1package compute
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
22
23// AccessURI a disk access SAS uri.
24type AccessURI struct {
25	autorest.Response `json:"-"`
26	// AccessSAS - READ-ONLY; A SAS uri for accessing a disk.
27	AccessSAS *string `json:"accessSAS,omitempty"`
28}
29
30// MarshalJSON is the custom marshaler for AccessURI.
31func (au AccessURI) MarshalJSON() ([]byte, error) {
32	objectMap := make(map[string]interface{})
33	return json.Marshal(objectMap)
34}
35
36// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale
37// set.
38type AdditionalCapabilities struct {
39	// UltraSSDEnabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
40	UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`
41}
42
43// AdditionalUnattendContent specifies additional XML formatted information that can be included in the
44// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name,
45// and the pass in which the content is applied.
46type AdditionalUnattendContent struct {
47	// PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem'
48	PassName PassNames `json:"passName,omitempty"`
49	// ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'MicrosoftWindowsShellSetup'
50	ComponentName ComponentNames `json:"componentName,omitempty"`
51	// SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands'
52	SettingName SettingNames `json:"settingName,omitempty"`
53	// Content - Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
54	Content *string `json:"content,omitempty"`
55}
56
57// APIEntityReference the API entity reference.
58type APIEntityReference struct {
59	// ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
60	ID *string `json:"id,omitempty"`
61}
62
63// APIError api error.
64type APIError struct {
65	// Details - The Api error details
66	Details *[]APIErrorBase `json:"details,omitempty"`
67	// Innererror - The Api inner error
68	Innererror *InnerError `json:"innererror,omitempty"`
69	// Code - The error code.
70	Code *string `json:"code,omitempty"`
71	// Target - The target of the particular error.
72	Target *string `json:"target,omitempty"`
73	// Message - The error message.
74	Message *string `json:"message,omitempty"`
75}
76
77// APIErrorBase api error base.
78type APIErrorBase struct {
79	// Code - The error code.
80	Code *string `json:"code,omitempty"`
81	// Target - The target of the particular error.
82	Target *string `json:"target,omitempty"`
83	// Message - The error message.
84	Message *string `json:"message,omitempty"`
85}
86
87// AutomaticOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade.
88type AutomaticOSUpgradePolicy struct {
89	// EnableAutomaticOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. <br><br> If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true.
90	EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"`
91	// DisableAutomaticRollback - Whether OS image rollback feature should be disabled. Default value is false.
92	DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"`
93}
94
95// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image.
96type AutomaticOSUpgradeProperties struct {
97	// AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image.
98	AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"`
99}
100
101// AutomaticRepairsPolicy specifies the configuration parameters for automatic repairs on the virtual
102// machine scale set.
103type AutomaticRepairsPolicy struct {
104	// Enabled - Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
105	Enabled *bool `json:"enabled,omitempty"`
106	// GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
107	GracePeriod *string `json:"gracePeriod,omitempty"`
108}
109
110// AvailabilitySet specifies information about the availability set that the virtual machine should be
111// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to
112// maximize availability. For more information about availability sets, see [Manage the availability of
113// virtual
114// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
115// <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual
116// machines in
117// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
118// <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot
119// be added to an availability set.
120type AvailabilitySet struct {
121	autorest.Response          `json:"-"`
122	*AvailabilitySetProperties `json:"properties,omitempty"`
123	// Sku - Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.
124	Sku *Sku `json:"sku,omitempty"`
125	// ID - READ-ONLY; Resource Id
126	ID *string `json:"id,omitempty"`
127	// Name - READ-ONLY; Resource name
128	Name *string `json:"name,omitempty"`
129	// Type - READ-ONLY; Resource type
130	Type *string `json:"type,omitempty"`
131	// Location - Resource location
132	Location *string `json:"location,omitempty"`
133	// Tags - Resource tags
134	Tags map[string]*string `json:"tags"`
135}
136
137// MarshalJSON is the custom marshaler for AvailabilitySet.
138func (as AvailabilitySet) MarshalJSON() ([]byte, error) {
139	objectMap := make(map[string]interface{})
140	if as.AvailabilitySetProperties != nil {
141		objectMap["properties"] = as.AvailabilitySetProperties
142	}
143	if as.Sku != nil {
144		objectMap["sku"] = as.Sku
145	}
146	if as.Location != nil {
147		objectMap["location"] = as.Location
148	}
149	if as.Tags != nil {
150		objectMap["tags"] = as.Tags
151	}
152	return json.Marshal(objectMap)
153}
154
155// UnmarshalJSON is the custom unmarshaler for AvailabilitySet struct.
156func (as *AvailabilitySet) UnmarshalJSON(body []byte) error {
157	var m map[string]*json.RawMessage
158	err := json.Unmarshal(body, &m)
159	if err != nil {
160		return err
161	}
162	for k, v := range m {
163		switch k {
164		case "properties":
165			if v != nil {
166				var availabilitySetProperties AvailabilitySetProperties
167				err = json.Unmarshal(*v, &availabilitySetProperties)
168				if err != nil {
169					return err
170				}
171				as.AvailabilitySetProperties = &availabilitySetProperties
172			}
173		case "sku":
174			if v != nil {
175				var sku Sku
176				err = json.Unmarshal(*v, &sku)
177				if err != nil {
178					return err
179				}
180				as.Sku = &sku
181			}
182		case "id":
183			if v != nil {
184				var ID string
185				err = json.Unmarshal(*v, &ID)
186				if err != nil {
187					return err
188				}
189				as.ID = &ID
190			}
191		case "name":
192			if v != nil {
193				var name string
194				err = json.Unmarshal(*v, &name)
195				if err != nil {
196					return err
197				}
198				as.Name = &name
199			}
200		case "type":
201			if v != nil {
202				var typeVar string
203				err = json.Unmarshal(*v, &typeVar)
204				if err != nil {
205					return err
206				}
207				as.Type = &typeVar
208			}
209		case "location":
210			if v != nil {
211				var location string
212				err = json.Unmarshal(*v, &location)
213				if err != nil {
214					return err
215				}
216				as.Location = &location
217			}
218		case "tags":
219			if v != nil {
220				var tags map[string]*string
221				err = json.Unmarshal(*v, &tags)
222				if err != nil {
223					return err
224				}
225				as.Tags = tags
226			}
227		}
228	}
229
230	return nil
231}
232
233// AvailabilitySetListResult the List Availability Set operation response.
234type AvailabilitySetListResult struct {
235	autorest.Response `json:"-"`
236	// Value - The list of availability sets
237	Value *[]AvailabilitySet `json:"value,omitempty"`
238	// NextLink - The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets.
239	NextLink *string `json:"nextLink,omitempty"`
240}
241
242// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values.
243type AvailabilitySetListResultIterator struct {
244	i    int
245	page AvailabilitySetListResultPage
246}
247
248// NextWithContext advances to the next value.  If there was an error making
249// the request the iterator does not advance and the error is returned.
250func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) {
251	if tracing.IsEnabled() {
252		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.NextWithContext")
253		defer func() {
254			sc := -1
255			if iter.Response().Response.Response != nil {
256				sc = iter.Response().Response.Response.StatusCode
257			}
258			tracing.EndSpan(ctx, sc, err)
259		}()
260	}
261	iter.i++
262	if iter.i < len(iter.page.Values()) {
263		return nil
264	}
265	err = iter.page.NextWithContext(ctx)
266	if err != nil {
267		iter.i--
268		return err
269	}
270	iter.i = 0
271	return nil
272}
273
274// Next advances to the next value.  If there was an error making
275// the request the iterator does not advance and the error is returned.
276// Deprecated: Use NextWithContext() instead.
277func (iter *AvailabilitySetListResultIterator) Next() error {
278	return iter.NextWithContext(context.Background())
279}
280
281// NotDone returns true if the enumeration should be started or is not yet complete.
282func (iter AvailabilitySetListResultIterator) NotDone() bool {
283	return iter.page.NotDone() && iter.i < len(iter.page.Values())
284}
285
286// Response returns the raw server response from the last page request.
287func (iter AvailabilitySetListResultIterator) Response() AvailabilitySetListResult {
288	return iter.page.Response()
289}
290
291// Value returns the current value or a zero-initialized value if the
292// iterator has advanced beyond the end of the collection.
293func (iter AvailabilitySetListResultIterator) Value() AvailabilitySet {
294	if !iter.page.NotDone() {
295		return AvailabilitySet{}
296	}
297	return iter.page.Values()[iter.i]
298}
299
300// Creates a new instance of the AvailabilitySetListResultIterator type.
301func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator {
302	return AvailabilitySetListResultIterator{page: page}
303}
304
305// IsEmpty returns true if the ListResult contains no values.
306func (aslr AvailabilitySetListResult) IsEmpty() bool {
307	return aslr.Value == nil || len(*aslr.Value) == 0
308}
309
310// hasNextLink returns true if the NextLink is not empty.
311func (aslr AvailabilitySetListResult) hasNextLink() bool {
312	return aslr.NextLink != nil && len(*aslr.NextLink) != 0
313}
314
315// availabilitySetListResultPreparer prepares a request to retrieve the next set of results.
316// It returns nil if no more results exist.
317func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer(ctx context.Context) (*http.Request, error) {
318	if !aslr.hasNextLink() {
319		return nil, nil
320	}
321	return autorest.Prepare((&http.Request{}).WithContext(ctx),
322		autorest.AsJSON(),
323		autorest.AsGet(),
324		autorest.WithBaseURL(to.String(aslr.NextLink)))
325}
326
327// AvailabilitySetListResultPage contains a page of AvailabilitySet values.
328type AvailabilitySetListResultPage struct {
329	fn   func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)
330	aslr AvailabilitySetListResult
331}
332
333// NextWithContext advances to the next page of values.  If there was an error making
334// the request the page does not advance and the error is returned.
335func (page *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) (err error) {
336	if tracing.IsEnabled() {
337		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultPage.NextWithContext")
338		defer func() {
339			sc := -1
340			if page.Response().Response.Response != nil {
341				sc = page.Response().Response.Response.StatusCode
342			}
343			tracing.EndSpan(ctx, sc, err)
344		}()
345	}
346	for {
347		next, err := page.fn(ctx, page.aslr)
348		if err != nil {
349			return err
350		}
351		page.aslr = next
352		if !next.hasNextLink() || !next.IsEmpty() {
353			break
354		}
355	}
356	return nil
357}
358
359// Next advances to the next page of values.  If there was an error making
360// the request the page does not advance and the error is returned.
361// Deprecated: Use NextWithContext() instead.
362func (page *AvailabilitySetListResultPage) Next() error {
363	return page.NextWithContext(context.Background())
364}
365
366// NotDone returns true if the page enumeration should be started or is not yet complete.
367func (page AvailabilitySetListResultPage) NotDone() bool {
368	return !page.aslr.IsEmpty()
369}
370
371// Response returns the raw server response from the last page request.
372func (page AvailabilitySetListResultPage) Response() AvailabilitySetListResult {
373	return page.aslr
374}
375
376// Values returns the slice of values for the current page or nil if there are no values.
377func (page AvailabilitySetListResultPage) Values() []AvailabilitySet {
378	if page.aslr.IsEmpty() {
379		return nil
380	}
381	return *page.aslr.Value
382}
383
384// Creates a new instance of the AvailabilitySetListResultPage type.
385func NewAvailabilitySetListResultPage(cur AvailabilitySetListResult, getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage {
386	return AvailabilitySetListResultPage{
387		fn:   getNextPage,
388		aslr: cur,
389	}
390}
391
392// AvailabilitySetProperties the instance view of a resource.
393type AvailabilitySetProperties struct {
394	// PlatformUpdateDomainCount - Update Domain count.
395	PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"`
396	// PlatformFaultDomainCount - Fault Domain count.
397	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
398	// VirtualMachines - A list of references to all virtual machines in the availability set.
399	VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"`
400	// ProximityPlacementGroup - Specifies information about the proximity placement group that the availability set should be assigned to. <br><br>Minimum api-version: 2018-04-01.
401	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
402	// Statuses - READ-ONLY; The resource status information.
403	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
404}
405
406// MarshalJSON is the custom marshaler for AvailabilitySetProperties.
407func (asp AvailabilitySetProperties) MarshalJSON() ([]byte, error) {
408	objectMap := make(map[string]interface{})
409	if asp.PlatformUpdateDomainCount != nil {
410		objectMap["platformUpdateDomainCount"] = asp.PlatformUpdateDomainCount
411	}
412	if asp.PlatformFaultDomainCount != nil {
413		objectMap["platformFaultDomainCount"] = asp.PlatformFaultDomainCount
414	}
415	if asp.VirtualMachines != nil {
416		objectMap["virtualMachines"] = asp.VirtualMachines
417	}
418	if asp.ProximityPlacementGroup != nil {
419		objectMap["proximityPlacementGroup"] = asp.ProximityPlacementGroup
420	}
421	return json.Marshal(objectMap)
422}
423
424// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should
425// be assigned to. Only tags may be updated.
426type AvailabilitySetUpdate struct {
427	*AvailabilitySetProperties `json:"properties,omitempty"`
428	// Sku - Sku of the availability set
429	Sku *Sku `json:"sku,omitempty"`
430	// Tags - Resource tags
431	Tags map[string]*string `json:"tags"`
432}
433
434// MarshalJSON is the custom marshaler for AvailabilitySetUpdate.
435func (asu AvailabilitySetUpdate) MarshalJSON() ([]byte, error) {
436	objectMap := make(map[string]interface{})
437	if asu.AvailabilitySetProperties != nil {
438		objectMap["properties"] = asu.AvailabilitySetProperties
439	}
440	if asu.Sku != nil {
441		objectMap["sku"] = asu.Sku
442	}
443	if asu.Tags != nil {
444		objectMap["tags"] = asu.Tags
445	}
446	return json.Marshal(objectMap)
447}
448
449// UnmarshalJSON is the custom unmarshaler for AvailabilitySetUpdate struct.
450func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
451	var m map[string]*json.RawMessage
452	err := json.Unmarshal(body, &m)
453	if err != nil {
454		return err
455	}
456	for k, v := range m {
457		switch k {
458		case "properties":
459			if v != nil {
460				var availabilitySetProperties AvailabilitySetProperties
461				err = json.Unmarshal(*v, &availabilitySetProperties)
462				if err != nil {
463					return err
464				}
465				asu.AvailabilitySetProperties = &availabilitySetProperties
466			}
467		case "sku":
468			if v != nil {
469				var sku Sku
470				err = json.Unmarshal(*v, &sku)
471				if err != nil {
472					return err
473				}
474				asu.Sku = &sku
475			}
476		case "tags":
477			if v != nil {
478				var tags map[string]*string
479				err = json.Unmarshal(*v, &tags)
480				if err != nil {
481					return err
482				}
483				asu.Tags = tags
484			}
485		}
486	}
487
488	return nil
489}
490
491// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS. <br><br>Minimum
492// api-version: 2019-03-01.
493type BillingProfile struct {
494	// MaxPrice - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if  the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01.
495	MaxPrice *float64 `json:"maxPrice,omitempty"`
496}
497
498// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and
499// Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br>
500// Azure also enables you to see a screenshot of the VM from the hypervisor.
501type BootDiagnostics struct {
502	// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
503	Enabled *bool `json:"enabled,omitempty"`
504	// StorageURI - Uri of the storage account to use for placing the console output and screenshot.
505	StorageURI *string `json:"storageUri,omitempty"`
506}
507
508// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics.
509type BootDiagnosticsInstanceView struct {
510	// ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI.
511	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
512	// SerialConsoleLogBlobURI - READ-ONLY; The Linux serial console log blob Uri.
513	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
514	// Status - READ-ONLY; The boot diagnostics status information for the VM. <br><br> NOTE: It will be set only if there are errors encountered in enabling boot diagnostics.
515	Status *InstanceViewStatus `json:"status,omitempty"`
516}
517
518// MarshalJSON is the custom marshaler for BootDiagnosticsInstanceView.
519func (bdiv BootDiagnosticsInstanceView) MarshalJSON() ([]byte, error) {
520	objectMap := make(map[string]interface{})
521	return json.Marshal(objectMap)
522}
523
524// CloudError an error response from the Gallery service.
525type CloudError struct {
526	Error *APIError `json:"error,omitempty"`
527}
528
529// ContainerService container service.
530type ContainerService struct {
531	autorest.Response           `json:"-"`
532	*ContainerServiceProperties `json:"properties,omitempty"`
533	// ID - READ-ONLY; Resource Id
534	ID *string `json:"id,omitempty"`
535	// Name - READ-ONLY; Resource name
536	Name *string `json:"name,omitempty"`
537	// Type - READ-ONLY; Resource type
538	Type *string `json:"type,omitempty"`
539	// Location - Resource location
540	Location *string `json:"location,omitempty"`
541	// Tags - Resource tags
542	Tags map[string]*string `json:"tags"`
543}
544
545// MarshalJSON is the custom marshaler for ContainerService.
546func (cs ContainerService) MarshalJSON() ([]byte, error) {
547	objectMap := make(map[string]interface{})
548	if cs.ContainerServiceProperties != nil {
549		objectMap["properties"] = cs.ContainerServiceProperties
550	}
551	if cs.Location != nil {
552		objectMap["location"] = cs.Location
553	}
554	if cs.Tags != nil {
555		objectMap["tags"] = cs.Tags
556	}
557	return json.Marshal(objectMap)
558}
559
560// UnmarshalJSON is the custom unmarshaler for ContainerService struct.
561func (cs *ContainerService) UnmarshalJSON(body []byte) error {
562	var m map[string]*json.RawMessage
563	err := json.Unmarshal(body, &m)
564	if err != nil {
565		return err
566	}
567	for k, v := range m {
568		switch k {
569		case "properties":
570			if v != nil {
571				var containerServiceProperties ContainerServiceProperties
572				err = json.Unmarshal(*v, &containerServiceProperties)
573				if err != nil {
574					return err
575				}
576				cs.ContainerServiceProperties = &containerServiceProperties
577			}
578		case "id":
579			if v != nil {
580				var ID string
581				err = json.Unmarshal(*v, &ID)
582				if err != nil {
583					return err
584				}
585				cs.ID = &ID
586			}
587		case "name":
588			if v != nil {
589				var name string
590				err = json.Unmarshal(*v, &name)
591				if err != nil {
592					return err
593				}
594				cs.Name = &name
595			}
596		case "type":
597			if v != nil {
598				var typeVar string
599				err = json.Unmarshal(*v, &typeVar)
600				if err != nil {
601					return err
602				}
603				cs.Type = &typeVar
604			}
605		case "location":
606			if v != nil {
607				var location string
608				err = json.Unmarshal(*v, &location)
609				if err != nil {
610					return err
611				}
612				cs.Location = &location
613			}
614		case "tags":
615			if v != nil {
616				var tags map[string]*string
617				err = json.Unmarshal(*v, &tags)
618				if err != nil {
619					return err
620				}
621				cs.Tags = tags
622			}
623		}
624	}
625
626	return nil
627}
628
629// ContainerServiceAgentPoolProfile profile for the container service agent pool.
630type ContainerServiceAgentPoolProfile struct {
631	// Name - Unique name of the agent pool profile in the context of the subscription and resource group.
632	Name *string `json:"name,omitempty"`
633	// Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
634	Count *int32 `json:"count,omitempty"`
635	// VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA2', 'StandardA3', 'StandardA4', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA9', 'StandardA10', 'StandardA11', 'StandardD1', 'StandardD2', 'StandardD3', 'StandardD4', 'StandardD11', 'StandardD12', 'StandardD13', 'StandardD14', 'StandardD1V2', 'StandardD2V2', 'StandardD3V2', 'StandardD4V2', 'StandardD5V2', 'StandardD11V2', 'StandardD12V2', 'StandardD13V2', 'StandardD14V2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardDS1', 'StandardDS2', 'StandardDS3', 'StandardDS4', 'StandardDS11', 'StandardDS12', 'StandardDS13', 'StandardDS14', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5'
636	VMSize ContainerServiceVMSizeTypes `json:"vmSize,omitempty"`
637	// DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool.
638	DNSPrefix *string `json:"dnsPrefix,omitempty"`
639	// Fqdn - READ-ONLY; FQDN for the agent pool.
640	Fqdn *string `json:"fqdn,omitempty"`
641}
642
643// MarshalJSON is the custom marshaler for ContainerServiceAgentPoolProfile.
644func (csapp ContainerServiceAgentPoolProfile) MarshalJSON() ([]byte, error) {
645	objectMap := make(map[string]interface{})
646	if csapp.Name != nil {
647		objectMap["name"] = csapp.Name
648	}
649	if csapp.Count != nil {
650		objectMap["count"] = csapp.Count
651	}
652	if csapp.VMSize != "" {
653		objectMap["vmSize"] = csapp.VMSize
654	}
655	if csapp.DNSPrefix != nil {
656		objectMap["dnsPrefix"] = csapp.DNSPrefix
657	}
658	return json.Marshal(objectMap)
659}
660
661// ContainerServiceCustomProfile properties to configure a custom container service cluster.
662type ContainerServiceCustomProfile struct {
663	// Orchestrator - The name of the custom orchestrator to use.
664	Orchestrator *string `json:"orchestrator,omitempty"`
665}
666
667// ContainerServiceDiagnosticsProfile ...
668type ContainerServiceDiagnosticsProfile struct {
669	// VMDiagnostics - Profile for the container service VM diagnostic agent.
670	VMDiagnostics *ContainerServiceVMDiagnostics `json:"vmDiagnostics,omitempty"`
671}
672
673// ContainerServiceLinuxProfile profile for Linux VMs in the container service cluster.
674type ContainerServiceLinuxProfile struct {
675	// AdminUsername - The administrator username to use for Linux VMs.
676	AdminUsername *string `json:"adminUsername,omitempty"`
677	// SSH - The ssh key configuration for Linux VMs.
678	SSH *ContainerServiceSSHConfiguration `json:"ssh,omitempty"`
679}
680
681// ContainerServiceListResult the response from the List Container Services operation.
682type ContainerServiceListResult struct {
683	autorest.Response `json:"-"`
684	// Value - the list of container services.
685	Value *[]ContainerService `json:"value,omitempty"`
686	// NextLink - The URL to get the next set of container service results.
687	NextLink *string `json:"nextLink,omitempty"`
688}
689
690// ContainerServiceListResultIterator provides access to a complete listing of ContainerService values.
691type ContainerServiceListResultIterator struct {
692	i    int
693	page ContainerServiceListResultPage
694}
695
696// NextWithContext advances to the next value.  If there was an error making
697// the request the iterator does not advance and the error is returned.
698func (iter *ContainerServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
699	if tracing.IsEnabled() {
700		ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultIterator.NextWithContext")
701		defer func() {
702			sc := -1
703			if iter.Response().Response.Response != nil {
704				sc = iter.Response().Response.Response.StatusCode
705			}
706			tracing.EndSpan(ctx, sc, err)
707		}()
708	}
709	iter.i++
710	if iter.i < len(iter.page.Values()) {
711		return nil
712	}
713	err = iter.page.NextWithContext(ctx)
714	if err != nil {
715		iter.i--
716		return err
717	}
718	iter.i = 0
719	return nil
720}
721
722// Next advances to the next value.  If there was an error making
723// the request the iterator does not advance and the error is returned.
724// Deprecated: Use NextWithContext() instead.
725func (iter *ContainerServiceListResultIterator) Next() error {
726	return iter.NextWithContext(context.Background())
727}
728
729// NotDone returns true if the enumeration should be started or is not yet complete.
730func (iter ContainerServiceListResultIterator) NotDone() bool {
731	return iter.page.NotDone() && iter.i < len(iter.page.Values())
732}
733
734// Response returns the raw server response from the last page request.
735func (iter ContainerServiceListResultIterator) Response() ContainerServiceListResult {
736	return iter.page.Response()
737}
738
739// Value returns the current value or a zero-initialized value if the
740// iterator has advanced beyond the end of the collection.
741func (iter ContainerServiceListResultIterator) Value() ContainerService {
742	if !iter.page.NotDone() {
743		return ContainerService{}
744	}
745	return iter.page.Values()[iter.i]
746}
747
748// Creates a new instance of the ContainerServiceListResultIterator type.
749func NewContainerServiceListResultIterator(page ContainerServiceListResultPage) ContainerServiceListResultIterator {
750	return ContainerServiceListResultIterator{page: page}
751}
752
753// IsEmpty returns true if the ListResult contains no values.
754func (cslr ContainerServiceListResult) IsEmpty() bool {
755	return cslr.Value == nil || len(*cslr.Value) == 0
756}
757
758// hasNextLink returns true if the NextLink is not empty.
759func (cslr ContainerServiceListResult) hasNextLink() bool {
760	return cslr.NextLink != nil && len(*cslr.NextLink) != 0
761}
762
763// containerServiceListResultPreparer prepares a request to retrieve the next set of results.
764// It returns nil if no more results exist.
765func (cslr ContainerServiceListResult) containerServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
766	if !cslr.hasNextLink() {
767		return nil, nil
768	}
769	return autorest.Prepare((&http.Request{}).WithContext(ctx),
770		autorest.AsJSON(),
771		autorest.AsGet(),
772		autorest.WithBaseURL(to.String(cslr.NextLink)))
773}
774
775// ContainerServiceListResultPage contains a page of ContainerService values.
776type ContainerServiceListResultPage struct {
777	fn   func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)
778	cslr ContainerServiceListResult
779}
780
781// NextWithContext advances to the next page of values.  If there was an error making
782// the request the page does not advance and the error is returned.
783func (page *ContainerServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
784	if tracing.IsEnabled() {
785		ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultPage.NextWithContext")
786		defer func() {
787			sc := -1
788			if page.Response().Response.Response != nil {
789				sc = page.Response().Response.Response.StatusCode
790			}
791			tracing.EndSpan(ctx, sc, err)
792		}()
793	}
794	for {
795		next, err := page.fn(ctx, page.cslr)
796		if err != nil {
797			return err
798		}
799		page.cslr = next
800		if !next.hasNextLink() || !next.IsEmpty() {
801			break
802		}
803	}
804	return nil
805}
806
807// Next advances to the next page of values.  If there was an error making
808// the request the page does not advance and the error is returned.
809// Deprecated: Use NextWithContext() instead.
810func (page *ContainerServiceListResultPage) Next() error {
811	return page.NextWithContext(context.Background())
812}
813
814// NotDone returns true if the page enumeration should be started or is not yet complete.
815func (page ContainerServiceListResultPage) NotDone() bool {
816	return !page.cslr.IsEmpty()
817}
818
819// Response returns the raw server response from the last page request.
820func (page ContainerServiceListResultPage) Response() ContainerServiceListResult {
821	return page.cslr
822}
823
824// Values returns the slice of values for the current page or nil if there are no values.
825func (page ContainerServiceListResultPage) Values() []ContainerService {
826	if page.cslr.IsEmpty() {
827		return nil
828	}
829	return *page.cslr.Value
830}
831
832// Creates a new instance of the ContainerServiceListResultPage type.
833func NewContainerServiceListResultPage(cur ContainerServiceListResult, getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage {
834	return ContainerServiceListResultPage{
835		fn:   getNextPage,
836		cslr: cur,
837	}
838}
839
840// ContainerServiceMasterProfile profile for the container service master.
841type ContainerServiceMasterProfile struct {
842	// Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.
843	Count *int32 `json:"count,omitempty"`
844	// DNSPrefix - DNS prefix to be used to create the FQDN for master.
845	DNSPrefix *string `json:"dnsPrefix,omitempty"`
846	// Fqdn - READ-ONLY; FQDN for the master.
847	Fqdn *string `json:"fqdn,omitempty"`
848}
849
850// MarshalJSON is the custom marshaler for ContainerServiceMasterProfile.
851func (csmp ContainerServiceMasterProfile) MarshalJSON() ([]byte, error) {
852	objectMap := make(map[string]interface{})
853	if csmp.Count != nil {
854		objectMap["count"] = csmp.Count
855	}
856	if csmp.DNSPrefix != nil {
857		objectMap["dnsPrefix"] = csmp.DNSPrefix
858	}
859	return json.Marshal(objectMap)
860}
861
862// ContainerServiceOrchestratorProfile profile for the container service orchestrator.
863type ContainerServiceOrchestratorProfile struct {
864	// OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Swarm, DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', 'Kubernetes'
865	OrchestratorType ContainerServiceOrchestratorTypes `json:"orchestratorType,omitempty"`
866}
867
868// ContainerServiceProperties properties of the container service.
869type ContainerServiceProperties struct {
870	// ProvisioningState - READ-ONLY; the current deployment or provisioning state, which only appears in the response.
871	ProvisioningState *string `json:"provisioningState,omitempty"`
872	// OrchestratorProfile - Properties of the orchestrator.
873	OrchestratorProfile *ContainerServiceOrchestratorProfile `json:"orchestratorProfile,omitempty"`
874	// CustomProfile - Properties for custom clusters.
875	CustomProfile *ContainerServiceCustomProfile `json:"customProfile,omitempty"`
876	// ServicePrincipalProfile - Properties for cluster service principals.
877	ServicePrincipalProfile *ContainerServiceServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
878	// MasterProfile - Properties of master agents.
879	MasterProfile *ContainerServiceMasterProfile `json:"masterProfile,omitempty"`
880	// AgentPoolProfiles - Properties of the agent pool.
881	AgentPoolProfiles *[]ContainerServiceAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
882	// WindowsProfile - Properties of Windows VMs.
883	WindowsProfile *ContainerServiceWindowsProfile `json:"windowsProfile,omitempty"`
884	// LinuxProfile - Properties of Linux VMs.
885	LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"`
886	// DiagnosticsProfile - Properties of the diagnostic agent.
887	DiagnosticsProfile *ContainerServiceDiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
888}
889
890// MarshalJSON is the custom marshaler for ContainerServiceProperties.
891func (csp ContainerServiceProperties) MarshalJSON() ([]byte, error) {
892	objectMap := make(map[string]interface{})
893	if csp.OrchestratorProfile != nil {
894		objectMap["orchestratorProfile"] = csp.OrchestratorProfile
895	}
896	if csp.CustomProfile != nil {
897		objectMap["customProfile"] = csp.CustomProfile
898	}
899	if csp.ServicePrincipalProfile != nil {
900		objectMap["servicePrincipalProfile"] = csp.ServicePrincipalProfile
901	}
902	if csp.MasterProfile != nil {
903		objectMap["masterProfile"] = csp.MasterProfile
904	}
905	if csp.AgentPoolProfiles != nil {
906		objectMap["agentPoolProfiles"] = csp.AgentPoolProfiles
907	}
908	if csp.WindowsProfile != nil {
909		objectMap["windowsProfile"] = csp.WindowsProfile
910	}
911	if csp.LinuxProfile != nil {
912		objectMap["linuxProfile"] = csp.LinuxProfile
913	}
914	if csp.DiagnosticsProfile != nil {
915		objectMap["diagnosticsProfile"] = csp.DiagnosticsProfile
916	}
917	return json.Marshal(objectMap)
918}
919
920// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
921// long-running operation.
922type ContainerServicesCreateOrUpdateFuture struct {
923	azure.FutureAPI
924	// Result returns the result of the asynchronous operation.
925	// If the operation has not completed it will return an error.
926	Result func(ContainerServicesClient) (ContainerService, error)
927}
928
929// UnmarshalJSON is the custom unmarshaller for CreateFuture.
930func (future *ContainerServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
931	var azFuture azure.Future
932	if err := json.Unmarshal(body, &azFuture); err != nil {
933		return err
934	}
935	future.FutureAPI = &azFuture
936	future.Result = future.result
937	return nil
938}
939
940// result is the default implementation for ContainerServicesCreateOrUpdateFuture.Result.
941func (future *ContainerServicesCreateOrUpdateFuture) result(client ContainerServicesClient) (cs ContainerService, err error) {
942	var done bool
943	done, err = future.DoneWithContext(context.Background(), client)
944	if err != nil {
945		err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
946		return
947	}
948	if !done {
949		cs.Response.Response = future.Response()
950		err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
951		return
952	}
953	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
954	if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
955		cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
956		if err != nil {
957			err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
958		}
959	}
960	return
961}
962
963// ContainerServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
964// operation.
965type ContainerServicesDeleteFuture struct {
966	azure.FutureAPI
967	// Result returns the result of the asynchronous operation.
968	// If the operation has not completed it will return an error.
969	Result func(ContainerServicesClient) (autorest.Response, error)
970}
971
972// UnmarshalJSON is the custom unmarshaller for CreateFuture.
973func (future *ContainerServicesDeleteFuture) UnmarshalJSON(body []byte) error {
974	var azFuture azure.Future
975	if err := json.Unmarshal(body, &azFuture); err != nil {
976		return err
977	}
978	future.FutureAPI = &azFuture
979	future.Result = future.result
980	return nil
981}
982
983// result is the default implementation for ContainerServicesDeleteFuture.Result.
984func (future *ContainerServicesDeleteFuture) result(client ContainerServicesClient) (ar autorest.Response, err error) {
985	var done bool
986	done, err = future.DoneWithContext(context.Background(), client)
987	if err != nil {
988		err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Polling failure")
989		return
990	}
991	if !done {
992		ar.Response = future.Response()
993		err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
994		return
995	}
996	ar.Response = future.Response()
997	return
998}
999
1000// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster
1001// to use for manipulating Azure APIs.
1002type ContainerServiceServicePrincipalProfile struct {
1003	// ClientID - The ID for the service principal.
1004	ClientID *string `json:"clientId,omitempty"`
1005	// Secret - The secret password associated with the service principal.
1006	Secret *string `json:"secret,omitempty"`
1007}
1008
1009// ContainerServiceSSHConfiguration SSH configuration for Linux-based VMs running on Azure.
1010type ContainerServiceSSHConfiguration struct {
1011	// PublicKeys - the list of SSH public keys used to authenticate with Linux-based VMs.
1012	PublicKeys *[]ContainerServiceSSHPublicKey `json:"publicKeys,omitempty"`
1013}
1014
1015// ContainerServiceSSHPublicKey contains information about SSH certificate public key data.
1016type ContainerServiceSSHPublicKey struct {
1017	// KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers.
1018	KeyData *string `json:"keyData,omitempty"`
1019}
1020
1021// ContainerServiceVMDiagnostics profile for diagnostics on the container service VMs.
1022type ContainerServiceVMDiagnostics struct {
1023	// Enabled - Whether the VM diagnostic agent is provisioned on the VM.
1024	Enabled *bool `json:"enabled,omitempty"`
1025	// StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored.
1026	StorageURI *string `json:"storageUri,omitempty"`
1027}
1028
1029// MarshalJSON is the custom marshaler for ContainerServiceVMDiagnostics.
1030func (csvd ContainerServiceVMDiagnostics) MarshalJSON() ([]byte, error) {
1031	objectMap := make(map[string]interface{})
1032	if csvd.Enabled != nil {
1033		objectMap["enabled"] = csvd.Enabled
1034	}
1035	return json.Marshal(objectMap)
1036}
1037
1038// ContainerServiceWindowsProfile profile for Windows VMs in the container service cluster.
1039type ContainerServiceWindowsProfile struct {
1040	// AdminUsername - The administrator username to use for Windows VMs.
1041	AdminUsername *string `json:"adminUsername,omitempty"`
1042	// AdminPassword - The administrator password to use for Windows VMs.
1043	AdminPassword *string `json:"adminPassword,omitempty"`
1044}
1045
1046// CreationData data used when creating a disk.
1047type CreationData struct {
1048	// CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload'
1049	CreateOption DiskCreateOption `json:"createOption,omitempty"`
1050	// StorageAccountID - If createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription
1051	StorageAccountID *string `json:"storageAccountId,omitempty"`
1052	// ImageReference - Disk source information.
1053	ImageReference *ImageDiskReference `json:"imageReference,omitempty"`
1054	// SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk.
1055	SourceURI *string `json:"sourceUri,omitempty"`
1056	// SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk.
1057	SourceResourceID *string `json:"sourceResourceId,omitempty"`
1058	// SourceUniqueID - READ-ONLY; If this field is set, this is the unique id identifying the source of this resource.
1059	SourceUniqueID *string `json:"sourceUniqueId,omitempty"`
1060	// UploadSizeBytes - If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
1061	UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"`
1062}
1063
1064// MarshalJSON is the custom marshaler for CreationData.
1065func (cd CreationData) MarshalJSON() ([]byte, error) {
1066	objectMap := make(map[string]interface{})
1067	if cd.CreateOption != "" {
1068		objectMap["createOption"] = cd.CreateOption
1069	}
1070	if cd.StorageAccountID != nil {
1071		objectMap["storageAccountId"] = cd.StorageAccountID
1072	}
1073	if cd.ImageReference != nil {
1074		objectMap["imageReference"] = cd.ImageReference
1075	}
1076	if cd.SourceURI != nil {
1077		objectMap["sourceUri"] = cd.SourceURI
1078	}
1079	if cd.SourceResourceID != nil {
1080		objectMap["sourceResourceId"] = cd.SourceResourceID
1081	}
1082	if cd.UploadSizeBytes != nil {
1083		objectMap["uploadSizeBytes"] = cd.UploadSizeBytes
1084	}
1085	return json.Marshal(objectMap)
1086}
1087
1088// DataDisk describes a data disk.
1089type DataDisk struct {
1090	// Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
1091	Lun *int32 `json:"lun,omitempty"`
1092	// Name - The disk name.
1093	Name *string `json:"name,omitempty"`
1094	// Vhd - The virtual hard disk.
1095	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
1096	// Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
1097	Image *VirtualHardDisk `json:"image,omitempty"`
1098	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
1099	Caching CachingTypes `json:"caching,omitempty"`
1100	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
1101	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
1102	// CreateOption - Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you  also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
1103	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
1104	// DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
1105	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
1106	// ManagedDisk - The managed disk parameters.
1107	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
1108	// ToBeDetached - Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
1109	ToBeDetached *bool `json:"toBeDetached,omitempty"`
1110}
1111
1112// DataDiskImage contains the data disk images information.
1113type DataDiskImage struct {
1114	// Lun - READ-ONLY; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
1115	Lun *int32 `json:"lun,omitempty"`
1116}
1117
1118// MarshalJSON is the custom marshaler for DataDiskImage.
1119func (ddi DataDiskImage) MarshalJSON() ([]byte, error) {
1120	objectMap := make(map[string]interface{})
1121	return json.Marshal(objectMap)
1122}
1123
1124// DedicatedHost specifies information about the Dedicated host.
1125type DedicatedHost struct {
1126	autorest.Response        `json:"-"`
1127	*DedicatedHostProperties `json:"properties,omitempty"`
1128	// Sku - SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values.
1129	Sku *Sku `json:"sku,omitempty"`
1130	// ID - READ-ONLY; Resource Id
1131	ID *string `json:"id,omitempty"`
1132	// Name - READ-ONLY; Resource name
1133	Name *string `json:"name,omitempty"`
1134	// Type - READ-ONLY; Resource type
1135	Type *string `json:"type,omitempty"`
1136	// Location - Resource location
1137	Location *string `json:"location,omitempty"`
1138	// Tags - Resource tags
1139	Tags map[string]*string `json:"tags"`
1140}
1141
1142// MarshalJSON is the custom marshaler for DedicatedHost.
1143func (dh DedicatedHost) MarshalJSON() ([]byte, error) {
1144	objectMap := make(map[string]interface{})
1145	if dh.DedicatedHostProperties != nil {
1146		objectMap["properties"] = dh.DedicatedHostProperties
1147	}
1148	if dh.Sku != nil {
1149		objectMap["sku"] = dh.Sku
1150	}
1151	if dh.Location != nil {
1152		objectMap["location"] = dh.Location
1153	}
1154	if dh.Tags != nil {
1155		objectMap["tags"] = dh.Tags
1156	}
1157	return json.Marshal(objectMap)
1158}
1159
1160// UnmarshalJSON is the custom unmarshaler for DedicatedHost struct.
1161func (dh *DedicatedHost) UnmarshalJSON(body []byte) error {
1162	var m map[string]*json.RawMessage
1163	err := json.Unmarshal(body, &m)
1164	if err != nil {
1165		return err
1166	}
1167	for k, v := range m {
1168		switch k {
1169		case "properties":
1170			if v != nil {
1171				var dedicatedHostProperties DedicatedHostProperties
1172				err = json.Unmarshal(*v, &dedicatedHostProperties)
1173				if err != nil {
1174					return err
1175				}
1176				dh.DedicatedHostProperties = &dedicatedHostProperties
1177			}
1178		case "sku":
1179			if v != nil {
1180				var sku Sku
1181				err = json.Unmarshal(*v, &sku)
1182				if err != nil {
1183					return err
1184				}
1185				dh.Sku = &sku
1186			}
1187		case "id":
1188			if v != nil {
1189				var ID string
1190				err = json.Unmarshal(*v, &ID)
1191				if err != nil {
1192					return err
1193				}
1194				dh.ID = &ID
1195			}
1196		case "name":
1197			if v != nil {
1198				var name string
1199				err = json.Unmarshal(*v, &name)
1200				if err != nil {
1201					return err
1202				}
1203				dh.Name = &name
1204			}
1205		case "type":
1206			if v != nil {
1207				var typeVar string
1208				err = json.Unmarshal(*v, &typeVar)
1209				if err != nil {
1210					return err
1211				}
1212				dh.Type = &typeVar
1213			}
1214		case "location":
1215			if v != nil {
1216				var location string
1217				err = json.Unmarshal(*v, &location)
1218				if err != nil {
1219					return err
1220				}
1221				dh.Location = &location
1222			}
1223		case "tags":
1224			if v != nil {
1225				var tags map[string]*string
1226				err = json.Unmarshal(*v, &tags)
1227				if err != nil {
1228					return err
1229				}
1230				dh.Tags = tags
1231			}
1232		}
1233	}
1234
1235	return nil
1236}
1237
1238// DedicatedHostAllocatableVM represents the dedicated host unutilized capacity in terms of a specific VM
1239// size.
1240type DedicatedHostAllocatableVM struct {
1241	// VMSize - VM size in terms of which the unutilized capacity is represented.
1242	VMSize *string `json:"vmSize,omitempty"`
1243	// Count - Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.
1244	Count *float64 `json:"count,omitempty"`
1245}
1246
1247// DedicatedHostAvailableCapacity dedicated host unutilized capacity.
1248type DedicatedHostAvailableCapacity struct {
1249	// AllocatableVMs - The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host.
1250	AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"`
1251}
1252
1253// DedicatedHostGroup specifies information about the dedicated host group that the dedicated hosts should
1254// be assigned to. <br><br> Currently, a dedicated host can only be added to a dedicated host group at
1255// creation time. An existing dedicated host cannot be added to another dedicated host group.
1256type DedicatedHostGroup struct {
1257	autorest.Response             `json:"-"`
1258	*DedicatedHostGroupProperties `json:"properties,omitempty"`
1259	// Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.
1260	Zones *[]string `json:"zones,omitempty"`
1261	// ID - READ-ONLY; Resource Id
1262	ID *string `json:"id,omitempty"`
1263	// Name - READ-ONLY; Resource name
1264	Name *string `json:"name,omitempty"`
1265	// Type - READ-ONLY; Resource type
1266	Type *string `json:"type,omitempty"`
1267	// Location - Resource location
1268	Location *string `json:"location,omitempty"`
1269	// Tags - Resource tags
1270	Tags map[string]*string `json:"tags"`
1271}
1272
1273// MarshalJSON is the custom marshaler for DedicatedHostGroup.
1274func (dhg DedicatedHostGroup) MarshalJSON() ([]byte, error) {
1275	objectMap := make(map[string]interface{})
1276	if dhg.DedicatedHostGroupProperties != nil {
1277		objectMap["properties"] = dhg.DedicatedHostGroupProperties
1278	}
1279	if dhg.Zones != nil {
1280		objectMap["zones"] = dhg.Zones
1281	}
1282	if dhg.Location != nil {
1283		objectMap["location"] = dhg.Location
1284	}
1285	if dhg.Tags != nil {
1286		objectMap["tags"] = dhg.Tags
1287	}
1288	return json.Marshal(objectMap)
1289}
1290
1291// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroup struct.
1292func (dhg *DedicatedHostGroup) UnmarshalJSON(body []byte) error {
1293	var m map[string]*json.RawMessage
1294	err := json.Unmarshal(body, &m)
1295	if err != nil {
1296		return err
1297	}
1298	for k, v := range m {
1299		switch k {
1300		case "properties":
1301			if v != nil {
1302				var dedicatedHostGroupProperties DedicatedHostGroupProperties
1303				err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
1304				if err != nil {
1305					return err
1306				}
1307				dhg.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
1308			}
1309		case "zones":
1310			if v != nil {
1311				var zones []string
1312				err = json.Unmarshal(*v, &zones)
1313				if err != nil {
1314					return err
1315				}
1316				dhg.Zones = &zones
1317			}
1318		case "id":
1319			if v != nil {
1320				var ID string
1321				err = json.Unmarshal(*v, &ID)
1322				if err != nil {
1323					return err
1324				}
1325				dhg.ID = &ID
1326			}
1327		case "name":
1328			if v != nil {
1329				var name string
1330				err = json.Unmarshal(*v, &name)
1331				if err != nil {
1332					return err
1333				}
1334				dhg.Name = &name
1335			}
1336		case "type":
1337			if v != nil {
1338				var typeVar string
1339				err = json.Unmarshal(*v, &typeVar)
1340				if err != nil {
1341					return err
1342				}
1343				dhg.Type = &typeVar
1344			}
1345		case "location":
1346			if v != nil {
1347				var location string
1348				err = json.Unmarshal(*v, &location)
1349				if err != nil {
1350					return err
1351				}
1352				dhg.Location = &location
1353			}
1354		case "tags":
1355			if v != nil {
1356				var tags map[string]*string
1357				err = json.Unmarshal(*v, &tags)
1358				if err != nil {
1359					return err
1360				}
1361				dhg.Tags = tags
1362			}
1363		}
1364	}
1365
1366	return nil
1367}
1368
1369// DedicatedHostGroupListResult the List Dedicated Host Group with resource group response.
1370type DedicatedHostGroupListResult struct {
1371	autorest.Response `json:"-"`
1372	// Value - The list of dedicated host groups
1373	Value *[]DedicatedHostGroup `json:"value,omitempty"`
1374	// NextLink - The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated Host Groups.
1375	NextLink *string `json:"nextLink,omitempty"`
1376}
1377
1378// DedicatedHostGroupListResultIterator provides access to a complete listing of DedicatedHostGroup values.
1379type DedicatedHostGroupListResultIterator struct {
1380	i    int
1381	page DedicatedHostGroupListResultPage
1382}
1383
1384// NextWithContext advances to the next value.  If there was an error making
1385// the request the iterator does not advance and the error is returned.
1386func (iter *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
1387	if tracing.IsEnabled() {
1388		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultIterator.NextWithContext")
1389		defer func() {
1390			sc := -1
1391			if iter.Response().Response.Response != nil {
1392				sc = iter.Response().Response.Response.StatusCode
1393			}
1394			tracing.EndSpan(ctx, sc, err)
1395		}()
1396	}
1397	iter.i++
1398	if iter.i < len(iter.page.Values()) {
1399		return nil
1400	}
1401	err = iter.page.NextWithContext(ctx)
1402	if err != nil {
1403		iter.i--
1404		return err
1405	}
1406	iter.i = 0
1407	return nil
1408}
1409
1410// Next advances to the next value.  If there was an error making
1411// the request the iterator does not advance and the error is returned.
1412// Deprecated: Use NextWithContext() instead.
1413func (iter *DedicatedHostGroupListResultIterator) Next() error {
1414	return iter.NextWithContext(context.Background())
1415}
1416
1417// NotDone returns true if the enumeration should be started or is not yet complete.
1418func (iter DedicatedHostGroupListResultIterator) NotDone() bool {
1419	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1420}
1421
1422// Response returns the raw server response from the last page request.
1423func (iter DedicatedHostGroupListResultIterator) Response() DedicatedHostGroupListResult {
1424	return iter.page.Response()
1425}
1426
1427// Value returns the current value or a zero-initialized value if the
1428// iterator has advanced beyond the end of the collection.
1429func (iter DedicatedHostGroupListResultIterator) Value() DedicatedHostGroup {
1430	if !iter.page.NotDone() {
1431		return DedicatedHostGroup{}
1432	}
1433	return iter.page.Values()[iter.i]
1434}
1435
1436// Creates a new instance of the DedicatedHostGroupListResultIterator type.
1437func NewDedicatedHostGroupListResultIterator(page DedicatedHostGroupListResultPage) DedicatedHostGroupListResultIterator {
1438	return DedicatedHostGroupListResultIterator{page: page}
1439}
1440
1441// IsEmpty returns true if the ListResult contains no values.
1442func (dhglr DedicatedHostGroupListResult) IsEmpty() bool {
1443	return dhglr.Value == nil || len(*dhglr.Value) == 0
1444}
1445
1446// hasNextLink returns true if the NextLink is not empty.
1447func (dhglr DedicatedHostGroupListResult) hasNextLink() bool {
1448	return dhglr.NextLink != nil && len(*dhglr.NextLink) != 0
1449}
1450
1451// dedicatedHostGroupListResultPreparer prepares a request to retrieve the next set of results.
1452// It returns nil if no more results exist.
1453func (dhglr DedicatedHostGroupListResult) dedicatedHostGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
1454	if !dhglr.hasNextLink() {
1455		return nil, nil
1456	}
1457	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1458		autorest.AsJSON(),
1459		autorest.AsGet(),
1460		autorest.WithBaseURL(to.String(dhglr.NextLink)))
1461}
1462
1463// DedicatedHostGroupListResultPage contains a page of DedicatedHostGroup values.
1464type DedicatedHostGroupListResultPage struct {
1465	fn    func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)
1466	dhglr DedicatedHostGroupListResult
1467}
1468
1469// NextWithContext advances to the next page of values.  If there was an error making
1470// the request the page does not advance and the error is returned.
1471func (page *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
1472	if tracing.IsEnabled() {
1473		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultPage.NextWithContext")
1474		defer func() {
1475			sc := -1
1476			if page.Response().Response.Response != nil {
1477				sc = page.Response().Response.Response.StatusCode
1478			}
1479			tracing.EndSpan(ctx, sc, err)
1480		}()
1481	}
1482	for {
1483		next, err := page.fn(ctx, page.dhglr)
1484		if err != nil {
1485			return err
1486		}
1487		page.dhglr = next
1488		if !next.hasNextLink() || !next.IsEmpty() {
1489			break
1490		}
1491	}
1492	return nil
1493}
1494
1495// Next advances to the next page of values.  If there was an error making
1496// the request the page does not advance and the error is returned.
1497// Deprecated: Use NextWithContext() instead.
1498func (page *DedicatedHostGroupListResultPage) Next() error {
1499	return page.NextWithContext(context.Background())
1500}
1501
1502// NotDone returns true if the page enumeration should be started or is not yet complete.
1503func (page DedicatedHostGroupListResultPage) NotDone() bool {
1504	return !page.dhglr.IsEmpty()
1505}
1506
1507// Response returns the raw server response from the last page request.
1508func (page DedicatedHostGroupListResultPage) Response() DedicatedHostGroupListResult {
1509	return page.dhglr
1510}
1511
1512// Values returns the slice of values for the current page or nil if there are no values.
1513func (page DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup {
1514	if page.dhglr.IsEmpty() {
1515		return nil
1516	}
1517	return *page.dhglr.Value
1518}
1519
1520// Creates a new instance of the DedicatedHostGroupListResultPage type.
1521func NewDedicatedHostGroupListResultPage(cur DedicatedHostGroupListResult, getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage {
1522	return DedicatedHostGroupListResultPage{
1523		fn:    getNextPage,
1524		dhglr: cur,
1525	}
1526}
1527
1528// DedicatedHostGroupProperties dedicated Host Group Properties.
1529type DedicatedHostGroupProperties struct {
1530	// PlatformFaultDomainCount - Number of fault domains that the host group can span.
1531	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
1532	// Hosts - READ-ONLY; A list of references to all dedicated hosts in the dedicated host group.
1533	Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"`
1534}
1535
1536// MarshalJSON is the custom marshaler for DedicatedHostGroupProperties.
1537func (dhgp DedicatedHostGroupProperties) MarshalJSON() ([]byte, error) {
1538	objectMap := make(map[string]interface{})
1539	if dhgp.PlatformFaultDomainCount != nil {
1540		objectMap["platformFaultDomainCount"] = dhgp.PlatformFaultDomainCount
1541	}
1542	return json.Marshal(objectMap)
1543}
1544
1545// DedicatedHostGroupUpdate specifies information about the dedicated host group that the dedicated host
1546// should be assigned to. Only tags may be updated.
1547type DedicatedHostGroupUpdate struct {
1548	*DedicatedHostGroupProperties `json:"properties,omitempty"`
1549	// Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.
1550	Zones *[]string `json:"zones,omitempty"`
1551	// Tags - Resource tags
1552	Tags map[string]*string `json:"tags"`
1553}
1554
1555// MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate.
1556func (dhgu DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) {
1557	objectMap := make(map[string]interface{})
1558	if dhgu.DedicatedHostGroupProperties != nil {
1559		objectMap["properties"] = dhgu.DedicatedHostGroupProperties
1560	}
1561	if dhgu.Zones != nil {
1562		objectMap["zones"] = dhgu.Zones
1563	}
1564	if dhgu.Tags != nil {
1565		objectMap["tags"] = dhgu.Tags
1566	}
1567	return json.Marshal(objectMap)
1568}
1569
1570// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroupUpdate struct.
1571func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error {
1572	var m map[string]*json.RawMessage
1573	err := json.Unmarshal(body, &m)
1574	if err != nil {
1575		return err
1576	}
1577	for k, v := range m {
1578		switch k {
1579		case "properties":
1580			if v != nil {
1581				var dedicatedHostGroupProperties DedicatedHostGroupProperties
1582				err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
1583				if err != nil {
1584					return err
1585				}
1586				dhgu.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
1587			}
1588		case "zones":
1589			if v != nil {
1590				var zones []string
1591				err = json.Unmarshal(*v, &zones)
1592				if err != nil {
1593					return err
1594				}
1595				dhgu.Zones = &zones
1596			}
1597		case "tags":
1598			if v != nil {
1599				var tags map[string]*string
1600				err = json.Unmarshal(*v, &tags)
1601				if err != nil {
1602					return err
1603				}
1604				dhgu.Tags = tags
1605			}
1606		}
1607	}
1608
1609	return nil
1610}
1611
1612// DedicatedHostInstanceView the instance view of a dedicated host.
1613type DedicatedHostInstanceView struct {
1614	// AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
1615	AssetID *string `json:"assetId,omitempty"`
1616	// AvailableCapacity - Unutilized capacity of the dedicated host.
1617	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
1618	// Statuses - The resource status information.
1619	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
1620}
1621
1622// MarshalJSON is the custom marshaler for DedicatedHostInstanceView.
1623func (dhiv DedicatedHostInstanceView) MarshalJSON() ([]byte, error) {
1624	objectMap := make(map[string]interface{})
1625	if dhiv.AvailableCapacity != nil {
1626		objectMap["availableCapacity"] = dhiv.AvailableCapacity
1627	}
1628	if dhiv.Statuses != nil {
1629		objectMap["statuses"] = dhiv.Statuses
1630	}
1631	return json.Marshal(objectMap)
1632}
1633
1634// DedicatedHostListResult the list dedicated host operation response.
1635type DedicatedHostListResult struct {
1636	autorest.Response `json:"-"`
1637	// Value - The list of dedicated hosts
1638	Value *[]DedicatedHost `json:"value,omitempty"`
1639	// NextLink - The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts.
1640	NextLink *string `json:"nextLink,omitempty"`
1641}
1642
1643// DedicatedHostListResultIterator provides access to a complete listing of DedicatedHost values.
1644type DedicatedHostListResultIterator struct {
1645	i    int
1646	page DedicatedHostListResultPage
1647}
1648
1649// NextWithContext advances to the next value.  If there was an error making
1650// the request the iterator does not advance and the error is returned.
1651func (iter *DedicatedHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
1652	if tracing.IsEnabled() {
1653		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultIterator.NextWithContext")
1654		defer func() {
1655			sc := -1
1656			if iter.Response().Response.Response != nil {
1657				sc = iter.Response().Response.Response.StatusCode
1658			}
1659			tracing.EndSpan(ctx, sc, err)
1660		}()
1661	}
1662	iter.i++
1663	if iter.i < len(iter.page.Values()) {
1664		return nil
1665	}
1666	err = iter.page.NextWithContext(ctx)
1667	if err != nil {
1668		iter.i--
1669		return err
1670	}
1671	iter.i = 0
1672	return nil
1673}
1674
1675// Next advances to the next value.  If there was an error making
1676// the request the iterator does not advance and the error is returned.
1677// Deprecated: Use NextWithContext() instead.
1678func (iter *DedicatedHostListResultIterator) Next() error {
1679	return iter.NextWithContext(context.Background())
1680}
1681
1682// NotDone returns true if the enumeration should be started or is not yet complete.
1683func (iter DedicatedHostListResultIterator) NotDone() bool {
1684	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1685}
1686
1687// Response returns the raw server response from the last page request.
1688func (iter DedicatedHostListResultIterator) Response() DedicatedHostListResult {
1689	return iter.page.Response()
1690}
1691
1692// Value returns the current value or a zero-initialized value if the
1693// iterator has advanced beyond the end of the collection.
1694func (iter DedicatedHostListResultIterator) Value() DedicatedHost {
1695	if !iter.page.NotDone() {
1696		return DedicatedHost{}
1697	}
1698	return iter.page.Values()[iter.i]
1699}
1700
1701// Creates a new instance of the DedicatedHostListResultIterator type.
1702func NewDedicatedHostListResultIterator(page DedicatedHostListResultPage) DedicatedHostListResultIterator {
1703	return DedicatedHostListResultIterator{page: page}
1704}
1705
1706// IsEmpty returns true if the ListResult contains no values.
1707func (dhlr DedicatedHostListResult) IsEmpty() bool {
1708	return dhlr.Value == nil || len(*dhlr.Value) == 0
1709}
1710
1711// hasNextLink returns true if the NextLink is not empty.
1712func (dhlr DedicatedHostListResult) hasNextLink() bool {
1713	return dhlr.NextLink != nil && len(*dhlr.NextLink) != 0
1714}
1715
1716// dedicatedHostListResultPreparer prepares a request to retrieve the next set of results.
1717// It returns nil if no more results exist.
1718func (dhlr DedicatedHostListResult) dedicatedHostListResultPreparer(ctx context.Context) (*http.Request, error) {
1719	if !dhlr.hasNextLink() {
1720		return nil, nil
1721	}
1722	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1723		autorest.AsJSON(),
1724		autorest.AsGet(),
1725		autorest.WithBaseURL(to.String(dhlr.NextLink)))
1726}
1727
1728// DedicatedHostListResultPage contains a page of DedicatedHost values.
1729type DedicatedHostListResultPage struct {
1730	fn   func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)
1731	dhlr DedicatedHostListResult
1732}
1733
1734// NextWithContext advances to the next page of values.  If there was an error making
1735// the request the page does not advance and the error is returned.
1736func (page *DedicatedHostListResultPage) NextWithContext(ctx context.Context) (err error) {
1737	if tracing.IsEnabled() {
1738		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultPage.NextWithContext")
1739		defer func() {
1740			sc := -1
1741			if page.Response().Response.Response != nil {
1742				sc = page.Response().Response.Response.StatusCode
1743			}
1744			tracing.EndSpan(ctx, sc, err)
1745		}()
1746	}
1747	for {
1748		next, err := page.fn(ctx, page.dhlr)
1749		if err != nil {
1750			return err
1751		}
1752		page.dhlr = next
1753		if !next.hasNextLink() || !next.IsEmpty() {
1754			break
1755		}
1756	}
1757	return nil
1758}
1759
1760// Next advances to the next page of values.  If there was an error making
1761// the request the page does not advance and the error is returned.
1762// Deprecated: Use NextWithContext() instead.
1763func (page *DedicatedHostListResultPage) Next() error {
1764	return page.NextWithContext(context.Background())
1765}
1766
1767// NotDone returns true if the page enumeration should be started or is not yet complete.
1768func (page DedicatedHostListResultPage) NotDone() bool {
1769	return !page.dhlr.IsEmpty()
1770}
1771
1772// Response returns the raw server response from the last page request.
1773func (page DedicatedHostListResultPage) Response() DedicatedHostListResult {
1774	return page.dhlr
1775}
1776
1777// Values returns the slice of values for the current page or nil if there are no values.
1778func (page DedicatedHostListResultPage) Values() []DedicatedHost {
1779	if page.dhlr.IsEmpty() {
1780		return nil
1781	}
1782	return *page.dhlr.Value
1783}
1784
1785// Creates a new instance of the DedicatedHostListResultPage type.
1786func NewDedicatedHostListResultPage(cur DedicatedHostListResult, getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage {
1787	return DedicatedHostListResultPage{
1788		fn:   getNextPage,
1789		dhlr: cur,
1790	}
1791}
1792
1793// DedicatedHostProperties properties of the dedicated host.
1794type DedicatedHostProperties struct {
1795	// PlatformFaultDomain - Fault domain of the dedicated host within a dedicated host group.
1796	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
1797	// AutoReplaceOnFailure - Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided.
1798	AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"`
1799	// HostID - READ-ONLY; A unique id generated and assigned to the dedicated host by the platform. <br><br> Does not change throughout the lifetime of the host.
1800	HostID *string `json:"hostId,omitempty"`
1801	// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the Dedicated Host.
1802	VirtualMachines *[]SubResourceReadOnly `json:"virtualMachines,omitempty"`
1803	// LicenseType - Specifies the software license type that will be applied to the VMs deployed on the dedicated host. <br><br> Possible values are: <br><br> **None** <br><br> **Windows_Server_Hybrid** <br><br> **Windows_Server_Perpetual** <br><br> Default: **None**. Possible values include: 'DedicatedHostLicenseTypesNone', 'DedicatedHostLicenseTypesWindowsServerHybrid', 'DedicatedHostLicenseTypesWindowsServerPerpetual'
1804	LicenseType DedicatedHostLicenseTypes `json:"licenseType,omitempty"`
1805	// ProvisioningTime - READ-ONLY; The date when the host was first provisioned.
1806	ProvisioningTime *date.Time `json:"provisioningTime,omitempty"`
1807	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
1808	ProvisioningState *string `json:"provisioningState,omitempty"`
1809	// InstanceView - READ-ONLY; The dedicated host instance view.
1810	InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty"`
1811}
1812
1813// MarshalJSON is the custom marshaler for DedicatedHostProperties.
1814func (dhp DedicatedHostProperties) MarshalJSON() ([]byte, error) {
1815	objectMap := make(map[string]interface{})
1816	if dhp.PlatformFaultDomain != nil {
1817		objectMap["platformFaultDomain"] = dhp.PlatformFaultDomain
1818	}
1819	if dhp.AutoReplaceOnFailure != nil {
1820		objectMap["autoReplaceOnFailure"] = dhp.AutoReplaceOnFailure
1821	}
1822	if dhp.LicenseType != "" {
1823		objectMap["licenseType"] = dhp.LicenseType
1824	}
1825	return json.Marshal(objectMap)
1826}
1827
1828// DedicatedHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1829// long-running operation.
1830type DedicatedHostsCreateOrUpdateFuture struct {
1831	azure.FutureAPI
1832	// Result returns the result of the asynchronous operation.
1833	// If the operation has not completed it will return an error.
1834	Result func(DedicatedHostsClient) (DedicatedHost, error)
1835}
1836
1837// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1838func (future *DedicatedHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
1839	var azFuture azure.Future
1840	if err := json.Unmarshal(body, &azFuture); err != nil {
1841		return err
1842	}
1843	future.FutureAPI = &azFuture
1844	future.Result = future.result
1845	return nil
1846}
1847
1848// result is the default implementation for DedicatedHostsCreateOrUpdateFuture.Result.
1849func (future *DedicatedHostsCreateOrUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
1850	var done bool
1851	done, err = future.DoneWithContext(context.Background(), client)
1852	if err != nil {
1853		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1854		return
1855	}
1856	if !done {
1857		dh.Response.Response = future.Response()
1858		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsCreateOrUpdateFuture")
1859		return
1860	}
1861	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1862	if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
1863		dh, err = client.CreateOrUpdateResponder(dh.Response.Response)
1864		if err != nil {
1865			err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
1866		}
1867	}
1868	return
1869}
1870
1871// DedicatedHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1872// operation.
1873type DedicatedHostsDeleteFuture struct {
1874	azure.FutureAPI
1875	// Result returns the result of the asynchronous operation.
1876	// If the operation has not completed it will return an error.
1877	Result func(DedicatedHostsClient) (autorest.Response, error)
1878}
1879
1880// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1881func (future *DedicatedHostsDeleteFuture) UnmarshalJSON(body []byte) error {
1882	var azFuture azure.Future
1883	if err := json.Unmarshal(body, &azFuture); err != nil {
1884		return err
1885	}
1886	future.FutureAPI = &azFuture
1887	future.Result = future.result
1888	return nil
1889}
1890
1891// result is the default implementation for DedicatedHostsDeleteFuture.Result.
1892func (future *DedicatedHostsDeleteFuture) result(client DedicatedHostsClient) (ar autorest.Response, err error) {
1893	var done bool
1894	done, err = future.DoneWithContext(context.Background(), client)
1895	if err != nil {
1896		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsDeleteFuture", "Result", future.Response(), "Polling failure")
1897		return
1898	}
1899	if !done {
1900		ar.Response = future.Response()
1901		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsDeleteFuture")
1902		return
1903	}
1904	ar.Response = future.Response()
1905	return
1906}
1907
1908// DedicatedHostsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1909// operation.
1910type DedicatedHostsUpdateFuture struct {
1911	azure.FutureAPI
1912	// Result returns the result of the asynchronous operation.
1913	// If the operation has not completed it will return an error.
1914	Result func(DedicatedHostsClient) (DedicatedHost, error)
1915}
1916
1917// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1918func (future *DedicatedHostsUpdateFuture) UnmarshalJSON(body []byte) error {
1919	var azFuture azure.Future
1920	if err := json.Unmarshal(body, &azFuture); err != nil {
1921		return err
1922	}
1923	future.FutureAPI = &azFuture
1924	future.Result = future.result
1925	return nil
1926}
1927
1928// result is the default implementation for DedicatedHostsUpdateFuture.Result.
1929func (future *DedicatedHostsUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
1930	var done bool
1931	done, err = future.DoneWithContext(context.Background(), client)
1932	if err != nil {
1933		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", future.Response(), "Polling failure")
1934		return
1935	}
1936	if !done {
1937		dh.Response.Response = future.Response()
1938		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsUpdateFuture")
1939		return
1940	}
1941	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1942	if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
1943		dh, err = client.UpdateResponder(dh.Response.Response)
1944		if err != nil {
1945			err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
1946		}
1947	}
1948	return
1949}
1950
1951// DedicatedHostUpdate specifies information about the dedicated host. Only tags, autoReplaceOnFailure and
1952// licenseType may be updated.
1953type DedicatedHostUpdate struct {
1954	*DedicatedHostProperties `json:"properties,omitempty"`
1955	// Tags - Resource tags
1956	Tags map[string]*string `json:"tags"`
1957}
1958
1959// MarshalJSON is the custom marshaler for DedicatedHostUpdate.
1960func (dhu DedicatedHostUpdate) MarshalJSON() ([]byte, error) {
1961	objectMap := make(map[string]interface{})
1962	if dhu.DedicatedHostProperties != nil {
1963		objectMap["properties"] = dhu.DedicatedHostProperties
1964	}
1965	if dhu.Tags != nil {
1966		objectMap["tags"] = dhu.Tags
1967	}
1968	return json.Marshal(objectMap)
1969}
1970
1971// UnmarshalJSON is the custom unmarshaler for DedicatedHostUpdate struct.
1972func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error {
1973	var m map[string]*json.RawMessage
1974	err := json.Unmarshal(body, &m)
1975	if err != nil {
1976		return err
1977	}
1978	for k, v := range m {
1979		switch k {
1980		case "properties":
1981			if v != nil {
1982				var dedicatedHostProperties DedicatedHostProperties
1983				err = json.Unmarshal(*v, &dedicatedHostProperties)
1984				if err != nil {
1985					return err
1986				}
1987				dhu.DedicatedHostProperties = &dedicatedHostProperties
1988			}
1989		case "tags":
1990			if v != nil {
1991				var tags map[string]*string
1992				err = json.Unmarshal(*v, &tags)
1993				if err != nil {
1994					return err
1995				}
1996				dhu.Tags = tags
1997			}
1998		}
1999	}
2000
2001	return nil
2002}
2003
2004// DiagnosticsProfile specifies the boot diagnostic settings state. <br><br>Minimum api-version:
2005// 2015-06-15.
2006type DiagnosticsProfile struct {
2007	// BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor.
2008	BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
2009}
2010
2011// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating
2012// system disk. <br><br> NOTE: The ephemeral disk settings can only be specified for managed disk.
2013type DiffDiskSettings struct {
2014	// Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local'
2015	Option DiffDiskOptions `json:"option,omitempty"`
2016}
2017
2018// Disallowed describes the disallowed disk types.
2019type Disallowed struct {
2020	// DiskTypes - A list of disk types.
2021	DiskTypes *[]string `json:"diskTypes,omitempty"`
2022}
2023
2024// Disk disk resource.
2025type Disk struct {
2026	autorest.Response `json:"-"`
2027	// ManagedBy - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
2028	ManagedBy *string  `json:"managedBy,omitempty"`
2029	Sku       *DiskSku `json:"sku,omitempty"`
2030	// Zones - The Logical zone list for Disk.
2031	Zones           *[]string `json:"zones,omitempty"`
2032	*DiskProperties `json:"properties,omitempty"`
2033	// ID - READ-ONLY; Resource Id
2034	ID *string `json:"id,omitempty"`
2035	// Name - READ-ONLY; Resource name
2036	Name *string `json:"name,omitempty"`
2037	// Type - READ-ONLY; Resource type
2038	Type *string `json:"type,omitempty"`
2039	// Location - Resource location
2040	Location *string `json:"location,omitempty"`
2041	// Tags - Resource tags
2042	Tags map[string]*string `json:"tags"`
2043}
2044
2045// MarshalJSON is the custom marshaler for Disk.
2046func (d Disk) MarshalJSON() ([]byte, error) {
2047	objectMap := make(map[string]interface{})
2048	if d.Sku != nil {
2049		objectMap["sku"] = d.Sku
2050	}
2051	if d.Zones != nil {
2052		objectMap["zones"] = d.Zones
2053	}
2054	if d.DiskProperties != nil {
2055		objectMap["properties"] = d.DiskProperties
2056	}
2057	if d.Location != nil {
2058		objectMap["location"] = d.Location
2059	}
2060	if d.Tags != nil {
2061		objectMap["tags"] = d.Tags
2062	}
2063	return json.Marshal(objectMap)
2064}
2065
2066// UnmarshalJSON is the custom unmarshaler for Disk struct.
2067func (d *Disk) UnmarshalJSON(body []byte) error {
2068	var m map[string]*json.RawMessage
2069	err := json.Unmarshal(body, &m)
2070	if err != nil {
2071		return err
2072	}
2073	for k, v := range m {
2074		switch k {
2075		case "managedBy":
2076			if v != nil {
2077				var managedBy string
2078				err = json.Unmarshal(*v, &managedBy)
2079				if err != nil {
2080					return err
2081				}
2082				d.ManagedBy = &managedBy
2083			}
2084		case "sku":
2085			if v != nil {
2086				var sku DiskSku
2087				err = json.Unmarshal(*v, &sku)
2088				if err != nil {
2089					return err
2090				}
2091				d.Sku = &sku
2092			}
2093		case "zones":
2094			if v != nil {
2095				var zones []string
2096				err = json.Unmarshal(*v, &zones)
2097				if err != nil {
2098					return err
2099				}
2100				d.Zones = &zones
2101			}
2102		case "properties":
2103			if v != nil {
2104				var diskProperties DiskProperties
2105				err = json.Unmarshal(*v, &diskProperties)
2106				if err != nil {
2107					return err
2108				}
2109				d.DiskProperties = &diskProperties
2110			}
2111		case "id":
2112			if v != nil {
2113				var ID string
2114				err = json.Unmarshal(*v, &ID)
2115				if err != nil {
2116					return err
2117				}
2118				d.ID = &ID
2119			}
2120		case "name":
2121			if v != nil {
2122				var name string
2123				err = json.Unmarshal(*v, &name)
2124				if err != nil {
2125					return err
2126				}
2127				d.Name = &name
2128			}
2129		case "type":
2130			if v != nil {
2131				var typeVar string
2132				err = json.Unmarshal(*v, &typeVar)
2133				if err != nil {
2134					return err
2135				}
2136				d.Type = &typeVar
2137			}
2138		case "location":
2139			if v != nil {
2140				var location string
2141				err = json.Unmarshal(*v, &location)
2142				if err != nil {
2143					return err
2144				}
2145				d.Location = &location
2146			}
2147		case "tags":
2148			if v != nil {
2149				var tags map[string]*string
2150				err = json.Unmarshal(*v, &tags)
2151				if err != nil {
2152					return err
2153				}
2154				d.Tags = tags
2155			}
2156		}
2157	}
2158
2159	return nil
2160}
2161
2162// DiskEncryptionSettings describes a Encryption Settings for a Disk
2163type DiskEncryptionSettings struct {
2164	// DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret.
2165	DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"`
2166	// KeyEncryptionKey - Specifies the location of the key encryption key in Key Vault.
2167	KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"`
2168	// Enabled - Specifies whether disk encryption should be enabled on the virtual machine.
2169	Enabled *bool `json:"enabled,omitempty"`
2170}
2171
2172// DiskInstanceView the instance view of the disk.
2173type DiskInstanceView struct {
2174	// Name - The disk name.
2175	Name *string `json:"name,omitempty"`
2176	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
2177	EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
2178	// Statuses - The resource status information.
2179	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
2180}
2181
2182// DiskList the List Disks operation response.
2183type DiskList struct {
2184	autorest.Response `json:"-"`
2185	// Value - A list of disks.
2186	Value *[]Disk `json:"value,omitempty"`
2187	// NextLink - The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks.
2188	NextLink *string `json:"nextLink,omitempty"`
2189}
2190
2191// DiskListIterator provides access to a complete listing of Disk values.
2192type DiskListIterator struct {
2193	i    int
2194	page DiskListPage
2195}
2196
2197// NextWithContext advances to the next value.  If there was an error making
2198// the request the iterator does not advance and the error is returned.
2199func (iter *DiskListIterator) NextWithContext(ctx context.Context) (err error) {
2200	if tracing.IsEnabled() {
2201		ctx = tracing.StartSpan(ctx, fqdn+"/DiskListIterator.NextWithContext")
2202		defer func() {
2203			sc := -1
2204			if iter.Response().Response.Response != nil {
2205				sc = iter.Response().Response.Response.StatusCode
2206			}
2207			tracing.EndSpan(ctx, sc, err)
2208		}()
2209	}
2210	iter.i++
2211	if iter.i < len(iter.page.Values()) {
2212		return nil
2213	}
2214	err = iter.page.NextWithContext(ctx)
2215	if err != nil {
2216		iter.i--
2217		return err
2218	}
2219	iter.i = 0
2220	return nil
2221}
2222
2223// Next advances to the next value.  If there was an error making
2224// the request the iterator does not advance and the error is returned.
2225// Deprecated: Use NextWithContext() instead.
2226func (iter *DiskListIterator) Next() error {
2227	return iter.NextWithContext(context.Background())
2228}
2229
2230// NotDone returns true if the enumeration should be started or is not yet complete.
2231func (iter DiskListIterator) NotDone() bool {
2232	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2233}
2234
2235// Response returns the raw server response from the last page request.
2236func (iter DiskListIterator) Response() DiskList {
2237	return iter.page.Response()
2238}
2239
2240// Value returns the current value or a zero-initialized value if the
2241// iterator has advanced beyond the end of the collection.
2242func (iter DiskListIterator) Value() Disk {
2243	if !iter.page.NotDone() {
2244		return Disk{}
2245	}
2246	return iter.page.Values()[iter.i]
2247}
2248
2249// Creates a new instance of the DiskListIterator type.
2250func NewDiskListIterator(page DiskListPage) DiskListIterator {
2251	return DiskListIterator{page: page}
2252}
2253
2254// IsEmpty returns true if the ListResult contains no values.
2255func (dl DiskList) IsEmpty() bool {
2256	return dl.Value == nil || len(*dl.Value) == 0
2257}
2258
2259// hasNextLink returns true if the NextLink is not empty.
2260func (dl DiskList) hasNextLink() bool {
2261	return dl.NextLink != nil && len(*dl.NextLink) != 0
2262}
2263
2264// diskListPreparer prepares a request to retrieve the next set of results.
2265// It returns nil if no more results exist.
2266func (dl DiskList) diskListPreparer(ctx context.Context) (*http.Request, error) {
2267	if !dl.hasNextLink() {
2268		return nil, nil
2269	}
2270	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2271		autorest.AsJSON(),
2272		autorest.AsGet(),
2273		autorest.WithBaseURL(to.String(dl.NextLink)))
2274}
2275
2276// DiskListPage contains a page of Disk values.
2277type DiskListPage struct {
2278	fn func(context.Context, DiskList) (DiskList, error)
2279	dl DiskList
2280}
2281
2282// NextWithContext advances to the next page of values.  If there was an error making
2283// the request the page does not advance and the error is returned.
2284func (page *DiskListPage) NextWithContext(ctx context.Context) (err error) {
2285	if tracing.IsEnabled() {
2286		ctx = tracing.StartSpan(ctx, fqdn+"/DiskListPage.NextWithContext")
2287		defer func() {
2288			sc := -1
2289			if page.Response().Response.Response != nil {
2290				sc = page.Response().Response.Response.StatusCode
2291			}
2292			tracing.EndSpan(ctx, sc, err)
2293		}()
2294	}
2295	for {
2296		next, err := page.fn(ctx, page.dl)
2297		if err != nil {
2298			return err
2299		}
2300		page.dl = next
2301		if !next.hasNextLink() || !next.IsEmpty() {
2302			break
2303		}
2304	}
2305	return nil
2306}
2307
2308// Next advances to the next page of values.  If there was an error making
2309// the request the page does not advance and the error is returned.
2310// Deprecated: Use NextWithContext() instead.
2311func (page *DiskListPage) Next() error {
2312	return page.NextWithContext(context.Background())
2313}
2314
2315// NotDone returns true if the page enumeration should be started or is not yet complete.
2316func (page DiskListPage) NotDone() bool {
2317	return !page.dl.IsEmpty()
2318}
2319
2320// Response returns the raw server response from the last page request.
2321func (page DiskListPage) Response() DiskList {
2322	return page.dl
2323}
2324
2325// Values returns the slice of values for the current page or nil if there are no values.
2326func (page DiskListPage) Values() []Disk {
2327	if page.dl.IsEmpty() {
2328		return nil
2329	}
2330	return *page.dl.Value
2331}
2332
2333// Creates a new instance of the DiskListPage type.
2334func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
2335	return DiskListPage{
2336		fn: getNextPage,
2337		dl: cur,
2338	}
2339}
2340
2341// DiskProperties disk resource properties.
2342type DiskProperties struct {
2343	// TimeCreated - READ-ONLY; The time when the disk was created.
2344	TimeCreated *date.Time `json:"timeCreated,omitempty"`
2345	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
2346	OsType OperatingSystemTypes `json:"osType,omitempty"`
2347	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
2348	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
2349	// CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
2350	CreationData *CreationData `json:"creationData,omitempty"`
2351	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
2352	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
2353	// DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
2354	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
2355	// UniqueID - READ-ONLY; Unique Guid identifying the resource.
2356	UniqueID *string `json:"uniqueId,omitempty"`
2357	// EncryptionSettingsCollection - Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
2358	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
2359	// ProvisioningState - READ-ONLY; The disk provisioning state.
2360	ProvisioningState *string `json:"provisioningState,omitempty"`
2361	// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
2362	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
2363	// DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
2364	DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"`
2365	// DiskState - READ-ONLY; The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
2366	DiskState DiskState `json:"diskState,omitempty"`
2367}
2368
2369// MarshalJSON is the custom marshaler for DiskProperties.
2370func (dp DiskProperties) MarshalJSON() ([]byte, error) {
2371	objectMap := make(map[string]interface{})
2372	if dp.OsType != "" {
2373		objectMap["osType"] = dp.OsType
2374	}
2375	if dp.HyperVGeneration != "" {
2376		objectMap["hyperVGeneration"] = dp.HyperVGeneration
2377	}
2378	if dp.CreationData != nil {
2379		objectMap["creationData"] = dp.CreationData
2380	}
2381	if dp.DiskSizeGB != nil {
2382		objectMap["diskSizeGB"] = dp.DiskSizeGB
2383	}
2384	if dp.EncryptionSettingsCollection != nil {
2385		objectMap["encryptionSettingsCollection"] = dp.EncryptionSettingsCollection
2386	}
2387	if dp.DiskIOPSReadWrite != nil {
2388		objectMap["diskIOPSReadWrite"] = dp.DiskIOPSReadWrite
2389	}
2390	if dp.DiskMBpsReadWrite != nil {
2391		objectMap["diskMBpsReadWrite"] = dp.DiskMBpsReadWrite
2392	}
2393	return json.Marshal(objectMap)
2394}
2395
2396// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
2397// operation.
2398type DisksCreateOrUpdateFuture struct {
2399	azure.FutureAPI
2400	// Result returns the result of the asynchronous operation.
2401	// If the operation has not completed it will return an error.
2402	Result func(DisksClient) (Disk, error)
2403}
2404
2405// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2406func (future *DisksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2407	var azFuture azure.Future
2408	if err := json.Unmarshal(body, &azFuture); err != nil {
2409		return err
2410	}
2411	future.FutureAPI = &azFuture
2412	future.Result = future.result
2413	return nil
2414}
2415
2416// result is the default implementation for DisksCreateOrUpdateFuture.Result.
2417func (future *DisksCreateOrUpdateFuture) result(client DisksClient) (d Disk, err error) {
2418	var done bool
2419	done, err = future.DoneWithContext(context.Background(), client)
2420	if err != nil {
2421		err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2422		return
2423	}
2424	if !done {
2425		d.Response.Response = future.Response()
2426		err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
2427		return
2428	}
2429	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2430	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
2431		d, err = client.CreateOrUpdateResponder(d.Response.Response)
2432		if err != nil {
2433			err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
2434		}
2435	}
2436	return
2437}
2438
2439// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
2440type DisksDeleteFuture struct {
2441	azure.FutureAPI
2442	// Result returns the result of the asynchronous operation.
2443	// If the operation has not completed it will return an error.
2444	Result func(DisksClient) (autorest.Response, error)
2445}
2446
2447// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2448func (future *DisksDeleteFuture) UnmarshalJSON(body []byte) error {
2449	var azFuture azure.Future
2450	if err := json.Unmarshal(body, &azFuture); err != nil {
2451		return err
2452	}
2453	future.FutureAPI = &azFuture
2454	future.Result = future.result
2455	return nil
2456}
2457
2458// result is the default implementation for DisksDeleteFuture.Result.
2459func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Response, err error) {
2460	var done bool
2461	done, err = future.DoneWithContext(context.Background(), client)
2462	if err != nil {
2463		err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Polling failure")
2464		return
2465	}
2466	if !done {
2467		ar.Response = future.Response()
2468		err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
2469		return
2470	}
2471	ar.Response = future.Response()
2472	return
2473}
2474
2475// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
2476// operation.
2477type DisksGrantAccessFuture struct {
2478	azure.FutureAPI
2479	// Result returns the result of the asynchronous operation.
2480	// If the operation has not completed it will return an error.
2481	Result func(DisksClient) (AccessURI, error)
2482}
2483
2484// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2485func (future *DisksGrantAccessFuture) UnmarshalJSON(body []byte) error {
2486	var azFuture azure.Future
2487	if err := json.Unmarshal(body, &azFuture); err != nil {
2488		return err
2489	}
2490	future.FutureAPI = &azFuture
2491	future.Result = future.result
2492	return nil
2493}
2494
2495// result is the default implementation for DisksGrantAccessFuture.Result.
2496func (future *DisksGrantAccessFuture) result(client DisksClient) (au AccessURI, err error) {
2497	var done bool
2498	done, err = future.DoneWithContext(context.Background(), client)
2499	if err != nil {
2500		err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Polling failure")
2501		return
2502	}
2503	if !done {
2504		au.Response.Response = future.Response()
2505		err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
2506		return
2507	}
2508	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2509	if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
2510		au, err = client.GrantAccessResponder(au.Response.Response)
2511		if err != nil {
2512			err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
2513		}
2514	}
2515	return
2516}
2517
2518// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.
2519type DiskSku struct {
2520	// Name - The sku name. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS', 'UltraSSDLRS'
2521	Name DiskStorageAccountTypes `json:"name,omitempty"`
2522	// Tier - READ-ONLY; The sku tier.
2523	Tier *string `json:"tier,omitempty"`
2524}
2525
2526// MarshalJSON is the custom marshaler for DiskSku.
2527func (ds DiskSku) MarshalJSON() ([]byte, error) {
2528	objectMap := make(map[string]interface{})
2529	if ds.Name != "" {
2530		objectMap["name"] = ds.Name
2531	}
2532	return json.Marshal(objectMap)
2533}
2534
2535// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
2536// operation.
2537type DisksRevokeAccessFuture struct {
2538	azure.FutureAPI
2539	// Result returns the result of the asynchronous operation.
2540	// If the operation has not completed it will return an error.
2541	Result func(DisksClient) (autorest.Response, error)
2542}
2543
2544// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2545func (future *DisksRevokeAccessFuture) UnmarshalJSON(body []byte) error {
2546	var azFuture azure.Future
2547	if err := json.Unmarshal(body, &azFuture); err != nil {
2548		return err
2549	}
2550	future.FutureAPI = &azFuture
2551	future.Result = future.result
2552	return nil
2553}
2554
2555// result is the default implementation for DisksRevokeAccessFuture.Result.
2556func (future *DisksRevokeAccessFuture) result(client DisksClient) (ar autorest.Response, err error) {
2557	var done bool
2558	done, err = future.DoneWithContext(context.Background(), client)
2559	if err != nil {
2560		err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Polling failure")
2561		return
2562	}
2563	if !done {
2564		ar.Response = future.Response()
2565		err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
2566		return
2567	}
2568	ar.Response = future.Response()
2569	return
2570}
2571
2572// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
2573type DisksUpdateFuture struct {
2574	azure.FutureAPI
2575	// Result returns the result of the asynchronous operation.
2576	// If the operation has not completed it will return an error.
2577	Result func(DisksClient) (Disk, error)
2578}
2579
2580// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2581func (future *DisksUpdateFuture) UnmarshalJSON(body []byte) error {
2582	var azFuture azure.Future
2583	if err := json.Unmarshal(body, &azFuture); err != nil {
2584		return err
2585	}
2586	future.FutureAPI = &azFuture
2587	future.Result = future.result
2588	return nil
2589}
2590
2591// result is the default implementation for DisksUpdateFuture.Result.
2592func (future *DisksUpdateFuture) result(client DisksClient) (d Disk, err error) {
2593	var done bool
2594	done, err = future.DoneWithContext(context.Background(), client)
2595	if err != nil {
2596		err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Polling failure")
2597		return
2598	}
2599	if !done {
2600		d.Response.Response = future.Response()
2601		err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
2602		return
2603	}
2604	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2605	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
2606		d, err = client.UpdateResponder(d.Response.Response)
2607		if err != nil {
2608			err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
2609		}
2610	}
2611	return
2612}
2613
2614// DiskUpdate disk update resource.
2615type DiskUpdate struct {
2616	*DiskUpdateProperties `json:"properties,omitempty"`
2617	// Tags - Resource tags
2618	Tags map[string]*string `json:"tags"`
2619	Sku  *DiskSku           `json:"sku,omitempty"`
2620}
2621
2622// MarshalJSON is the custom marshaler for DiskUpdate.
2623func (du DiskUpdate) MarshalJSON() ([]byte, error) {
2624	objectMap := make(map[string]interface{})
2625	if du.DiskUpdateProperties != nil {
2626		objectMap["properties"] = du.DiskUpdateProperties
2627	}
2628	if du.Tags != nil {
2629		objectMap["tags"] = du.Tags
2630	}
2631	if du.Sku != nil {
2632		objectMap["sku"] = du.Sku
2633	}
2634	return json.Marshal(objectMap)
2635}
2636
2637// UnmarshalJSON is the custom unmarshaler for DiskUpdate struct.
2638func (du *DiskUpdate) UnmarshalJSON(body []byte) error {
2639	var m map[string]*json.RawMessage
2640	err := json.Unmarshal(body, &m)
2641	if err != nil {
2642		return err
2643	}
2644	for k, v := range m {
2645		switch k {
2646		case "properties":
2647			if v != nil {
2648				var diskUpdateProperties DiskUpdateProperties
2649				err = json.Unmarshal(*v, &diskUpdateProperties)
2650				if err != nil {
2651					return err
2652				}
2653				du.DiskUpdateProperties = &diskUpdateProperties
2654			}
2655		case "tags":
2656			if v != nil {
2657				var tags map[string]*string
2658				err = json.Unmarshal(*v, &tags)
2659				if err != nil {
2660					return err
2661				}
2662				du.Tags = tags
2663			}
2664		case "sku":
2665			if v != nil {
2666				var sku DiskSku
2667				err = json.Unmarshal(*v, &sku)
2668				if err != nil {
2669					return err
2670				}
2671				du.Sku = &sku
2672			}
2673		}
2674	}
2675
2676	return nil
2677}
2678
2679// DiskUpdateProperties disk resource update properties.
2680type DiskUpdateProperties struct {
2681	// OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
2682	OsType OperatingSystemTypes `json:"osType,omitempty"`
2683	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
2684	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
2685	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
2686	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
2687	// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
2688	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
2689	// DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
2690	DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"`
2691}
2692
2693// EncryptionSettingsCollection encryption settings for disk or snapshot
2694type EncryptionSettingsCollection struct {
2695	// Enabled - Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.
2696	Enabled *bool `json:"enabled,omitempty"`
2697	// EncryptionSettings - A collection of encryption settings, one for each disk volume.
2698	EncryptionSettings *[]EncryptionSettingsElement `json:"encryptionSettings,omitempty"`
2699	// EncryptionSettingsVersion - Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.
2700	EncryptionSettingsVersion *string `json:"encryptionSettingsVersion,omitempty"`
2701}
2702
2703// EncryptionSettingsElement encryption settings for one disk volume.
2704type EncryptionSettingsElement struct {
2705	// DiskEncryptionKey - Key Vault Secret Url and vault id of the disk encryption key
2706	DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"`
2707	// KeyEncryptionKey - Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.
2708	KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"`
2709}
2710
2711// GalleriesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
2712// operation.
2713type GalleriesCreateOrUpdateFuture struct {
2714	azure.FutureAPI
2715	// Result returns the result of the asynchronous operation.
2716	// If the operation has not completed it will return an error.
2717	Result func(GalleriesClient) (Gallery, error)
2718}
2719
2720// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2721func (future *GalleriesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2722	var azFuture azure.Future
2723	if err := json.Unmarshal(body, &azFuture); err != nil {
2724		return err
2725	}
2726	future.FutureAPI = &azFuture
2727	future.Result = future.result
2728	return nil
2729}
2730
2731// result is the default implementation for GalleriesCreateOrUpdateFuture.Result.
2732func (future *GalleriesCreateOrUpdateFuture) result(client GalleriesClient) (g Gallery, err error) {
2733	var done bool
2734	done, err = future.DoneWithContext(context.Background(), client)
2735	if err != nil {
2736		err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2737		return
2738	}
2739	if !done {
2740		g.Response.Response = future.Response()
2741		err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture")
2742		return
2743	}
2744	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2745	if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
2746		g, err = client.CreateOrUpdateResponder(g.Response.Response)
2747		if err != nil {
2748			err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
2749		}
2750	}
2751	return
2752}
2753
2754// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
2755// operation.
2756type GalleriesDeleteFuture struct {
2757	azure.FutureAPI
2758	// Result returns the result of the asynchronous operation.
2759	// If the operation has not completed it will return an error.
2760	Result func(GalleriesClient) (autorest.Response, error)
2761}
2762
2763// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2764func (future *GalleriesDeleteFuture) UnmarshalJSON(body []byte) error {
2765	var azFuture azure.Future
2766	if err := json.Unmarshal(body, &azFuture); err != nil {
2767		return err
2768	}
2769	future.FutureAPI = &azFuture
2770	future.Result = future.result
2771	return nil
2772}
2773
2774// result is the default implementation for GalleriesDeleteFuture.Result.
2775func (future *GalleriesDeleteFuture) result(client GalleriesClient) (ar autorest.Response, err error) {
2776	var done bool
2777	done, err = future.DoneWithContext(context.Background(), client)
2778	if err != nil {
2779		err = autorest.NewErrorWithError(err, "compute.GalleriesDeleteFuture", "Result", future.Response(), "Polling failure")
2780		return
2781	}
2782	if !done {
2783		ar.Response = future.Response()
2784		err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture")
2785		return
2786	}
2787	ar.Response = future.Response()
2788	return
2789}
2790
2791// Gallery specifies information about the Shared Image Gallery that you want to create or update.
2792type Gallery struct {
2793	autorest.Response  `json:"-"`
2794	*GalleryProperties `json:"properties,omitempty"`
2795	// ID - READ-ONLY; Resource Id
2796	ID *string `json:"id,omitempty"`
2797	// Name - READ-ONLY; Resource name
2798	Name *string `json:"name,omitempty"`
2799	// Type - READ-ONLY; Resource type
2800	Type *string `json:"type,omitempty"`
2801	// Location - Resource location
2802	Location *string `json:"location,omitempty"`
2803	// Tags - Resource tags
2804	Tags map[string]*string `json:"tags"`
2805}
2806
2807// MarshalJSON is the custom marshaler for Gallery.
2808func (g Gallery) MarshalJSON() ([]byte, error) {
2809	objectMap := make(map[string]interface{})
2810	if g.GalleryProperties != nil {
2811		objectMap["properties"] = g.GalleryProperties
2812	}
2813	if g.Location != nil {
2814		objectMap["location"] = g.Location
2815	}
2816	if g.Tags != nil {
2817		objectMap["tags"] = g.Tags
2818	}
2819	return json.Marshal(objectMap)
2820}
2821
2822// UnmarshalJSON is the custom unmarshaler for Gallery struct.
2823func (g *Gallery) UnmarshalJSON(body []byte) error {
2824	var m map[string]*json.RawMessage
2825	err := json.Unmarshal(body, &m)
2826	if err != nil {
2827		return err
2828	}
2829	for k, v := range m {
2830		switch k {
2831		case "properties":
2832			if v != nil {
2833				var galleryProperties GalleryProperties
2834				err = json.Unmarshal(*v, &galleryProperties)
2835				if err != nil {
2836					return err
2837				}
2838				g.GalleryProperties = &galleryProperties
2839			}
2840		case "id":
2841			if v != nil {
2842				var ID string
2843				err = json.Unmarshal(*v, &ID)
2844				if err != nil {
2845					return err
2846				}
2847				g.ID = &ID
2848			}
2849		case "name":
2850			if v != nil {
2851				var name string
2852				err = json.Unmarshal(*v, &name)
2853				if err != nil {
2854					return err
2855				}
2856				g.Name = &name
2857			}
2858		case "type":
2859			if v != nil {
2860				var typeVar string
2861				err = json.Unmarshal(*v, &typeVar)
2862				if err != nil {
2863					return err
2864				}
2865				g.Type = &typeVar
2866			}
2867		case "location":
2868			if v != nil {
2869				var location string
2870				err = json.Unmarshal(*v, &location)
2871				if err != nil {
2872					return err
2873				}
2874				g.Location = &location
2875			}
2876		case "tags":
2877			if v != nil {
2878				var tags map[string]*string
2879				err = json.Unmarshal(*v, &tags)
2880				if err != nil {
2881					return err
2882				}
2883				g.Tags = tags
2884			}
2885		}
2886	}
2887
2888	return nil
2889}
2890
2891// GalleryApplication specifies information about the gallery Application Definition that you want to
2892// create or update.
2893type GalleryApplication struct {
2894	autorest.Response             `json:"-"`
2895	*GalleryApplicationProperties `json:"properties,omitempty"`
2896	// ID - READ-ONLY; Resource Id
2897	ID *string `json:"id,omitempty"`
2898	// Name - READ-ONLY; Resource name
2899	Name *string `json:"name,omitempty"`
2900	// Type - READ-ONLY; Resource type
2901	Type *string `json:"type,omitempty"`
2902	// Location - Resource location
2903	Location *string `json:"location,omitempty"`
2904	// Tags - Resource tags
2905	Tags map[string]*string `json:"tags"`
2906}
2907
2908// MarshalJSON is the custom marshaler for GalleryApplication.
2909func (ga GalleryApplication) MarshalJSON() ([]byte, error) {
2910	objectMap := make(map[string]interface{})
2911	if ga.GalleryApplicationProperties != nil {
2912		objectMap["properties"] = ga.GalleryApplicationProperties
2913	}
2914	if ga.Location != nil {
2915		objectMap["location"] = ga.Location
2916	}
2917	if ga.Tags != nil {
2918		objectMap["tags"] = ga.Tags
2919	}
2920	return json.Marshal(objectMap)
2921}
2922
2923// UnmarshalJSON is the custom unmarshaler for GalleryApplication struct.
2924func (ga *GalleryApplication) UnmarshalJSON(body []byte) error {
2925	var m map[string]*json.RawMessage
2926	err := json.Unmarshal(body, &m)
2927	if err != nil {
2928		return err
2929	}
2930	for k, v := range m {
2931		switch k {
2932		case "properties":
2933			if v != nil {
2934				var galleryApplicationProperties GalleryApplicationProperties
2935				err = json.Unmarshal(*v, &galleryApplicationProperties)
2936				if err != nil {
2937					return err
2938				}
2939				ga.GalleryApplicationProperties = &galleryApplicationProperties
2940			}
2941		case "id":
2942			if v != nil {
2943				var ID string
2944				err = json.Unmarshal(*v, &ID)
2945				if err != nil {
2946					return err
2947				}
2948				ga.ID = &ID
2949			}
2950		case "name":
2951			if v != nil {
2952				var name string
2953				err = json.Unmarshal(*v, &name)
2954				if err != nil {
2955					return err
2956				}
2957				ga.Name = &name
2958			}
2959		case "type":
2960			if v != nil {
2961				var typeVar string
2962				err = json.Unmarshal(*v, &typeVar)
2963				if err != nil {
2964					return err
2965				}
2966				ga.Type = &typeVar
2967			}
2968		case "location":
2969			if v != nil {
2970				var location string
2971				err = json.Unmarshal(*v, &location)
2972				if err != nil {
2973					return err
2974				}
2975				ga.Location = &location
2976			}
2977		case "tags":
2978			if v != nil {
2979				var tags map[string]*string
2980				err = json.Unmarshal(*v, &tags)
2981				if err != nil {
2982					return err
2983				}
2984				ga.Tags = tags
2985			}
2986		}
2987	}
2988
2989	return nil
2990}
2991
2992// GalleryApplicationList the List Gallery Applications operation response.
2993type GalleryApplicationList struct {
2994	autorest.Response `json:"-"`
2995	// Value - A list of Gallery Applications.
2996	Value *[]GalleryApplication `json:"value,omitempty"`
2997	// NextLink - The uri to fetch the next page of Application Definitions in the Application Gallery. Call ListNext() with this to fetch the next page of gallery Application Definitions.
2998	NextLink *string `json:"nextLink,omitempty"`
2999}
3000
3001// GalleryApplicationListIterator provides access to a complete listing of GalleryApplication values.
3002type GalleryApplicationListIterator struct {
3003	i    int
3004	page GalleryApplicationListPage
3005}
3006
3007// NextWithContext advances to the next value.  If there was an error making
3008// the request the iterator does not advance and the error is returned.
3009func (iter *GalleryApplicationListIterator) NextWithContext(ctx context.Context) (err error) {
3010	if tracing.IsEnabled() {
3011		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListIterator.NextWithContext")
3012		defer func() {
3013			sc := -1
3014			if iter.Response().Response.Response != nil {
3015				sc = iter.Response().Response.Response.StatusCode
3016			}
3017			tracing.EndSpan(ctx, sc, err)
3018		}()
3019	}
3020	iter.i++
3021	if iter.i < len(iter.page.Values()) {
3022		return nil
3023	}
3024	err = iter.page.NextWithContext(ctx)
3025	if err != nil {
3026		iter.i--
3027		return err
3028	}
3029	iter.i = 0
3030	return nil
3031}
3032
3033// Next advances to the next value.  If there was an error making
3034// the request the iterator does not advance and the error is returned.
3035// Deprecated: Use NextWithContext() instead.
3036func (iter *GalleryApplicationListIterator) Next() error {
3037	return iter.NextWithContext(context.Background())
3038}
3039
3040// NotDone returns true if the enumeration should be started or is not yet complete.
3041func (iter GalleryApplicationListIterator) NotDone() bool {
3042	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3043}
3044
3045// Response returns the raw server response from the last page request.
3046func (iter GalleryApplicationListIterator) Response() GalleryApplicationList {
3047	return iter.page.Response()
3048}
3049
3050// Value returns the current value or a zero-initialized value if the
3051// iterator has advanced beyond the end of the collection.
3052func (iter GalleryApplicationListIterator) Value() GalleryApplication {
3053	if !iter.page.NotDone() {
3054		return GalleryApplication{}
3055	}
3056	return iter.page.Values()[iter.i]
3057}
3058
3059// Creates a new instance of the GalleryApplicationListIterator type.
3060func NewGalleryApplicationListIterator(page GalleryApplicationListPage) GalleryApplicationListIterator {
3061	return GalleryApplicationListIterator{page: page}
3062}
3063
3064// IsEmpty returns true if the ListResult contains no values.
3065func (gal GalleryApplicationList) IsEmpty() bool {
3066	return gal.Value == nil || len(*gal.Value) == 0
3067}
3068
3069// hasNextLink returns true if the NextLink is not empty.
3070func (gal GalleryApplicationList) hasNextLink() bool {
3071	return gal.NextLink != nil && len(*gal.NextLink) != 0
3072}
3073
3074// galleryApplicationListPreparer prepares a request to retrieve the next set of results.
3075// It returns nil if no more results exist.
3076func (gal GalleryApplicationList) galleryApplicationListPreparer(ctx context.Context) (*http.Request, error) {
3077	if !gal.hasNextLink() {
3078		return nil, nil
3079	}
3080	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3081		autorest.AsJSON(),
3082		autorest.AsGet(),
3083		autorest.WithBaseURL(to.String(gal.NextLink)))
3084}
3085
3086// GalleryApplicationListPage contains a page of GalleryApplication values.
3087type GalleryApplicationListPage struct {
3088	fn  func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)
3089	gal GalleryApplicationList
3090}
3091
3092// NextWithContext advances to the next page of values.  If there was an error making
3093// the request the page does not advance and the error is returned.
3094func (page *GalleryApplicationListPage) NextWithContext(ctx context.Context) (err error) {
3095	if tracing.IsEnabled() {
3096		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListPage.NextWithContext")
3097		defer func() {
3098			sc := -1
3099			if page.Response().Response.Response != nil {
3100				sc = page.Response().Response.Response.StatusCode
3101			}
3102			tracing.EndSpan(ctx, sc, err)
3103		}()
3104	}
3105	for {
3106		next, err := page.fn(ctx, page.gal)
3107		if err != nil {
3108			return err
3109		}
3110		page.gal = next
3111		if !next.hasNextLink() || !next.IsEmpty() {
3112			break
3113		}
3114	}
3115	return nil
3116}
3117
3118// Next advances to the next page of values.  If there was an error making
3119// the request the page does not advance and the error is returned.
3120// Deprecated: Use NextWithContext() instead.
3121func (page *GalleryApplicationListPage) Next() error {
3122	return page.NextWithContext(context.Background())
3123}
3124
3125// NotDone returns true if the page enumeration should be started or is not yet complete.
3126func (page GalleryApplicationListPage) NotDone() bool {
3127	return !page.gal.IsEmpty()
3128}
3129
3130// Response returns the raw server response from the last page request.
3131func (page GalleryApplicationListPage) Response() GalleryApplicationList {
3132	return page.gal
3133}
3134
3135// Values returns the slice of values for the current page or nil if there are no values.
3136func (page GalleryApplicationListPage) Values() []GalleryApplication {
3137	if page.gal.IsEmpty() {
3138		return nil
3139	}
3140	return *page.gal.Value
3141}
3142
3143// Creates a new instance of the GalleryApplicationListPage type.
3144func NewGalleryApplicationListPage(cur GalleryApplicationList, getNextPage func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)) GalleryApplicationListPage {
3145	return GalleryApplicationListPage{
3146		fn:  getNextPage,
3147		gal: cur,
3148	}
3149}
3150
3151// GalleryApplicationProperties describes the properties of a gallery Application Definition.
3152type GalleryApplicationProperties struct {
3153	// Description - The description of this gallery Application Definition resource. This property is updatable.
3154	Description *string `json:"description,omitempty"`
3155	// Eula - The Eula agreement for the gallery Application Definition.
3156	Eula *string `json:"eula,omitempty"`
3157	// PrivacyStatementURI - The privacy statement uri.
3158	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
3159	// ReleaseNoteURI - The release note uri.
3160	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
3161	// EndOfLifeDate - The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable.
3162	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
3163	// SupportedOSType - This property allows you to specify the supported type of the OS that application is built for. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
3164	SupportedOSType OperatingSystemTypes `json:"supportedOSType,omitempty"`
3165}
3166
3167// GalleryApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3168// long-running operation.
3169type GalleryApplicationsCreateOrUpdateFuture struct {
3170	azure.FutureAPI
3171	// Result returns the result of the asynchronous operation.
3172	// If the operation has not completed it will return an error.
3173	Result func(GalleryApplicationsClient) (GalleryApplication, error)
3174}
3175
3176// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3177func (future *GalleryApplicationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3178	var azFuture azure.Future
3179	if err := json.Unmarshal(body, &azFuture); err != nil {
3180		return err
3181	}
3182	future.FutureAPI = &azFuture
3183	future.Result = future.result
3184	return nil
3185}
3186
3187// result is the default implementation for GalleryApplicationsCreateOrUpdateFuture.Result.
3188func (future *GalleryApplicationsCreateOrUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
3189	var done bool
3190	done, err = future.DoneWithContext(context.Background(), client)
3191	if err != nil {
3192		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3193		return
3194	}
3195	if !done {
3196		ga.Response.Response = future.Response()
3197		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsCreateOrUpdateFuture")
3198		return
3199	}
3200	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3201	if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
3202		ga, err = client.CreateOrUpdateResponder(ga.Response.Response)
3203		if err != nil {
3204			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
3205		}
3206	}
3207	return
3208}
3209
3210// GalleryApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a
3211// long-running operation.
3212type GalleryApplicationsDeleteFuture struct {
3213	azure.FutureAPI
3214	// Result returns the result of the asynchronous operation.
3215	// If the operation has not completed it will return an error.
3216	Result func(GalleryApplicationsClient) (autorest.Response, error)
3217}
3218
3219// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3220func (future *GalleryApplicationsDeleteFuture) UnmarshalJSON(body []byte) error {
3221	var azFuture azure.Future
3222	if err := json.Unmarshal(body, &azFuture); err != nil {
3223		return err
3224	}
3225	future.FutureAPI = &azFuture
3226	future.Result = future.result
3227	return nil
3228}
3229
3230// result is the default implementation for GalleryApplicationsDeleteFuture.Result.
3231func (future *GalleryApplicationsDeleteFuture) result(client GalleryApplicationsClient) (ar autorest.Response, err error) {
3232	var done bool
3233	done, err = future.DoneWithContext(context.Background(), client)
3234	if err != nil {
3235		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsDeleteFuture", "Result", future.Response(), "Polling failure")
3236		return
3237	}
3238	if !done {
3239		ar.Response = future.Response()
3240		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsDeleteFuture")
3241		return
3242	}
3243	ar.Response = future.Response()
3244	return
3245}
3246
3247// GalleryApplicationVersion specifies information about the gallery Application Version that you want to
3248// create or update.
3249type GalleryApplicationVersion struct {
3250	autorest.Response                    `json:"-"`
3251	*GalleryApplicationVersionProperties `json:"properties,omitempty"`
3252	// ID - READ-ONLY; Resource Id
3253	ID *string `json:"id,omitempty"`
3254	// Name - READ-ONLY; Resource name
3255	Name *string `json:"name,omitempty"`
3256	// Type - READ-ONLY; Resource type
3257	Type *string `json:"type,omitempty"`
3258	// Location - Resource location
3259	Location *string `json:"location,omitempty"`
3260	// Tags - Resource tags
3261	Tags map[string]*string `json:"tags"`
3262}
3263
3264// MarshalJSON is the custom marshaler for GalleryApplicationVersion.
3265func (gav GalleryApplicationVersion) MarshalJSON() ([]byte, error) {
3266	objectMap := make(map[string]interface{})
3267	if gav.GalleryApplicationVersionProperties != nil {
3268		objectMap["properties"] = gav.GalleryApplicationVersionProperties
3269	}
3270	if gav.Location != nil {
3271		objectMap["location"] = gav.Location
3272	}
3273	if gav.Tags != nil {
3274		objectMap["tags"] = gav.Tags
3275	}
3276	return json.Marshal(objectMap)
3277}
3278
3279// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersion struct.
3280func (gav *GalleryApplicationVersion) UnmarshalJSON(body []byte) error {
3281	var m map[string]*json.RawMessage
3282	err := json.Unmarshal(body, &m)
3283	if err != nil {
3284		return err
3285	}
3286	for k, v := range m {
3287		switch k {
3288		case "properties":
3289			if v != nil {
3290				var galleryApplicationVersionProperties GalleryApplicationVersionProperties
3291				err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
3292				if err != nil {
3293					return err
3294				}
3295				gav.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
3296			}
3297		case "id":
3298			if v != nil {
3299				var ID string
3300				err = json.Unmarshal(*v, &ID)
3301				if err != nil {
3302					return err
3303				}
3304				gav.ID = &ID
3305			}
3306		case "name":
3307			if v != nil {
3308				var name string
3309				err = json.Unmarshal(*v, &name)
3310				if err != nil {
3311					return err
3312				}
3313				gav.Name = &name
3314			}
3315		case "type":
3316			if v != nil {
3317				var typeVar string
3318				err = json.Unmarshal(*v, &typeVar)
3319				if err != nil {
3320					return err
3321				}
3322				gav.Type = &typeVar
3323			}
3324		case "location":
3325			if v != nil {
3326				var location string
3327				err = json.Unmarshal(*v, &location)
3328				if err != nil {
3329					return err
3330				}
3331				gav.Location = &location
3332			}
3333		case "tags":
3334			if v != nil {
3335				var tags map[string]*string
3336				err = json.Unmarshal(*v, &tags)
3337				if err != nil {
3338					return err
3339				}
3340				gav.Tags = tags
3341			}
3342		}
3343	}
3344
3345	return nil
3346}
3347
3348// GalleryApplicationVersionList the List Gallery Application version operation response.
3349type GalleryApplicationVersionList struct {
3350	autorest.Response `json:"-"`
3351	// Value - A list of gallery Application Versions.
3352	Value *[]GalleryApplicationVersion `json:"value,omitempty"`
3353	// NextLink - The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to fetch the next page of gallery Application Versions.
3354	NextLink *string `json:"nextLink,omitempty"`
3355}
3356
3357// GalleryApplicationVersionListIterator provides access to a complete listing of GalleryApplicationVersion
3358// values.
3359type GalleryApplicationVersionListIterator struct {
3360	i    int
3361	page GalleryApplicationVersionListPage
3362}
3363
3364// NextWithContext advances to the next value.  If there was an error making
3365// the request the iterator does not advance and the error is returned.
3366func (iter *GalleryApplicationVersionListIterator) NextWithContext(ctx context.Context) (err error) {
3367	if tracing.IsEnabled() {
3368		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListIterator.NextWithContext")
3369		defer func() {
3370			sc := -1
3371			if iter.Response().Response.Response != nil {
3372				sc = iter.Response().Response.Response.StatusCode
3373			}
3374			tracing.EndSpan(ctx, sc, err)
3375		}()
3376	}
3377	iter.i++
3378	if iter.i < len(iter.page.Values()) {
3379		return nil
3380	}
3381	err = iter.page.NextWithContext(ctx)
3382	if err != nil {
3383		iter.i--
3384		return err
3385	}
3386	iter.i = 0
3387	return nil
3388}
3389
3390// Next advances to the next value.  If there was an error making
3391// the request the iterator does not advance and the error is returned.
3392// Deprecated: Use NextWithContext() instead.
3393func (iter *GalleryApplicationVersionListIterator) Next() error {
3394	return iter.NextWithContext(context.Background())
3395}
3396
3397// NotDone returns true if the enumeration should be started or is not yet complete.
3398func (iter GalleryApplicationVersionListIterator) NotDone() bool {
3399	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3400}
3401
3402// Response returns the raw server response from the last page request.
3403func (iter GalleryApplicationVersionListIterator) Response() GalleryApplicationVersionList {
3404	return iter.page.Response()
3405}
3406
3407// Value returns the current value or a zero-initialized value if the
3408// iterator has advanced beyond the end of the collection.
3409func (iter GalleryApplicationVersionListIterator) Value() GalleryApplicationVersion {
3410	if !iter.page.NotDone() {
3411		return GalleryApplicationVersion{}
3412	}
3413	return iter.page.Values()[iter.i]
3414}
3415
3416// Creates a new instance of the GalleryApplicationVersionListIterator type.
3417func NewGalleryApplicationVersionListIterator(page GalleryApplicationVersionListPage) GalleryApplicationVersionListIterator {
3418	return GalleryApplicationVersionListIterator{page: page}
3419}
3420
3421// IsEmpty returns true if the ListResult contains no values.
3422func (gavl GalleryApplicationVersionList) IsEmpty() bool {
3423	return gavl.Value == nil || len(*gavl.Value) == 0
3424}
3425
3426// hasNextLink returns true if the NextLink is not empty.
3427func (gavl GalleryApplicationVersionList) hasNextLink() bool {
3428	return gavl.NextLink != nil && len(*gavl.NextLink) != 0
3429}
3430
3431// galleryApplicationVersionListPreparer prepares a request to retrieve the next set of results.
3432// It returns nil if no more results exist.
3433func (gavl GalleryApplicationVersionList) galleryApplicationVersionListPreparer(ctx context.Context) (*http.Request, error) {
3434	if !gavl.hasNextLink() {
3435		return nil, nil
3436	}
3437	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3438		autorest.AsJSON(),
3439		autorest.AsGet(),
3440		autorest.WithBaseURL(to.String(gavl.NextLink)))
3441}
3442
3443// GalleryApplicationVersionListPage contains a page of GalleryApplicationVersion values.
3444type GalleryApplicationVersionListPage struct {
3445	fn   func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)
3446	gavl GalleryApplicationVersionList
3447}
3448
3449// NextWithContext advances to the next page of values.  If there was an error making
3450// the request the page does not advance and the error is returned.
3451func (page *GalleryApplicationVersionListPage) NextWithContext(ctx context.Context) (err error) {
3452	if tracing.IsEnabled() {
3453		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListPage.NextWithContext")
3454		defer func() {
3455			sc := -1
3456			if page.Response().Response.Response != nil {
3457				sc = page.Response().Response.Response.StatusCode
3458			}
3459			tracing.EndSpan(ctx, sc, err)
3460		}()
3461	}
3462	for {
3463		next, err := page.fn(ctx, page.gavl)
3464		if err != nil {
3465			return err
3466		}
3467		page.gavl = next
3468		if !next.hasNextLink() || !next.IsEmpty() {
3469			break
3470		}
3471	}
3472	return nil
3473}
3474
3475// Next advances to the next page of values.  If there was an error making
3476// the request the page does not advance and the error is returned.
3477// Deprecated: Use NextWithContext() instead.
3478func (page *GalleryApplicationVersionListPage) Next() error {
3479	return page.NextWithContext(context.Background())
3480}
3481
3482// NotDone returns true if the page enumeration should be started or is not yet complete.
3483func (page GalleryApplicationVersionListPage) NotDone() bool {
3484	return !page.gavl.IsEmpty()
3485}
3486
3487// Response returns the raw server response from the last page request.
3488func (page GalleryApplicationVersionListPage) Response() GalleryApplicationVersionList {
3489	return page.gavl
3490}
3491
3492// Values returns the slice of values for the current page or nil if there are no values.
3493func (page GalleryApplicationVersionListPage) Values() []GalleryApplicationVersion {
3494	if page.gavl.IsEmpty() {
3495		return nil
3496	}
3497	return *page.gavl.Value
3498}
3499
3500// Creates a new instance of the GalleryApplicationVersionListPage type.
3501func NewGalleryApplicationVersionListPage(cur GalleryApplicationVersionList, getNextPage func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)) GalleryApplicationVersionListPage {
3502	return GalleryApplicationVersionListPage{
3503		fn:   getNextPage,
3504		gavl: cur,
3505	}
3506}
3507
3508// GalleryApplicationVersionProperties describes the properties of a gallery Image Version.
3509type GalleryApplicationVersionProperties struct {
3510	PublishingProfile *GalleryApplicationVersionPublishingProfile `json:"publishingProfile,omitempty"`
3511	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1Updating', 'ProvisioningState1Failed', 'ProvisioningState1Succeeded', 'ProvisioningState1Deleting', 'ProvisioningState1Migrating'
3512	ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"`
3513	// ReplicationStatus - READ-ONLY
3514	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
3515}
3516
3517// MarshalJSON is the custom marshaler for GalleryApplicationVersionProperties.
3518func (gavp GalleryApplicationVersionProperties) MarshalJSON() ([]byte, error) {
3519	objectMap := make(map[string]interface{})
3520	if gavp.PublishingProfile != nil {
3521		objectMap["publishingProfile"] = gavp.PublishingProfile
3522	}
3523	return json.Marshal(objectMap)
3524}
3525
3526// GalleryApplicationVersionPublishingProfile the publishing profile of a gallery Image Version.
3527type GalleryApplicationVersionPublishingProfile struct {
3528	Source *UserArtifactSource `json:"source,omitempty"`
3529	// ContentType - Optional. May be used to help process this file. The type of file contained in the source, e.g. zip, json, etc.
3530	ContentType *string `json:"contentType,omitempty"`
3531	// EnableHealthCheck - Optional. Whether or not this application reports health.
3532	EnableHealthCheck *bool `json:"enableHealthCheck,omitempty"`
3533	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
3534	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
3535	// ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
3536	ReplicaCount *int32 `json:"replicaCount,omitempty"`
3537	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
3538	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
3539	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
3540	PublishedDate *date.Time `json:"publishedDate,omitempty"`
3541	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
3542	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
3543	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS'
3544	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
3545}
3546
3547// MarshalJSON is the custom marshaler for GalleryApplicationVersionPublishingProfile.
3548func (gavpp GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, error) {
3549	objectMap := make(map[string]interface{})
3550	if gavpp.Source != nil {
3551		objectMap["source"] = gavpp.Source
3552	}
3553	if gavpp.ContentType != nil {
3554		objectMap["contentType"] = gavpp.ContentType
3555	}
3556	if gavpp.EnableHealthCheck != nil {
3557		objectMap["enableHealthCheck"] = gavpp.EnableHealthCheck
3558	}
3559	if gavpp.TargetRegions != nil {
3560		objectMap["targetRegions"] = gavpp.TargetRegions
3561	}
3562	if gavpp.ReplicaCount != nil {
3563		objectMap["replicaCount"] = gavpp.ReplicaCount
3564	}
3565	if gavpp.ExcludeFromLatest != nil {
3566		objectMap["excludeFromLatest"] = gavpp.ExcludeFromLatest
3567	}
3568	if gavpp.EndOfLifeDate != nil {
3569		objectMap["endOfLifeDate"] = gavpp.EndOfLifeDate
3570	}
3571	if gavpp.StorageAccountType != "" {
3572		objectMap["storageAccountType"] = gavpp.StorageAccountType
3573	}
3574	return json.Marshal(objectMap)
3575}
3576
3577// GalleryApplicationVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3578// of a long-running operation.
3579type GalleryApplicationVersionsCreateOrUpdateFuture struct {
3580	azure.FutureAPI
3581	// Result returns the result of the asynchronous operation.
3582	// If the operation has not completed it will return an error.
3583	Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
3584}
3585
3586// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3587func (future *GalleryApplicationVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3588	var azFuture azure.Future
3589	if err := json.Unmarshal(body, &azFuture); err != nil {
3590		return err
3591	}
3592	future.FutureAPI = &azFuture
3593	future.Result = future.result
3594	return nil
3595}
3596
3597// result is the default implementation for GalleryApplicationVersionsCreateOrUpdateFuture.Result.
3598func (future *GalleryApplicationVersionsCreateOrUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
3599	var done bool
3600	done, err = future.DoneWithContext(context.Background(), client)
3601	if err != nil {
3602		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3603		return
3604	}
3605	if !done {
3606		gav.Response.Response = future.Response()
3607		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsCreateOrUpdateFuture")
3608		return
3609	}
3610	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3611	if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
3612		gav, err = client.CreateOrUpdateResponder(gav.Response.Response)
3613		if err != nil {
3614			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
3615		}
3616	}
3617	return
3618}
3619
3620// GalleryApplicationVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
3621// long-running operation.
3622type GalleryApplicationVersionsDeleteFuture struct {
3623	azure.FutureAPI
3624	// Result returns the result of the asynchronous operation.
3625	// If the operation has not completed it will return an error.
3626	Result func(GalleryApplicationVersionsClient) (autorest.Response, error)
3627}
3628
3629// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3630func (future *GalleryApplicationVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
3631	var azFuture azure.Future
3632	if err := json.Unmarshal(body, &azFuture); err != nil {
3633		return err
3634	}
3635	future.FutureAPI = &azFuture
3636	future.Result = future.result
3637	return nil
3638}
3639
3640// result is the default implementation for GalleryApplicationVersionsDeleteFuture.Result.
3641func (future *GalleryApplicationVersionsDeleteFuture) result(client GalleryApplicationVersionsClient) (ar autorest.Response, err error) {
3642	var done bool
3643	done, err = future.DoneWithContext(context.Background(), client)
3644	if err != nil {
3645		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
3646		return
3647	}
3648	if !done {
3649		ar.Response = future.Response()
3650		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsDeleteFuture")
3651		return
3652	}
3653	ar.Response = future.Response()
3654	return
3655}
3656
3657// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile.
3658type GalleryArtifactPublishingProfileBase struct {
3659	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
3660	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
3661	// ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
3662	ReplicaCount *int32 `json:"replicaCount,omitempty"`
3663	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
3664	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
3665	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
3666	PublishedDate *date.Time `json:"publishedDate,omitempty"`
3667	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
3668	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
3669	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS'
3670	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
3671}
3672
3673// MarshalJSON is the custom marshaler for GalleryArtifactPublishingProfileBase.
3674func (gappb GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error) {
3675	objectMap := make(map[string]interface{})
3676	if gappb.TargetRegions != nil {
3677		objectMap["targetRegions"] = gappb.TargetRegions
3678	}
3679	if gappb.ReplicaCount != nil {
3680		objectMap["replicaCount"] = gappb.ReplicaCount
3681	}
3682	if gappb.ExcludeFromLatest != nil {
3683		objectMap["excludeFromLatest"] = gappb.ExcludeFromLatest
3684	}
3685	if gappb.EndOfLifeDate != nil {
3686		objectMap["endOfLifeDate"] = gappb.EndOfLifeDate
3687	}
3688	if gappb.StorageAccountType != "" {
3689		objectMap["storageAccountType"] = gappb.StorageAccountType
3690	}
3691	return json.Marshal(objectMap)
3692}
3693
3694// GalleryArtifactSource the source image from which the Image Version is going to be created.
3695type GalleryArtifactSource struct {
3696	ManagedImage *ManagedArtifact `json:"managedImage,omitempty"`
3697}
3698
3699// GalleryDataDiskImage this is the data disk image.
3700type GalleryDataDiskImage struct {
3701	// Lun - READ-ONLY; This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
3702	Lun *int32 `json:"lun,omitempty"`
3703	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
3704	SizeInGB *int32 `json:"sizeInGB,omitempty"`
3705	// HostCaching - READ-ONLY; The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
3706	HostCaching HostCaching `json:"hostCaching,omitempty"`
3707}
3708
3709// MarshalJSON is the custom marshaler for GalleryDataDiskImage.
3710func (gddi GalleryDataDiskImage) MarshalJSON() ([]byte, error) {
3711	objectMap := make(map[string]interface{})
3712	return json.Marshal(objectMap)
3713}
3714
3715// GalleryDiskImage this is the disk image base class.
3716type GalleryDiskImage struct {
3717	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
3718	SizeInGB *int32 `json:"sizeInGB,omitempty"`
3719	// HostCaching - READ-ONLY; The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
3720	HostCaching HostCaching `json:"hostCaching,omitempty"`
3721}
3722
3723// MarshalJSON is the custom marshaler for GalleryDiskImage.
3724func (gdi GalleryDiskImage) MarshalJSON() ([]byte, error) {
3725	objectMap := make(map[string]interface{})
3726	return json.Marshal(objectMap)
3727}
3728
3729// GalleryIdentifier describes the gallery unique name.
3730type GalleryIdentifier struct {
3731	// UniqueName - READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure.
3732	UniqueName *string `json:"uniqueName,omitempty"`
3733}
3734
3735// MarshalJSON is the custom marshaler for GalleryIdentifier.
3736func (gi GalleryIdentifier) MarshalJSON() ([]byte, error) {
3737	objectMap := make(map[string]interface{})
3738	return json.Marshal(objectMap)
3739}
3740
3741// GalleryImage specifies information about the gallery Image Definition that you want to create or update.
3742type GalleryImage struct {
3743	autorest.Response       `json:"-"`
3744	*GalleryImageProperties `json:"properties,omitempty"`
3745	// ID - READ-ONLY; Resource Id
3746	ID *string `json:"id,omitempty"`
3747	// Name - READ-ONLY; Resource name
3748	Name *string `json:"name,omitempty"`
3749	// Type - READ-ONLY; Resource type
3750	Type *string `json:"type,omitempty"`
3751	// Location - Resource location
3752	Location *string `json:"location,omitempty"`
3753	// Tags - Resource tags
3754	Tags map[string]*string `json:"tags"`
3755}
3756
3757// MarshalJSON is the custom marshaler for GalleryImage.
3758func (gi GalleryImage) MarshalJSON() ([]byte, error) {
3759	objectMap := make(map[string]interface{})
3760	if gi.GalleryImageProperties != nil {
3761		objectMap["properties"] = gi.GalleryImageProperties
3762	}
3763	if gi.Location != nil {
3764		objectMap["location"] = gi.Location
3765	}
3766	if gi.Tags != nil {
3767		objectMap["tags"] = gi.Tags
3768	}
3769	return json.Marshal(objectMap)
3770}
3771
3772// UnmarshalJSON is the custom unmarshaler for GalleryImage struct.
3773func (gi *GalleryImage) UnmarshalJSON(body []byte) error {
3774	var m map[string]*json.RawMessage
3775	err := json.Unmarshal(body, &m)
3776	if err != nil {
3777		return err
3778	}
3779	for k, v := range m {
3780		switch k {
3781		case "properties":
3782			if v != nil {
3783				var galleryImageProperties GalleryImageProperties
3784				err = json.Unmarshal(*v, &galleryImageProperties)
3785				if err != nil {
3786					return err
3787				}
3788				gi.GalleryImageProperties = &galleryImageProperties
3789			}
3790		case "id":
3791			if v != nil {
3792				var ID string
3793				err = json.Unmarshal(*v, &ID)
3794				if err != nil {
3795					return err
3796				}
3797				gi.ID = &ID
3798			}
3799		case "name":
3800			if v != nil {
3801				var name string
3802				err = json.Unmarshal(*v, &name)
3803				if err != nil {
3804					return err
3805				}
3806				gi.Name = &name
3807			}
3808		case "type":
3809			if v != nil {
3810				var typeVar string
3811				err = json.Unmarshal(*v, &typeVar)
3812				if err != nil {
3813					return err
3814				}
3815				gi.Type = &typeVar
3816			}
3817		case "location":
3818			if v != nil {
3819				var location string
3820				err = json.Unmarshal(*v, &location)
3821				if err != nil {
3822					return err
3823				}
3824				gi.Location = &location
3825			}
3826		case "tags":
3827			if v != nil {
3828				var tags map[string]*string
3829				err = json.Unmarshal(*v, &tags)
3830				if err != nil {
3831					return err
3832				}
3833				gi.Tags = tags
3834			}
3835		}
3836	}
3837
3838	return nil
3839}
3840
3841// GalleryImageIdentifier this is the gallery Image Definition identifier.
3842type GalleryImageIdentifier struct {
3843	// Publisher - The name of the gallery Image Definition publisher.
3844	Publisher *string `json:"publisher,omitempty"`
3845	// Offer - The name of the gallery Image Definition offer.
3846	Offer *string `json:"offer,omitempty"`
3847	// Sku - The name of the gallery Image Definition SKU.
3848	Sku *string `json:"sku,omitempty"`
3849}
3850
3851// GalleryImageList the List Gallery Images operation response.
3852type GalleryImageList struct {
3853	autorest.Response `json:"-"`
3854	// Value - A list of Shared Image Gallery images.
3855	Value *[]GalleryImage `json:"value,omitempty"`
3856	// NextLink - The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call ListNext() with this to fetch the next page of gallery Image Definitions.
3857	NextLink *string `json:"nextLink,omitempty"`
3858}
3859
3860// GalleryImageListIterator provides access to a complete listing of GalleryImage values.
3861type GalleryImageListIterator struct {
3862	i    int
3863	page GalleryImageListPage
3864}
3865
3866// NextWithContext advances to the next value.  If there was an error making
3867// the request the iterator does not advance and the error is returned.
3868func (iter *GalleryImageListIterator) NextWithContext(ctx context.Context) (err error) {
3869	if tracing.IsEnabled() {
3870		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListIterator.NextWithContext")
3871		defer func() {
3872			sc := -1
3873			if iter.Response().Response.Response != nil {
3874				sc = iter.Response().Response.Response.StatusCode
3875			}
3876			tracing.EndSpan(ctx, sc, err)
3877		}()
3878	}
3879	iter.i++
3880	if iter.i < len(iter.page.Values()) {
3881		return nil
3882	}
3883	err = iter.page.NextWithContext(ctx)
3884	if err != nil {
3885		iter.i--
3886		return err
3887	}
3888	iter.i = 0
3889	return nil
3890}
3891
3892// Next advances to the next value.  If there was an error making
3893// the request the iterator does not advance and the error is returned.
3894// Deprecated: Use NextWithContext() instead.
3895func (iter *GalleryImageListIterator) Next() error {
3896	return iter.NextWithContext(context.Background())
3897}
3898
3899// NotDone returns true if the enumeration should be started or is not yet complete.
3900func (iter GalleryImageListIterator) NotDone() bool {
3901	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3902}
3903
3904// Response returns the raw server response from the last page request.
3905func (iter GalleryImageListIterator) Response() GalleryImageList {
3906	return iter.page.Response()
3907}
3908
3909// Value returns the current value or a zero-initialized value if the
3910// iterator has advanced beyond the end of the collection.
3911func (iter GalleryImageListIterator) Value() GalleryImage {
3912	if !iter.page.NotDone() {
3913		return GalleryImage{}
3914	}
3915	return iter.page.Values()[iter.i]
3916}
3917
3918// Creates a new instance of the GalleryImageListIterator type.
3919func NewGalleryImageListIterator(page GalleryImageListPage) GalleryImageListIterator {
3920	return GalleryImageListIterator{page: page}
3921}
3922
3923// IsEmpty returns true if the ListResult contains no values.
3924func (gil GalleryImageList) IsEmpty() bool {
3925	return gil.Value == nil || len(*gil.Value) == 0
3926}
3927
3928// hasNextLink returns true if the NextLink is not empty.
3929func (gil GalleryImageList) hasNextLink() bool {
3930	return gil.NextLink != nil && len(*gil.NextLink) != 0
3931}
3932
3933// galleryImageListPreparer prepares a request to retrieve the next set of results.
3934// It returns nil if no more results exist.
3935func (gil GalleryImageList) galleryImageListPreparer(ctx context.Context) (*http.Request, error) {
3936	if !gil.hasNextLink() {
3937		return nil, nil
3938	}
3939	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3940		autorest.AsJSON(),
3941		autorest.AsGet(),
3942		autorest.WithBaseURL(to.String(gil.NextLink)))
3943}
3944
3945// GalleryImageListPage contains a page of GalleryImage values.
3946type GalleryImageListPage struct {
3947	fn  func(context.Context, GalleryImageList) (GalleryImageList, error)
3948	gil GalleryImageList
3949}
3950
3951// NextWithContext advances to the next page of values.  If there was an error making
3952// the request the page does not advance and the error is returned.
3953func (page *GalleryImageListPage) NextWithContext(ctx context.Context) (err error) {
3954	if tracing.IsEnabled() {
3955		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListPage.NextWithContext")
3956		defer func() {
3957			sc := -1
3958			if page.Response().Response.Response != nil {
3959				sc = page.Response().Response.Response.StatusCode
3960			}
3961			tracing.EndSpan(ctx, sc, err)
3962		}()
3963	}
3964	for {
3965		next, err := page.fn(ctx, page.gil)
3966		if err != nil {
3967			return err
3968		}
3969		page.gil = next
3970		if !next.hasNextLink() || !next.IsEmpty() {
3971			break
3972		}
3973	}
3974	return nil
3975}
3976
3977// Next advances to the next page of values.  If there was an error making
3978// the request the page does not advance and the error is returned.
3979// Deprecated: Use NextWithContext() instead.
3980func (page *GalleryImageListPage) Next() error {
3981	return page.NextWithContext(context.Background())
3982}
3983
3984// NotDone returns true if the page enumeration should be started or is not yet complete.
3985func (page GalleryImageListPage) NotDone() bool {
3986	return !page.gil.IsEmpty()
3987}
3988
3989// Response returns the raw server response from the last page request.
3990func (page GalleryImageListPage) Response() GalleryImageList {
3991	return page.gil
3992}
3993
3994// Values returns the slice of values for the current page or nil if there are no values.
3995func (page GalleryImageListPage) Values() []GalleryImage {
3996	if page.gil.IsEmpty() {
3997		return nil
3998	}
3999	return *page.gil.Value
4000}
4001
4002// Creates a new instance of the GalleryImageListPage type.
4003func NewGalleryImageListPage(cur GalleryImageList, getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage {
4004	return GalleryImageListPage{
4005		fn:  getNextPage,
4006		gil: cur,
4007	}
4008}
4009
4010// GalleryImageProperties describes the properties of a gallery Image Definition.
4011type GalleryImageProperties struct {
4012	// Description - The description of this gallery Image Definition resource. This property is updatable.
4013	Description *string `json:"description,omitempty"`
4014	// Eula - The Eula agreement for the gallery Image Definition.
4015	Eula *string `json:"eula,omitempty"`
4016	// PrivacyStatementURI - The privacy statement uri.
4017	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
4018	// ReleaseNoteURI - The release note uri.
4019	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
4020	// OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
4021	OsType OperatingSystemTypes `json:"osType,omitempty"`
4022	// OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'Generalized', 'Specialized'
4023	OsState OperatingSystemStateTypes `json:"osState,omitempty"`
4024	// EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable.
4025	EndOfLifeDate *date.Time                       `json:"endOfLifeDate,omitempty"`
4026	Identifier    *GalleryImageIdentifier          `json:"identifier,omitempty"`
4027	Recommended   *RecommendedMachineConfiguration `json:"recommended,omitempty"`
4028	Disallowed    *Disallowed                      `json:"disallowed,omitempty"`
4029	PurchasePlan  *ImagePurchasePlan               `json:"purchasePlan,omitempty"`
4030	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState2Creating', 'ProvisioningState2Updating', 'ProvisioningState2Failed', 'ProvisioningState2Succeeded', 'ProvisioningState2Deleting', 'ProvisioningState2Migrating'
4031	ProvisioningState ProvisioningState2 `json:"provisioningState,omitempty"`
4032}
4033
4034// MarshalJSON is the custom marshaler for GalleryImageProperties.
4035func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) {
4036	objectMap := make(map[string]interface{})
4037	if gip.Description != nil {
4038		objectMap["description"] = gip.Description
4039	}
4040	if gip.Eula != nil {
4041		objectMap["eula"] = gip.Eula
4042	}
4043	if gip.PrivacyStatementURI != nil {
4044		objectMap["privacyStatementUri"] = gip.PrivacyStatementURI
4045	}
4046	if gip.ReleaseNoteURI != nil {
4047		objectMap["releaseNoteUri"] = gip.ReleaseNoteURI
4048	}
4049	if gip.OsType != "" {
4050		objectMap["osType"] = gip.OsType
4051	}
4052	if gip.OsState != "" {
4053		objectMap["osState"] = gip.OsState
4054	}
4055	if gip.EndOfLifeDate != nil {
4056		objectMap["endOfLifeDate"] = gip.EndOfLifeDate
4057	}
4058	if gip.Identifier != nil {
4059		objectMap["identifier"] = gip.Identifier
4060	}
4061	if gip.Recommended != nil {
4062		objectMap["recommended"] = gip.Recommended
4063	}
4064	if gip.Disallowed != nil {
4065		objectMap["disallowed"] = gip.Disallowed
4066	}
4067	if gip.PurchasePlan != nil {
4068		objectMap["purchasePlan"] = gip.PurchasePlan
4069	}
4070	return json.Marshal(objectMap)
4071}
4072
4073// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4074// long-running operation.
4075type GalleryImagesCreateOrUpdateFuture struct {
4076	azure.FutureAPI
4077	// Result returns the result of the asynchronous operation.
4078	// If the operation has not completed it will return an error.
4079	Result func(GalleryImagesClient) (GalleryImage, error)
4080}
4081
4082// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4083func (future *GalleryImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4084	var azFuture azure.Future
4085	if err := json.Unmarshal(body, &azFuture); err != nil {
4086		return err
4087	}
4088	future.FutureAPI = &azFuture
4089	future.Result = future.result
4090	return nil
4091}
4092
4093// result is the default implementation for GalleryImagesCreateOrUpdateFuture.Result.
4094func (future *GalleryImagesCreateOrUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) {
4095	var done bool
4096	done, err = future.DoneWithContext(context.Background(), client)
4097	if err != nil {
4098		err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4099		return
4100	}
4101	if !done {
4102		gi.Response.Response = future.Response()
4103		err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture")
4104		return
4105	}
4106	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4107	if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
4108		gi, err = client.CreateOrUpdateResponder(gi.Response.Response)
4109		if err != nil {
4110			err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
4111		}
4112	}
4113	return
4114}
4115
4116// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4117// operation.
4118type GalleryImagesDeleteFuture struct {
4119	azure.FutureAPI
4120	// Result returns the result of the asynchronous operation.
4121	// If the operation has not completed it will return an error.
4122	Result func(GalleryImagesClient) (autorest.Response, error)
4123}
4124
4125// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4126func (future *GalleryImagesDeleteFuture) UnmarshalJSON(body []byte) error {
4127	var azFuture azure.Future
4128	if err := json.Unmarshal(body, &azFuture); err != nil {
4129		return err
4130	}
4131	future.FutureAPI = &azFuture
4132	future.Result = future.result
4133	return nil
4134}
4135
4136// result is the default implementation for GalleryImagesDeleteFuture.Result.
4137func (future *GalleryImagesDeleteFuture) result(client GalleryImagesClient) (ar autorest.Response, err error) {
4138	var done bool
4139	done, err = future.DoneWithContext(context.Background(), client)
4140	if err != nil {
4141		err = autorest.NewErrorWithError(err, "compute.GalleryImagesDeleteFuture", "Result", future.Response(), "Polling failure")
4142		return
4143	}
4144	if !done {
4145		ar.Response = future.Response()
4146		err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture")
4147		return
4148	}
4149	ar.Response = future.Response()
4150	return
4151}
4152
4153// GalleryImageVersion specifies information about the gallery Image Version that you want to create or
4154// update.
4155type GalleryImageVersion struct {
4156	autorest.Response              `json:"-"`
4157	*GalleryImageVersionProperties `json:"properties,omitempty"`
4158	// ID - READ-ONLY; Resource Id
4159	ID *string `json:"id,omitempty"`
4160	// Name - READ-ONLY; Resource name
4161	Name *string `json:"name,omitempty"`
4162	// Type - READ-ONLY; Resource type
4163	Type *string `json:"type,omitempty"`
4164	// Location - Resource location
4165	Location *string `json:"location,omitempty"`
4166	// Tags - Resource tags
4167	Tags map[string]*string `json:"tags"`
4168}
4169
4170// MarshalJSON is the custom marshaler for GalleryImageVersion.
4171func (giv GalleryImageVersion) MarshalJSON() ([]byte, error) {
4172	objectMap := make(map[string]interface{})
4173	if giv.GalleryImageVersionProperties != nil {
4174		objectMap["properties"] = giv.GalleryImageVersionProperties
4175	}
4176	if giv.Location != nil {
4177		objectMap["location"] = giv.Location
4178	}
4179	if giv.Tags != nil {
4180		objectMap["tags"] = giv.Tags
4181	}
4182	return json.Marshal(objectMap)
4183}
4184
4185// UnmarshalJSON is the custom unmarshaler for GalleryImageVersion struct.
4186func (giv *GalleryImageVersion) UnmarshalJSON(body []byte) error {
4187	var m map[string]*json.RawMessage
4188	err := json.Unmarshal(body, &m)
4189	if err != nil {
4190		return err
4191	}
4192	for k, v := range m {
4193		switch k {
4194		case "properties":
4195			if v != nil {
4196				var galleryImageVersionProperties GalleryImageVersionProperties
4197				err = json.Unmarshal(*v, &galleryImageVersionProperties)
4198				if err != nil {
4199					return err
4200				}
4201				giv.GalleryImageVersionProperties = &galleryImageVersionProperties
4202			}
4203		case "id":
4204			if v != nil {
4205				var ID string
4206				err = json.Unmarshal(*v, &ID)
4207				if err != nil {
4208					return err
4209				}
4210				giv.ID = &ID
4211			}
4212		case "name":
4213			if v != nil {
4214				var name string
4215				err = json.Unmarshal(*v, &name)
4216				if err != nil {
4217					return err
4218				}
4219				giv.Name = &name
4220			}
4221		case "type":
4222			if v != nil {
4223				var typeVar string
4224				err = json.Unmarshal(*v, &typeVar)
4225				if err != nil {
4226					return err
4227				}
4228				giv.Type = &typeVar
4229			}
4230		case "location":
4231			if v != nil {
4232				var location string
4233				err = json.Unmarshal(*v, &location)
4234				if err != nil {
4235					return err
4236				}
4237				giv.Location = &location
4238			}
4239		case "tags":
4240			if v != nil {
4241				var tags map[string]*string
4242				err = json.Unmarshal(*v, &tags)
4243				if err != nil {
4244					return err
4245				}
4246				giv.Tags = tags
4247			}
4248		}
4249	}
4250
4251	return nil
4252}
4253
4254// GalleryImageVersionList the List Gallery Image version operation response.
4255type GalleryImageVersionList struct {
4256	autorest.Response `json:"-"`
4257	// Value - A list of gallery Image Versions.
4258	Value *[]GalleryImageVersion `json:"value,omitempty"`
4259	// NextLink - The uri to fetch the next page of gallery Image Versions. Call ListNext() with this to fetch the next page of gallery Image Versions.
4260	NextLink *string `json:"nextLink,omitempty"`
4261}
4262
4263// GalleryImageVersionListIterator provides access to a complete listing of GalleryImageVersion values.
4264type GalleryImageVersionListIterator struct {
4265	i    int
4266	page GalleryImageVersionListPage
4267}
4268
4269// NextWithContext advances to the next value.  If there was an error making
4270// the request the iterator does not advance and the error is returned.
4271func (iter *GalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) {
4272	if tracing.IsEnabled() {
4273		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListIterator.NextWithContext")
4274		defer func() {
4275			sc := -1
4276			if iter.Response().Response.Response != nil {
4277				sc = iter.Response().Response.Response.StatusCode
4278			}
4279			tracing.EndSpan(ctx, sc, err)
4280		}()
4281	}
4282	iter.i++
4283	if iter.i < len(iter.page.Values()) {
4284		return nil
4285	}
4286	err = iter.page.NextWithContext(ctx)
4287	if err != nil {
4288		iter.i--
4289		return err
4290	}
4291	iter.i = 0
4292	return nil
4293}
4294
4295// Next advances to the next value.  If there was an error making
4296// the request the iterator does not advance and the error is returned.
4297// Deprecated: Use NextWithContext() instead.
4298func (iter *GalleryImageVersionListIterator) Next() error {
4299	return iter.NextWithContext(context.Background())
4300}
4301
4302// NotDone returns true if the enumeration should be started or is not yet complete.
4303func (iter GalleryImageVersionListIterator) NotDone() bool {
4304	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4305}
4306
4307// Response returns the raw server response from the last page request.
4308func (iter GalleryImageVersionListIterator) Response() GalleryImageVersionList {
4309	return iter.page.Response()
4310}
4311
4312// Value returns the current value or a zero-initialized value if the
4313// iterator has advanced beyond the end of the collection.
4314func (iter GalleryImageVersionListIterator) Value() GalleryImageVersion {
4315	if !iter.page.NotDone() {
4316		return GalleryImageVersion{}
4317	}
4318	return iter.page.Values()[iter.i]
4319}
4320
4321// Creates a new instance of the GalleryImageVersionListIterator type.
4322func NewGalleryImageVersionListIterator(page GalleryImageVersionListPage) GalleryImageVersionListIterator {
4323	return GalleryImageVersionListIterator{page: page}
4324}
4325
4326// IsEmpty returns true if the ListResult contains no values.
4327func (givl GalleryImageVersionList) IsEmpty() bool {
4328	return givl.Value == nil || len(*givl.Value) == 0
4329}
4330
4331// hasNextLink returns true if the NextLink is not empty.
4332func (givl GalleryImageVersionList) hasNextLink() bool {
4333	return givl.NextLink != nil && len(*givl.NextLink) != 0
4334}
4335
4336// galleryImageVersionListPreparer prepares a request to retrieve the next set of results.
4337// It returns nil if no more results exist.
4338func (givl GalleryImageVersionList) galleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) {
4339	if !givl.hasNextLink() {
4340		return nil, nil
4341	}
4342	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4343		autorest.AsJSON(),
4344		autorest.AsGet(),
4345		autorest.WithBaseURL(to.String(givl.NextLink)))
4346}
4347
4348// GalleryImageVersionListPage contains a page of GalleryImageVersion values.
4349type GalleryImageVersionListPage struct {
4350	fn   func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)
4351	givl GalleryImageVersionList
4352}
4353
4354// NextWithContext advances to the next page of values.  If there was an error making
4355// the request the page does not advance and the error is returned.
4356func (page *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) {
4357	if tracing.IsEnabled() {
4358		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListPage.NextWithContext")
4359		defer func() {
4360			sc := -1
4361			if page.Response().Response.Response != nil {
4362				sc = page.Response().Response.Response.StatusCode
4363			}
4364			tracing.EndSpan(ctx, sc, err)
4365		}()
4366	}
4367	for {
4368		next, err := page.fn(ctx, page.givl)
4369		if err != nil {
4370			return err
4371		}
4372		page.givl = next
4373		if !next.hasNextLink() || !next.IsEmpty() {
4374			break
4375		}
4376	}
4377	return nil
4378}
4379
4380// Next advances to the next page of values.  If there was an error making
4381// the request the page does not advance and the error is returned.
4382// Deprecated: Use NextWithContext() instead.
4383func (page *GalleryImageVersionListPage) Next() error {
4384	return page.NextWithContext(context.Background())
4385}
4386
4387// NotDone returns true if the page enumeration should be started or is not yet complete.
4388func (page GalleryImageVersionListPage) NotDone() bool {
4389	return !page.givl.IsEmpty()
4390}
4391
4392// Response returns the raw server response from the last page request.
4393func (page GalleryImageVersionListPage) Response() GalleryImageVersionList {
4394	return page.givl
4395}
4396
4397// Values returns the slice of values for the current page or nil if there are no values.
4398func (page GalleryImageVersionListPage) Values() []GalleryImageVersion {
4399	if page.givl.IsEmpty() {
4400		return nil
4401	}
4402	return *page.givl.Value
4403}
4404
4405// Creates a new instance of the GalleryImageVersionListPage type.
4406func NewGalleryImageVersionListPage(cur GalleryImageVersionList, getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage {
4407	return GalleryImageVersionListPage{
4408		fn:   getNextPage,
4409		givl: cur,
4410	}
4411}
4412
4413// GalleryImageVersionProperties describes the properties of a gallery Image Version.
4414type GalleryImageVersionProperties struct {
4415	PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"`
4416	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState3Creating', 'ProvisioningState3Updating', 'ProvisioningState3Failed', 'ProvisioningState3Succeeded', 'ProvisioningState3Deleting', 'ProvisioningState3Migrating'
4417	ProvisioningState ProvisioningState3 `json:"provisioningState,omitempty"`
4418	// StorageProfile - READ-ONLY
4419	StorageProfile *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"`
4420	// ReplicationStatus - READ-ONLY
4421	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
4422}
4423
4424// MarshalJSON is the custom marshaler for GalleryImageVersionProperties.
4425func (givp GalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
4426	objectMap := make(map[string]interface{})
4427	if givp.PublishingProfile != nil {
4428		objectMap["publishingProfile"] = givp.PublishingProfile
4429	}
4430	return json.Marshal(objectMap)
4431}
4432
4433// GalleryImageVersionPublishingProfile the publishing profile of a gallery Image Version.
4434type GalleryImageVersionPublishingProfile struct {
4435	Source *GalleryArtifactSource `json:"source,omitempty"`
4436	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
4437	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
4438	// ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
4439	ReplicaCount *int32 `json:"replicaCount,omitempty"`
4440	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
4441	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
4442	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
4443	PublishedDate *date.Time `json:"publishedDate,omitempty"`
4444	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
4445	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
4446	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS'
4447	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
4448}
4449
4450// MarshalJSON is the custom marshaler for GalleryImageVersionPublishingProfile.
4451func (givpp GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error) {
4452	objectMap := make(map[string]interface{})
4453	if givpp.Source != nil {
4454		objectMap["source"] = givpp.Source
4455	}
4456	if givpp.TargetRegions != nil {
4457		objectMap["targetRegions"] = givpp.TargetRegions
4458	}
4459	if givpp.ReplicaCount != nil {
4460		objectMap["replicaCount"] = givpp.ReplicaCount
4461	}
4462	if givpp.ExcludeFromLatest != nil {
4463		objectMap["excludeFromLatest"] = givpp.ExcludeFromLatest
4464	}
4465	if givpp.EndOfLifeDate != nil {
4466		objectMap["endOfLifeDate"] = givpp.EndOfLifeDate
4467	}
4468	if givpp.StorageAccountType != "" {
4469		objectMap["storageAccountType"] = givpp.StorageAccountType
4470	}
4471	return json.Marshal(objectMap)
4472}
4473
4474// GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4475// long-running operation.
4476type GalleryImageVersionsCreateOrUpdateFuture struct {
4477	azure.FutureAPI
4478	// Result returns the result of the asynchronous operation.
4479	// If the operation has not completed it will return an error.
4480	Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
4481}
4482
4483// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4484func (future *GalleryImageVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4485	var azFuture azure.Future
4486	if err := json.Unmarshal(body, &azFuture); err != nil {
4487		return err
4488	}
4489	future.FutureAPI = &azFuture
4490	future.Result = future.result
4491	return nil
4492}
4493
4494// result is the default implementation for GalleryImageVersionsCreateOrUpdateFuture.Result.
4495func (future *GalleryImageVersionsCreateOrUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
4496	var done bool
4497	done, err = future.DoneWithContext(context.Background(), client)
4498	if err != nil {
4499		err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4500		return
4501	}
4502	if !done {
4503		giv.Response.Response = future.Response()
4504		err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture")
4505		return
4506	}
4507	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4508	if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
4509		giv, err = client.CreateOrUpdateResponder(giv.Response.Response)
4510		if err != nil {
4511			err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
4512		}
4513	}
4514	return
4515}
4516
4517// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
4518// long-running operation.
4519type GalleryImageVersionsDeleteFuture struct {
4520	azure.FutureAPI
4521	// Result returns the result of the asynchronous operation.
4522	// If the operation has not completed it will return an error.
4523	Result func(GalleryImageVersionsClient) (autorest.Response, error)
4524}
4525
4526// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4527func (future *GalleryImageVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
4528	var azFuture azure.Future
4529	if err := json.Unmarshal(body, &azFuture); err != nil {
4530		return err
4531	}
4532	future.FutureAPI = &azFuture
4533	future.Result = future.result
4534	return nil
4535}
4536
4537// result is the default implementation for GalleryImageVersionsDeleteFuture.Result.
4538func (future *GalleryImageVersionsDeleteFuture) result(client GalleryImageVersionsClient) (ar autorest.Response, err error) {
4539	var done bool
4540	done, err = future.DoneWithContext(context.Background(), client)
4541	if err != nil {
4542		err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
4543		return
4544	}
4545	if !done {
4546		ar.Response = future.Response()
4547		err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture")
4548		return
4549	}
4550	ar.Response = future.Response()
4551	return
4552}
4553
4554// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version.
4555type GalleryImageVersionStorageProfile struct {
4556	// OsDiskImage - READ-ONLY
4557	OsDiskImage *GalleryOSDiskImage `json:"osDiskImage,omitempty"`
4558	// DataDiskImages - READ-ONLY; A list of data disk images.
4559	DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"`
4560}
4561
4562// MarshalJSON is the custom marshaler for GalleryImageVersionStorageProfile.
4563func (givsp GalleryImageVersionStorageProfile) MarshalJSON() ([]byte, error) {
4564	objectMap := make(map[string]interface{})
4565	return json.Marshal(objectMap)
4566}
4567
4568// GalleryList the List Galleries operation response.
4569type GalleryList struct {
4570	autorest.Response `json:"-"`
4571	// Value - A list of galleries.
4572	Value *[]Gallery `json:"value,omitempty"`
4573	// NextLink - The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries.
4574	NextLink *string `json:"nextLink,omitempty"`
4575}
4576
4577// GalleryListIterator provides access to a complete listing of Gallery values.
4578type GalleryListIterator struct {
4579	i    int
4580	page GalleryListPage
4581}
4582
4583// NextWithContext advances to the next value.  If there was an error making
4584// the request the iterator does not advance and the error is returned.
4585func (iter *GalleryListIterator) NextWithContext(ctx context.Context) (err error) {
4586	if tracing.IsEnabled() {
4587		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListIterator.NextWithContext")
4588		defer func() {
4589			sc := -1
4590			if iter.Response().Response.Response != nil {
4591				sc = iter.Response().Response.Response.StatusCode
4592			}
4593			tracing.EndSpan(ctx, sc, err)
4594		}()
4595	}
4596	iter.i++
4597	if iter.i < len(iter.page.Values()) {
4598		return nil
4599	}
4600	err = iter.page.NextWithContext(ctx)
4601	if err != nil {
4602		iter.i--
4603		return err
4604	}
4605	iter.i = 0
4606	return nil
4607}
4608
4609// Next advances to the next value.  If there was an error making
4610// the request the iterator does not advance and the error is returned.
4611// Deprecated: Use NextWithContext() instead.
4612func (iter *GalleryListIterator) Next() error {
4613	return iter.NextWithContext(context.Background())
4614}
4615
4616// NotDone returns true if the enumeration should be started or is not yet complete.
4617func (iter GalleryListIterator) NotDone() bool {
4618	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4619}
4620
4621// Response returns the raw server response from the last page request.
4622func (iter GalleryListIterator) Response() GalleryList {
4623	return iter.page.Response()
4624}
4625
4626// Value returns the current value or a zero-initialized value if the
4627// iterator has advanced beyond the end of the collection.
4628func (iter GalleryListIterator) Value() Gallery {
4629	if !iter.page.NotDone() {
4630		return Gallery{}
4631	}
4632	return iter.page.Values()[iter.i]
4633}
4634
4635// Creates a new instance of the GalleryListIterator type.
4636func NewGalleryListIterator(page GalleryListPage) GalleryListIterator {
4637	return GalleryListIterator{page: page}
4638}
4639
4640// IsEmpty returns true if the ListResult contains no values.
4641func (gl GalleryList) IsEmpty() bool {
4642	return gl.Value == nil || len(*gl.Value) == 0
4643}
4644
4645// hasNextLink returns true if the NextLink is not empty.
4646func (gl GalleryList) hasNextLink() bool {
4647	return gl.NextLink != nil && len(*gl.NextLink) != 0
4648}
4649
4650// galleryListPreparer prepares a request to retrieve the next set of results.
4651// It returns nil if no more results exist.
4652func (gl GalleryList) galleryListPreparer(ctx context.Context) (*http.Request, error) {
4653	if !gl.hasNextLink() {
4654		return nil, nil
4655	}
4656	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4657		autorest.AsJSON(),
4658		autorest.AsGet(),
4659		autorest.WithBaseURL(to.String(gl.NextLink)))
4660}
4661
4662// GalleryListPage contains a page of Gallery values.
4663type GalleryListPage struct {
4664	fn func(context.Context, GalleryList) (GalleryList, error)
4665	gl GalleryList
4666}
4667
4668// NextWithContext advances to the next page of values.  If there was an error making
4669// the request the page does not advance and the error is returned.
4670func (page *GalleryListPage) NextWithContext(ctx context.Context) (err error) {
4671	if tracing.IsEnabled() {
4672		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListPage.NextWithContext")
4673		defer func() {
4674			sc := -1
4675			if page.Response().Response.Response != nil {
4676				sc = page.Response().Response.Response.StatusCode
4677			}
4678			tracing.EndSpan(ctx, sc, err)
4679		}()
4680	}
4681	for {
4682		next, err := page.fn(ctx, page.gl)
4683		if err != nil {
4684			return err
4685		}
4686		page.gl = next
4687		if !next.hasNextLink() || !next.IsEmpty() {
4688			break
4689		}
4690	}
4691	return nil
4692}
4693
4694// Next advances to the next page of values.  If there was an error making
4695// the request the page does not advance and the error is returned.
4696// Deprecated: Use NextWithContext() instead.
4697func (page *GalleryListPage) Next() error {
4698	return page.NextWithContext(context.Background())
4699}
4700
4701// NotDone returns true if the page enumeration should be started or is not yet complete.
4702func (page GalleryListPage) NotDone() bool {
4703	return !page.gl.IsEmpty()
4704}
4705
4706// Response returns the raw server response from the last page request.
4707func (page GalleryListPage) Response() GalleryList {
4708	return page.gl
4709}
4710
4711// Values returns the slice of values for the current page or nil if there are no values.
4712func (page GalleryListPage) Values() []Gallery {
4713	if page.gl.IsEmpty() {
4714		return nil
4715	}
4716	return *page.gl.Value
4717}
4718
4719// Creates a new instance of the GalleryListPage type.
4720func NewGalleryListPage(cur GalleryList, getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage {
4721	return GalleryListPage{
4722		fn: getNextPage,
4723		gl: cur,
4724	}
4725}
4726
4727// GalleryOSDiskImage this is the OS disk image.
4728type GalleryOSDiskImage struct {
4729	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
4730	SizeInGB *int32 `json:"sizeInGB,omitempty"`
4731	// HostCaching - READ-ONLY; The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
4732	HostCaching HostCaching `json:"hostCaching,omitempty"`
4733}
4734
4735// MarshalJSON is the custom marshaler for GalleryOSDiskImage.
4736func (godi GalleryOSDiskImage) MarshalJSON() ([]byte, error) {
4737	objectMap := make(map[string]interface{})
4738	return json.Marshal(objectMap)
4739}
4740
4741// GalleryProperties describes the properties of a Shared Image Gallery.
4742type GalleryProperties struct {
4743	// Description - The description of this Shared Image Gallery resource. This property is updatable.
4744	Description *string            `json:"description,omitempty"`
4745	Identifier  *GalleryIdentifier `json:"identifier,omitempty"`
4746	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating'
4747	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4748}
4749
4750// MarshalJSON is the custom marshaler for GalleryProperties.
4751func (gp GalleryProperties) MarshalJSON() ([]byte, error) {
4752	objectMap := make(map[string]interface{})
4753	if gp.Description != nil {
4754		objectMap["description"] = gp.Description
4755	}
4756	if gp.Identifier != nil {
4757		objectMap["identifier"] = gp.Identifier
4758	}
4759	return json.Marshal(objectMap)
4760}
4761
4762// GrantAccessData data used for requesting a SAS.
4763type GrantAccessData struct {
4764	// Access - Possible values include: 'None', 'Read', 'Write'
4765	Access AccessLevel `json:"access,omitempty"`
4766	// DurationInSeconds - Time duration in seconds until the SAS access expires.
4767	DurationInSeconds *int32 `json:"durationInSeconds,omitempty"`
4768}
4769
4770// HardwareProfile specifies the hardware settings for the virtual machine.
4771type HardwareProfile struct {
4772	// VMSize - Specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:  <br><br> [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) <br><br> [List all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). Possible values include: 'VirtualMachineSizeTypesBasicA0', 'VirtualMachineSizeTypesBasicA1', 'VirtualMachineSizeTypesBasicA2', 'VirtualMachineSizeTypesBasicA3', 'VirtualMachineSizeTypesBasicA4', 'VirtualMachineSizeTypesStandardA0', 'VirtualMachineSizeTypesStandardA1', 'VirtualMachineSizeTypesStandardA2', 'VirtualMachineSizeTypesStandardA3', 'VirtualMachineSizeTypesStandardA4', 'VirtualMachineSizeTypesStandardA5', 'VirtualMachineSizeTypesStandardA6', 'VirtualMachineSizeTypesStandardA7', 'VirtualMachineSizeTypesStandardA8', 'VirtualMachineSizeTypesStandardA9', 'VirtualMachineSizeTypesStandardA10', 'VirtualMachineSizeTypesStandardA11', 'VirtualMachineSizeTypesStandardA1V2', 'VirtualMachineSizeTypesStandardA2V2', 'VirtualMachineSizeTypesStandardA4V2', 'VirtualMachineSizeTypesStandardA8V2', 'VirtualMachineSizeTypesStandardA2mV2', 'VirtualMachineSizeTypesStandardA4mV2', 'VirtualMachineSizeTypesStandardA8mV2', 'VirtualMachineSizeTypesStandardB1s', 'VirtualMachineSizeTypesStandardB1ms', 'VirtualMachineSizeTypesStandardB2s', 'VirtualMachineSizeTypesStandardB2ms', 'VirtualMachineSizeTypesStandardB4ms', 'VirtualMachineSizeTypesStandardB8ms', 'VirtualMachineSizeTypesStandardD1', 'VirtualMachineSizeTypesStandardD2', 'VirtualMachineSizeTypesStandardD3', 'VirtualMachineSizeTypesStandardD4', 'VirtualMachineSizeTypesStandardD11', 'VirtualMachineSizeTypesStandardD12', 'VirtualMachineSizeTypesStandardD13', 'VirtualMachineSizeTypesStandardD14', 'VirtualMachineSizeTypesStandardD1V2', 'VirtualMachineSizeTypesStandardD2V2', 'VirtualMachineSizeTypesStandardD3V2', 'VirtualMachineSizeTypesStandardD4V2', 'VirtualMachineSizeTypesStandardD5V2', 'VirtualMachineSizeTypesStandardD2V3', 'VirtualMachineSizeTypesStandardD4V3', 'VirtualMachineSizeTypesStandardD8V3', 'VirtualMachineSizeTypesStandardD16V3', 'VirtualMachineSizeTypesStandardD32V3', 'VirtualMachineSizeTypesStandardD64V3', 'VirtualMachineSizeTypesStandardD2sV3', 'VirtualMachineSizeTypesStandardD4sV3', 'VirtualMachineSizeTypesStandardD8sV3', 'VirtualMachineSizeTypesStandardD16sV3', 'VirtualMachineSizeTypesStandardD32sV3', 'VirtualMachineSizeTypesStandardD64sV3', 'VirtualMachineSizeTypesStandardD11V2', 'VirtualMachineSizeTypesStandardD12V2', 'VirtualMachineSizeTypesStandardD13V2', 'VirtualMachineSizeTypesStandardD14V2', 'VirtualMachineSizeTypesStandardD15V2', 'VirtualMachineSizeTypesStandardDS1', 'VirtualMachineSizeTypesStandardDS2', 'VirtualMachineSizeTypesStandardDS3', 'VirtualMachineSizeTypesStandardDS4', 'VirtualMachineSizeTypesStandardDS11', 'VirtualMachineSizeTypesStandardDS12', 'VirtualMachineSizeTypesStandardDS13', 'VirtualMachineSizeTypesStandardDS14', 'VirtualMachineSizeTypesStandardDS1V2', 'VirtualMachineSizeTypesStandardDS2V2', 'VirtualMachineSizeTypesStandardDS3V2', 'VirtualMachineSizeTypesStandardDS4V2', 'VirtualMachineSizeTypesStandardDS5V2', 'VirtualMachineSizeTypesStandardDS11V2', 'VirtualMachineSizeTypesStandardDS12V2', 'VirtualMachineSizeTypesStandardDS13V2', 'VirtualMachineSizeTypesStandardDS14V2', 'VirtualMachineSizeTypesStandardDS15V2', 'VirtualMachineSizeTypesStandardDS134V2', 'VirtualMachineSizeTypesStandardDS132V2', 'VirtualMachineSizeTypesStandardDS148V2', 'VirtualMachineSizeTypesStandardDS144V2', 'VirtualMachineSizeTypesStandardE2V3', 'VirtualMachineSizeTypesStandardE4V3', 'VirtualMachineSizeTypesStandardE8V3', 'VirtualMachineSizeTypesStandardE16V3', 'VirtualMachineSizeTypesStandardE32V3', 'VirtualMachineSizeTypesStandardE64V3', 'VirtualMachineSizeTypesStandardE2sV3', 'VirtualMachineSizeTypesStandardE4sV3', 'VirtualMachineSizeTypesStandardE8sV3', 'VirtualMachineSizeTypesStandardE16sV3', 'VirtualMachineSizeTypesStandardE32sV3', 'VirtualMachineSizeTypesStandardE64sV3', 'VirtualMachineSizeTypesStandardE3216V3', 'VirtualMachineSizeTypesStandardE328sV3', 'VirtualMachineSizeTypesStandardE6432sV3', 'VirtualMachineSizeTypesStandardE6416sV3', 'VirtualMachineSizeTypesStandardF1', 'VirtualMachineSizeTypesStandardF2', 'VirtualMachineSizeTypesStandardF4', 'VirtualMachineSizeTypesStandardF8', 'VirtualMachineSizeTypesStandardF16', 'VirtualMachineSizeTypesStandardF1s', 'VirtualMachineSizeTypesStandardF2s', 'VirtualMachineSizeTypesStandardF4s', 'VirtualMachineSizeTypesStandardF8s', 'VirtualMachineSizeTypesStandardF16s', 'VirtualMachineSizeTypesStandardF2sV2', 'VirtualMachineSizeTypesStandardF4sV2', 'VirtualMachineSizeTypesStandardF8sV2', 'VirtualMachineSizeTypesStandardF16sV2', 'VirtualMachineSizeTypesStandardF32sV2', 'VirtualMachineSizeTypesStandardF64sV2', 'VirtualMachineSizeTypesStandardF72sV2', 'VirtualMachineSizeTypesStandardG1', 'VirtualMachineSizeTypesStandardG2', 'VirtualMachineSizeTypesStandardG3', 'VirtualMachineSizeTypesStandardG4', 'VirtualMachineSizeTypesStandardG5', 'VirtualMachineSizeTypesStandardGS1', 'VirtualMachineSizeTypesStandardGS2', 'VirtualMachineSizeTypesStandardGS3', 'VirtualMachineSizeTypesStandardGS4', 'VirtualMachineSizeTypesStandardGS5', 'VirtualMachineSizeTypesStandardGS48', 'VirtualMachineSizeTypesStandardGS44', 'VirtualMachineSizeTypesStandardGS516', 'VirtualMachineSizeTypesStandardGS58', 'VirtualMachineSizeTypesStandardH8', 'VirtualMachineSizeTypesStandardH16', 'VirtualMachineSizeTypesStandardH8m', 'VirtualMachineSizeTypesStandardH16m', 'VirtualMachineSizeTypesStandardH16r', 'VirtualMachineSizeTypesStandardH16mr', 'VirtualMachineSizeTypesStandardL4s', 'VirtualMachineSizeTypesStandardL8s', 'VirtualMachineSizeTypesStandardL16s', 'VirtualMachineSizeTypesStandardL32s', 'VirtualMachineSizeTypesStandardM64s', 'VirtualMachineSizeTypesStandardM64ms', 'VirtualMachineSizeTypesStandardM128s', 'VirtualMachineSizeTypesStandardM128ms', 'VirtualMachineSizeTypesStandardM6432ms', 'VirtualMachineSizeTypesStandardM6416ms', 'VirtualMachineSizeTypesStandardM12864ms', 'VirtualMachineSizeTypesStandardM12832ms', 'VirtualMachineSizeTypesStandardNC6', 'VirtualMachineSizeTypesStandardNC12', 'VirtualMachineSizeTypesStandardNC24', 'VirtualMachineSizeTypesStandardNC24r', 'VirtualMachineSizeTypesStandardNC6sV2', 'VirtualMachineSizeTypesStandardNC12sV2', 'VirtualMachineSizeTypesStandardNC24sV2', 'VirtualMachineSizeTypesStandardNC24rsV2', 'VirtualMachineSizeTypesStandardNC6sV3', 'VirtualMachineSizeTypesStandardNC12sV3', 'VirtualMachineSizeTypesStandardNC24sV3', 'VirtualMachineSizeTypesStandardNC24rsV3', 'VirtualMachineSizeTypesStandardND6s', 'VirtualMachineSizeTypesStandardND12s', 'VirtualMachineSizeTypesStandardND24s', 'VirtualMachineSizeTypesStandardND24rs', 'VirtualMachineSizeTypesStandardNV6', 'VirtualMachineSizeTypesStandardNV12', 'VirtualMachineSizeTypesStandardNV24'
4773	VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"`
4774}
4775
4776// Image the source user image virtual hard disk. The virtual hard disk will be copied before being
4777// attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not
4778// exist.
4779type Image struct {
4780	autorest.Response `json:"-"`
4781	*ImageProperties  `json:"properties,omitempty"`
4782	// ID - READ-ONLY; Resource Id
4783	ID *string `json:"id,omitempty"`
4784	// Name - READ-ONLY; Resource name
4785	Name *string `json:"name,omitempty"`
4786	// Type - READ-ONLY; Resource type
4787	Type *string `json:"type,omitempty"`
4788	// Location - Resource location
4789	Location *string `json:"location,omitempty"`
4790	// Tags - Resource tags
4791	Tags map[string]*string `json:"tags"`
4792}
4793
4794// MarshalJSON is the custom marshaler for Image.
4795func (i Image) MarshalJSON() ([]byte, error) {
4796	objectMap := make(map[string]interface{})
4797	if i.ImageProperties != nil {
4798		objectMap["properties"] = i.ImageProperties
4799	}
4800	if i.Location != nil {
4801		objectMap["location"] = i.Location
4802	}
4803	if i.Tags != nil {
4804		objectMap["tags"] = i.Tags
4805	}
4806	return json.Marshal(objectMap)
4807}
4808
4809// UnmarshalJSON is the custom unmarshaler for Image struct.
4810func (i *Image) UnmarshalJSON(body []byte) error {
4811	var m map[string]*json.RawMessage
4812	err := json.Unmarshal(body, &m)
4813	if err != nil {
4814		return err
4815	}
4816	for k, v := range m {
4817		switch k {
4818		case "properties":
4819			if v != nil {
4820				var imageProperties ImageProperties
4821				err = json.Unmarshal(*v, &imageProperties)
4822				if err != nil {
4823					return err
4824				}
4825				i.ImageProperties = &imageProperties
4826			}
4827		case "id":
4828			if v != nil {
4829				var ID string
4830				err = json.Unmarshal(*v, &ID)
4831				if err != nil {
4832					return err
4833				}
4834				i.ID = &ID
4835			}
4836		case "name":
4837			if v != nil {
4838				var name string
4839				err = json.Unmarshal(*v, &name)
4840				if err != nil {
4841					return err
4842				}
4843				i.Name = &name
4844			}
4845		case "type":
4846			if v != nil {
4847				var typeVar string
4848				err = json.Unmarshal(*v, &typeVar)
4849				if err != nil {
4850					return err
4851				}
4852				i.Type = &typeVar
4853			}
4854		case "location":
4855			if v != nil {
4856				var location string
4857				err = json.Unmarshal(*v, &location)
4858				if err != nil {
4859					return err
4860				}
4861				i.Location = &location
4862			}
4863		case "tags":
4864			if v != nil {
4865				var tags map[string]*string
4866				err = json.Unmarshal(*v, &tags)
4867				if err != nil {
4868					return err
4869				}
4870				i.Tags = tags
4871			}
4872		}
4873	}
4874
4875	return nil
4876}
4877
4878// ImageDataDisk describes a data disk.
4879type ImageDataDisk struct {
4880	// Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
4881	Lun *int32 `json:"lun,omitempty"`
4882	// Snapshot - The snapshot.
4883	Snapshot *SubResource `json:"snapshot,omitempty"`
4884	// ManagedDisk - The managedDisk.
4885	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
4886	// BlobURI - The Virtual Hard Disk.
4887	BlobURI *string `json:"blobUri,omitempty"`
4888	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
4889	Caching CachingTypes `json:"caching,omitempty"`
4890	// DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
4891	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
4892	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
4893	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
4894}
4895
4896// ImageDiskReference the source image used for creating the disk.
4897type ImageDiskReference struct {
4898	// ID - A relative uri containing either a Platform Image Repository or user image reference.
4899	ID *string `json:"id,omitempty"`
4900	// Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
4901	Lun *int32 `json:"lun,omitempty"`
4902}
4903
4904// ImageListResult the List Image operation response.
4905type ImageListResult struct {
4906	autorest.Response `json:"-"`
4907	// Value - The list of Images.
4908	Value *[]Image `json:"value,omitempty"`
4909	// NextLink - The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images.
4910	NextLink *string `json:"nextLink,omitempty"`
4911}
4912
4913// ImageListResultIterator provides access to a complete listing of Image values.
4914type ImageListResultIterator struct {
4915	i    int
4916	page ImageListResultPage
4917}
4918
4919// NextWithContext advances to the next value.  If there was an error making
4920// the request the iterator does not advance and the error is returned.
4921func (iter *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) {
4922	if tracing.IsEnabled() {
4923		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.NextWithContext")
4924		defer func() {
4925			sc := -1
4926			if iter.Response().Response.Response != nil {
4927				sc = iter.Response().Response.Response.StatusCode
4928			}
4929			tracing.EndSpan(ctx, sc, err)
4930		}()
4931	}
4932	iter.i++
4933	if iter.i < len(iter.page.Values()) {
4934		return nil
4935	}
4936	err = iter.page.NextWithContext(ctx)
4937	if err != nil {
4938		iter.i--
4939		return err
4940	}
4941	iter.i = 0
4942	return nil
4943}
4944
4945// Next advances to the next value.  If there was an error making
4946// the request the iterator does not advance and the error is returned.
4947// Deprecated: Use NextWithContext() instead.
4948func (iter *ImageListResultIterator) Next() error {
4949	return iter.NextWithContext(context.Background())
4950}
4951
4952// NotDone returns true if the enumeration should be started or is not yet complete.
4953func (iter ImageListResultIterator) NotDone() bool {
4954	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4955}
4956
4957// Response returns the raw server response from the last page request.
4958func (iter ImageListResultIterator) Response() ImageListResult {
4959	return iter.page.Response()
4960}
4961
4962// Value returns the current value or a zero-initialized value if the
4963// iterator has advanced beyond the end of the collection.
4964func (iter ImageListResultIterator) Value() Image {
4965	if !iter.page.NotDone() {
4966		return Image{}
4967	}
4968	return iter.page.Values()[iter.i]
4969}
4970
4971// Creates a new instance of the ImageListResultIterator type.
4972func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator {
4973	return ImageListResultIterator{page: page}
4974}
4975
4976// IsEmpty returns true if the ListResult contains no values.
4977func (ilr ImageListResult) IsEmpty() bool {
4978	return ilr.Value == nil || len(*ilr.Value) == 0
4979}
4980
4981// hasNextLink returns true if the NextLink is not empty.
4982func (ilr ImageListResult) hasNextLink() bool {
4983	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
4984}
4985
4986// imageListResultPreparer prepares a request to retrieve the next set of results.
4987// It returns nil if no more results exist.
4988func (ilr ImageListResult) imageListResultPreparer(ctx context.Context) (*http.Request, error) {
4989	if !ilr.hasNextLink() {
4990		return nil, nil
4991	}
4992	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4993		autorest.AsJSON(),
4994		autorest.AsGet(),
4995		autorest.WithBaseURL(to.String(ilr.NextLink)))
4996}
4997
4998// ImageListResultPage contains a page of Image values.
4999type ImageListResultPage struct {
5000	fn  func(context.Context, ImageListResult) (ImageListResult, error)
5001	ilr ImageListResult
5002}
5003
5004// NextWithContext advances to the next page of values.  If there was an error making
5005// the request the page does not advance and the error is returned.
5006func (page *ImageListResultPage) NextWithContext(ctx context.Context) (err error) {
5007	if tracing.IsEnabled() {
5008		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultPage.NextWithContext")
5009		defer func() {
5010			sc := -1
5011			if page.Response().Response.Response != nil {
5012				sc = page.Response().Response.Response.StatusCode
5013			}
5014			tracing.EndSpan(ctx, sc, err)
5015		}()
5016	}
5017	for {
5018		next, err := page.fn(ctx, page.ilr)
5019		if err != nil {
5020			return err
5021		}
5022		page.ilr = next
5023		if !next.hasNextLink() || !next.IsEmpty() {
5024			break
5025		}
5026	}
5027	return nil
5028}
5029
5030// Next advances to the next page of values.  If there was an error making
5031// the request the page does not advance and the error is returned.
5032// Deprecated: Use NextWithContext() instead.
5033func (page *ImageListResultPage) Next() error {
5034	return page.NextWithContext(context.Background())
5035}
5036
5037// NotDone returns true if the page enumeration should be started or is not yet complete.
5038func (page ImageListResultPage) NotDone() bool {
5039	return !page.ilr.IsEmpty()
5040}
5041
5042// Response returns the raw server response from the last page request.
5043func (page ImageListResultPage) Response() ImageListResult {
5044	return page.ilr
5045}
5046
5047// Values returns the slice of values for the current page or nil if there are no values.
5048func (page ImageListResultPage) Values() []Image {
5049	if page.ilr.IsEmpty() {
5050		return nil
5051	}
5052	return *page.ilr.Value
5053}
5054
5055// Creates a new instance of the ImageListResultPage type.
5056func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
5057	return ImageListResultPage{
5058		fn:  getNextPage,
5059		ilr: cur,
5060	}
5061}
5062
5063// ImageOSDisk describes an Operating System disk.
5064type ImageOSDisk struct {
5065	// OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
5066	OsType OperatingSystemTypes `json:"osType,omitempty"`
5067	// OsState - The OS State. Possible values include: 'Generalized', 'Specialized'
5068	OsState OperatingSystemStateTypes `json:"osState,omitempty"`
5069	// Snapshot - The snapshot.
5070	Snapshot *SubResource `json:"snapshot,omitempty"`
5071	// ManagedDisk - The managedDisk.
5072	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
5073	// BlobURI - The Virtual Hard Disk.
5074	BlobURI *string `json:"blobUri,omitempty"`
5075	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
5076	Caching CachingTypes `json:"caching,omitempty"`
5077	// DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
5078	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
5079	// StorageAccountType - Specifies the storage account type for the managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
5080	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
5081}
5082
5083// ImageProperties describes the properties of an Image.
5084type ImageProperties struct {
5085	// SourceVirtualMachine - The source virtual machine from which Image is created.
5086	SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"`
5087	// StorageProfile - Specifies the storage settings for the virtual machine disks.
5088	StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"`
5089	// ProvisioningState - READ-ONLY; The provisioning state.
5090	ProvisioningState *string `json:"provisioningState,omitempty"`
5091	// HyperVGeneration - Gets the HyperVGenerationType of the VirtualMachine created from the image. Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
5092	HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
5093}
5094
5095// MarshalJSON is the custom marshaler for ImageProperties.
5096func (IP ImageProperties) MarshalJSON() ([]byte, error) {
5097	objectMap := make(map[string]interface{})
5098	if IP.SourceVirtualMachine != nil {
5099		objectMap["sourceVirtualMachine"] = IP.SourceVirtualMachine
5100	}
5101	if IP.StorageProfile != nil {
5102		objectMap["storageProfile"] = IP.StorageProfile
5103	}
5104	if IP.HyperVGeneration != "" {
5105		objectMap["hyperVGeneration"] = IP.HyperVGeneration
5106	}
5107	return json.Marshal(objectMap)
5108}
5109
5110// ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace
5111// images.
5112type ImagePurchasePlan struct {
5113	// Name - The plan ID.
5114	Name *string `json:"name,omitempty"`
5115	// Publisher - The publisher ID.
5116	Publisher *string `json:"publisher,omitempty"`
5117	// Product - The product ID.
5118	Product *string `json:"product,omitempty"`
5119}
5120
5121// ImageReference specifies information about the image to use. You can specify information about platform
5122// images, marketplace images, or virtual machine images. This element is required when you want to use a
5123// platform image, marketplace image, or virtual machine image, but is not used in other creation
5124// operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.
5125type ImageReference struct {
5126	// Publisher - The image publisher.
5127	Publisher *string `json:"publisher,omitempty"`
5128	// Offer - Specifies the offer of the platform image or marketplace image used to create the virtual machine.
5129	Offer *string `json:"offer,omitempty"`
5130	// Sku - The image SKU.
5131	Sku *string `json:"sku,omitempty"`
5132	// Version - Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.
5133	Version *string `json:"version,omitempty"`
5134	// ID - Resource Id
5135	ID *string `json:"id,omitempty"`
5136}
5137
5138// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
5139// operation.
5140type ImagesCreateOrUpdateFuture struct {
5141	azure.FutureAPI
5142	// Result returns the result of the asynchronous operation.
5143	// If the operation has not completed it will return an error.
5144	Result func(ImagesClient) (Image, error)
5145}
5146
5147// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5148func (future *ImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5149	var azFuture azure.Future
5150	if err := json.Unmarshal(body, &azFuture); err != nil {
5151		return err
5152	}
5153	future.FutureAPI = &azFuture
5154	future.Result = future.result
5155	return nil
5156}
5157
5158// result is the default implementation for ImagesCreateOrUpdateFuture.Result.
5159func (future *ImagesCreateOrUpdateFuture) result(client ImagesClient) (i Image, err error) {
5160	var done bool
5161	done, err = future.DoneWithContext(context.Background(), client)
5162	if err != nil {
5163		err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5164		return
5165	}
5166	if !done {
5167		i.Response.Response = future.Response()
5168		err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
5169		return
5170	}
5171	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5172	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
5173		i, err = client.CreateOrUpdateResponder(i.Response.Response)
5174		if err != nil {
5175			err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
5176		}
5177	}
5178	return
5179}
5180
5181// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
5182type ImagesDeleteFuture struct {
5183	azure.FutureAPI
5184	// Result returns the result of the asynchronous operation.
5185	// If the operation has not completed it will return an error.
5186	Result func(ImagesClient) (autorest.Response, error)
5187}
5188
5189// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5190func (future *ImagesDeleteFuture) UnmarshalJSON(body []byte) error {
5191	var azFuture azure.Future
5192	if err := json.Unmarshal(body, &azFuture); err != nil {
5193		return err
5194	}
5195	future.FutureAPI = &azFuture
5196	future.Result = future.result
5197	return nil
5198}
5199
5200// result is the default implementation for ImagesDeleteFuture.Result.
5201func (future *ImagesDeleteFuture) result(client ImagesClient) (ar autorest.Response, err error) {
5202	var done bool
5203	done, err = future.DoneWithContext(context.Background(), client)
5204	if err != nil {
5205		err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Polling failure")
5206		return
5207	}
5208	if !done {
5209		ar.Response = future.Response()
5210		err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
5211		return
5212	}
5213	ar.Response = future.Response()
5214	return
5215}
5216
5217// ImageStorageProfile describes a storage profile.
5218type ImageStorageProfile struct {
5219	// OsDisk - Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
5220	OsDisk *ImageOSDisk `json:"osDisk,omitempty"`
5221	// DataDisks - Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
5222	DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"`
5223	// ZoneResilient - Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
5224	ZoneResilient *bool `json:"zoneResilient,omitempty"`
5225}
5226
5227// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
5228type ImagesUpdateFuture struct {
5229	azure.FutureAPI
5230	// Result returns the result of the asynchronous operation.
5231	// If the operation has not completed it will return an error.
5232	Result func(ImagesClient) (Image, error)
5233}
5234
5235// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5236func (future *ImagesUpdateFuture) UnmarshalJSON(body []byte) error {
5237	var azFuture azure.Future
5238	if err := json.Unmarshal(body, &azFuture); err != nil {
5239		return err
5240	}
5241	future.FutureAPI = &azFuture
5242	future.Result = future.result
5243	return nil
5244}
5245
5246// result is the default implementation for ImagesUpdateFuture.Result.
5247func (future *ImagesUpdateFuture) result(client ImagesClient) (i Image, err error) {
5248	var done bool
5249	done, err = future.DoneWithContext(context.Background(), client)
5250	if err != nil {
5251		err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Polling failure")
5252		return
5253	}
5254	if !done {
5255		i.Response.Response = future.Response()
5256		err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
5257		return
5258	}
5259	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5260	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
5261		i, err = client.UpdateResponder(i.Response.Response)
5262		if err != nil {
5263			err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
5264		}
5265	}
5266	return
5267}
5268
5269// ImageUpdate the source user image virtual hard disk. Only tags may be updated.
5270type ImageUpdate struct {
5271	*ImageProperties `json:"properties,omitempty"`
5272	// Tags - Resource tags
5273	Tags map[string]*string `json:"tags"`
5274}
5275
5276// MarshalJSON is the custom marshaler for ImageUpdate.
5277func (iu ImageUpdate) MarshalJSON() ([]byte, error) {
5278	objectMap := make(map[string]interface{})
5279	if iu.ImageProperties != nil {
5280		objectMap["properties"] = iu.ImageProperties
5281	}
5282	if iu.Tags != nil {
5283		objectMap["tags"] = iu.Tags
5284	}
5285	return json.Marshal(objectMap)
5286}
5287
5288// UnmarshalJSON is the custom unmarshaler for ImageUpdate struct.
5289func (iu *ImageUpdate) UnmarshalJSON(body []byte) error {
5290	var m map[string]*json.RawMessage
5291	err := json.Unmarshal(body, &m)
5292	if err != nil {
5293		return err
5294	}
5295	for k, v := range m {
5296		switch k {
5297		case "properties":
5298			if v != nil {
5299				var imageProperties ImageProperties
5300				err = json.Unmarshal(*v, &imageProperties)
5301				if err != nil {
5302					return err
5303				}
5304				iu.ImageProperties = &imageProperties
5305			}
5306		case "tags":
5307			if v != nil {
5308				var tags map[string]*string
5309				err = json.Unmarshal(*v, &tags)
5310				if err != nil {
5311					return err
5312				}
5313				iu.Tags = tags
5314			}
5315		}
5316	}
5317
5318	return nil
5319}
5320
5321// InnerError inner error details.
5322type InnerError struct {
5323	// Exceptiontype - The exception type.
5324	Exceptiontype *string `json:"exceptiontype,omitempty"`
5325	// Errordetail - The internal error message or exception dump.
5326	Errordetail *string `json:"errordetail,omitempty"`
5327}
5328
5329// InstanceViewStatus instance view status.
5330type InstanceViewStatus struct {
5331	// Code - The status code.
5332	Code *string `json:"code,omitempty"`
5333	// Level - The level code. Possible values include: 'Info', 'Warning', 'Error'
5334	Level StatusLevelTypes `json:"level,omitempty"`
5335	// DisplayStatus - The short localizable label for the status.
5336	DisplayStatus *string `json:"displayStatus,omitempty"`
5337	// Message - The detailed status message, including for alerts and error messages.
5338	Message *string `json:"message,omitempty"`
5339	// Time - The time of the status.
5340	Time *date.Time `json:"time,omitempty"`
5341}
5342
5343// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used
5344// to unwrap the encryptionKey
5345type KeyVaultAndKeyReference struct {
5346	// SourceVault - Resource id of the KeyVault containing the key or secret
5347	SourceVault *SourceVault `json:"sourceVault,omitempty"`
5348	// KeyURL - Url pointing to a key or secret in KeyVault
5349	KeyURL *string `json:"keyUrl,omitempty"`
5350}
5351
5352// KeyVaultAndSecretReference key Vault Secret Url and vault id of the encryption key
5353type KeyVaultAndSecretReference struct {
5354	// SourceVault - Resource id of the KeyVault containing the key or secret
5355	SourceVault *SourceVault `json:"sourceVault,omitempty"`
5356	// SecretURL - Url pointing to a key or secret in KeyVault
5357	SecretURL *string `json:"secretUrl,omitempty"`
5358}
5359
5360// KeyVaultKeyReference describes a reference to Key Vault Key
5361type KeyVaultKeyReference struct {
5362	// KeyURL - The URL referencing a key encryption key in Key Vault.
5363	KeyURL *string `json:"keyUrl,omitempty"`
5364	// SourceVault - The relative URL of the Key Vault containing the key.
5365	SourceVault *SubResource `json:"sourceVault,omitempty"`
5366}
5367
5368// KeyVaultSecretReference describes a reference to Key Vault Secret
5369type KeyVaultSecretReference struct {
5370	// SecretURL - The URL referencing a secret in a Key Vault.
5371	SecretURL *string `json:"secretUrl,omitempty"`
5372	// SourceVault - The relative URL of the Key Vault containing the secret.
5373	SourceVault *SubResource `json:"sourceVault,omitempty"`
5374}
5375
5376// LinuxConfiguration specifies the Linux operating system settings on the virtual machine. <br><br>For a
5377// list of supported Linux distributions, see [Linux on Azure-Endorsed
5378// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
5379// <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed
5380// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
5381type LinuxConfiguration struct {
5382	// DisablePasswordAuthentication - Specifies whether password authentication should be disabled.
5383	DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"`
5384	// SSH - Specifies the ssh key configuration for a Linux OS.
5385	SSH *SSHConfiguration `json:"ssh,omitempty"`
5386	// ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> When this property is not specified in the request body, default behavior is to set it to true.  This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.
5387	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
5388}
5389
5390// ListUsagesResult the List Usages operation response.
5391type ListUsagesResult struct {
5392	autorest.Response `json:"-"`
5393	// Value - The list of compute resource usages.
5394	Value *[]Usage `json:"value,omitempty"`
5395	// NextLink - The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page of compute resource usage information.
5396	NextLink *string `json:"nextLink,omitempty"`
5397}
5398
5399// ListUsagesResultIterator provides access to a complete listing of Usage values.
5400type ListUsagesResultIterator struct {
5401	i    int
5402	page ListUsagesResultPage
5403}
5404
5405// NextWithContext advances to the next value.  If there was an error making
5406// the request the iterator does not advance and the error is returned.
5407func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
5408	if tracing.IsEnabled() {
5409		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
5410		defer func() {
5411			sc := -1
5412			if iter.Response().Response.Response != nil {
5413				sc = iter.Response().Response.Response.StatusCode
5414			}
5415			tracing.EndSpan(ctx, sc, err)
5416		}()
5417	}
5418	iter.i++
5419	if iter.i < len(iter.page.Values()) {
5420		return nil
5421	}
5422	err = iter.page.NextWithContext(ctx)
5423	if err != nil {
5424		iter.i--
5425		return err
5426	}
5427	iter.i = 0
5428	return nil
5429}
5430
5431// Next advances to the next value.  If there was an error making
5432// the request the iterator does not advance and the error is returned.
5433// Deprecated: Use NextWithContext() instead.
5434func (iter *ListUsagesResultIterator) Next() error {
5435	return iter.NextWithContext(context.Background())
5436}
5437
5438// NotDone returns true if the enumeration should be started or is not yet complete.
5439func (iter ListUsagesResultIterator) NotDone() bool {
5440	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5441}
5442
5443// Response returns the raw server response from the last page request.
5444func (iter ListUsagesResultIterator) Response() ListUsagesResult {
5445	return iter.page.Response()
5446}
5447
5448// Value returns the current value or a zero-initialized value if the
5449// iterator has advanced beyond the end of the collection.
5450func (iter ListUsagesResultIterator) Value() Usage {
5451	if !iter.page.NotDone() {
5452		return Usage{}
5453	}
5454	return iter.page.Values()[iter.i]
5455}
5456
5457// Creates a new instance of the ListUsagesResultIterator type.
5458func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
5459	return ListUsagesResultIterator{page: page}
5460}
5461
5462// IsEmpty returns true if the ListResult contains no values.
5463func (lur ListUsagesResult) IsEmpty() bool {
5464	return lur.Value == nil || len(*lur.Value) == 0
5465}
5466
5467// hasNextLink returns true if the NextLink is not empty.
5468func (lur ListUsagesResult) hasNextLink() bool {
5469	return lur.NextLink != nil && len(*lur.NextLink) != 0
5470}
5471
5472// listUsagesResultPreparer prepares a request to retrieve the next set of results.
5473// It returns nil if no more results exist.
5474func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
5475	if !lur.hasNextLink() {
5476		return nil, nil
5477	}
5478	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5479		autorest.AsJSON(),
5480		autorest.AsGet(),
5481		autorest.WithBaseURL(to.String(lur.NextLink)))
5482}
5483
5484// ListUsagesResultPage contains a page of Usage values.
5485type ListUsagesResultPage struct {
5486	fn  func(context.Context, ListUsagesResult) (ListUsagesResult, error)
5487	lur ListUsagesResult
5488}
5489
5490// NextWithContext advances to the next page of values.  If there was an error making
5491// the request the page does not advance and the error is returned.
5492func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
5493	if tracing.IsEnabled() {
5494		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
5495		defer func() {
5496			sc := -1
5497			if page.Response().Response.Response != nil {
5498				sc = page.Response().Response.Response.StatusCode
5499			}
5500			tracing.EndSpan(ctx, sc, err)
5501		}()
5502	}
5503	for {
5504		next, err := page.fn(ctx, page.lur)
5505		if err != nil {
5506			return err
5507		}
5508		page.lur = next
5509		if !next.hasNextLink() || !next.IsEmpty() {
5510			break
5511		}
5512	}
5513	return nil
5514}
5515
5516// Next advances to the next page of values.  If there was an error making
5517// the request the page does not advance and the error is returned.
5518// Deprecated: Use NextWithContext() instead.
5519func (page *ListUsagesResultPage) Next() error {
5520	return page.NextWithContext(context.Background())
5521}
5522
5523// NotDone returns true if the page enumeration should be started or is not yet complete.
5524func (page ListUsagesResultPage) NotDone() bool {
5525	return !page.lur.IsEmpty()
5526}
5527
5528// Response returns the raw server response from the last page request.
5529func (page ListUsagesResultPage) Response() ListUsagesResult {
5530	return page.lur
5531}
5532
5533// Values returns the slice of values for the current page or nil if there are no values.
5534func (page ListUsagesResultPage) Values() []Usage {
5535	if page.lur.IsEmpty() {
5536		return nil
5537	}
5538	return *page.lur.Value
5539}
5540
5541// Creates a new instance of the ListUsagesResultPage type.
5542func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
5543	return ListUsagesResultPage{
5544		fn:  getNextPage,
5545		lur: cur,
5546	}
5547}
5548
5549// ListVirtualMachineExtensionImage ...
5550type ListVirtualMachineExtensionImage struct {
5551	autorest.Response `json:"-"`
5552	Value             *[]VirtualMachineExtensionImage `json:"value,omitempty"`
5553}
5554
5555// ListVirtualMachineImageResource ...
5556type ListVirtualMachineImageResource struct {
5557	autorest.Response `json:"-"`
5558	Value             *[]VirtualMachineImageResource `json:"value,omitempty"`
5559}
5560
5561// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results
5562// of a long-running operation.
5563type LogAnalyticsExportRequestRateByIntervalFuture struct {
5564	azure.FutureAPI
5565	// Result returns the result of the asynchronous operation.
5566	// If the operation has not completed it will return an error.
5567	Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
5568}
5569
5570// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5571func (future *LogAnalyticsExportRequestRateByIntervalFuture) UnmarshalJSON(body []byte) error {
5572	var azFuture azure.Future
5573	if err := json.Unmarshal(body, &azFuture); err != nil {
5574		return err
5575	}
5576	future.FutureAPI = &azFuture
5577	future.Result = future.result
5578	return nil
5579}
5580
5581// result is the default implementation for LogAnalyticsExportRequestRateByIntervalFuture.Result.
5582func (future *LogAnalyticsExportRequestRateByIntervalFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
5583	var done bool
5584	done, err = future.DoneWithContext(context.Background(), client)
5585	if err != nil {
5586		err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Polling failure")
5587		return
5588	}
5589	if !done {
5590		laor.Response.Response = future.Response()
5591		err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
5592		return
5593	}
5594	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5595	if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
5596		laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response)
5597		if err != nil {
5598			err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request")
5599		}
5600	}
5601	return
5602}
5603
5604// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a
5605// long-running operation.
5606type LogAnalyticsExportThrottledRequestsFuture struct {
5607	azure.FutureAPI
5608	// Result returns the result of the asynchronous operation.
5609	// If the operation has not completed it will return an error.
5610	Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
5611}
5612
5613// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5614func (future *LogAnalyticsExportThrottledRequestsFuture) UnmarshalJSON(body []byte) error {
5615	var azFuture azure.Future
5616	if err := json.Unmarshal(body, &azFuture); err != nil {
5617		return err
5618	}
5619	future.FutureAPI = &azFuture
5620	future.Result = future.result
5621	return nil
5622}
5623
5624// result is the default implementation for LogAnalyticsExportThrottledRequestsFuture.Result.
5625func (future *LogAnalyticsExportThrottledRequestsFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
5626	var done bool
5627	done, err = future.DoneWithContext(context.Background(), client)
5628	if err != nil {
5629		err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Polling failure")
5630		return
5631	}
5632	if !done {
5633		laor.Response.Response = future.Response()
5634		err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
5635		return
5636	}
5637	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5638	if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
5639		laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response)
5640		if err != nil {
5641			err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request")
5642		}
5643	}
5644	return
5645}
5646
5647// LogAnalyticsInputBase api input base class for LogAnalytics Api.
5648type LogAnalyticsInputBase struct {
5649	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
5650	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
5651	// FromTime - From time of the query
5652	FromTime *date.Time `json:"fromTime,omitempty"`
5653	// ToTime - To time of the query
5654	ToTime *date.Time `json:"toTime,omitempty"`
5655	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
5656	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
5657	// GroupByOperationName - Group query result by Operation Name.
5658	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
5659	// GroupByResourceName - Group query result by Resource Name.
5660	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
5661}
5662
5663// LogAnalyticsOperationResult logAnalytics operation status response
5664type LogAnalyticsOperationResult struct {
5665	autorest.Response `json:"-"`
5666	// Properties - READ-ONLY; LogAnalyticsOutput
5667	Properties *LogAnalyticsOutput `json:"properties,omitempty"`
5668}
5669
5670// MarshalJSON is the custom marshaler for LogAnalyticsOperationResult.
5671func (laor LogAnalyticsOperationResult) MarshalJSON() ([]byte, error) {
5672	objectMap := make(map[string]interface{})
5673	return json.Marshal(objectMap)
5674}
5675
5676// LogAnalyticsOutput logAnalytics output properties
5677type LogAnalyticsOutput struct {
5678	// Output - READ-ONLY; Output file Uri path to blob container.
5679	Output *string `json:"output,omitempty"`
5680}
5681
5682// MarshalJSON is the custom marshaler for LogAnalyticsOutput.
5683func (lao LogAnalyticsOutput) MarshalJSON() ([]byte, error) {
5684	objectMap := make(map[string]interface{})
5685	return json.Marshal(objectMap)
5686}
5687
5688// MaintenanceRedeployStatus maintenance Operation Status.
5689type MaintenanceRedeployStatus struct {
5690	// IsCustomerInitiatedMaintenanceAllowed - True, if customer is allowed to perform Maintenance.
5691	IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"`
5692	// PreMaintenanceWindowStartTime - Start Time for the Pre Maintenance Window.
5693	PreMaintenanceWindowStartTime *date.Time `json:"preMaintenanceWindowStartTime,omitempty"`
5694	// PreMaintenanceWindowEndTime - End Time for the Pre Maintenance Window.
5695	PreMaintenanceWindowEndTime *date.Time `json:"preMaintenanceWindowEndTime,omitempty"`
5696	// MaintenanceWindowStartTime - Start Time for the Maintenance Window.
5697	MaintenanceWindowStartTime *date.Time `json:"maintenanceWindowStartTime,omitempty"`
5698	// MaintenanceWindowEndTime - End Time for the Maintenance Window.
5699	MaintenanceWindowEndTime *date.Time `json:"maintenanceWindowEndTime,omitempty"`
5700	// LastOperationResultCode - The Last Maintenance Operation Result Code. Possible values include: 'MaintenanceOperationResultCodeTypesNone', 'MaintenanceOperationResultCodeTypesRetryLater', 'MaintenanceOperationResultCodeTypesMaintenanceAborted', 'MaintenanceOperationResultCodeTypesMaintenanceCompleted'
5701	LastOperationResultCode MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"`
5702	// LastOperationMessage - Message returned for the last Maintenance Operation.
5703	LastOperationMessage *string `json:"lastOperationMessage,omitempty"`
5704}
5705
5706// ManagedArtifact the managed artifact.
5707type ManagedArtifact struct {
5708	// ID - The managed artifact id.
5709	ID *string `json:"id,omitempty"`
5710}
5711
5712// ManagedDiskParameters the parameters of a managed disk.
5713type ManagedDiskParameters struct {
5714	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
5715	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
5716	// ID - Resource Id
5717	ID *string `json:"id,omitempty"`
5718}
5719
5720// NetworkInterfaceReference describes a network interface reference.
5721type NetworkInterfaceReference struct {
5722	*NetworkInterfaceReferenceProperties `json:"properties,omitempty"`
5723	// ID - Resource Id
5724	ID *string `json:"id,omitempty"`
5725}
5726
5727// MarshalJSON is the custom marshaler for NetworkInterfaceReference.
5728func (nir NetworkInterfaceReference) MarshalJSON() ([]byte, error) {
5729	objectMap := make(map[string]interface{})
5730	if nir.NetworkInterfaceReferenceProperties != nil {
5731		objectMap["properties"] = nir.NetworkInterfaceReferenceProperties
5732	}
5733	if nir.ID != nil {
5734		objectMap["id"] = nir.ID
5735	}
5736	return json.Marshal(objectMap)
5737}
5738
5739// UnmarshalJSON is the custom unmarshaler for NetworkInterfaceReference struct.
5740func (nir *NetworkInterfaceReference) UnmarshalJSON(body []byte) error {
5741	var m map[string]*json.RawMessage
5742	err := json.Unmarshal(body, &m)
5743	if err != nil {
5744		return err
5745	}
5746	for k, v := range m {
5747		switch k {
5748		case "properties":
5749			if v != nil {
5750				var networkInterfaceReferenceProperties NetworkInterfaceReferenceProperties
5751				err = json.Unmarshal(*v, &networkInterfaceReferenceProperties)
5752				if err != nil {
5753					return err
5754				}
5755				nir.NetworkInterfaceReferenceProperties = &networkInterfaceReferenceProperties
5756			}
5757		case "id":
5758			if v != nil {
5759				var ID string
5760				err = json.Unmarshal(*v, &ID)
5761				if err != nil {
5762					return err
5763				}
5764				nir.ID = &ID
5765			}
5766		}
5767	}
5768
5769	return nil
5770}
5771
5772// NetworkInterfaceReferenceProperties describes a network interface reference properties.
5773type NetworkInterfaceReferenceProperties struct {
5774	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
5775	Primary *bool `json:"primary,omitempty"`
5776}
5777
5778// NetworkProfile specifies the network interfaces of the virtual machine.
5779type NetworkProfile struct {
5780	// NetworkInterfaces - Specifies the list of resource Ids for the network interfaces associated with the virtual machine.
5781	NetworkInterfaces *[]NetworkInterfaceReference `json:"networkInterfaces,omitempty"`
5782}
5783
5784// OperationListResult the List Compute Operation operation response.
5785type OperationListResult struct {
5786	autorest.Response `json:"-"`
5787	// Value - READ-ONLY; The list of compute operations
5788	Value *[]OperationValue `json:"value,omitempty"`
5789}
5790
5791// MarshalJSON is the custom marshaler for OperationListResult.
5792func (olr OperationListResult) MarshalJSON() ([]byte, error) {
5793	objectMap := make(map[string]interface{})
5794	return json.Marshal(objectMap)
5795}
5796
5797// OperationValue describes the properties of a Compute Operation value.
5798type OperationValue struct {
5799	// Origin - READ-ONLY; The origin of the compute operation.
5800	Origin *string `json:"origin,omitempty"`
5801	// Name - READ-ONLY; The name of the compute operation.
5802	Name                   *string `json:"name,omitempty"`
5803	*OperationValueDisplay `json:"display,omitempty"`
5804}
5805
5806// MarshalJSON is the custom marshaler for OperationValue.
5807func (ov OperationValue) MarshalJSON() ([]byte, error) {
5808	objectMap := make(map[string]interface{})
5809	if ov.OperationValueDisplay != nil {
5810		objectMap["display"] = ov.OperationValueDisplay
5811	}
5812	return json.Marshal(objectMap)
5813}
5814
5815// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
5816func (ov *OperationValue) UnmarshalJSON(body []byte) error {
5817	var m map[string]*json.RawMessage
5818	err := json.Unmarshal(body, &m)
5819	if err != nil {
5820		return err
5821	}
5822	for k, v := range m {
5823		switch k {
5824		case "origin":
5825			if v != nil {
5826				var origin string
5827				err = json.Unmarshal(*v, &origin)
5828				if err != nil {
5829					return err
5830				}
5831				ov.Origin = &origin
5832			}
5833		case "name":
5834			if v != nil {
5835				var name string
5836				err = json.Unmarshal(*v, &name)
5837				if err != nil {
5838					return err
5839				}
5840				ov.Name = &name
5841			}
5842		case "display":
5843			if v != nil {
5844				var operationValueDisplay OperationValueDisplay
5845				err = json.Unmarshal(*v, &operationValueDisplay)
5846				if err != nil {
5847					return err
5848				}
5849				ov.OperationValueDisplay = &operationValueDisplay
5850			}
5851		}
5852	}
5853
5854	return nil
5855}
5856
5857// OperationValueDisplay describes the properties of a Compute Operation Value Display.
5858type OperationValueDisplay struct {
5859	// Operation - READ-ONLY; The display name of the compute operation.
5860	Operation *string `json:"operation,omitempty"`
5861	// Resource - READ-ONLY; The display name of the resource the operation applies to.
5862	Resource *string `json:"resource,omitempty"`
5863	// Description - READ-ONLY; The description of the operation.
5864	Description *string `json:"description,omitempty"`
5865	// Provider - READ-ONLY; The resource provider for the operation.
5866	Provider *string `json:"provider,omitempty"`
5867}
5868
5869// MarshalJSON is the custom marshaler for OperationValueDisplay.
5870func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) {
5871	objectMap := make(map[string]interface{})
5872	return json.Marshal(objectMap)
5873}
5874
5875// OSDisk specifies information about the operating system disk used by the virtual machine. <br><br> For
5876// more information about disks, see [About disks and VHDs for Azure virtual
5877// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
5878type OSDisk struct {
5879	// OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
5880	OsType OperatingSystemTypes `json:"osType,omitempty"`
5881	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
5882	EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
5883	// Name - The disk name.
5884	Name *string `json:"name,omitempty"`
5885	// Vhd - The virtual hard disk.
5886	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
5887	// Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
5888	Image *VirtualHardDisk `json:"image,omitempty"`
5889	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
5890	Caching CachingTypes `json:"caching,omitempty"`
5891	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
5892	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
5893	// DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
5894	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
5895	// CreateOption - Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you  also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
5896	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
5897	// DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
5898	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
5899	// ManagedDisk - The managed disk parameters.
5900	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
5901}
5902
5903// OSDiskImage contains the os disk image information.
5904type OSDiskImage struct {
5905	// OperatingSystem - The operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'
5906	OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"`
5907}
5908
5909// OSProfile specifies the operating system settings for the virtual machine.
5910type OSProfile struct {
5911	// ComputerName - Specifies the host OS name of the virtual machine. <br><br> This name cannot be updated after the VM is created. <br><br> **Max-length (Windows):** 15 characters <br><br> **Max-length (Linux):** 64 characters. <br><br> For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions).
5912	ComputerName *string `json:"computerName,omitempty"`
5913	// AdminUsername - Specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1  character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters  <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
5914	AdminUsername *string `json:"adminUsername,omitempty"`
5915	// AdminPassword - Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password)
5916	AdminPassword *string `json:"adminPassword,omitempty"`
5917	// CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
5918	CustomData *string `json:"customData,omitempty"`
5919	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
5920	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
5921	// LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
5922	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
5923	// Secrets - Specifies set of certificates that should be installed onto the virtual machine.
5924	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
5925	// AllowExtensionOperations - Specifies whether extension operations should be allowed on the virtual machine. <br><br>This may only be set to False when no extensions are present on the virtual machine.
5926	AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"`
5927	// RequireGuestProvisionSignal - Specifies whether the guest provision signal is required from the virtual machine.
5928	RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"`
5929}
5930
5931// Plan specifies information about the marketplace image used to create the virtual machine. This element
5932// is only used for marketplace images. Before you can use a marketplace image from an API, you must enable
5933// the image for programmatic use.  In the Azure portal, find the marketplace image that you want to use
5934// and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and
5935// then click **Save**.
5936type Plan struct {
5937	// Name - The plan ID.
5938	Name *string `json:"name,omitempty"`
5939	// Publisher - The publisher ID.
5940	Publisher *string `json:"publisher,omitempty"`
5941	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
5942	Product *string `json:"product,omitempty"`
5943	// PromotionCode - The promotion code.
5944	PromotionCode *string `json:"promotionCode,omitempty"`
5945}
5946
5947// ProximityPlacementGroup specifies information about the proximity placement group.
5948type ProximityPlacementGroup struct {
5949	autorest.Response `json:"-"`
5950	// ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group.
5951	*ProximityPlacementGroupProperties `json:"properties,omitempty"`
5952	// ID - READ-ONLY; Resource Id
5953	ID *string `json:"id,omitempty"`
5954	// Name - READ-ONLY; Resource name
5955	Name *string `json:"name,omitempty"`
5956	// Type - READ-ONLY; Resource type
5957	Type *string `json:"type,omitempty"`
5958	// Location - Resource location
5959	Location *string `json:"location,omitempty"`
5960	// Tags - Resource tags
5961	Tags map[string]*string `json:"tags"`
5962}
5963
5964// MarshalJSON is the custom marshaler for ProximityPlacementGroup.
5965func (ppg ProximityPlacementGroup) MarshalJSON() ([]byte, error) {
5966	objectMap := make(map[string]interface{})
5967	if ppg.ProximityPlacementGroupProperties != nil {
5968		objectMap["properties"] = ppg.ProximityPlacementGroupProperties
5969	}
5970	if ppg.Location != nil {
5971		objectMap["location"] = ppg.Location
5972	}
5973	if ppg.Tags != nil {
5974		objectMap["tags"] = ppg.Tags
5975	}
5976	return json.Marshal(objectMap)
5977}
5978
5979// UnmarshalJSON is the custom unmarshaler for ProximityPlacementGroup struct.
5980func (ppg *ProximityPlacementGroup) UnmarshalJSON(body []byte) error {
5981	var m map[string]*json.RawMessage
5982	err := json.Unmarshal(body, &m)
5983	if err != nil {
5984		return err
5985	}
5986	for k, v := range m {
5987		switch k {
5988		case "properties":
5989			if v != nil {
5990				var proximityPlacementGroupProperties ProximityPlacementGroupProperties
5991				err = json.Unmarshal(*v, &proximityPlacementGroupProperties)
5992				if err != nil {
5993					return err
5994				}
5995				ppg.ProximityPlacementGroupProperties = &proximityPlacementGroupProperties
5996			}
5997		case "id":
5998			if v != nil {
5999				var ID string
6000				err = json.Unmarshal(*v, &ID)
6001				if err != nil {
6002					return err
6003				}
6004				ppg.ID = &ID
6005			}
6006		case "name":
6007			if v != nil {
6008				var name string
6009				err = json.Unmarshal(*v, &name)
6010				if err != nil {
6011					return err
6012				}
6013				ppg.Name = &name
6014			}
6015		case "type":
6016			if v != nil {
6017				var typeVar string
6018				err = json.Unmarshal(*v, &typeVar)
6019				if err != nil {
6020					return err
6021				}
6022				ppg.Type = &typeVar
6023			}
6024		case "location":
6025			if v != nil {
6026				var location string
6027				err = json.Unmarshal(*v, &location)
6028				if err != nil {
6029					return err
6030				}
6031				ppg.Location = &location
6032			}
6033		case "tags":
6034			if v != nil {
6035				var tags map[string]*string
6036				err = json.Unmarshal(*v, &tags)
6037				if err != nil {
6038					return err
6039				}
6040				ppg.Tags = tags
6041			}
6042		}
6043	}
6044
6045	return nil
6046}
6047
6048// ProximityPlacementGroupListResult the List Proximity Placement Group operation response.
6049type ProximityPlacementGroupListResult struct {
6050	autorest.Response `json:"-"`
6051	// Value - The list of proximity placement groups
6052	Value *[]ProximityPlacementGroup `json:"value,omitempty"`
6053	// NextLink - The URI to fetch the next page of proximity placement groups.
6054	NextLink *string `json:"nextLink,omitempty"`
6055}
6056
6057// ProximityPlacementGroupListResultIterator provides access to a complete listing of
6058// ProximityPlacementGroup values.
6059type ProximityPlacementGroupListResultIterator struct {
6060	i    int
6061	page ProximityPlacementGroupListResultPage
6062}
6063
6064// NextWithContext advances to the next value.  If there was an error making
6065// the request the iterator does not advance and the error is returned.
6066func (iter *ProximityPlacementGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
6067	if tracing.IsEnabled() {
6068		ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultIterator.NextWithContext")
6069		defer func() {
6070			sc := -1
6071			if iter.Response().Response.Response != nil {
6072				sc = iter.Response().Response.Response.StatusCode
6073			}
6074			tracing.EndSpan(ctx, sc, err)
6075		}()
6076	}
6077	iter.i++
6078	if iter.i < len(iter.page.Values()) {
6079		return nil
6080	}
6081	err = iter.page.NextWithContext(ctx)
6082	if err != nil {
6083		iter.i--
6084		return err
6085	}
6086	iter.i = 0
6087	return nil
6088}
6089
6090// Next advances to the next value.  If there was an error making
6091// the request the iterator does not advance and the error is returned.
6092// Deprecated: Use NextWithContext() instead.
6093func (iter *ProximityPlacementGroupListResultIterator) Next() error {
6094	return iter.NextWithContext(context.Background())
6095}
6096
6097// NotDone returns true if the enumeration should be started or is not yet complete.
6098func (iter ProximityPlacementGroupListResultIterator) NotDone() bool {
6099	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6100}
6101
6102// Response returns the raw server response from the last page request.
6103func (iter ProximityPlacementGroupListResultIterator) Response() ProximityPlacementGroupListResult {
6104	return iter.page.Response()
6105}
6106
6107// Value returns the current value or a zero-initialized value if the
6108// iterator has advanced beyond the end of the collection.
6109func (iter ProximityPlacementGroupListResultIterator) Value() ProximityPlacementGroup {
6110	if !iter.page.NotDone() {
6111		return ProximityPlacementGroup{}
6112	}
6113	return iter.page.Values()[iter.i]
6114}
6115
6116// Creates a new instance of the ProximityPlacementGroupListResultIterator type.
6117func NewProximityPlacementGroupListResultIterator(page ProximityPlacementGroupListResultPage) ProximityPlacementGroupListResultIterator {
6118	return ProximityPlacementGroupListResultIterator{page: page}
6119}
6120
6121// IsEmpty returns true if the ListResult contains no values.
6122func (ppglr ProximityPlacementGroupListResult) IsEmpty() bool {
6123	return ppglr.Value == nil || len(*ppglr.Value) == 0
6124}
6125
6126// hasNextLink returns true if the NextLink is not empty.
6127func (ppglr ProximityPlacementGroupListResult) hasNextLink() bool {
6128	return ppglr.NextLink != nil && len(*ppglr.NextLink) != 0
6129}
6130
6131// proximityPlacementGroupListResultPreparer prepares a request to retrieve the next set of results.
6132// It returns nil if no more results exist.
6133func (ppglr ProximityPlacementGroupListResult) proximityPlacementGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
6134	if !ppglr.hasNextLink() {
6135		return nil, nil
6136	}
6137	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6138		autorest.AsJSON(),
6139		autorest.AsGet(),
6140		autorest.WithBaseURL(to.String(ppglr.NextLink)))
6141}
6142
6143// ProximityPlacementGroupListResultPage contains a page of ProximityPlacementGroup values.
6144type ProximityPlacementGroupListResultPage struct {
6145	fn    func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)
6146	ppglr ProximityPlacementGroupListResult
6147}
6148
6149// NextWithContext advances to the next page of values.  If there was an error making
6150// the request the page does not advance and the error is returned.
6151func (page *ProximityPlacementGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
6152	if tracing.IsEnabled() {
6153		ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultPage.NextWithContext")
6154		defer func() {
6155			sc := -1
6156			if page.Response().Response.Response != nil {
6157				sc = page.Response().Response.Response.StatusCode
6158			}
6159			tracing.EndSpan(ctx, sc, err)
6160		}()
6161	}
6162	for {
6163		next, err := page.fn(ctx, page.ppglr)
6164		if err != nil {
6165			return err
6166		}
6167		page.ppglr = next
6168		if !next.hasNextLink() || !next.IsEmpty() {
6169			break
6170		}
6171	}
6172	return nil
6173}
6174
6175// Next advances to the next page of values.  If there was an error making
6176// the request the page does not advance and the error is returned.
6177// Deprecated: Use NextWithContext() instead.
6178func (page *ProximityPlacementGroupListResultPage) Next() error {
6179	return page.NextWithContext(context.Background())
6180}
6181
6182// NotDone returns true if the page enumeration should be started or is not yet complete.
6183func (page ProximityPlacementGroupListResultPage) NotDone() bool {
6184	return !page.ppglr.IsEmpty()
6185}
6186
6187// Response returns the raw server response from the last page request.
6188func (page ProximityPlacementGroupListResultPage) Response() ProximityPlacementGroupListResult {
6189	return page.ppglr
6190}
6191
6192// Values returns the slice of values for the current page or nil if there are no values.
6193func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementGroup {
6194	if page.ppglr.IsEmpty() {
6195		return nil
6196	}
6197	return *page.ppglr.Value
6198}
6199
6200// Creates a new instance of the ProximityPlacementGroupListResultPage type.
6201func NewProximityPlacementGroupListResultPage(cur ProximityPlacementGroupListResult, getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage {
6202	return ProximityPlacementGroupListResultPage{
6203		fn:    getNextPage,
6204		ppglr: cur,
6205	}
6206}
6207
6208// ProximityPlacementGroupProperties describes the properties of a Proximity Placement Group.
6209type ProximityPlacementGroupProperties struct {
6210	// ProximityPlacementGroupType - Specifies the type of the proximity placement group. <br><br> Possible values are: <br><br> **Standard** : Co-locate resources within an Azure region or Availability Zone. <br><br> **Ultra** : For future use. Possible values include: 'Standard', 'Ultra'
6211	ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"`
6212	// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group.
6213	VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"`
6214	// VirtualMachineScaleSets - READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group.
6215	VirtualMachineScaleSets *[]SubResource `json:"virtualMachineScaleSets,omitempty"`
6216	// AvailabilitySets - READ-ONLY; A list of references to all availability sets in the proximity placement group.
6217	AvailabilitySets *[]SubResource `json:"availabilitySets,omitempty"`
6218}
6219
6220// MarshalJSON is the custom marshaler for ProximityPlacementGroupProperties.
6221func (ppgp ProximityPlacementGroupProperties) MarshalJSON() ([]byte, error) {
6222	objectMap := make(map[string]interface{})
6223	if ppgp.ProximityPlacementGroupType != "" {
6224		objectMap["proximityPlacementGroupType"] = ppgp.ProximityPlacementGroupType
6225	}
6226	return json.Marshal(objectMap)
6227}
6228
6229// ProximityPlacementGroupUpdate specifies information about the proximity placement group.
6230type ProximityPlacementGroupUpdate struct {
6231	// Tags - Resource tags
6232	Tags map[string]*string `json:"tags"`
6233}
6234
6235// MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate.
6236func (ppgu ProximityPlacementGroupUpdate) MarshalJSON() ([]byte, error) {
6237	objectMap := make(map[string]interface{})
6238	if ppgu.Tags != nil {
6239		objectMap["tags"] = ppgu.Tags
6240	}
6241	return json.Marshal(objectMap)
6242}
6243
6244// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
6245type PurchasePlan struct {
6246	// Publisher - The publisher ID.
6247	Publisher *string `json:"publisher,omitempty"`
6248	// Name - The plan ID.
6249	Name *string `json:"name,omitempty"`
6250	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
6251	Product *string `json:"product,omitempty"`
6252}
6253
6254// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this
6255// Image Definition. These properties are updatable.
6256type RecommendedMachineConfiguration struct {
6257	VCPUs  *ResourceRange `json:"vCPUs,omitempty"`
6258	Memory *ResourceRange `json:"memory,omitempty"`
6259}
6260
6261// RecoveryWalkResponse response after calling a manual recovery walk
6262type RecoveryWalkResponse struct {
6263	autorest.Response `json:"-"`
6264	// WalkPerformed - READ-ONLY; Whether the recovery walk was performed
6265	WalkPerformed *bool `json:"walkPerformed,omitempty"`
6266	// NextPlatformUpdateDomain - READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed
6267	NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"`
6268}
6269
6270// MarshalJSON is the custom marshaler for RecoveryWalkResponse.
6271func (rwr RecoveryWalkResponse) MarshalJSON() ([]byte, error) {
6272	objectMap := make(map[string]interface{})
6273	return json.Marshal(objectMap)
6274}
6275
6276// RegionalReplicationStatus this is the regional replication status.
6277type RegionalReplicationStatus struct {
6278	// Region - READ-ONLY; The region to which the gallery Image Version is being replicated to.
6279	Region *string `json:"region,omitempty"`
6280	// State - READ-ONLY; This is the regional replication state. Possible values include: 'ReplicationStateUnknown', 'ReplicationStateReplicating', 'ReplicationStateCompleted', 'ReplicationStateFailed'
6281	State ReplicationState `json:"state,omitempty"`
6282	// Details - READ-ONLY; The details of the replication status.
6283	Details *string `json:"details,omitempty"`
6284	// Progress - READ-ONLY; It indicates progress of the replication job.
6285	Progress *int32 `json:"progress,omitempty"`
6286}
6287
6288// MarshalJSON is the custom marshaler for RegionalReplicationStatus.
6289func (rrs RegionalReplicationStatus) MarshalJSON() ([]byte, error) {
6290	objectMap := make(map[string]interface{})
6291	return json.Marshal(objectMap)
6292}
6293
6294// ReplicationStatus this is the replication status of the gallery Image Version.
6295type ReplicationStatus struct {
6296	// AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed'
6297	AggregatedState AggregatedReplicationState `json:"aggregatedState,omitempty"`
6298	// Summary - READ-ONLY; This is a summary of replication status for each region.
6299	Summary *[]RegionalReplicationStatus `json:"summary,omitempty"`
6300}
6301
6302// MarshalJSON is the custom marshaler for ReplicationStatus.
6303func (rs ReplicationStatus) MarshalJSON() ([]byte, error) {
6304	objectMap := make(map[string]interface{})
6305	return json.Marshal(objectMap)
6306}
6307
6308// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api.
6309type RequestRateByIntervalInput struct {
6310	// IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'
6311	IntervalLength IntervalInMins `json:"intervalLength,omitempty"`
6312	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
6313	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
6314	// FromTime - From time of the query
6315	FromTime *date.Time `json:"fromTime,omitempty"`
6316	// ToTime - To time of the query
6317	ToTime *date.Time `json:"toTime,omitempty"`
6318	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
6319	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
6320	// GroupByOperationName - Group query result by Operation Name.
6321	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
6322	// GroupByResourceName - Group query result by Resource Name.
6323	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
6324}
6325
6326// Resource the Resource model definition.
6327type Resource struct {
6328	// ID - READ-ONLY; Resource Id
6329	ID *string `json:"id,omitempty"`
6330	// Name - READ-ONLY; Resource name
6331	Name *string `json:"name,omitempty"`
6332	// Type - READ-ONLY; Resource type
6333	Type *string `json:"type,omitempty"`
6334	// Location - Resource location
6335	Location *string `json:"location,omitempty"`
6336	// Tags - Resource tags
6337	Tags map[string]*string `json:"tags"`
6338}
6339
6340// MarshalJSON is the custom marshaler for Resource.
6341func (r Resource) MarshalJSON() ([]byte, error) {
6342	objectMap := make(map[string]interface{})
6343	if r.Location != nil {
6344		objectMap["location"] = r.Location
6345	}
6346	if r.Tags != nil {
6347		objectMap["tags"] = r.Tags
6348	}
6349	return json.Marshal(objectMap)
6350}
6351
6352// ResourceRange describes the resource range.
6353type ResourceRange struct {
6354	// Min - The minimum number of the resource.
6355	Min *int32 `json:"min,omitempty"`
6356	// Max - The maximum number of the resource.
6357	Max *int32 `json:"max,omitempty"`
6358}
6359
6360// ResourceSku describes an available Compute SKU.
6361type ResourceSku struct {
6362	// ResourceType - READ-ONLY; The type of resource the SKU applies to.
6363	ResourceType *string `json:"resourceType,omitempty"`
6364	// Name - READ-ONLY; The name of SKU.
6365	Name *string `json:"name,omitempty"`
6366	// Tier - READ-ONLY; Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
6367	Tier *string `json:"tier,omitempty"`
6368	// Size - READ-ONLY; The Size of the SKU.
6369	Size *string `json:"size,omitempty"`
6370	// Family - READ-ONLY; The Family of this particular SKU.
6371	Family *string `json:"family,omitempty"`
6372	// Kind - READ-ONLY; The Kind of resources that are supported in this SKU.
6373	Kind *string `json:"kind,omitempty"`
6374	// Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
6375	Capacity *ResourceSkuCapacity `json:"capacity,omitempty"`
6376	// Locations - READ-ONLY; The set of locations that the SKU is available.
6377	Locations *[]string `json:"locations,omitempty"`
6378	// LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
6379	LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
6380	// APIVersions - READ-ONLY; The api versions that support this SKU.
6381	APIVersions *[]string `json:"apiVersions,omitempty"`
6382	// Costs - READ-ONLY; Metadata for retrieving price info.
6383	Costs *[]ResourceSkuCosts `json:"costs,omitempty"`
6384	// Capabilities - READ-ONLY; A name value pair to describe the capability.
6385	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
6386	// Restrictions - READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
6387	Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
6388}
6389
6390// MarshalJSON is the custom marshaler for ResourceSku.
6391func (rs ResourceSku) MarshalJSON() ([]byte, error) {
6392	objectMap := make(map[string]interface{})
6393	return json.Marshal(objectMap)
6394}
6395
6396// ResourceSkuCapabilities describes The SKU capabilities object.
6397type ResourceSkuCapabilities struct {
6398	// Name - READ-ONLY; An invariant to describe the feature.
6399	Name *string `json:"name,omitempty"`
6400	// Value - READ-ONLY; An invariant if the feature is measured by quantity.
6401	Value *string `json:"value,omitempty"`
6402}
6403
6404// MarshalJSON is the custom marshaler for ResourceSkuCapabilities.
6405func (rsc ResourceSkuCapabilities) MarshalJSON() ([]byte, error) {
6406	objectMap := make(map[string]interface{})
6407	return json.Marshal(objectMap)
6408}
6409
6410// ResourceSkuCapacity describes scaling information of a SKU.
6411type ResourceSkuCapacity struct {
6412	// Minimum - READ-ONLY; The minimum capacity.
6413	Minimum *int64 `json:"minimum,omitempty"`
6414	// Maximum - READ-ONLY; The maximum capacity that can be set.
6415	Maximum *int64 `json:"maximum,omitempty"`
6416	// Default - READ-ONLY; The default capacity.
6417	Default *int64 `json:"default,omitempty"`
6418	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone'
6419	ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
6420}
6421
6422// MarshalJSON is the custom marshaler for ResourceSkuCapacity.
6423func (rsc ResourceSkuCapacity) MarshalJSON() ([]byte, error) {
6424	objectMap := make(map[string]interface{})
6425	return json.Marshal(objectMap)
6426}
6427
6428// ResourceSkuCosts describes metadata for retrieving price info.
6429type ResourceSkuCosts struct {
6430	// MeterID - READ-ONLY; Used for querying price from commerce.
6431	MeterID *string `json:"meterID,omitempty"`
6432	// Quantity - READ-ONLY; The multiplier is needed to extend the base metered cost.
6433	Quantity *int64 `json:"quantity,omitempty"`
6434	// ExtendedUnit - READ-ONLY; An invariant to show the extended unit.
6435	ExtendedUnit *string `json:"extendedUnit,omitempty"`
6436}
6437
6438// MarshalJSON is the custom marshaler for ResourceSkuCosts.
6439func (rsc ResourceSkuCosts) MarshalJSON() ([]byte, error) {
6440	objectMap := make(map[string]interface{})
6441	return json.Marshal(objectMap)
6442}
6443
6444// ResourceSkuLocationInfo ...
6445type ResourceSkuLocationInfo struct {
6446	// Location - READ-ONLY; Location of the SKU
6447	Location *string `json:"location,omitempty"`
6448	// Zones - READ-ONLY; List of availability zones where the SKU is supported.
6449	Zones *[]string `json:"zones,omitempty"`
6450	// ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones.
6451	ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
6452}
6453
6454// MarshalJSON is the custom marshaler for ResourceSkuLocationInfo.
6455func (rsli ResourceSkuLocationInfo) MarshalJSON() ([]byte, error) {
6456	objectMap := make(map[string]interface{})
6457	return json.Marshal(objectMap)
6458}
6459
6460// ResourceSkuRestrictionInfo ...
6461type ResourceSkuRestrictionInfo struct {
6462	// Locations - READ-ONLY; Locations where the SKU is restricted
6463	Locations *[]string `json:"locations,omitempty"`
6464	// Zones - READ-ONLY; List of availability zones where the SKU is restricted.
6465	Zones *[]string `json:"zones,omitempty"`
6466}
6467
6468// MarshalJSON is the custom marshaler for ResourceSkuRestrictionInfo.
6469func (rsri ResourceSkuRestrictionInfo) MarshalJSON() ([]byte, error) {
6470	objectMap := make(map[string]interface{})
6471	return json.Marshal(objectMap)
6472}
6473
6474// ResourceSkuRestrictions describes scaling information of a SKU.
6475type ResourceSkuRestrictions struct {
6476	// Type - READ-ONLY; The type of restrictions. Possible values include: 'Location', 'Zone'
6477	Type ResourceSkuRestrictionsType `json:"type,omitempty"`
6478	// Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
6479	Values *[]string `json:"values,omitempty"`
6480	// RestrictionInfo - READ-ONLY; The information about the restriction where the SKU cannot be used.
6481	RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"`
6482	// ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription'
6483	ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
6484}
6485
6486// MarshalJSON is the custom marshaler for ResourceSkuRestrictions.
6487func (rsr ResourceSkuRestrictions) MarshalJSON() ([]byte, error) {
6488	objectMap := make(map[string]interface{})
6489	return json.Marshal(objectMap)
6490}
6491
6492// ResourceSkusResult the List Resource Skus operation response.
6493type ResourceSkusResult struct {
6494	autorest.Response `json:"-"`
6495	// Value - The list of skus available for the subscription.
6496	Value *[]ResourceSku `json:"value,omitempty"`
6497	// NextLink - The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus
6498	NextLink *string `json:"nextLink,omitempty"`
6499}
6500
6501// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values.
6502type ResourceSkusResultIterator struct {
6503	i    int
6504	page ResourceSkusResultPage
6505}
6506
6507// NextWithContext advances to the next value.  If there was an error making
6508// the request the iterator does not advance and the error is returned.
6509func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
6510	if tracing.IsEnabled() {
6511		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext")
6512		defer func() {
6513			sc := -1
6514			if iter.Response().Response.Response != nil {
6515				sc = iter.Response().Response.Response.StatusCode
6516			}
6517			tracing.EndSpan(ctx, sc, err)
6518		}()
6519	}
6520	iter.i++
6521	if iter.i < len(iter.page.Values()) {
6522		return nil
6523	}
6524	err = iter.page.NextWithContext(ctx)
6525	if err != nil {
6526		iter.i--
6527		return err
6528	}
6529	iter.i = 0
6530	return nil
6531}
6532
6533// Next advances to the next value.  If there was an error making
6534// the request the iterator does not advance and the error is returned.
6535// Deprecated: Use NextWithContext() instead.
6536func (iter *ResourceSkusResultIterator) Next() error {
6537	return iter.NextWithContext(context.Background())
6538}
6539
6540// NotDone returns true if the enumeration should be started or is not yet complete.
6541func (iter ResourceSkusResultIterator) NotDone() bool {
6542	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6543}
6544
6545// Response returns the raw server response from the last page request.
6546func (iter ResourceSkusResultIterator) Response() ResourceSkusResult {
6547	return iter.page.Response()
6548}
6549
6550// Value returns the current value or a zero-initialized value if the
6551// iterator has advanced beyond the end of the collection.
6552func (iter ResourceSkusResultIterator) Value() ResourceSku {
6553	if !iter.page.NotDone() {
6554		return ResourceSku{}
6555	}
6556	return iter.page.Values()[iter.i]
6557}
6558
6559// Creates a new instance of the ResourceSkusResultIterator type.
6560func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator {
6561	return ResourceSkusResultIterator{page: page}
6562}
6563
6564// IsEmpty returns true if the ListResult contains no values.
6565func (rsr ResourceSkusResult) IsEmpty() bool {
6566	return rsr.Value == nil || len(*rsr.Value) == 0
6567}
6568
6569// hasNextLink returns true if the NextLink is not empty.
6570func (rsr ResourceSkusResult) hasNextLink() bool {
6571	return rsr.NextLink != nil && len(*rsr.NextLink) != 0
6572}
6573
6574// resourceSkusResultPreparer prepares a request to retrieve the next set of results.
6575// It returns nil if no more results exist.
6576func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) {
6577	if !rsr.hasNextLink() {
6578		return nil, nil
6579	}
6580	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6581		autorest.AsJSON(),
6582		autorest.AsGet(),
6583		autorest.WithBaseURL(to.String(rsr.NextLink)))
6584}
6585
6586// ResourceSkusResultPage contains a page of ResourceSku values.
6587type ResourceSkusResultPage struct {
6588	fn  func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)
6589	rsr ResourceSkusResult
6590}
6591
6592// NextWithContext advances to the next page of values.  If there was an error making
6593// the request the page does not advance and the error is returned.
6594func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) {
6595	if tracing.IsEnabled() {
6596		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext")
6597		defer func() {
6598			sc := -1
6599			if page.Response().Response.Response != nil {
6600				sc = page.Response().Response.Response.StatusCode
6601			}
6602			tracing.EndSpan(ctx, sc, err)
6603		}()
6604	}
6605	for {
6606		next, err := page.fn(ctx, page.rsr)
6607		if err != nil {
6608			return err
6609		}
6610		page.rsr = next
6611		if !next.hasNextLink() || !next.IsEmpty() {
6612			break
6613		}
6614	}
6615	return nil
6616}
6617
6618// Next advances to the next page of values.  If there was an error making
6619// the request the page does not advance and the error is returned.
6620// Deprecated: Use NextWithContext() instead.
6621func (page *ResourceSkusResultPage) Next() error {
6622	return page.NextWithContext(context.Background())
6623}
6624
6625// NotDone returns true if the page enumeration should be started or is not yet complete.
6626func (page ResourceSkusResultPage) NotDone() bool {
6627	return !page.rsr.IsEmpty()
6628}
6629
6630// Response returns the raw server response from the last page request.
6631func (page ResourceSkusResultPage) Response() ResourceSkusResult {
6632	return page.rsr
6633}
6634
6635// Values returns the slice of values for the current page or nil if there are no values.
6636func (page ResourceSkusResultPage) Values() []ResourceSku {
6637	if page.rsr.IsEmpty() {
6638		return nil
6639	}
6640	return *page.rsr.Value
6641}
6642
6643// Creates a new instance of the ResourceSkusResultPage type.
6644func NewResourceSkusResultPage(cur ResourceSkusResult, getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
6645	return ResourceSkusResultPage{
6646		fn:  getNextPage,
6647		rsr: cur,
6648	}
6649}
6650
6651// ResourceSkuZoneDetails describes The zonal capabilities of a SKU.
6652type ResourceSkuZoneDetails struct {
6653	// Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
6654	Name *[]string `json:"name,omitempty"`
6655	// Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
6656	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
6657}
6658
6659// MarshalJSON is the custom marshaler for ResourceSkuZoneDetails.
6660func (rszd ResourceSkuZoneDetails) MarshalJSON() ([]byte, error) {
6661	objectMap := make(map[string]interface{})
6662	return json.Marshal(objectMap)
6663}
6664
6665// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
6666type RollbackStatusInfo struct {
6667	// SuccessfullyRolledbackInstanceCount - READ-ONLY; The number of instances which have been successfully rolled back.
6668	SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"`
6669	// FailedRolledbackInstanceCount - READ-ONLY; The number of instances which failed to rollback.
6670	FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"`
6671	// RollbackError - READ-ONLY; Error details if OS rollback failed.
6672	RollbackError *APIError `json:"rollbackError,omitempty"`
6673}
6674
6675// MarshalJSON is the custom marshaler for RollbackStatusInfo.
6676func (rsi RollbackStatusInfo) MarshalJSON() ([]byte, error) {
6677	objectMap := make(map[string]interface{})
6678	return json.Marshal(objectMap)
6679}
6680
6681// RollingUpgradePolicy the configuration parameters used while performing a rolling upgrade.
6682type RollingUpgradePolicy struct {
6683	// MaxBatchInstancePercent - The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%.
6684	MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"`
6685	// MaxUnhealthyInstancePercent - The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%.
6686	MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"`
6687	// MaxUnhealthyUpgradedInstancePercent - The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%.
6688	MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"`
6689	// PauseTimeBetweenBatches - The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S).
6690	PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"`
6691}
6692
6693// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade
6694// state.
6695type RollingUpgradeProgressInfo struct {
6696	// SuccessfulInstanceCount - READ-ONLY; The number of instances that have been successfully upgraded.
6697	SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"`
6698	// FailedInstanceCount - READ-ONLY; The number of instances that have failed to be upgraded successfully.
6699	FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty"`
6700	// InProgressInstanceCount - READ-ONLY; The number of instances that are currently being upgraded.
6701	InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty"`
6702	// PendingInstanceCount - READ-ONLY; The number of instances that have not yet begun to be upgraded.
6703	PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"`
6704}
6705
6706// MarshalJSON is the custom marshaler for RollingUpgradeProgressInfo.
6707func (rupi RollingUpgradeProgressInfo) MarshalJSON() ([]byte, error) {
6708	objectMap := make(map[string]interface{})
6709	return json.Marshal(objectMap)
6710}
6711
6712// RollingUpgradeRunningStatus information about the current running state of the overall upgrade.
6713type RollingUpgradeRunningStatus struct {
6714	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'RollingUpgradeStatusCodeRollingForward', 'RollingUpgradeStatusCodeCancelled', 'RollingUpgradeStatusCodeCompleted', 'RollingUpgradeStatusCodeFaulted'
6715	Code RollingUpgradeStatusCode `json:"code,omitempty"`
6716	// StartTime - READ-ONLY; Start time of the upgrade.
6717	StartTime *date.Time `json:"startTime,omitempty"`
6718	// LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel'
6719	LastAction RollingUpgradeActionType `json:"lastAction,omitempty"`
6720	// LastActionTime - READ-ONLY; Last action time of the upgrade.
6721	LastActionTime *date.Time `json:"lastActionTime,omitempty"`
6722}
6723
6724// MarshalJSON is the custom marshaler for RollingUpgradeRunningStatus.
6725func (rurs RollingUpgradeRunningStatus) MarshalJSON() ([]byte, error) {
6726	objectMap := make(map[string]interface{})
6727	return json.Marshal(objectMap)
6728}
6729
6730// RollingUpgradeStatusInfo the status of the latest virtual machine scale set rolling upgrade.
6731type RollingUpgradeStatusInfo struct {
6732	autorest.Response                   `json:"-"`
6733	*RollingUpgradeStatusInfoProperties `json:"properties,omitempty"`
6734	// ID - READ-ONLY; Resource Id
6735	ID *string `json:"id,omitempty"`
6736	// Name - READ-ONLY; Resource name
6737	Name *string `json:"name,omitempty"`
6738	// Type - READ-ONLY; Resource type
6739	Type *string `json:"type,omitempty"`
6740	// Location - Resource location
6741	Location *string `json:"location,omitempty"`
6742	// Tags - Resource tags
6743	Tags map[string]*string `json:"tags"`
6744}
6745
6746// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfo.
6747func (rusi RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) {
6748	objectMap := make(map[string]interface{})
6749	if rusi.RollingUpgradeStatusInfoProperties != nil {
6750		objectMap["properties"] = rusi.RollingUpgradeStatusInfoProperties
6751	}
6752	if rusi.Location != nil {
6753		objectMap["location"] = rusi.Location
6754	}
6755	if rusi.Tags != nil {
6756		objectMap["tags"] = rusi.Tags
6757	}
6758	return json.Marshal(objectMap)
6759}
6760
6761// UnmarshalJSON is the custom unmarshaler for RollingUpgradeStatusInfo struct.
6762func (rusi *RollingUpgradeStatusInfo) UnmarshalJSON(body []byte) error {
6763	var m map[string]*json.RawMessage
6764	err := json.Unmarshal(body, &m)
6765	if err != nil {
6766		return err
6767	}
6768	for k, v := range m {
6769		switch k {
6770		case "properties":
6771			if v != nil {
6772				var rollingUpgradeStatusInfoProperties RollingUpgradeStatusInfoProperties
6773				err = json.Unmarshal(*v, &rollingUpgradeStatusInfoProperties)
6774				if err != nil {
6775					return err
6776				}
6777				rusi.RollingUpgradeStatusInfoProperties = &rollingUpgradeStatusInfoProperties
6778			}
6779		case "id":
6780			if v != nil {
6781				var ID string
6782				err = json.Unmarshal(*v, &ID)
6783				if err != nil {
6784					return err
6785				}
6786				rusi.ID = &ID
6787			}
6788		case "name":
6789			if v != nil {
6790				var name string
6791				err = json.Unmarshal(*v, &name)
6792				if err != nil {
6793					return err
6794				}
6795				rusi.Name = &name
6796			}
6797		case "type":
6798			if v != nil {
6799				var typeVar string
6800				err = json.Unmarshal(*v, &typeVar)
6801				if err != nil {
6802					return err
6803				}
6804				rusi.Type = &typeVar
6805			}
6806		case "location":
6807			if v != nil {
6808				var location string
6809				err = json.Unmarshal(*v, &location)
6810				if err != nil {
6811					return err
6812				}
6813				rusi.Location = &location
6814			}
6815		case "tags":
6816			if v != nil {
6817				var tags map[string]*string
6818				err = json.Unmarshal(*v, &tags)
6819				if err != nil {
6820					return err
6821				}
6822				rusi.Tags = tags
6823			}
6824		}
6825	}
6826
6827	return nil
6828}
6829
6830// RollingUpgradeStatusInfoProperties the status of the latest virtual machine scale set rolling upgrade.
6831type RollingUpgradeStatusInfoProperties struct {
6832	// Policy - READ-ONLY; The rolling upgrade policies applied for this upgrade.
6833	Policy *RollingUpgradePolicy `json:"policy,omitempty"`
6834	// RunningStatus - READ-ONLY; Information about the current running state of the overall upgrade.
6835	RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"`
6836	// Progress - READ-ONLY; Information about the number of virtual machine instances in each upgrade state.
6837	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
6838	// Error - READ-ONLY; Error details for this upgrade, if there are any.
6839	Error *APIError `json:"error,omitempty"`
6840}
6841
6842// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfoProperties.
6843func (rusip RollingUpgradeStatusInfoProperties) MarshalJSON() ([]byte, error) {
6844	objectMap := make(map[string]interface{})
6845	return json.Marshal(objectMap)
6846}
6847
6848// RunCommandDocument describes the properties of a Run Command.
6849type RunCommandDocument struct {
6850	autorest.Response `json:"-"`
6851	// Script - The script to be executed.
6852	Script *[]string `json:"script,omitempty"`
6853	// Parameters - The parameters used by the script.
6854	Parameters *[]RunCommandParameterDefinition `json:"parameters,omitempty"`
6855	// Schema - The VM run command schema.
6856	Schema *string `json:"$schema,omitempty"`
6857	// ID - The VM run command id.
6858	ID *string `json:"id,omitempty"`
6859	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
6860	OsType OperatingSystemTypes `json:"osType,omitempty"`
6861	// Label - The VM run command label.
6862	Label *string `json:"label,omitempty"`
6863	// Description - The VM run command description.
6864	Description *string `json:"description,omitempty"`
6865}
6866
6867// RunCommandDocumentBase describes the properties of a Run Command metadata.
6868type RunCommandDocumentBase struct {
6869	// Schema - The VM run command schema.
6870	Schema *string `json:"$schema,omitempty"`
6871	// ID - The VM run command id.
6872	ID *string `json:"id,omitempty"`
6873	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
6874	OsType OperatingSystemTypes `json:"osType,omitempty"`
6875	// Label - The VM run command label.
6876	Label *string `json:"label,omitempty"`
6877	// Description - The VM run command description.
6878	Description *string `json:"description,omitempty"`
6879}
6880
6881// RunCommandInput capture Virtual Machine parameters.
6882type RunCommandInput struct {
6883	// CommandID - The run command id.
6884	CommandID *string `json:"commandId,omitempty"`
6885	// Script - Optional. The script to be executed.  When this value is given, the given script will override the default script of the command.
6886	Script *[]string `json:"script,omitempty"`
6887	// Parameters - The run command parameters.
6888	Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
6889}
6890
6891// RunCommandInputParameter describes the properties of a run command parameter.
6892type RunCommandInputParameter struct {
6893	// Name - The run command parameter name.
6894	Name *string `json:"name,omitempty"`
6895	// Value - The run command parameter value.
6896	Value *string `json:"value,omitempty"`
6897}
6898
6899// RunCommandListResult the List Virtual Machine operation response.
6900type RunCommandListResult struct {
6901	autorest.Response `json:"-"`
6902	// Value - The list of virtual machine run commands.
6903	Value *[]RunCommandDocumentBase `json:"value,omitempty"`
6904	// NextLink - The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands.
6905	NextLink *string `json:"nextLink,omitempty"`
6906}
6907
6908// RunCommandListResultIterator provides access to a complete listing of RunCommandDocumentBase values.
6909type RunCommandListResultIterator struct {
6910	i    int
6911	page RunCommandListResultPage
6912}
6913
6914// NextWithContext advances to the next value.  If there was an error making
6915// the request the iterator does not advance and the error is returned.
6916func (iter *RunCommandListResultIterator) NextWithContext(ctx context.Context) (err error) {
6917	if tracing.IsEnabled() {
6918		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultIterator.NextWithContext")
6919		defer func() {
6920			sc := -1
6921			if iter.Response().Response.Response != nil {
6922				sc = iter.Response().Response.Response.StatusCode
6923			}
6924			tracing.EndSpan(ctx, sc, err)
6925		}()
6926	}
6927	iter.i++
6928	if iter.i < len(iter.page.Values()) {
6929		return nil
6930	}
6931	err = iter.page.NextWithContext(ctx)
6932	if err != nil {
6933		iter.i--
6934		return err
6935	}
6936	iter.i = 0
6937	return nil
6938}
6939
6940// Next advances to the next value.  If there was an error making
6941// the request the iterator does not advance and the error is returned.
6942// Deprecated: Use NextWithContext() instead.
6943func (iter *RunCommandListResultIterator) Next() error {
6944	return iter.NextWithContext(context.Background())
6945}
6946
6947// NotDone returns true if the enumeration should be started or is not yet complete.
6948func (iter RunCommandListResultIterator) NotDone() bool {
6949	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6950}
6951
6952// Response returns the raw server response from the last page request.
6953func (iter RunCommandListResultIterator) Response() RunCommandListResult {
6954	return iter.page.Response()
6955}
6956
6957// Value returns the current value or a zero-initialized value if the
6958// iterator has advanced beyond the end of the collection.
6959func (iter RunCommandListResultIterator) Value() RunCommandDocumentBase {
6960	if !iter.page.NotDone() {
6961		return RunCommandDocumentBase{}
6962	}
6963	return iter.page.Values()[iter.i]
6964}
6965
6966// Creates a new instance of the RunCommandListResultIterator type.
6967func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator {
6968	return RunCommandListResultIterator{page: page}
6969}
6970
6971// IsEmpty returns true if the ListResult contains no values.
6972func (rclr RunCommandListResult) IsEmpty() bool {
6973	return rclr.Value == nil || len(*rclr.Value) == 0
6974}
6975
6976// hasNextLink returns true if the NextLink is not empty.
6977func (rclr RunCommandListResult) hasNextLink() bool {
6978	return rclr.NextLink != nil && len(*rclr.NextLink) != 0
6979}
6980
6981// runCommandListResultPreparer prepares a request to retrieve the next set of results.
6982// It returns nil if no more results exist.
6983func (rclr RunCommandListResult) runCommandListResultPreparer(ctx context.Context) (*http.Request, error) {
6984	if !rclr.hasNextLink() {
6985		return nil, nil
6986	}
6987	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6988		autorest.AsJSON(),
6989		autorest.AsGet(),
6990		autorest.WithBaseURL(to.String(rclr.NextLink)))
6991}
6992
6993// RunCommandListResultPage contains a page of RunCommandDocumentBase values.
6994type RunCommandListResultPage struct {
6995	fn   func(context.Context, RunCommandListResult) (RunCommandListResult, error)
6996	rclr RunCommandListResult
6997}
6998
6999// NextWithContext advances to the next page of values.  If there was an error making
7000// the request the page does not advance and the error is returned.
7001func (page *RunCommandListResultPage) NextWithContext(ctx context.Context) (err error) {
7002	if tracing.IsEnabled() {
7003		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultPage.NextWithContext")
7004		defer func() {
7005			sc := -1
7006			if page.Response().Response.Response != nil {
7007				sc = page.Response().Response.Response.StatusCode
7008			}
7009			tracing.EndSpan(ctx, sc, err)
7010		}()
7011	}
7012	for {
7013		next, err := page.fn(ctx, page.rclr)
7014		if err != nil {
7015			return err
7016		}
7017		page.rclr = next
7018		if !next.hasNextLink() || !next.IsEmpty() {
7019			break
7020		}
7021	}
7022	return nil
7023}
7024
7025// Next advances to the next page of values.  If there was an error making
7026// the request the page does not advance and the error is returned.
7027// Deprecated: Use NextWithContext() instead.
7028func (page *RunCommandListResultPage) Next() error {
7029	return page.NextWithContext(context.Background())
7030}
7031
7032// NotDone returns true if the page enumeration should be started or is not yet complete.
7033func (page RunCommandListResultPage) NotDone() bool {
7034	return !page.rclr.IsEmpty()
7035}
7036
7037// Response returns the raw server response from the last page request.
7038func (page RunCommandListResultPage) Response() RunCommandListResult {
7039	return page.rclr
7040}
7041
7042// Values returns the slice of values for the current page or nil if there are no values.
7043func (page RunCommandListResultPage) Values() []RunCommandDocumentBase {
7044	if page.rclr.IsEmpty() {
7045		return nil
7046	}
7047	return *page.rclr.Value
7048}
7049
7050// Creates a new instance of the RunCommandListResultPage type.
7051func NewRunCommandListResultPage(cur RunCommandListResult, getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
7052	return RunCommandListResultPage{
7053		fn:   getNextPage,
7054		rclr: cur,
7055	}
7056}
7057
7058// RunCommandParameterDefinition describes the properties of a run command parameter.
7059type RunCommandParameterDefinition struct {
7060	// Name - The run command parameter name.
7061	Name *string `json:"name,omitempty"`
7062	// Type - The run command parameter type.
7063	Type *string `json:"type,omitempty"`
7064	// DefaultValue - The run command parameter default value.
7065	DefaultValue *string `json:"defaultValue,omitempty"`
7066	// Required - The run command parameter required.
7067	Required *bool `json:"required,omitempty"`
7068}
7069
7070// RunCommandResult ...
7071type RunCommandResult struct {
7072	autorest.Response `json:"-"`
7073	// Value - Run command operation response.
7074	Value *[]InstanceViewStatus `json:"value,omitempty"`
7075}
7076
7077// ScaleInPolicy describes a scale-in policy for a virtual machine scale set.
7078type ScaleInPolicy struct {
7079	// Rules - The rules to be followed when scaling-in a virtual machine scale set. <br><br> Possible values are: <br><br> **Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in. <br><br> **OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal. <br><br> **NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal. <br><br>
7080	Rules *[]VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"`
7081}
7082
7083// ScheduledEventsProfile ...
7084type ScheduledEventsProfile struct {
7085	// TerminateNotificationProfile - Specifies Terminate Scheduled Event related configurations.
7086	TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"`
7087}
7088
7089// Sku describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware
7090// the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU
7091// name.
7092type Sku struct {
7093	// Name - The sku name.
7094	Name *string `json:"name,omitempty"`
7095	// Tier - Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
7096	Tier *string `json:"tier,omitempty"`
7097	// Capacity - Specifies the number of virtual machines in the scale set.
7098	Capacity *int64 `json:"capacity,omitempty"`
7099}
7100
7101// Snapshot snapshot resource.
7102type Snapshot struct {
7103	autorest.Response `json:"-"`
7104	// ManagedBy - READ-ONLY; Unused. Always Null.
7105	ManagedBy           *string      `json:"managedBy,omitempty"`
7106	Sku                 *SnapshotSku `json:"sku,omitempty"`
7107	*SnapshotProperties `json:"properties,omitempty"`
7108	// ID - READ-ONLY; Resource Id
7109	ID *string `json:"id,omitempty"`
7110	// Name - READ-ONLY; Resource name
7111	Name *string `json:"name,omitempty"`
7112	// Type - READ-ONLY; Resource type
7113	Type *string `json:"type,omitempty"`
7114	// Location - Resource location
7115	Location *string `json:"location,omitempty"`
7116	// Tags - Resource tags
7117	Tags map[string]*string `json:"tags"`
7118}
7119
7120// MarshalJSON is the custom marshaler for Snapshot.
7121func (s Snapshot) MarshalJSON() ([]byte, error) {
7122	objectMap := make(map[string]interface{})
7123	if s.Sku != nil {
7124		objectMap["sku"] = s.Sku
7125	}
7126	if s.SnapshotProperties != nil {
7127		objectMap["properties"] = s.SnapshotProperties
7128	}
7129	if s.Location != nil {
7130		objectMap["location"] = s.Location
7131	}
7132	if s.Tags != nil {
7133		objectMap["tags"] = s.Tags
7134	}
7135	return json.Marshal(objectMap)
7136}
7137
7138// UnmarshalJSON is the custom unmarshaler for Snapshot struct.
7139func (s *Snapshot) UnmarshalJSON(body []byte) error {
7140	var m map[string]*json.RawMessage
7141	err := json.Unmarshal(body, &m)
7142	if err != nil {
7143		return err
7144	}
7145	for k, v := range m {
7146		switch k {
7147		case "managedBy":
7148			if v != nil {
7149				var managedBy string
7150				err = json.Unmarshal(*v, &managedBy)
7151				if err != nil {
7152					return err
7153				}
7154				s.ManagedBy = &managedBy
7155			}
7156		case "sku":
7157			if v != nil {
7158				var sku SnapshotSku
7159				err = json.Unmarshal(*v, &sku)
7160				if err != nil {
7161					return err
7162				}
7163				s.Sku = &sku
7164			}
7165		case "properties":
7166			if v != nil {
7167				var snapshotProperties SnapshotProperties
7168				err = json.Unmarshal(*v, &snapshotProperties)
7169				if err != nil {
7170					return err
7171				}
7172				s.SnapshotProperties = &snapshotProperties
7173			}
7174		case "id":
7175			if v != nil {
7176				var ID string
7177				err = json.Unmarshal(*v, &ID)
7178				if err != nil {
7179					return err
7180				}
7181				s.ID = &ID
7182			}
7183		case "name":
7184			if v != nil {
7185				var name string
7186				err = json.Unmarshal(*v, &name)
7187				if err != nil {
7188					return err
7189				}
7190				s.Name = &name
7191			}
7192		case "type":
7193			if v != nil {
7194				var typeVar string
7195				err = json.Unmarshal(*v, &typeVar)
7196				if err != nil {
7197					return err
7198				}
7199				s.Type = &typeVar
7200			}
7201		case "location":
7202			if v != nil {
7203				var location string
7204				err = json.Unmarshal(*v, &location)
7205				if err != nil {
7206					return err
7207				}
7208				s.Location = &location
7209			}
7210		case "tags":
7211			if v != nil {
7212				var tags map[string]*string
7213				err = json.Unmarshal(*v, &tags)
7214				if err != nil {
7215					return err
7216				}
7217				s.Tags = tags
7218			}
7219		}
7220	}
7221
7222	return nil
7223}
7224
7225// SnapshotList the List Snapshots operation response.
7226type SnapshotList struct {
7227	autorest.Response `json:"-"`
7228	// Value - A list of snapshots.
7229	Value *[]Snapshot `json:"value,omitempty"`
7230	// NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
7231	NextLink *string `json:"nextLink,omitempty"`
7232}
7233
7234// SnapshotListIterator provides access to a complete listing of Snapshot values.
7235type SnapshotListIterator struct {
7236	i    int
7237	page SnapshotListPage
7238}
7239
7240// NextWithContext advances to the next value.  If there was an error making
7241// the request the iterator does not advance and the error is returned.
7242func (iter *SnapshotListIterator) NextWithContext(ctx context.Context) (err error) {
7243	if tracing.IsEnabled() {
7244		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListIterator.NextWithContext")
7245		defer func() {
7246			sc := -1
7247			if iter.Response().Response.Response != nil {
7248				sc = iter.Response().Response.Response.StatusCode
7249			}
7250			tracing.EndSpan(ctx, sc, err)
7251		}()
7252	}
7253	iter.i++
7254	if iter.i < len(iter.page.Values()) {
7255		return nil
7256	}
7257	err = iter.page.NextWithContext(ctx)
7258	if err != nil {
7259		iter.i--
7260		return err
7261	}
7262	iter.i = 0
7263	return nil
7264}
7265
7266// Next advances to the next value.  If there was an error making
7267// the request the iterator does not advance and the error is returned.
7268// Deprecated: Use NextWithContext() instead.
7269func (iter *SnapshotListIterator) Next() error {
7270	return iter.NextWithContext(context.Background())
7271}
7272
7273// NotDone returns true if the enumeration should be started or is not yet complete.
7274func (iter SnapshotListIterator) NotDone() bool {
7275	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7276}
7277
7278// Response returns the raw server response from the last page request.
7279func (iter SnapshotListIterator) Response() SnapshotList {
7280	return iter.page.Response()
7281}
7282
7283// Value returns the current value or a zero-initialized value if the
7284// iterator has advanced beyond the end of the collection.
7285func (iter SnapshotListIterator) Value() Snapshot {
7286	if !iter.page.NotDone() {
7287		return Snapshot{}
7288	}
7289	return iter.page.Values()[iter.i]
7290}
7291
7292// Creates a new instance of the SnapshotListIterator type.
7293func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator {
7294	return SnapshotListIterator{page: page}
7295}
7296
7297// IsEmpty returns true if the ListResult contains no values.
7298func (sl SnapshotList) IsEmpty() bool {
7299	return sl.Value == nil || len(*sl.Value) == 0
7300}
7301
7302// hasNextLink returns true if the NextLink is not empty.
7303func (sl SnapshotList) hasNextLink() bool {
7304	return sl.NextLink != nil && len(*sl.NextLink) != 0
7305}
7306
7307// snapshotListPreparer prepares a request to retrieve the next set of results.
7308// It returns nil if no more results exist.
7309func (sl SnapshotList) snapshotListPreparer(ctx context.Context) (*http.Request, error) {
7310	if !sl.hasNextLink() {
7311		return nil, nil
7312	}
7313	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7314		autorest.AsJSON(),
7315		autorest.AsGet(),
7316		autorest.WithBaseURL(to.String(sl.NextLink)))
7317}
7318
7319// SnapshotListPage contains a page of Snapshot values.
7320type SnapshotListPage struct {
7321	fn func(context.Context, SnapshotList) (SnapshotList, error)
7322	sl SnapshotList
7323}
7324
7325// NextWithContext advances to the next page of values.  If there was an error making
7326// the request the page does not advance and the error is returned.
7327func (page *SnapshotListPage) NextWithContext(ctx context.Context) (err error) {
7328	if tracing.IsEnabled() {
7329		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListPage.NextWithContext")
7330		defer func() {
7331			sc := -1
7332			if page.Response().Response.Response != nil {
7333				sc = page.Response().Response.Response.StatusCode
7334			}
7335			tracing.EndSpan(ctx, sc, err)
7336		}()
7337	}
7338	for {
7339		next, err := page.fn(ctx, page.sl)
7340		if err != nil {
7341			return err
7342		}
7343		page.sl = next
7344		if !next.hasNextLink() || !next.IsEmpty() {
7345			break
7346		}
7347	}
7348	return nil
7349}
7350
7351// Next advances to the next page of values.  If there was an error making
7352// the request the page does not advance and the error is returned.
7353// Deprecated: Use NextWithContext() instead.
7354func (page *SnapshotListPage) Next() error {
7355	return page.NextWithContext(context.Background())
7356}
7357
7358// NotDone returns true if the page enumeration should be started or is not yet complete.
7359func (page SnapshotListPage) NotDone() bool {
7360	return !page.sl.IsEmpty()
7361}
7362
7363// Response returns the raw server response from the last page request.
7364func (page SnapshotListPage) Response() SnapshotList {
7365	return page.sl
7366}
7367
7368// Values returns the slice of values for the current page or nil if there are no values.
7369func (page SnapshotListPage) Values() []Snapshot {
7370	if page.sl.IsEmpty() {
7371		return nil
7372	}
7373	return *page.sl.Value
7374}
7375
7376// Creates a new instance of the SnapshotListPage type.
7377func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
7378	return SnapshotListPage{
7379		fn: getNextPage,
7380		sl: cur,
7381	}
7382}
7383
7384// SnapshotProperties snapshot resource properties.
7385type SnapshotProperties struct {
7386	// TimeCreated - READ-ONLY; The time when the disk was created.
7387	TimeCreated *date.Time `json:"timeCreated,omitempty"`
7388	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
7389	OsType OperatingSystemTypes `json:"osType,omitempty"`
7390	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
7391	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
7392	// CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
7393	CreationData *CreationData `json:"creationData,omitempty"`
7394	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
7395	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
7396	// DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
7397	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
7398	// UniqueID - READ-ONLY; Unique Guid identifying the resource.
7399	UniqueID *string `json:"uniqueId,omitempty"`
7400	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
7401	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
7402	// ProvisioningState - READ-ONLY; The disk provisioning state.
7403	ProvisioningState *string `json:"provisioningState,omitempty"`
7404	// Incremental - Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.
7405	Incremental *bool `json:"incremental,omitempty"`
7406}
7407
7408// MarshalJSON is the custom marshaler for SnapshotProperties.
7409func (sp SnapshotProperties) MarshalJSON() ([]byte, error) {
7410	objectMap := make(map[string]interface{})
7411	if sp.OsType != "" {
7412		objectMap["osType"] = sp.OsType
7413	}
7414	if sp.HyperVGeneration != "" {
7415		objectMap["hyperVGeneration"] = sp.HyperVGeneration
7416	}
7417	if sp.CreationData != nil {
7418		objectMap["creationData"] = sp.CreationData
7419	}
7420	if sp.DiskSizeGB != nil {
7421		objectMap["diskSizeGB"] = sp.DiskSizeGB
7422	}
7423	if sp.EncryptionSettingsCollection != nil {
7424		objectMap["encryptionSettingsCollection"] = sp.EncryptionSettingsCollection
7425	}
7426	if sp.Incremental != nil {
7427		objectMap["incremental"] = sp.Incremental
7428	}
7429	return json.Marshal(objectMap)
7430}
7431
7432// SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
7433// operation.
7434type SnapshotsCreateOrUpdateFuture struct {
7435	azure.FutureAPI
7436	// Result returns the result of the asynchronous operation.
7437	// If the operation has not completed it will return an error.
7438	Result func(SnapshotsClient) (Snapshot, error)
7439}
7440
7441// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7442func (future *SnapshotsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7443	var azFuture azure.Future
7444	if err := json.Unmarshal(body, &azFuture); err != nil {
7445		return err
7446	}
7447	future.FutureAPI = &azFuture
7448	future.Result = future.result
7449	return nil
7450}
7451
7452// result is the default implementation for SnapshotsCreateOrUpdateFuture.Result.
7453func (future *SnapshotsCreateOrUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
7454	var done bool
7455	done, err = future.DoneWithContext(context.Background(), client)
7456	if err != nil {
7457		err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7458		return
7459	}
7460	if !done {
7461		s.Response.Response = future.Response()
7462		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
7463		return
7464	}
7465	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7466	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
7467		s, err = client.CreateOrUpdateResponder(s.Response.Response)
7468		if err != nil {
7469			err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
7470		}
7471	}
7472	return
7473}
7474
7475// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7476// operation.
7477type SnapshotsDeleteFuture struct {
7478	azure.FutureAPI
7479	// Result returns the result of the asynchronous operation.
7480	// If the operation has not completed it will return an error.
7481	Result func(SnapshotsClient) (autorest.Response, error)
7482}
7483
7484// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7485func (future *SnapshotsDeleteFuture) UnmarshalJSON(body []byte) error {
7486	var azFuture azure.Future
7487	if err := json.Unmarshal(body, &azFuture); err != nil {
7488		return err
7489	}
7490	future.FutureAPI = &azFuture
7491	future.Result = future.result
7492	return nil
7493}
7494
7495// result is the default implementation for SnapshotsDeleteFuture.Result.
7496func (future *SnapshotsDeleteFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
7497	var done bool
7498	done, err = future.DoneWithContext(context.Background(), client)
7499	if err != nil {
7500		err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Polling failure")
7501		return
7502	}
7503	if !done {
7504		ar.Response = future.Response()
7505		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
7506		return
7507	}
7508	ar.Response = future.Response()
7509	return
7510}
7511
7512// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
7513// operation.
7514type SnapshotsGrantAccessFuture struct {
7515	azure.FutureAPI
7516	// Result returns the result of the asynchronous operation.
7517	// If the operation has not completed it will return an error.
7518	Result func(SnapshotsClient) (AccessURI, error)
7519}
7520
7521// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7522func (future *SnapshotsGrantAccessFuture) UnmarshalJSON(body []byte) error {
7523	var azFuture azure.Future
7524	if err := json.Unmarshal(body, &azFuture); err != nil {
7525		return err
7526	}
7527	future.FutureAPI = &azFuture
7528	future.Result = future.result
7529	return nil
7530}
7531
7532// result is the default implementation for SnapshotsGrantAccessFuture.Result.
7533func (future *SnapshotsGrantAccessFuture) result(client SnapshotsClient) (au AccessURI, err error) {
7534	var done bool
7535	done, err = future.DoneWithContext(context.Background(), client)
7536	if err != nil {
7537		err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Polling failure")
7538		return
7539	}
7540	if !done {
7541		au.Response.Response = future.Response()
7542		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
7543		return
7544	}
7545	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7546	if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
7547		au, err = client.GrantAccessResponder(au.Response.Response)
7548		if err != nil {
7549			err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
7550		}
7551	}
7552	return
7553}
7554
7555// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.
7556type SnapshotSku struct {
7557	// Name - The sku name. Possible values include: 'SnapshotStorageAccountTypesStandardLRS', 'SnapshotStorageAccountTypesPremiumLRS', 'SnapshotStorageAccountTypesStandardZRS'
7558	Name SnapshotStorageAccountTypes `json:"name,omitempty"`
7559	// Tier - READ-ONLY; The sku tier.
7560	Tier *string `json:"tier,omitempty"`
7561}
7562
7563// MarshalJSON is the custom marshaler for SnapshotSku.
7564func (ss SnapshotSku) MarshalJSON() ([]byte, error) {
7565	objectMap := make(map[string]interface{})
7566	if ss.Name != "" {
7567		objectMap["name"] = ss.Name
7568	}
7569	return json.Marshal(objectMap)
7570}
7571
7572// SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
7573// operation.
7574type SnapshotsRevokeAccessFuture struct {
7575	azure.FutureAPI
7576	// Result returns the result of the asynchronous operation.
7577	// If the operation has not completed it will return an error.
7578	Result func(SnapshotsClient) (autorest.Response, error)
7579}
7580
7581// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7582func (future *SnapshotsRevokeAccessFuture) UnmarshalJSON(body []byte) error {
7583	var azFuture azure.Future
7584	if err := json.Unmarshal(body, &azFuture); err != nil {
7585		return err
7586	}
7587	future.FutureAPI = &azFuture
7588	future.Result = future.result
7589	return nil
7590}
7591
7592// result is the default implementation for SnapshotsRevokeAccessFuture.Result.
7593func (future *SnapshotsRevokeAccessFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
7594	var done bool
7595	done, err = future.DoneWithContext(context.Background(), client)
7596	if err != nil {
7597		err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Polling failure")
7598		return
7599	}
7600	if !done {
7601		ar.Response = future.Response()
7602		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
7603		return
7604	}
7605	ar.Response = future.Response()
7606	return
7607}
7608
7609// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
7610// operation.
7611type SnapshotsUpdateFuture struct {
7612	azure.FutureAPI
7613	// Result returns the result of the asynchronous operation.
7614	// If the operation has not completed it will return an error.
7615	Result func(SnapshotsClient) (Snapshot, error)
7616}
7617
7618// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7619func (future *SnapshotsUpdateFuture) UnmarshalJSON(body []byte) error {
7620	var azFuture azure.Future
7621	if err := json.Unmarshal(body, &azFuture); err != nil {
7622		return err
7623	}
7624	future.FutureAPI = &azFuture
7625	future.Result = future.result
7626	return nil
7627}
7628
7629// result is the default implementation for SnapshotsUpdateFuture.Result.
7630func (future *SnapshotsUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
7631	var done bool
7632	done, err = future.DoneWithContext(context.Background(), client)
7633	if err != nil {
7634		err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Polling failure")
7635		return
7636	}
7637	if !done {
7638		s.Response.Response = future.Response()
7639		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
7640		return
7641	}
7642	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7643	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
7644		s, err = client.UpdateResponder(s.Response.Response)
7645		if err != nil {
7646			err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
7647		}
7648	}
7649	return
7650}
7651
7652// SnapshotUpdate snapshot update resource.
7653type SnapshotUpdate struct {
7654	*SnapshotUpdateProperties `json:"properties,omitempty"`
7655	// Tags - Resource tags
7656	Tags map[string]*string `json:"tags"`
7657	Sku  *SnapshotSku       `json:"sku,omitempty"`
7658}
7659
7660// MarshalJSON is the custom marshaler for SnapshotUpdate.
7661func (su SnapshotUpdate) MarshalJSON() ([]byte, error) {
7662	objectMap := make(map[string]interface{})
7663	if su.SnapshotUpdateProperties != nil {
7664		objectMap["properties"] = su.SnapshotUpdateProperties
7665	}
7666	if su.Tags != nil {
7667		objectMap["tags"] = su.Tags
7668	}
7669	if su.Sku != nil {
7670		objectMap["sku"] = su.Sku
7671	}
7672	return json.Marshal(objectMap)
7673}
7674
7675// UnmarshalJSON is the custom unmarshaler for SnapshotUpdate struct.
7676func (su *SnapshotUpdate) UnmarshalJSON(body []byte) error {
7677	var m map[string]*json.RawMessage
7678	err := json.Unmarshal(body, &m)
7679	if err != nil {
7680		return err
7681	}
7682	for k, v := range m {
7683		switch k {
7684		case "properties":
7685			if v != nil {
7686				var snapshotUpdateProperties SnapshotUpdateProperties
7687				err = json.Unmarshal(*v, &snapshotUpdateProperties)
7688				if err != nil {
7689					return err
7690				}
7691				su.SnapshotUpdateProperties = &snapshotUpdateProperties
7692			}
7693		case "tags":
7694			if v != nil {
7695				var tags map[string]*string
7696				err = json.Unmarshal(*v, &tags)
7697				if err != nil {
7698					return err
7699				}
7700				su.Tags = tags
7701			}
7702		case "sku":
7703			if v != nil {
7704				var sku SnapshotSku
7705				err = json.Unmarshal(*v, &sku)
7706				if err != nil {
7707					return err
7708				}
7709				su.Sku = &sku
7710			}
7711		}
7712	}
7713
7714	return nil
7715}
7716
7717// SnapshotUpdateProperties snapshot resource update properties.
7718type SnapshotUpdateProperties struct {
7719	// OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
7720	OsType OperatingSystemTypes `json:"osType,omitempty"`
7721	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
7722	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
7723	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
7724	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
7725}
7726
7727// SourceVault the vault id is an Azure Resource Manager Resource id in the form
7728// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
7729type SourceVault struct {
7730	// ID - Resource Id
7731	ID *string `json:"id,omitempty"`
7732}
7733
7734// SSHConfiguration SSH configuration for Linux based VMs running on Azure
7735type SSHConfiguration struct {
7736	// PublicKeys - The list of SSH public keys used to authenticate with linux based VMs.
7737	PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
7738}
7739
7740// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where
7741// the public key is placed.
7742type SSHPublicKey struct {
7743	// Path - Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys
7744	Path *string `json:"path,omitempty"`
7745	// KeyData - SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
7746	KeyData *string `json:"keyData,omitempty"`
7747}
7748
7749// StorageProfile specifies the storage settings for the virtual machine disks.
7750type StorageProfile struct {
7751	// ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.
7752	ImageReference *ImageReference `json:"imageReference,omitempty"`
7753	// OsDisk - Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
7754	OsDisk *OSDisk `json:"osDisk,omitempty"`
7755	// DataDisks - Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
7756	DataDisks *[]DataDisk `json:"dataDisks,omitempty"`
7757}
7758
7759// SubResource ...
7760type SubResource struct {
7761	// ID - Resource Id
7762	ID *string `json:"id,omitempty"`
7763}
7764
7765// SubResourceReadOnly ...
7766type SubResourceReadOnly struct {
7767	// ID - READ-ONLY; Resource Id
7768	ID *string `json:"id,omitempty"`
7769}
7770
7771// MarshalJSON is the custom marshaler for SubResourceReadOnly.
7772func (srro SubResourceReadOnly) MarshalJSON() ([]byte, error) {
7773	objectMap := make(map[string]interface{})
7774	return json.Marshal(objectMap)
7775}
7776
7777// TargetRegion describes the target region information.
7778type TargetRegion struct {
7779	// Name - The name of the region.
7780	Name *string `json:"name,omitempty"`
7781	// RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable.
7782	RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"`
7783	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS'
7784	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
7785}
7786
7787// TerminateNotificationProfile ...
7788type TerminateNotificationProfile struct {
7789	// NotBeforeTimeout - Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M)
7790	NotBeforeTimeout *string `json:"notBeforeTimeout,omitempty"`
7791	// Enable - Specifies whether the Terminate Scheduled event is enabled or disabled.
7792	Enable *bool `json:"enable,omitempty"`
7793}
7794
7795// ThrottledRequestsInput api request input for LogAnalytics getThrottledRequests Api.
7796type ThrottledRequestsInput struct {
7797	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
7798	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
7799	// FromTime - From time of the query
7800	FromTime *date.Time `json:"fromTime,omitempty"`
7801	// ToTime - To time of the query
7802	ToTime *date.Time `json:"toTime,omitempty"`
7803	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
7804	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
7805	// GroupByOperationName - Group query result by Operation Name.
7806	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
7807	// GroupByResourceName - Group query result by Resource Name.
7808	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
7809}
7810
7811// UpdateResource the Update Resource model definition.
7812type UpdateResource struct {
7813	// Tags - Resource tags
7814	Tags map[string]*string `json:"tags"`
7815}
7816
7817// MarshalJSON is the custom marshaler for UpdateResource.
7818func (ur UpdateResource) MarshalJSON() ([]byte, error) {
7819	objectMap := make(map[string]interface{})
7820	if ur.Tags != nil {
7821		objectMap["tags"] = ur.Tags
7822	}
7823	return json.Marshal(objectMap)
7824}
7825
7826// UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response.
7827type UpgradeOperationHistoricalStatusInfo struct {
7828	// Properties - READ-ONLY; Information about the properties of the upgrade operation.
7829	Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty"`
7830	// Type - READ-ONLY; Resource type
7831	Type *string `json:"type,omitempty"`
7832	// Location - READ-ONLY; Resource location
7833	Location *string `json:"location,omitempty"`
7834}
7835
7836// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfo.
7837func (uohsi UpgradeOperationHistoricalStatusInfo) MarshalJSON() ([]byte, error) {
7838	objectMap := make(map[string]interface{})
7839	return json.Marshal(objectMap)
7840}
7841
7842// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale
7843// Set.
7844type UpgradeOperationHistoricalStatusInfoProperties struct {
7845	// RunningStatus - READ-ONLY; Information about the overall status of the upgrade operation.
7846	RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"`
7847	// Progress - READ-ONLY; Counts of the VMs in each state.
7848	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
7849	// Error - READ-ONLY; Error Details for this upgrade if there are any.
7850	Error *APIError `json:"error,omitempty"`
7851	// StartedBy - READ-ONLY; Invoker of the Upgrade Operation. Possible values include: 'UpgradeOperationInvokerUnknown', 'UpgradeOperationInvokerUser', 'UpgradeOperationInvokerPlatform'
7852	StartedBy UpgradeOperationInvoker `json:"startedBy,omitempty"`
7853	// TargetImageReference - READ-ONLY; Image Reference details
7854	TargetImageReference *ImageReference `json:"targetImageReference,omitempty"`
7855	// RollbackInfo - READ-ONLY; Information about OS rollback if performed
7856	RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"`
7857}
7858
7859// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfoProperties.
7860func (uohsip UpgradeOperationHistoricalStatusInfoProperties) MarshalJSON() ([]byte, error) {
7861	objectMap := make(map[string]interface{})
7862	return json.Marshal(objectMap)
7863}
7864
7865// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade.
7866type UpgradeOperationHistoryStatus struct {
7867	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted'
7868	Code UpgradeState `json:"code,omitempty"`
7869	// StartTime - READ-ONLY; Start time of the upgrade.
7870	StartTime *date.Time `json:"startTime,omitempty"`
7871	// EndTime - READ-ONLY; End time of the upgrade.
7872	EndTime *date.Time `json:"endTime,omitempty"`
7873}
7874
7875// MarshalJSON is the custom marshaler for UpgradeOperationHistoryStatus.
7876func (uohs UpgradeOperationHistoryStatus) MarshalJSON() ([]byte, error) {
7877	objectMap := make(map[string]interface{})
7878	return json.Marshal(objectMap)
7879}
7880
7881// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling.
7882type UpgradePolicy struct {
7883	// Mode - Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You  control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are  automatically updated at the same time. Possible values include: 'Automatic', 'Manual', 'Rolling'
7884	Mode UpgradeMode `json:"mode,omitempty"`
7885	// RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.
7886	RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"`
7887	// AutomaticOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade.
7888	AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"`
7889}
7890
7891// Usage describes Compute Resource Usage.
7892type Usage struct {
7893	// Unit - An enum describing the unit of usage measurement.
7894	Unit *string `json:"unit,omitempty"`
7895	// CurrentValue - The current usage of the resource.
7896	CurrentValue *int32 `json:"currentValue,omitempty"`
7897	// Limit - The maximum permitted usage of the resource.
7898	Limit *int64 `json:"limit,omitempty"`
7899	// Name - The name of the type of usage.
7900	Name *UsageName `json:"name,omitempty"`
7901}
7902
7903// UsageName the Usage Names.
7904type UsageName struct {
7905	// Value - The name of the resource.
7906	Value *string `json:"value,omitempty"`
7907	// LocalizedValue - The localized name of the resource.
7908	LocalizedValue *string `json:"localizedValue,omitempty"`
7909}
7910
7911// UserArtifactSource the source image from which the Image Version is going to be created.
7912type UserArtifactSource struct {
7913	// FileName - Required. The fileName of the artifact.
7914	FileName *string `json:"fileName,omitempty"`
7915	// MediaLink - Required. The mediaLink of the artifact, must be a readable storage blob.
7916	MediaLink *string `json:"mediaLink,omitempty"`
7917}
7918
7919// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate
7920// should reside on the VM.
7921type VaultCertificate struct {
7922	// CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br>  "data":"<Base64-encoded-certificate>",<br>  "dataType":"pfx",<br>  "password":"<pfx-file-password>"<br>}
7923	CertificateURL *string `json:"certificateUrl,omitempty"`
7924	// CertificateStore - For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name &lt;UppercaseThumbprint&gt;.crt for the X509 certificate file and &lt;UppercaseThumbprint&gt;.prv for private key. Both of these files are .pem formatted.
7925	CertificateStore *string `json:"certificateStore,omitempty"`
7926}
7927
7928// VaultSecretGroup describes a set of certificates which are all in the same Key Vault.
7929type VaultSecretGroup struct {
7930	// SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
7931	SourceVault *SubResource `json:"sourceVault,omitempty"`
7932	// VaultCertificates - The list of key vault references in SourceVault which contain certificates.
7933	VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"`
7934}
7935
7936// VirtualHardDisk describes the uri of a disk.
7937type VirtualHardDisk struct {
7938	// URI - Specifies the virtual hard disk's uri.
7939	URI *string `json:"uri,omitempty"`
7940}
7941
7942// VirtualMachine describes a Virtual Machine.
7943type VirtualMachine struct {
7944	autorest.Response `json:"-"`
7945	// Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use.  In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
7946	Plan                      *Plan `json:"plan,omitempty"`
7947	*VirtualMachineProperties `json:"properties,omitempty"`
7948	// Resources - READ-ONLY; The virtual machine child extension resources.
7949	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
7950	// Identity - The identity of the virtual machine, if configured.
7951	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
7952	// Zones - The virtual machine zones.
7953	Zones *[]string `json:"zones,omitempty"`
7954	// ID - READ-ONLY; Resource Id
7955	ID *string `json:"id,omitempty"`
7956	// Name - READ-ONLY; Resource name
7957	Name *string `json:"name,omitempty"`
7958	// Type - READ-ONLY; Resource type
7959	Type *string `json:"type,omitempty"`
7960	// Location - Resource location
7961	Location *string `json:"location,omitempty"`
7962	// Tags - Resource tags
7963	Tags map[string]*string `json:"tags"`
7964}
7965
7966// MarshalJSON is the custom marshaler for VirtualMachine.
7967func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
7968	objectMap := make(map[string]interface{})
7969	if VM.Plan != nil {
7970		objectMap["plan"] = VM.Plan
7971	}
7972	if VM.VirtualMachineProperties != nil {
7973		objectMap["properties"] = VM.VirtualMachineProperties
7974	}
7975	if VM.Identity != nil {
7976		objectMap["identity"] = VM.Identity
7977	}
7978	if VM.Zones != nil {
7979		objectMap["zones"] = VM.Zones
7980	}
7981	if VM.Location != nil {
7982		objectMap["location"] = VM.Location
7983	}
7984	if VM.Tags != nil {
7985		objectMap["tags"] = VM.Tags
7986	}
7987	return json.Marshal(objectMap)
7988}
7989
7990// UnmarshalJSON is the custom unmarshaler for VirtualMachine struct.
7991func (VM *VirtualMachine) UnmarshalJSON(body []byte) error {
7992	var m map[string]*json.RawMessage
7993	err := json.Unmarshal(body, &m)
7994	if err != nil {
7995		return err
7996	}
7997	for k, v := range m {
7998		switch k {
7999		case "plan":
8000			if v != nil {
8001				var plan Plan
8002				err = json.Unmarshal(*v, &plan)
8003				if err != nil {
8004					return err
8005				}
8006				VM.Plan = &plan
8007			}
8008		case "properties":
8009			if v != nil {
8010				var virtualMachineProperties VirtualMachineProperties
8011				err = json.Unmarshal(*v, &virtualMachineProperties)
8012				if err != nil {
8013					return err
8014				}
8015				VM.VirtualMachineProperties = &virtualMachineProperties
8016			}
8017		case "resources":
8018			if v != nil {
8019				var resources []VirtualMachineExtension
8020				err = json.Unmarshal(*v, &resources)
8021				if err != nil {
8022					return err
8023				}
8024				VM.Resources = &resources
8025			}
8026		case "identity":
8027			if v != nil {
8028				var identity VirtualMachineIdentity
8029				err = json.Unmarshal(*v, &identity)
8030				if err != nil {
8031					return err
8032				}
8033				VM.Identity = &identity
8034			}
8035		case "zones":
8036			if v != nil {
8037				var zones []string
8038				err = json.Unmarshal(*v, &zones)
8039				if err != nil {
8040					return err
8041				}
8042				VM.Zones = &zones
8043			}
8044		case "id":
8045			if v != nil {
8046				var ID string
8047				err = json.Unmarshal(*v, &ID)
8048				if err != nil {
8049					return err
8050				}
8051				VM.ID = &ID
8052			}
8053		case "name":
8054			if v != nil {
8055				var name string
8056				err = json.Unmarshal(*v, &name)
8057				if err != nil {
8058					return err
8059				}
8060				VM.Name = &name
8061			}
8062		case "type":
8063			if v != nil {
8064				var typeVar string
8065				err = json.Unmarshal(*v, &typeVar)
8066				if err != nil {
8067					return err
8068				}
8069				VM.Type = &typeVar
8070			}
8071		case "location":
8072			if v != nil {
8073				var location string
8074				err = json.Unmarshal(*v, &location)
8075				if err != nil {
8076					return err
8077				}
8078				VM.Location = &location
8079			}
8080		case "tags":
8081			if v != nil {
8082				var tags map[string]*string
8083				err = json.Unmarshal(*v, &tags)
8084				if err != nil {
8085					return err
8086				}
8087				VM.Tags = tags
8088			}
8089		}
8090	}
8091
8092	return nil
8093}
8094
8095// VirtualMachineAgentInstanceView the instance view of the VM Agent running on the virtual machine.
8096type VirtualMachineAgentInstanceView struct {
8097	// VMAgentVersion - The VM Agent full version.
8098	VMAgentVersion *string `json:"vmAgentVersion,omitempty"`
8099	// ExtensionHandlers - The virtual machine extension handler instance view.
8100	ExtensionHandlers *[]VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"`
8101	// Statuses - The resource status information.
8102	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
8103}
8104
8105// VirtualMachineCaptureParameters capture Virtual Machine parameters.
8106type VirtualMachineCaptureParameters struct {
8107	// VhdPrefix - The captured virtual hard disk's name prefix.
8108	VhdPrefix *string `json:"vhdPrefix,omitempty"`
8109	// DestinationContainerName - The destination container name.
8110	DestinationContainerName *string `json:"destinationContainerName,omitempty"`
8111	// OverwriteVhds - Specifies whether to overwrite the destination virtual hard disk, in case of conflict.
8112	OverwriteVhds *bool `json:"overwriteVhds,omitempty"`
8113}
8114
8115// VirtualMachineCaptureResult output of virtual machine capture operation.
8116type VirtualMachineCaptureResult struct {
8117	autorest.Response `json:"-"`
8118	// Schema - READ-ONLY; the schema of the captured virtual machine
8119	Schema *string `json:"$schema,omitempty"`
8120	// ContentVersion - READ-ONLY; the version of the content
8121	ContentVersion *string `json:"contentVersion,omitempty"`
8122	// Parameters - READ-ONLY; parameters of the captured virtual machine
8123	Parameters interface{} `json:"parameters,omitempty"`
8124	// Resources - READ-ONLY; a list of resource items of the captured virtual machine
8125	Resources *[]interface{} `json:"resources,omitempty"`
8126	// ID - Resource Id
8127	ID *string `json:"id,omitempty"`
8128}
8129
8130// MarshalJSON is the custom marshaler for VirtualMachineCaptureResult.
8131func (vmcr VirtualMachineCaptureResult) MarshalJSON() ([]byte, error) {
8132	objectMap := make(map[string]interface{})
8133	if vmcr.ID != nil {
8134		objectMap["id"] = vmcr.ID
8135	}
8136	return json.Marshal(objectMap)
8137}
8138
8139// VirtualMachineExtension describes a Virtual Machine Extension.
8140type VirtualMachineExtension struct {
8141	autorest.Response                  `json:"-"`
8142	*VirtualMachineExtensionProperties `json:"properties,omitempty"`
8143	// ID - READ-ONLY; Resource Id
8144	ID *string `json:"id,omitempty"`
8145	// Name - READ-ONLY; Resource name
8146	Name *string `json:"name,omitempty"`
8147	// Type - READ-ONLY; Resource type
8148	Type *string `json:"type,omitempty"`
8149	// Location - Resource location
8150	Location *string `json:"location,omitempty"`
8151	// Tags - Resource tags
8152	Tags map[string]*string `json:"tags"`
8153}
8154
8155// MarshalJSON is the custom marshaler for VirtualMachineExtension.
8156func (vme VirtualMachineExtension) MarshalJSON() ([]byte, error) {
8157	objectMap := make(map[string]interface{})
8158	if vme.VirtualMachineExtensionProperties != nil {
8159		objectMap["properties"] = vme.VirtualMachineExtensionProperties
8160	}
8161	if vme.Location != nil {
8162		objectMap["location"] = vme.Location
8163	}
8164	if vme.Tags != nil {
8165		objectMap["tags"] = vme.Tags
8166	}
8167	return json.Marshal(objectMap)
8168}
8169
8170// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtension struct.
8171func (vme *VirtualMachineExtension) UnmarshalJSON(body []byte) error {
8172	var m map[string]*json.RawMessage
8173	err := json.Unmarshal(body, &m)
8174	if err != nil {
8175		return err
8176	}
8177	for k, v := range m {
8178		switch k {
8179		case "properties":
8180			if v != nil {
8181				var virtualMachineExtensionProperties VirtualMachineExtensionProperties
8182				err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
8183				if err != nil {
8184					return err
8185				}
8186				vme.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
8187			}
8188		case "id":
8189			if v != nil {
8190				var ID string
8191				err = json.Unmarshal(*v, &ID)
8192				if err != nil {
8193					return err
8194				}
8195				vme.ID = &ID
8196			}
8197		case "name":
8198			if v != nil {
8199				var name string
8200				err = json.Unmarshal(*v, &name)
8201				if err != nil {
8202					return err
8203				}
8204				vme.Name = &name
8205			}
8206		case "type":
8207			if v != nil {
8208				var typeVar string
8209				err = json.Unmarshal(*v, &typeVar)
8210				if err != nil {
8211					return err
8212				}
8213				vme.Type = &typeVar
8214			}
8215		case "location":
8216			if v != nil {
8217				var location string
8218				err = json.Unmarshal(*v, &location)
8219				if err != nil {
8220					return err
8221				}
8222				vme.Location = &location
8223			}
8224		case "tags":
8225			if v != nil {
8226				var tags map[string]*string
8227				err = json.Unmarshal(*v, &tags)
8228				if err != nil {
8229					return err
8230				}
8231				vme.Tags = tags
8232			}
8233		}
8234	}
8235
8236	return nil
8237}
8238
8239// VirtualMachineExtensionHandlerInstanceView the instance view of a virtual machine extension handler.
8240type VirtualMachineExtensionHandlerInstanceView struct {
8241	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
8242	Type *string `json:"type,omitempty"`
8243	// TypeHandlerVersion - Specifies the version of the script handler.
8244	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
8245	// Status - The extension handler status.
8246	Status *InstanceViewStatus `json:"status,omitempty"`
8247}
8248
8249// VirtualMachineExtensionImage describes a Virtual Machine Extension Image.
8250type VirtualMachineExtensionImage struct {
8251	autorest.Response                       `json:"-"`
8252	*VirtualMachineExtensionImageProperties `json:"properties,omitempty"`
8253	// ID - READ-ONLY; Resource Id
8254	ID *string `json:"id,omitempty"`
8255	// Name - READ-ONLY; Resource name
8256	Name *string `json:"name,omitempty"`
8257	// Type - READ-ONLY; Resource type
8258	Type *string `json:"type,omitempty"`
8259	// Location - Resource location
8260	Location *string `json:"location,omitempty"`
8261	// Tags - Resource tags
8262	Tags map[string]*string `json:"tags"`
8263}
8264
8265// MarshalJSON is the custom marshaler for VirtualMachineExtensionImage.
8266func (vmei VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) {
8267	objectMap := make(map[string]interface{})
8268	if vmei.VirtualMachineExtensionImageProperties != nil {
8269		objectMap["properties"] = vmei.VirtualMachineExtensionImageProperties
8270	}
8271	if vmei.Location != nil {
8272		objectMap["location"] = vmei.Location
8273	}
8274	if vmei.Tags != nil {
8275		objectMap["tags"] = vmei.Tags
8276	}
8277	return json.Marshal(objectMap)
8278}
8279
8280// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionImage struct.
8281func (vmei *VirtualMachineExtensionImage) UnmarshalJSON(body []byte) error {
8282	var m map[string]*json.RawMessage
8283	err := json.Unmarshal(body, &m)
8284	if err != nil {
8285		return err
8286	}
8287	for k, v := range m {
8288		switch k {
8289		case "properties":
8290			if v != nil {
8291				var virtualMachineExtensionImageProperties VirtualMachineExtensionImageProperties
8292				err = json.Unmarshal(*v, &virtualMachineExtensionImageProperties)
8293				if err != nil {
8294					return err
8295				}
8296				vmei.VirtualMachineExtensionImageProperties = &virtualMachineExtensionImageProperties
8297			}
8298		case "id":
8299			if v != nil {
8300				var ID string
8301				err = json.Unmarshal(*v, &ID)
8302				if err != nil {
8303					return err
8304				}
8305				vmei.ID = &ID
8306			}
8307		case "name":
8308			if v != nil {
8309				var name string
8310				err = json.Unmarshal(*v, &name)
8311				if err != nil {
8312					return err
8313				}
8314				vmei.Name = &name
8315			}
8316		case "type":
8317			if v != nil {
8318				var typeVar string
8319				err = json.Unmarshal(*v, &typeVar)
8320				if err != nil {
8321					return err
8322				}
8323				vmei.Type = &typeVar
8324			}
8325		case "location":
8326			if v != nil {
8327				var location string
8328				err = json.Unmarshal(*v, &location)
8329				if err != nil {
8330					return err
8331				}
8332				vmei.Location = &location
8333			}
8334		case "tags":
8335			if v != nil {
8336				var tags map[string]*string
8337				err = json.Unmarshal(*v, &tags)
8338				if err != nil {
8339					return err
8340				}
8341				vmei.Tags = tags
8342			}
8343		}
8344	}
8345
8346	return nil
8347}
8348
8349// VirtualMachineExtensionImageProperties describes the properties of a Virtual Machine Extension Image.
8350type VirtualMachineExtensionImageProperties struct {
8351	// OperatingSystem - The operating system this extension supports.
8352	OperatingSystem *string `json:"operatingSystem,omitempty"`
8353	// ComputeRole - The type of role (IaaS or PaaS) this extension supports.
8354	ComputeRole *string `json:"computeRole,omitempty"`
8355	// HandlerSchema - The schema defined by publisher, where extension consumers should provide settings in a matching schema.
8356	HandlerSchema *string `json:"handlerSchema,omitempty"`
8357	// VMScaleSetEnabled - Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS.
8358	VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"`
8359	// SupportsMultipleExtensions - Whether the handler can support multiple extensions.
8360	SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"`
8361}
8362
8363// VirtualMachineExtensionInstanceView the instance view of a virtual machine extension.
8364type VirtualMachineExtensionInstanceView struct {
8365	// Name - The virtual machine extension name.
8366	Name *string `json:"name,omitempty"`
8367	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
8368	Type *string `json:"type,omitempty"`
8369	// TypeHandlerVersion - Specifies the version of the script handler.
8370	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
8371	// Substatuses - The resource status information.
8372	Substatuses *[]InstanceViewStatus `json:"substatuses,omitempty"`
8373	// Statuses - The resource status information.
8374	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
8375}
8376
8377// VirtualMachineExtensionProperties describes the properties of a Virtual Machine Extension.
8378type VirtualMachineExtensionProperties struct {
8379	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
8380	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
8381	// Publisher - The name of the extension handler publisher.
8382	Publisher *string `json:"publisher,omitempty"`
8383	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
8384	Type *string `json:"type,omitempty"`
8385	// TypeHandlerVersion - Specifies the version of the script handler.
8386	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
8387	// AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
8388	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
8389	// Settings - Json formatted public settings for the extension.
8390	Settings interface{} `json:"settings,omitempty"`
8391	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
8392	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
8393	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
8394	ProvisioningState *string `json:"provisioningState,omitempty"`
8395	// InstanceView - The virtual machine extension instance view.
8396	InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`
8397}
8398
8399// MarshalJSON is the custom marshaler for VirtualMachineExtensionProperties.
8400func (vmep VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) {
8401	objectMap := make(map[string]interface{})
8402	if vmep.ForceUpdateTag != nil {
8403		objectMap["forceUpdateTag"] = vmep.ForceUpdateTag
8404	}
8405	if vmep.Publisher != nil {
8406		objectMap["publisher"] = vmep.Publisher
8407	}
8408	if vmep.Type != nil {
8409		objectMap["type"] = vmep.Type
8410	}
8411	if vmep.TypeHandlerVersion != nil {
8412		objectMap["typeHandlerVersion"] = vmep.TypeHandlerVersion
8413	}
8414	if vmep.AutoUpgradeMinorVersion != nil {
8415		objectMap["autoUpgradeMinorVersion"] = vmep.AutoUpgradeMinorVersion
8416	}
8417	if vmep.Settings != nil {
8418		objectMap["settings"] = vmep.Settings
8419	}
8420	if vmep.ProtectedSettings != nil {
8421		objectMap["protectedSettings"] = vmep.ProtectedSettings
8422	}
8423	if vmep.InstanceView != nil {
8424		objectMap["instanceView"] = vmep.InstanceView
8425	}
8426	return json.Marshal(objectMap)
8427}
8428
8429// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
8430// a long-running operation.
8431type VirtualMachineExtensionsCreateOrUpdateFuture struct {
8432	azure.FutureAPI
8433	// Result returns the result of the asynchronous operation.
8434	// If the operation has not completed it will return an error.
8435	Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
8436}
8437
8438// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8439func (future *VirtualMachineExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8440	var azFuture azure.Future
8441	if err := json.Unmarshal(body, &azFuture); err != nil {
8442		return err
8443	}
8444	future.FutureAPI = &azFuture
8445	future.Result = future.result
8446	return nil
8447}
8448
8449// result is the default implementation for VirtualMachineExtensionsCreateOrUpdateFuture.Result.
8450func (future *VirtualMachineExtensionsCreateOrUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
8451	var done bool
8452	done, err = future.DoneWithContext(context.Background(), client)
8453	if err != nil {
8454		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8455		return
8456	}
8457	if !done {
8458		vme.Response.Response = future.Response()
8459		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
8460		return
8461	}
8462	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8463	if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
8464		vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
8465		if err != nil {
8466			err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
8467		}
8468	}
8469	return
8470}
8471
8472// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
8473// long-running operation.
8474type VirtualMachineExtensionsDeleteFuture struct {
8475	azure.FutureAPI
8476	// Result returns the result of the asynchronous operation.
8477	// If the operation has not completed it will return an error.
8478	Result func(VirtualMachineExtensionsClient) (autorest.Response, error)
8479}
8480
8481// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8482func (future *VirtualMachineExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
8483	var azFuture azure.Future
8484	if err := json.Unmarshal(body, &azFuture); err != nil {
8485		return err
8486	}
8487	future.FutureAPI = &azFuture
8488	future.Result = future.result
8489	return nil
8490}
8491
8492// result is the default implementation for VirtualMachineExtensionsDeleteFuture.Result.
8493func (future *VirtualMachineExtensionsDeleteFuture) result(client VirtualMachineExtensionsClient) (ar autorest.Response, err error) {
8494	var done bool
8495	done, err = future.DoneWithContext(context.Background(), client)
8496	if err != nil {
8497		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
8498		return
8499	}
8500	if !done {
8501		ar.Response = future.Response()
8502		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
8503		return
8504	}
8505	ar.Response = future.Response()
8506	return
8507}
8508
8509// VirtualMachineExtensionsListResult the List Extension operation response
8510type VirtualMachineExtensionsListResult struct {
8511	autorest.Response `json:"-"`
8512	// Value - The list of extensions
8513	Value *[]VirtualMachineExtension `json:"value,omitempty"`
8514}
8515
8516// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
8517// long-running operation.
8518type VirtualMachineExtensionsUpdateFuture struct {
8519	azure.FutureAPI
8520	// Result returns the result of the asynchronous operation.
8521	// If the operation has not completed it will return an error.
8522	Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
8523}
8524
8525// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8526func (future *VirtualMachineExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
8527	var azFuture azure.Future
8528	if err := json.Unmarshal(body, &azFuture); err != nil {
8529		return err
8530	}
8531	future.FutureAPI = &azFuture
8532	future.Result = future.result
8533	return nil
8534}
8535
8536// result is the default implementation for VirtualMachineExtensionsUpdateFuture.Result.
8537func (future *VirtualMachineExtensionsUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
8538	var done bool
8539	done, err = future.DoneWithContext(context.Background(), client)
8540	if err != nil {
8541		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
8542		return
8543	}
8544	if !done {
8545		vme.Response.Response = future.Response()
8546		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
8547		return
8548	}
8549	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8550	if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
8551		vme, err = client.UpdateResponder(vme.Response.Response)
8552		if err != nil {
8553			err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
8554		}
8555	}
8556	return
8557}
8558
8559// VirtualMachineExtensionUpdate describes a Virtual Machine Extension.
8560type VirtualMachineExtensionUpdate struct {
8561	*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
8562	// Tags - Resource tags
8563	Tags map[string]*string `json:"tags"`
8564}
8565
8566// MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate.
8567func (vmeu VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) {
8568	objectMap := make(map[string]interface{})
8569	if vmeu.VirtualMachineExtensionUpdateProperties != nil {
8570		objectMap["properties"] = vmeu.VirtualMachineExtensionUpdateProperties
8571	}
8572	if vmeu.Tags != nil {
8573		objectMap["tags"] = vmeu.Tags
8574	}
8575	return json.Marshal(objectMap)
8576}
8577
8578// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionUpdate struct.
8579func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error {
8580	var m map[string]*json.RawMessage
8581	err := json.Unmarshal(body, &m)
8582	if err != nil {
8583		return err
8584	}
8585	for k, v := range m {
8586		switch k {
8587		case "properties":
8588			if v != nil {
8589				var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
8590				err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
8591				if err != nil {
8592					return err
8593				}
8594				vmeu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
8595			}
8596		case "tags":
8597			if v != nil {
8598				var tags map[string]*string
8599				err = json.Unmarshal(*v, &tags)
8600				if err != nil {
8601					return err
8602				}
8603				vmeu.Tags = tags
8604			}
8605		}
8606	}
8607
8608	return nil
8609}
8610
8611// VirtualMachineExtensionUpdateProperties describes the properties of a Virtual Machine Extension.
8612type VirtualMachineExtensionUpdateProperties struct {
8613	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
8614	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
8615	// Publisher - The name of the extension handler publisher.
8616	Publisher *string `json:"publisher,omitempty"`
8617	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
8618	Type *string `json:"type,omitempty"`
8619	// TypeHandlerVersion - Specifies the version of the script handler.
8620	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
8621	// AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
8622	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
8623	// Settings - Json formatted public settings for the extension.
8624	Settings interface{} `json:"settings,omitempty"`
8625	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
8626	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
8627}
8628
8629// VirtualMachineHealthStatus the health status of the VM.
8630type VirtualMachineHealthStatus struct {
8631	// Status - READ-ONLY; The health status information for the VM.
8632	Status *InstanceViewStatus `json:"status,omitempty"`
8633}
8634
8635// MarshalJSON is the custom marshaler for VirtualMachineHealthStatus.
8636func (vmhs VirtualMachineHealthStatus) MarshalJSON() ([]byte, error) {
8637	objectMap := make(map[string]interface{})
8638	return json.Marshal(objectMap)
8639}
8640
8641// VirtualMachineIdentity identity for the virtual machine.
8642type VirtualMachineIdentity struct {
8643	// PrincipalID - READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity.
8644	PrincipalID *string `json:"principalId,omitempty"`
8645	// TenantID - READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity.
8646	TenantID *string `json:"tenantId,omitempty"`
8647	// Type - The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone'
8648	Type ResourceIdentityType `json:"type,omitempty"`
8649	// UserAssignedIdentities - The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
8650	UserAssignedIdentities map[string]*VirtualMachineIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
8651}
8652
8653// MarshalJSON is the custom marshaler for VirtualMachineIdentity.
8654func (vmi VirtualMachineIdentity) MarshalJSON() ([]byte, error) {
8655	objectMap := make(map[string]interface{})
8656	if vmi.Type != "" {
8657		objectMap["type"] = vmi.Type
8658	}
8659	if vmi.UserAssignedIdentities != nil {
8660		objectMap["userAssignedIdentities"] = vmi.UserAssignedIdentities
8661	}
8662	return json.Marshal(objectMap)
8663}
8664
8665// VirtualMachineIdentityUserAssignedIdentitiesValue ...
8666type VirtualMachineIdentityUserAssignedIdentitiesValue struct {
8667	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
8668	PrincipalID *string `json:"principalId,omitempty"`
8669	// ClientID - READ-ONLY; The client id of user assigned identity.
8670	ClientID *string `json:"clientId,omitempty"`
8671}
8672
8673// MarshalJSON is the custom marshaler for VirtualMachineIdentityUserAssignedIdentitiesValue.
8674func (vmiAiv VirtualMachineIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
8675	objectMap := make(map[string]interface{})
8676	return json.Marshal(objectMap)
8677}
8678
8679// VirtualMachineImage describes a Virtual Machine Image.
8680type VirtualMachineImage struct {
8681	autorest.Response              `json:"-"`
8682	*VirtualMachineImageProperties `json:"properties,omitempty"`
8683	// Name - The name of the resource.
8684	Name *string `json:"name,omitempty"`
8685	// Location - The supported Azure location of the resource.
8686	Location *string `json:"location,omitempty"`
8687	// Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md).
8688	Tags map[string]*string `json:"tags"`
8689	// ID - Resource Id
8690	ID *string `json:"id,omitempty"`
8691}
8692
8693// MarshalJSON is the custom marshaler for VirtualMachineImage.
8694func (vmi VirtualMachineImage) MarshalJSON() ([]byte, error) {
8695	objectMap := make(map[string]interface{})
8696	if vmi.VirtualMachineImageProperties != nil {
8697		objectMap["properties"] = vmi.VirtualMachineImageProperties
8698	}
8699	if vmi.Name != nil {
8700		objectMap["name"] = vmi.Name
8701	}
8702	if vmi.Location != nil {
8703		objectMap["location"] = vmi.Location
8704	}
8705	if vmi.Tags != nil {
8706		objectMap["tags"] = vmi.Tags
8707	}
8708	if vmi.ID != nil {
8709		objectMap["id"] = vmi.ID
8710	}
8711	return json.Marshal(objectMap)
8712}
8713
8714// UnmarshalJSON is the custom unmarshaler for VirtualMachineImage struct.
8715func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error {
8716	var m map[string]*json.RawMessage
8717	err := json.Unmarshal(body, &m)
8718	if err != nil {
8719		return err
8720	}
8721	for k, v := range m {
8722		switch k {
8723		case "properties":
8724			if v != nil {
8725				var virtualMachineImageProperties VirtualMachineImageProperties
8726				err = json.Unmarshal(*v, &virtualMachineImageProperties)
8727				if err != nil {
8728					return err
8729				}
8730				vmi.VirtualMachineImageProperties = &virtualMachineImageProperties
8731			}
8732		case "name":
8733			if v != nil {
8734				var name string
8735				err = json.Unmarshal(*v, &name)
8736				if err != nil {
8737					return err
8738				}
8739				vmi.Name = &name
8740			}
8741		case "location":
8742			if v != nil {
8743				var location string
8744				err = json.Unmarshal(*v, &location)
8745				if err != nil {
8746					return err
8747				}
8748				vmi.Location = &location
8749			}
8750		case "tags":
8751			if v != nil {
8752				var tags map[string]*string
8753				err = json.Unmarshal(*v, &tags)
8754				if err != nil {
8755					return err
8756				}
8757				vmi.Tags = tags
8758			}
8759		case "id":
8760			if v != nil {
8761				var ID string
8762				err = json.Unmarshal(*v, &ID)
8763				if err != nil {
8764					return err
8765				}
8766				vmi.ID = &ID
8767			}
8768		}
8769	}
8770
8771	return nil
8772}
8773
8774// VirtualMachineImageProperties describes the properties of a Virtual Machine Image.
8775type VirtualMachineImageProperties struct {
8776	Plan                         *PurchasePlan                 `json:"plan,omitempty"`
8777	OsDiskImage                  *OSDiskImage                  `json:"osDiskImage,omitempty"`
8778	DataDiskImages               *[]DataDiskImage              `json:"dataDiskImages,omitempty"`
8779	AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"`
8780	// HyperVGeneration - Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
8781	HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
8782}
8783
8784// VirtualMachineImageResource virtual machine image resource information.
8785type VirtualMachineImageResource struct {
8786	// Name - The name of the resource.
8787	Name *string `json:"name,omitempty"`
8788	// Location - The supported Azure location of the resource.
8789	Location *string `json:"location,omitempty"`
8790	// Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md).
8791	Tags map[string]*string `json:"tags"`
8792	// ID - Resource Id
8793	ID *string `json:"id,omitempty"`
8794}
8795
8796// MarshalJSON is the custom marshaler for VirtualMachineImageResource.
8797func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) {
8798	objectMap := make(map[string]interface{})
8799	if vmir.Name != nil {
8800		objectMap["name"] = vmir.Name
8801	}
8802	if vmir.Location != nil {
8803		objectMap["location"] = vmir.Location
8804	}
8805	if vmir.Tags != nil {
8806		objectMap["tags"] = vmir.Tags
8807	}
8808	if vmir.ID != nil {
8809		objectMap["id"] = vmir.ID
8810	}
8811	return json.Marshal(objectMap)
8812}
8813
8814// VirtualMachineInstanceView the instance view of a virtual machine.
8815type VirtualMachineInstanceView struct {
8816	autorest.Response `json:"-"`
8817	// PlatformUpdateDomain - Specifies the update domain of the virtual machine.
8818	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
8819	// PlatformFaultDomain - Specifies the fault domain of the virtual machine.
8820	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
8821	// ComputerName - The computer name assigned to the virtual machine.
8822	ComputerName *string `json:"computerName,omitempty"`
8823	// OsName - The Operating System running on the virtual machine.
8824	OsName *string `json:"osName,omitempty"`
8825	// OsVersion - The version of Operating System running on the virtual machine.
8826	OsVersion *string `json:"osVersion,omitempty"`
8827	// HyperVGeneration - Specifies the HyperVGeneration Type associated with a resource. Possible values include: 'HyperVGenerationTypeV1', 'HyperVGenerationTypeV2'
8828	HyperVGeneration HyperVGenerationType `json:"hyperVGeneration,omitempty"`
8829	// RdpThumbPrint - The Remote desktop certificate thumbprint.
8830	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
8831	// VMAgent - The VM Agent running on the virtual machine.
8832	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
8833	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
8834	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
8835	// Disks - The virtual machine disk information.
8836	Disks *[]DiskInstanceView `json:"disks,omitempty"`
8837	// Extensions - The extensions information.
8838	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
8839	// BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor.
8840	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
8841	// Statuses - The resource status information.
8842	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
8843}
8844
8845// VirtualMachineListResult the List Virtual Machine operation response.
8846type VirtualMachineListResult struct {
8847	autorest.Response `json:"-"`
8848	// Value - The list of virtual machines.
8849	Value *[]VirtualMachine `json:"value,omitempty"`
8850	// NextLink - The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines.
8851	NextLink *string `json:"nextLink,omitempty"`
8852}
8853
8854// VirtualMachineListResultIterator provides access to a complete listing of VirtualMachine values.
8855type VirtualMachineListResultIterator struct {
8856	i    int
8857	page VirtualMachineListResultPage
8858}
8859
8860// NextWithContext advances to the next value.  If there was an error making
8861// the request the iterator does not advance and the error is returned.
8862func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) {
8863	if tracing.IsEnabled() {
8864		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.NextWithContext")
8865		defer func() {
8866			sc := -1
8867			if iter.Response().Response.Response != nil {
8868				sc = iter.Response().Response.Response.StatusCode
8869			}
8870			tracing.EndSpan(ctx, sc, err)
8871		}()
8872	}
8873	iter.i++
8874	if iter.i < len(iter.page.Values()) {
8875		return nil
8876	}
8877	err = iter.page.NextWithContext(ctx)
8878	if err != nil {
8879		iter.i--
8880		return err
8881	}
8882	iter.i = 0
8883	return nil
8884}
8885
8886// Next advances to the next value.  If there was an error making
8887// the request the iterator does not advance and the error is returned.
8888// Deprecated: Use NextWithContext() instead.
8889func (iter *VirtualMachineListResultIterator) Next() error {
8890	return iter.NextWithContext(context.Background())
8891}
8892
8893// NotDone returns true if the enumeration should be started or is not yet complete.
8894func (iter VirtualMachineListResultIterator) NotDone() bool {
8895	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8896}
8897
8898// Response returns the raw server response from the last page request.
8899func (iter VirtualMachineListResultIterator) Response() VirtualMachineListResult {
8900	return iter.page.Response()
8901}
8902
8903// Value returns the current value or a zero-initialized value if the
8904// iterator has advanced beyond the end of the collection.
8905func (iter VirtualMachineListResultIterator) Value() VirtualMachine {
8906	if !iter.page.NotDone() {
8907		return VirtualMachine{}
8908	}
8909	return iter.page.Values()[iter.i]
8910}
8911
8912// Creates a new instance of the VirtualMachineListResultIterator type.
8913func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator {
8914	return VirtualMachineListResultIterator{page: page}
8915}
8916
8917// IsEmpty returns true if the ListResult contains no values.
8918func (vmlr VirtualMachineListResult) IsEmpty() bool {
8919	return vmlr.Value == nil || len(*vmlr.Value) == 0
8920}
8921
8922// hasNextLink returns true if the NextLink is not empty.
8923func (vmlr VirtualMachineListResult) hasNextLink() bool {
8924	return vmlr.NextLink != nil && len(*vmlr.NextLink) != 0
8925}
8926
8927// virtualMachineListResultPreparer prepares a request to retrieve the next set of results.
8928// It returns nil if no more results exist.
8929func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) {
8930	if !vmlr.hasNextLink() {
8931		return nil, nil
8932	}
8933	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8934		autorest.AsJSON(),
8935		autorest.AsGet(),
8936		autorest.WithBaseURL(to.String(vmlr.NextLink)))
8937}
8938
8939// VirtualMachineListResultPage contains a page of VirtualMachine values.
8940type VirtualMachineListResultPage struct {
8941	fn   func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)
8942	vmlr VirtualMachineListResult
8943}
8944
8945// NextWithContext advances to the next page of values.  If there was an error making
8946// the request the page does not advance and the error is returned.
8947func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) {
8948	if tracing.IsEnabled() {
8949		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext")
8950		defer func() {
8951			sc := -1
8952			if page.Response().Response.Response != nil {
8953				sc = page.Response().Response.Response.StatusCode
8954			}
8955			tracing.EndSpan(ctx, sc, err)
8956		}()
8957	}
8958	for {
8959		next, err := page.fn(ctx, page.vmlr)
8960		if err != nil {
8961			return err
8962		}
8963		page.vmlr = next
8964		if !next.hasNextLink() || !next.IsEmpty() {
8965			break
8966		}
8967	}
8968	return nil
8969}
8970
8971// Next advances to the next page of values.  If there was an error making
8972// the request the page does not advance and the error is returned.
8973// Deprecated: Use NextWithContext() instead.
8974func (page *VirtualMachineListResultPage) Next() error {
8975	return page.NextWithContext(context.Background())
8976}
8977
8978// NotDone returns true if the page enumeration should be started or is not yet complete.
8979func (page VirtualMachineListResultPage) NotDone() bool {
8980	return !page.vmlr.IsEmpty()
8981}
8982
8983// Response returns the raw server response from the last page request.
8984func (page VirtualMachineListResultPage) Response() VirtualMachineListResult {
8985	return page.vmlr
8986}
8987
8988// Values returns the slice of values for the current page or nil if there are no values.
8989func (page VirtualMachineListResultPage) Values() []VirtualMachine {
8990	if page.vmlr.IsEmpty() {
8991		return nil
8992	}
8993	return *page.vmlr.Value
8994}
8995
8996// Creates a new instance of the VirtualMachineListResultPage type.
8997func NewVirtualMachineListResultPage(cur VirtualMachineListResult, getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
8998	return VirtualMachineListResultPage{
8999		fn:   getNextPage,
9000		vmlr: cur,
9001	}
9002}
9003
9004// VirtualMachineProperties describes the properties of a Virtual Machine.
9005type VirtualMachineProperties struct {
9006	// HardwareProfile - Specifies the hardware settings for the virtual machine.
9007	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
9008	// StorageProfile - Specifies the storage settings for the virtual machine disks.
9009	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
9010	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine.
9011	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
9012	// OsProfile - Specifies the operating system settings for the virtual machine.
9013	OsProfile *OSProfile `json:"osProfile,omitempty"`
9014	// NetworkProfile - Specifies the network interfaces of the virtual machine.
9015	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
9016	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
9017	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
9018	// AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
9019	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
9020	// VirtualMachineScaleSet - Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01
9021	VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"`
9022	// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.
9023	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
9024	// Priority - Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot'
9025	Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
9026	// EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine. Only supported value is 'Deallocate'. <br><br>Minimum api-version: 2019-03-01. Possible values include: 'Deallocate', 'Delete'
9027	EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
9028	// BillingProfile - Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
9029	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
9030	// Host - Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
9031	Host *SubResource `json:"host,omitempty"`
9032	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
9033	ProvisioningState *string `json:"provisioningState,omitempty"`
9034	// InstanceView - READ-ONLY; The virtual machine instance view.
9035	InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"`
9036	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15
9037	LicenseType *string `json:"licenseType,omitempty"`
9038	// VMID - READ-ONLY; Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.
9039	VMID *string `json:"vmId,omitempty"`
9040}
9041
9042// MarshalJSON is the custom marshaler for VirtualMachineProperties.
9043func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) {
9044	objectMap := make(map[string]interface{})
9045	if vmp.HardwareProfile != nil {
9046		objectMap["hardwareProfile"] = vmp.HardwareProfile
9047	}
9048	if vmp.StorageProfile != nil {
9049		objectMap["storageProfile"] = vmp.StorageProfile
9050	}
9051	if vmp.AdditionalCapabilities != nil {
9052		objectMap["additionalCapabilities"] = vmp.AdditionalCapabilities
9053	}
9054	if vmp.OsProfile != nil {
9055		objectMap["osProfile"] = vmp.OsProfile
9056	}
9057	if vmp.NetworkProfile != nil {
9058		objectMap["networkProfile"] = vmp.NetworkProfile
9059	}
9060	if vmp.DiagnosticsProfile != nil {
9061		objectMap["diagnosticsProfile"] = vmp.DiagnosticsProfile
9062	}
9063	if vmp.AvailabilitySet != nil {
9064		objectMap["availabilitySet"] = vmp.AvailabilitySet
9065	}
9066	if vmp.VirtualMachineScaleSet != nil {
9067		objectMap["virtualMachineScaleSet"] = vmp.VirtualMachineScaleSet
9068	}
9069	if vmp.ProximityPlacementGroup != nil {
9070		objectMap["proximityPlacementGroup"] = vmp.ProximityPlacementGroup
9071	}
9072	if vmp.Priority != "" {
9073		objectMap["priority"] = vmp.Priority
9074	}
9075	if vmp.EvictionPolicy != "" {
9076		objectMap["evictionPolicy"] = vmp.EvictionPolicy
9077	}
9078	if vmp.BillingProfile != nil {
9079		objectMap["billingProfile"] = vmp.BillingProfile
9080	}
9081	if vmp.Host != nil {
9082		objectMap["host"] = vmp.Host
9083	}
9084	if vmp.LicenseType != nil {
9085		objectMap["licenseType"] = vmp.LicenseType
9086	}
9087	return json.Marshal(objectMap)
9088}
9089
9090// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk
9091// will always be reimaged
9092type VirtualMachineReimageParameters struct {
9093	// TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
9094	TempDisk *bool `json:"tempDisk,omitempty"`
9095}
9096
9097// VirtualMachineScaleSet describes a Virtual Machine Scale Set.
9098type VirtualMachineScaleSet struct {
9099	autorest.Response `json:"-"`
9100	// Sku - The virtual machine scale set sku.
9101	Sku *Sku `json:"sku,omitempty"`
9102	// Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use.  In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
9103	Plan                              *Plan `json:"plan,omitempty"`
9104	*VirtualMachineScaleSetProperties `json:"properties,omitempty"`
9105	// Identity - The identity of the virtual machine scale set, if configured.
9106	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
9107	// Zones - The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set.
9108	Zones *[]string `json:"zones,omitempty"`
9109	// ID - READ-ONLY; Resource Id
9110	ID *string `json:"id,omitempty"`
9111	// Name - READ-ONLY; Resource name
9112	Name *string `json:"name,omitempty"`
9113	// Type - READ-ONLY; Resource type
9114	Type *string `json:"type,omitempty"`
9115	// Location - Resource location
9116	Location *string `json:"location,omitempty"`
9117	// Tags - Resource tags
9118	Tags map[string]*string `json:"tags"`
9119}
9120
9121// MarshalJSON is the custom marshaler for VirtualMachineScaleSet.
9122func (vmss VirtualMachineScaleSet) MarshalJSON() ([]byte, error) {
9123	objectMap := make(map[string]interface{})
9124	if vmss.Sku != nil {
9125		objectMap["sku"] = vmss.Sku
9126	}
9127	if vmss.Plan != nil {
9128		objectMap["plan"] = vmss.Plan
9129	}
9130	if vmss.VirtualMachineScaleSetProperties != nil {
9131		objectMap["properties"] = vmss.VirtualMachineScaleSetProperties
9132	}
9133	if vmss.Identity != nil {
9134		objectMap["identity"] = vmss.Identity
9135	}
9136	if vmss.Zones != nil {
9137		objectMap["zones"] = vmss.Zones
9138	}
9139	if vmss.Location != nil {
9140		objectMap["location"] = vmss.Location
9141	}
9142	if vmss.Tags != nil {
9143		objectMap["tags"] = vmss.Tags
9144	}
9145	return json.Marshal(objectMap)
9146}
9147
9148// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSet struct.
9149func (vmss *VirtualMachineScaleSet) UnmarshalJSON(body []byte) error {
9150	var m map[string]*json.RawMessage
9151	err := json.Unmarshal(body, &m)
9152	if err != nil {
9153		return err
9154	}
9155	for k, v := range m {
9156		switch k {
9157		case "sku":
9158			if v != nil {
9159				var sku Sku
9160				err = json.Unmarshal(*v, &sku)
9161				if err != nil {
9162					return err
9163				}
9164				vmss.Sku = &sku
9165			}
9166		case "plan":
9167			if v != nil {
9168				var plan Plan
9169				err = json.Unmarshal(*v, &plan)
9170				if err != nil {
9171					return err
9172				}
9173				vmss.Plan = &plan
9174			}
9175		case "properties":
9176			if v != nil {
9177				var virtualMachineScaleSetProperties VirtualMachineScaleSetProperties
9178				err = json.Unmarshal(*v, &virtualMachineScaleSetProperties)
9179				if err != nil {
9180					return err
9181				}
9182				vmss.VirtualMachineScaleSetProperties = &virtualMachineScaleSetProperties
9183			}
9184		case "identity":
9185			if v != nil {
9186				var identity VirtualMachineScaleSetIdentity
9187				err = json.Unmarshal(*v, &identity)
9188				if err != nil {
9189					return err
9190				}
9191				vmss.Identity = &identity
9192			}
9193		case "zones":
9194			if v != nil {
9195				var zones []string
9196				err = json.Unmarshal(*v, &zones)
9197				if err != nil {
9198					return err
9199				}
9200				vmss.Zones = &zones
9201			}
9202		case "id":
9203			if v != nil {
9204				var ID string
9205				err = json.Unmarshal(*v, &ID)
9206				if err != nil {
9207					return err
9208				}
9209				vmss.ID = &ID
9210			}
9211		case "name":
9212			if v != nil {
9213				var name string
9214				err = json.Unmarshal(*v, &name)
9215				if err != nil {
9216					return err
9217				}
9218				vmss.Name = &name
9219			}
9220		case "type":
9221			if v != nil {
9222				var typeVar string
9223				err = json.Unmarshal(*v, &typeVar)
9224				if err != nil {
9225					return err
9226				}
9227				vmss.Type = &typeVar
9228			}
9229		case "location":
9230			if v != nil {
9231				var location string
9232				err = json.Unmarshal(*v, &location)
9233				if err != nil {
9234					return err
9235				}
9236				vmss.Location = &location
9237			}
9238		case "tags":
9239			if v != nil {
9240				var tags map[string]*string
9241				err = json.Unmarshal(*v, &tags)
9242				if err != nil {
9243					return err
9244				}
9245				vmss.Tags = tags
9246			}
9247		}
9248	}
9249
9250	return nil
9251}
9252
9253// VirtualMachineScaleSetDataDisk describes a virtual machine scale set data disk.
9254type VirtualMachineScaleSetDataDisk struct {
9255	// Name - The disk name.
9256	Name *string `json:"name,omitempty"`
9257	// Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
9258	Lun *int32 `json:"lun,omitempty"`
9259	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
9260	Caching CachingTypes `json:"caching,omitempty"`
9261	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
9262	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
9263	// CreateOption - The create option. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
9264	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
9265	// DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
9266	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
9267	// ManagedDisk - The managed disk parameters.
9268	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
9269}
9270
9271// VirtualMachineScaleSetExtension describes a Virtual Machine Scale Set Extension.
9272type VirtualMachineScaleSetExtension struct {
9273	autorest.Response `json:"-"`
9274	// Name - The name of the extension.
9275	Name                                       *string `json:"name,omitempty"`
9276	*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
9277	// ID - READ-ONLY; Resource Id
9278	ID *string `json:"id,omitempty"`
9279}
9280
9281// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtension.
9282func (vmsse VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) {
9283	objectMap := make(map[string]interface{})
9284	if vmsse.Name != nil {
9285		objectMap["name"] = vmsse.Name
9286	}
9287	if vmsse.VirtualMachineScaleSetExtensionProperties != nil {
9288		objectMap["properties"] = vmsse.VirtualMachineScaleSetExtensionProperties
9289	}
9290	return json.Marshal(objectMap)
9291}
9292
9293// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtension struct.
9294func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error {
9295	var m map[string]*json.RawMessage
9296	err := json.Unmarshal(body, &m)
9297	if err != nil {
9298		return err
9299	}
9300	for k, v := range m {
9301		switch k {
9302		case "name":
9303			if v != nil {
9304				var name string
9305				err = json.Unmarshal(*v, &name)
9306				if err != nil {
9307					return err
9308				}
9309				vmsse.Name = &name
9310			}
9311		case "properties":
9312			if v != nil {
9313				var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
9314				err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
9315				if err != nil {
9316					return err
9317				}
9318				vmsse.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
9319			}
9320		case "id":
9321			if v != nil {
9322				var ID string
9323				err = json.Unmarshal(*v, &ID)
9324				if err != nil {
9325					return err
9326				}
9327				vmsse.ID = &ID
9328			}
9329		}
9330	}
9331
9332	return nil
9333}
9334
9335// VirtualMachineScaleSetExtensionListResult the List VM scale set extension operation response.
9336type VirtualMachineScaleSetExtensionListResult struct {
9337	autorest.Response `json:"-"`
9338	// Value - The list of VM scale set extensions.
9339	Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"`
9340	// NextLink - The uri to fetch the next page of VM scale set extensions. Call ListNext() with this to fetch the next page of VM scale set extensions.
9341	NextLink *string `json:"nextLink,omitempty"`
9342}
9343
9344// VirtualMachineScaleSetExtensionListResultIterator provides access to a complete listing of
9345// VirtualMachineScaleSetExtension values.
9346type VirtualMachineScaleSetExtensionListResultIterator struct {
9347	i    int
9348	page VirtualMachineScaleSetExtensionListResultPage
9349}
9350
9351// NextWithContext advances to the next value.  If there was an error making
9352// the request the iterator does not advance and the error is returned.
9353func (iter *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) {
9354	if tracing.IsEnabled() {
9355		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.NextWithContext")
9356		defer func() {
9357			sc := -1
9358			if iter.Response().Response.Response != nil {
9359				sc = iter.Response().Response.Response.StatusCode
9360			}
9361			tracing.EndSpan(ctx, sc, err)
9362		}()
9363	}
9364	iter.i++
9365	if iter.i < len(iter.page.Values()) {
9366		return nil
9367	}
9368	err = iter.page.NextWithContext(ctx)
9369	if err != nil {
9370		iter.i--
9371		return err
9372	}
9373	iter.i = 0
9374	return nil
9375}
9376
9377// Next advances to the next value.  If there was an error making
9378// the request the iterator does not advance and the error is returned.
9379// Deprecated: Use NextWithContext() instead.
9380func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error {
9381	return iter.NextWithContext(context.Background())
9382}
9383
9384// NotDone returns true if the enumeration should be started or is not yet complete.
9385func (iter VirtualMachineScaleSetExtensionListResultIterator) NotDone() bool {
9386	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9387}
9388
9389// Response returns the raw server response from the last page request.
9390func (iter VirtualMachineScaleSetExtensionListResultIterator) Response() VirtualMachineScaleSetExtensionListResult {
9391	return iter.page.Response()
9392}
9393
9394// Value returns the current value or a zero-initialized value if the
9395// iterator has advanced beyond the end of the collection.
9396func (iter VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMachineScaleSetExtension {
9397	if !iter.page.NotDone() {
9398		return VirtualMachineScaleSetExtension{}
9399	}
9400	return iter.page.Values()[iter.i]
9401}
9402
9403// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type.
9404func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator {
9405	return VirtualMachineScaleSetExtensionListResultIterator{page: page}
9406}
9407
9408// IsEmpty returns true if the ListResult contains no values.
9409func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool {
9410	return vmsselr.Value == nil || len(*vmsselr.Value) == 0
9411}
9412
9413// hasNextLink returns true if the NextLink is not empty.
9414func (vmsselr VirtualMachineScaleSetExtensionListResult) hasNextLink() bool {
9415	return vmsselr.NextLink != nil && len(*vmsselr.NextLink) != 0
9416}
9417
9418// virtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results.
9419// It returns nil if no more results exist.
9420func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer(ctx context.Context) (*http.Request, error) {
9421	if !vmsselr.hasNextLink() {
9422		return nil, nil
9423	}
9424	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9425		autorest.AsJSON(),
9426		autorest.AsGet(),
9427		autorest.WithBaseURL(to.String(vmsselr.NextLink)))
9428}
9429
9430// VirtualMachineScaleSetExtensionListResultPage contains a page of VirtualMachineScaleSetExtension values.
9431type VirtualMachineScaleSetExtensionListResultPage struct {
9432	fn      func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)
9433	vmsselr VirtualMachineScaleSetExtensionListResult
9434}
9435
9436// NextWithContext advances to the next page of values.  If there was an error making
9437// the request the page does not advance and the error is returned.
9438func (page *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx context.Context) (err error) {
9439	if tracing.IsEnabled() {
9440		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultPage.NextWithContext")
9441		defer func() {
9442			sc := -1
9443			if page.Response().Response.Response != nil {
9444				sc = page.Response().Response.Response.StatusCode
9445			}
9446			tracing.EndSpan(ctx, sc, err)
9447		}()
9448	}
9449	for {
9450		next, err := page.fn(ctx, page.vmsselr)
9451		if err != nil {
9452			return err
9453		}
9454		page.vmsselr = next
9455		if !next.hasNextLink() || !next.IsEmpty() {
9456			break
9457		}
9458	}
9459	return nil
9460}
9461
9462// Next advances to the next page of values.  If there was an error making
9463// the request the page does not advance and the error is returned.
9464// Deprecated: Use NextWithContext() instead.
9465func (page *VirtualMachineScaleSetExtensionListResultPage) Next() error {
9466	return page.NextWithContext(context.Background())
9467}
9468
9469// NotDone returns true if the page enumeration should be started or is not yet complete.
9470func (page VirtualMachineScaleSetExtensionListResultPage) NotDone() bool {
9471	return !page.vmsselr.IsEmpty()
9472}
9473
9474// Response returns the raw server response from the last page request.
9475func (page VirtualMachineScaleSetExtensionListResultPage) Response() VirtualMachineScaleSetExtensionListResult {
9476	return page.vmsselr
9477}
9478
9479// Values returns the slice of values for the current page or nil if there are no values.
9480func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMachineScaleSetExtension {
9481	if page.vmsselr.IsEmpty() {
9482		return nil
9483	}
9484	return *page.vmsselr.Value
9485}
9486
9487// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type.
9488func NewVirtualMachineScaleSetExtensionListResultPage(cur VirtualMachineScaleSetExtensionListResult, getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
9489	return VirtualMachineScaleSetExtensionListResultPage{
9490		fn:      getNextPage,
9491		vmsselr: cur,
9492	}
9493}
9494
9495// VirtualMachineScaleSetExtensionProfile describes a virtual machine scale set extension profile.
9496type VirtualMachineScaleSetExtensionProfile struct {
9497	// Extensions - The virtual machine scale set child extension resources.
9498	Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"`
9499}
9500
9501// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set
9502// Extension.
9503type VirtualMachineScaleSetExtensionProperties struct {
9504	// ForceUpdateTag - If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed.
9505	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
9506	// Publisher - The name of the extension handler publisher.
9507	Publisher *string `json:"publisher,omitempty"`
9508	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
9509	Type *string `json:"type,omitempty"`
9510	// TypeHandlerVersion - Specifies the version of the script handler.
9511	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
9512	// AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
9513	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
9514	// Settings - Json formatted public settings for the extension.
9515	Settings interface{} `json:"settings,omitempty"`
9516	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
9517	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
9518	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
9519	ProvisioningState *string `json:"provisioningState,omitempty"`
9520	// ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
9521	ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
9522}
9523
9524// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionProperties.
9525func (vmssep VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, error) {
9526	objectMap := make(map[string]interface{})
9527	if vmssep.ForceUpdateTag != nil {
9528		objectMap["forceUpdateTag"] = vmssep.ForceUpdateTag
9529	}
9530	if vmssep.Publisher != nil {
9531		objectMap["publisher"] = vmssep.Publisher
9532	}
9533	if vmssep.Type != nil {
9534		objectMap["type"] = vmssep.Type
9535	}
9536	if vmssep.TypeHandlerVersion != nil {
9537		objectMap["typeHandlerVersion"] = vmssep.TypeHandlerVersion
9538	}
9539	if vmssep.AutoUpgradeMinorVersion != nil {
9540		objectMap["autoUpgradeMinorVersion"] = vmssep.AutoUpgradeMinorVersion
9541	}
9542	if vmssep.Settings != nil {
9543		objectMap["settings"] = vmssep.Settings
9544	}
9545	if vmssep.ProtectedSettings != nil {
9546		objectMap["protectedSettings"] = vmssep.ProtectedSettings
9547	}
9548	if vmssep.ProvisionAfterExtensions != nil {
9549		objectMap["provisionAfterExtensions"] = vmssep.ProvisionAfterExtensions
9550	}
9551	return json.Marshal(objectMap)
9552}
9553
9554// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9555// results of a long-running operation.
9556type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
9557	azure.FutureAPI
9558	// Result returns the result of the asynchronous operation.
9559	// If the operation has not completed it will return an error.
9560	Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
9561}
9562
9563// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9564func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9565	var azFuture azure.Future
9566	if err := json.Unmarshal(body, &azFuture); err != nil {
9567		return err
9568	}
9569	future.FutureAPI = &azFuture
9570	future.Result = future.result
9571	return nil
9572}
9573
9574// result is the default implementation for VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.Result.
9575func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
9576	var done bool
9577	done, err = future.DoneWithContext(context.Background(), client)
9578	if err != nil {
9579		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9580		return
9581	}
9582	if !done {
9583		vmsse.Response.Response = future.Response()
9584		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
9585		return
9586	}
9587	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9588	if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
9589		vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response)
9590		if err != nil {
9591			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
9592		}
9593	}
9594	return
9595}
9596
9597// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of
9598// a long-running operation.
9599type VirtualMachineScaleSetExtensionsDeleteFuture struct {
9600	azure.FutureAPI
9601	// Result returns the result of the asynchronous operation.
9602	// If the operation has not completed it will return an error.
9603	Result func(VirtualMachineScaleSetExtensionsClient) (autorest.Response, error)
9604}
9605
9606// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9607func (future *VirtualMachineScaleSetExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
9608	var azFuture azure.Future
9609	if err := json.Unmarshal(body, &azFuture); err != nil {
9610		return err
9611	}
9612	future.FutureAPI = &azFuture
9613	future.Result = future.result
9614	return nil
9615}
9616
9617// result is the default implementation for VirtualMachineScaleSetExtensionsDeleteFuture.Result.
9618func (future *VirtualMachineScaleSetExtensionsDeleteFuture) result(client VirtualMachineScaleSetExtensionsClient) (ar autorest.Response, err error) {
9619	var done bool
9620	done, err = future.DoneWithContext(context.Background(), client)
9621	if err != nil {
9622		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
9623		return
9624	}
9625	if !done {
9626		ar.Response = future.Response()
9627		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
9628		return
9629	}
9630	ar.Response = future.Response()
9631	return
9632}
9633
9634// VirtualMachineScaleSetIdentity identity for the virtual machine scale set.
9635type VirtualMachineScaleSetIdentity struct {
9636	// PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity.
9637	PrincipalID *string `json:"principalId,omitempty"`
9638	// TenantID - READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity.
9639	TenantID *string `json:"tenantId,omitempty"`
9640	// Type - The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone'
9641	Type ResourceIdentityType `json:"type,omitempty"`
9642	// UserAssignedIdentities - The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
9643	UserAssignedIdentities map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
9644}
9645
9646// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentity.
9647func (vmssi VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) {
9648	objectMap := make(map[string]interface{})
9649	if vmssi.Type != "" {
9650		objectMap["type"] = vmssi.Type
9651	}
9652	if vmssi.UserAssignedIdentities != nil {
9653		objectMap["userAssignedIdentities"] = vmssi.UserAssignedIdentities
9654	}
9655	return json.Marshal(objectMap)
9656}
9657
9658// VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue ...
9659type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct {
9660	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
9661	PrincipalID *string `json:"principalId,omitempty"`
9662	// ClientID - READ-ONLY; The client id of user assigned identity.
9663	ClientID *string `json:"clientId,omitempty"`
9664}
9665
9666// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue.
9667func (vmssiAiv VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
9668	objectMap := make(map[string]interface{})
9669	return json.Marshal(objectMap)
9670}
9671
9672// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set.
9673type VirtualMachineScaleSetInstanceView struct {
9674	autorest.Response `json:"-"`
9675	// VirtualMachine - READ-ONLY; The instance view status summary for the virtual machine scale set.
9676	VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"`
9677	// Extensions - READ-ONLY; The extensions information.
9678	Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"`
9679	// Statuses - The resource status information.
9680	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
9681}
9682
9683// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceView.
9684func (vmssiv VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) {
9685	objectMap := make(map[string]interface{})
9686	if vmssiv.Statuses != nil {
9687		objectMap["statuses"] = vmssiv.Statuses
9688	}
9689	return json.Marshal(objectMap)
9690}
9691
9692// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of
9693// a virtual machine scale set.
9694type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
9695	// StatusesSummary - READ-ONLY; The extensions information.
9696	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
9697}
9698
9699// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceViewStatusesSummary.
9700func (vmssivss VirtualMachineScaleSetInstanceViewStatusesSummary) MarshalJSON() ([]byte, error) {
9701	objectMap := make(map[string]interface{})
9702	return json.Marshal(objectMap)
9703}
9704
9705// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP
9706// configuration.
9707type VirtualMachineScaleSetIPConfiguration struct {
9708	// Name - The IP configuration name.
9709	Name                                             *string `json:"name,omitempty"`
9710	*VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"`
9711	// ID - Resource Id
9712	ID *string `json:"id,omitempty"`
9713}
9714
9715// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIPConfiguration.
9716func (vmssic VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) {
9717	objectMap := make(map[string]interface{})
9718	if vmssic.Name != nil {
9719		objectMap["name"] = vmssic.Name
9720	}
9721	if vmssic.VirtualMachineScaleSetIPConfigurationProperties != nil {
9722		objectMap["properties"] = vmssic.VirtualMachineScaleSetIPConfigurationProperties
9723	}
9724	if vmssic.ID != nil {
9725		objectMap["id"] = vmssic.ID
9726	}
9727	return json.Marshal(objectMap)
9728}
9729
9730// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetIPConfiguration struct.
9731func (vmssic *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(body []byte) error {
9732	var m map[string]*json.RawMessage
9733	err := json.Unmarshal(body, &m)
9734	if err != nil {
9735		return err
9736	}
9737	for k, v := range m {
9738		switch k {
9739		case "name":
9740			if v != nil {
9741				var name string
9742				err = json.Unmarshal(*v, &name)
9743				if err != nil {
9744					return err
9745				}
9746				vmssic.Name = &name
9747			}
9748		case "properties":
9749			if v != nil {
9750				var virtualMachineScaleSetIPConfigurationProperties VirtualMachineScaleSetIPConfigurationProperties
9751				err = json.Unmarshal(*v, &virtualMachineScaleSetIPConfigurationProperties)
9752				if err != nil {
9753					return err
9754				}
9755				vmssic.VirtualMachineScaleSetIPConfigurationProperties = &virtualMachineScaleSetIPConfigurationProperties
9756			}
9757		case "id":
9758			if v != nil {
9759				var ID string
9760				err = json.Unmarshal(*v, &ID)
9761				if err != nil {
9762					return err
9763				}
9764				vmssic.ID = &ID
9765			}
9766		}
9767	}
9768
9769	return nil
9770}
9771
9772// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's
9773// IP configuration properties.
9774type VirtualMachineScaleSetIPConfigurationProperties struct {
9775	// Subnet - Specifies the identifier of the subnet.
9776	Subnet *APIEntityReference `json:"subnet,omitempty"`
9777	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
9778	Primary *bool `json:"primary,omitempty"`
9779	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
9780	PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
9781	// PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
9782	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
9783	// ApplicationGatewayBackendAddressPools - Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway.
9784	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
9785	// ApplicationSecurityGroups - Specifies an array of references to application security group.
9786	ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
9787	// LoadBalancerBackendAddressPools - Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.
9788	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
9789	// LoadBalancerInboundNatPools - Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer
9790	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
9791}
9792
9793// VirtualMachineScaleSetIPTag contains the IP tag associated with the public IP address.
9794type VirtualMachineScaleSetIPTag struct {
9795	// IPTagType - IP tag type. Example: FirstPartyUsage.
9796	IPTagType *string `json:"ipTagType,omitempty"`
9797	// Tag - IP tag associated with the public IP. Example: SQL, Storage etc.
9798	Tag *string `json:"tag,omitempty"`
9799}
9800
9801// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History
9802// operation response.
9803type VirtualMachineScaleSetListOSUpgradeHistory struct {
9804	autorest.Response `json:"-"`
9805	// Value - The list of OS upgrades performed on the virtual machine scale set.
9806	Value *[]UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"`
9807	// NextLink - The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the next page of history of upgrades.
9808	NextLink *string `json:"nextLink,omitempty"`
9809}
9810
9811// VirtualMachineScaleSetListOSUpgradeHistoryIterator provides access to a complete listing of
9812// UpgradeOperationHistoricalStatusInfo values.
9813type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct {
9814	i    int
9815	page VirtualMachineScaleSetListOSUpgradeHistoryPage
9816}
9817
9818// NextWithContext advances to the next value.  If there was an error making
9819// the request the iterator does not advance and the error is returned.
9820func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) {
9821	if tracing.IsEnabled() {
9822		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.NextWithContext")
9823		defer func() {
9824			sc := -1
9825			if iter.Response().Response.Response != nil {
9826				sc = iter.Response().Response.Response.StatusCode
9827			}
9828			tracing.EndSpan(ctx, sc, err)
9829		}()
9830	}
9831	iter.i++
9832	if iter.i < len(iter.page.Values()) {
9833		return nil
9834	}
9835	err = iter.page.NextWithContext(ctx)
9836	if err != nil {
9837		iter.i--
9838		return err
9839	}
9840	iter.i = 0
9841	return nil
9842}
9843
9844// Next advances to the next value.  If there was an error making
9845// the request the iterator does not advance and the error is returned.
9846// Deprecated: Use NextWithContext() instead.
9847func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error {
9848	return iter.NextWithContext(context.Background())
9849}
9850
9851// NotDone returns true if the enumeration should be started or is not yet complete.
9852func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) NotDone() bool {
9853	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9854}
9855
9856// Response returns the raw server response from the last page request.
9857func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Response() VirtualMachineScaleSetListOSUpgradeHistory {
9858	return iter.page.Response()
9859}
9860
9861// Value returns the current value or a zero-initialized value if the
9862// iterator has advanced beyond the end of the collection.
9863func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOperationHistoricalStatusInfo {
9864	if !iter.page.NotDone() {
9865		return UpgradeOperationHistoricalStatusInfo{}
9866	}
9867	return iter.page.Values()[iter.i]
9868}
9869
9870// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type.
9871func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator {
9872	return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page}
9873}
9874
9875// IsEmpty returns true if the ListResult contains no values.
9876func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool {
9877	return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0
9878}
9879
9880// hasNextLink returns true if the NextLink is not empty.
9881func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) hasNextLink() bool {
9882	return vmsslouh.NextLink != nil && len(*vmsslouh.NextLink) != 0
9883}
9884
9885// virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results.
9886// It returns nil if no more results exist.
9887func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) {
9888	if !vmsslouh.hasNextLink() {
9889		return nil, nil
9890	}
9891	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9892		autorest.AsJSON(),
9893		autorest.AsGet(),
9894		autorest.WithBaseURL(to.String(vmsslouh.NextLink)))
9895}
9896
9897// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo
9898// values.
9899type VirtualMachineScaleSetListOSUpgradeHistoryPage struct {
9900	fn       func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)
9901	vmsslouh VirtualMachineScaleSetListOSUpgradeHistory
9902}
9903
9904// NextWithContext advances to the next page of values.  If there was an error making
9905// the request the page does not advance and the error is returned.
9906func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) {
9907	if tracing.IsEnabled() {
9908		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.NextWithContext")
9909		defer func() {
9910			sc := -1
9911			if page.Response().Response.Response != nil {
9912				sc = page.Response().Response.Response.StatusCode
9913			}
9914			tracing.EndSpan(ctx, sc, err)
9915		}()
9916	}
9917	for {
9918		next, err := page.fn(ctx, page.vmsslouh)
9919		if err != nil {
9920			return err
9921		}
9922		page.vmsslouh = next
9923		if !next.hasNextLink() || !next.IsEmpty() {
9924			break
9925		}
9926	}
9927	return nil
9928}
9929
9930// Next advances to the next page of values.  If there was an error making
9931// the request the page does not advance and the error is returned.
9932// Deprecated: Use NextWithContext() instead.
9933func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error {
9934	return page.NextWithContext(context.Background())
9935}
9936
9937// NotDone returns true if the page enumeration should be started or is not yet complete.
9938func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool {
9939	return !page.vmsslouh.IsEmpty()
9940}
9941
9942// Response returns the raw server response from the last page request.
9943func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Response() VirtualMachineScaleSetListOSUpgradeHistory {
9944	return page.vmsslouh
9945}
9946
9947// Values returns the slice of values for the current page or nil if there are no values.
9948func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOperationHistoricalStatusInfo {
9949	if page.vmsslouh.IsEmpty() {
9950		return nil
9951	}
9952	return *page.vmsslouh.Value
9953}
9954
9955// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type.
9956func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(cur VirtualMachineScaleSetListOSUpgradeHistory, getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage {
9957	return VirtualMachineScaleSetListOSUpgradeHistoryPage{
9958		fn:       getNextPage,
9959		vmsslouh: cur,
9960	}
9961}
9962
9963// VirtualMachineScaleSetListResult the List Virtual Machine operation response.
9964type VirtualMachineScaleSetListResult struct {
9965	autorest.Response `json:"-"`
9966	// Value - The list of virtual machine scale sets.
9967	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
9968	// NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS.
9969	NextLink *string `json:"nextLink,omitempty"`
9970}
9971
9972// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet
9973// values.
9974type VirtualMachineScaleSetListResultIterator struct {
9975	i    int
9976	page VirtualMachineScaleSetListResultPage
9977}
9978
9979// NextWithContext advances to the next value.  If there was an error making
9980// the request the iterator does not advance and the error is returned.
9981func (iter *VirtualMachineScaleSetListResultIterator) NextWithContext(ctx context.Context) (err error) {
9982	if tracing.IsEnabled() {
9983		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultIterator.NextWithContext")
9984		defer func() {
9985			sc := -1
9986			if iter.Response().Response.Response != nil {
9987				sc = iter.Response().Response.Response.StatusCode
9988			}
9989			tracing.EndSpan(ctx, sc, err)
9990		}()
9991	}
9992	iter.i++
9993	if iter.i < len(iter.page.Values()) {
9994		return nil
9995	}
9996	err = iter.page.NextWithContext(ctx)
9997	if err != nil {
9998		iter.i--
9999		return err
10000	}
10001	iter.i = 0
10002	return nil
10003}
10004
10005// Next advances to the next value.  If there was an error making
10006// the request the iterator does not advance and the error is returned.
10007// Deprecated: Use NextWithContext() instead.
10008func (iter *VirtualMachineScaleSetListResultIterator) Next() error {
10009	return iter.NextWithContext(context.Background())
10010}
10011
10012// NotDone returns true if the enumeration should be started or is not yet complete.
10013func (iter VirtualMachineScaleSetListResultIterator) NotDone() bool {
10014	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10015}
10016
10017// Response returns the raw server response from the last page request.
10018func (iter VirtualMachineScaleSetListResultIterator) Response() VirtualMachineScaleSetListResult {
10019	return iter.page.Response()
10020}
10021
10022// Value returns the current value or a zero-initialized value if the
10023// iterator has advanced beyond the end of the collection.
10024func (iter VirtualMachineScaleSetListResultIterator) Value() VirtualMachineScaleSet {
10025	if !iter.page.NotDone() {
10026		return VirtualMachineScaleSet{}
10027	}
10028	return iter.page.Values()[iter.i]
10029}
10030
10031// Creates a new instance of the VirtualMachineScaleSetListResultIterator type.
10032func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator {
10033	return VirtualMachineScaleSetListResultIterator{page: page}
10034}
10035
10036// IsEmpty returns true if the ListResult contains no values.
10037func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool {
10038	return vmsslr.Value == nil || len(*vmsslr.Value) == 0
10039}
10040
10041// hasNextLink returns true if the NextLink is not empty.
10042func (vmsslr VirtualMachineScaleSetListResult) hasNextLink() bool {
10043	return vmsslr.NextLink != nil && len(*vmsslr.NextLink) != 0
10044}
10045
10046// virtualMachineScaleSetListResultPreparer prepares a request to retrieve the next set of results.
10047// It returns nil if no more results exist.
10048func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer(ctx context.Context) (*http.Request, error) {
10049	if !vmsslr.hasNextLink() {
10050		return nil, nil
10051	}
10052	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10053		autorest.AsJSON(),
10054		autorest.AsGet(),
10055		autorest.WithBaseURL(to.String(vmsslr.NextLink)))
10056}
10057
10058// VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values.
10059type VirtualMachineScaleSetListResultPage struct {
10060	fn     func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)
10061	vmsslr VirtualMachineScaleSetListResult
10062}
10063
10064// NextWithContext advances to the next page of values.  If there was an error making
10065// the request the page does not advance and the error is returned.
10066func (page *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error) {
10067	if tracing.IsEnabled() {
10068		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultPage.NextWithContext")
10069		defer func() {
10070			sc := -1
10071			if page.Response().Response.Response != nil {
10072				sc = page.Response().Response.Response.StatusCode
10073			}
10074			tracing.EndSpan(ctx, sc, err)
10075		}()
10076	}
10077	for {
10078		next, err := page.fn(ctx, page.vmsslr)
10079		if err != nil {
10080			return err
10081		}
10082		page.vmsslr = next
10083		if !next.hasNextLink() || !next.IsEmpty() {
10084			break
10085		}
10086	}
10087	return nil
10088}
10089
10090// Next advances to the next page of values.  If there was an error making
10091// the request the page does not advance and the error is returned.
10092// Deprecated: Use NextWithContext() instead.
10093func (page *VirtualMachineScaleSetListResultPage) Next() error {
10094	return page.NextWithContext(context.Background())
10095}
10096
10097// NotDone returns true if the page enumeration should be started or is not yet complete.
10098func (page VirtualMachineScaleSetListResultPage) NotDone() bool {
10099	return !page.vmsslr.IsEmpty()
10100}
10101
10102// Response returns the raw server response from the last page request.
10103func (page VirtualMachineScaleSetListResultPage) Response() VirtualMachineScaleSetListResult {
10104	return page.vmsslr
10105}
10106
10107// Values returns the slice of values for the current page or nil if there are no values.
10108func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleSet {
10109	if page.vmsslr.IsEmpty() {
10110		return nil
10111	}
10112	return *page.vmsslr.Value
10113}
10114
10115// Creates a new instance of the VirtualMachineScaleSetListResultPage type.
10116func NewVirtualMachineScaleSetListResultPage(cur VirtualMachineScaleSetListResult, getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
10117	return VirtualMachineScaleSetListResultPage{
10118		fn:     getNextPage,
10119		vmsslr: cur,
10120	}
10121}
10122
10123// VirtualMachineScaleSetListSkusResult the Virtual Machine Scale Set List Skus operation response.
10124type VirtualMachineScaleSetListSkusResult struct {
10125	autorest.Response `json:"-"`
10126	// Value - The list of skus available for the virtual machine scale set.
10127	Value *[]VirtualMachineScaleSetSku `json:"value,omitempty"`
10128	// NextLink - The uri to fetch the next page of Virtual Machine Scale Set Skus. Call ListNext() with this to fetch the next page of VMSS Skus.
10129	NextLink *string `json:"nextLink,omitempty"`
10130}
10131
10132// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of
10133// VirtualMachineScaleSetSku values.
10134type VirtualMachineScaleSetListSkusResultIterator struct {
10135	i    int
10136	page VirtualMachineScaleSetListSkusResultPage
10137}
10138
10139// NextWithContext advances to the next value.  If there was an error making
10140// the request the iterator does not advance and the error is returned.
10141func (iter *VirtualMachineScaleSetListSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
10142	if tracing.IsEnabled() {
10143		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultIterator.NextWithContext")
10144		defer func() {
10145			sc := -1
10146			if iter.Response().Response.Response != nil {
10147				sc = iter.Response().Response.Response.StatusCode
10148			}
10149			tracing.EndSpan(ctx, sc, err)
10150		}()
10151	}
10152	iter.i++
10153	if iter.i < len(iter.page.Values()) {
10154		return nil
10155	}
10156	err = iter.page.NextWithContext(ctx)
10157	if err != nil {
10158		iter.i--
10159		return err
10160	}
10161	iter.i = 0
10162	return nil
10163}
10164
10165// Next advances to the next value.  If there was an error making
10166// the request the iterator does not advance and the error is returned.
10167// Deprecated: Use NextWithContext() instead.
10168func (iter *VirtualMachineScaleSetListSkusResultIterator) Next() error {
10169	return iter.NextWithContext(context.Background())
10170}
10171
10172// NotDone returns true if the enumeration should be started or is not yet complete.
10173func (iter VirtualMachineScaleSetListSkusResultIterator) NotDone() bool {
10174	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10175}
10176
10177// Response returns the raw server response from the last page request.
10178func (iter VirtualMachineScaleSetListSkusResultIterator) Response() VirtualMachineScaleSetListSkusResult {
10179	return iter.page.Response()
10180}
10181
10182// Value returns the current value or a zero-initialized value if the
10183// iterator has advanced beyond the end of the collection.
10184func (iter VirtualMachineScaleSetListSkusResultIterator) Value() VirtualMachineScaleSetSku {
10185	if !iter.page.NotDone() {
10186		return VirtualMachineScaleSetSku{}
10187	}
10188	return iter.page.Values()[iter.i]
10189}
10190
10191// Creates a new instance of the VirtualMachineScaleSetListSkusResultIterator type.
10192func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator {
10193	return VirtualMachineScaleSetListSkusResultIterator{page: page}
10194}
10195
10196// IsEmpty returns true if the ListResult contains no values.
10197func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool {
10198	return vmsslsr.Value == nil || len(*vmsslsr.Value) == 0
10199}
10200
10201// hasNextLink returns true if the NextLink is not empty.
10202func (vmsslsr VirtualMachineScaleSetListSkusResult) hasNextLink() bool {
10203	return vmsslsr.NextLink != nil && len(*vmsslsr.NextLink) != 0
10204}
10205
10206// virtualMachineScaleSetListSkusResultPreparer prepares a request to retrieve the next set of results.
10207// It returns nil if no more results exist.
10208func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer(ctx context.Context) (*http.Request, error) {
10209	if !vmsslsr.hasNextLink() {
10210		return nil, nil
10211	}
10212	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10213		autorest.AsJSON(),
10214		autorest.AsGet(),
10215		autorest.WithBaseURL(to.String(vmsslsr.NextLink)))
10216}
10217
10218// VirtualMachineScaleSetListSkusResultPage contains a page of VirtualMachineScaleSetSku values.
10219type VirtualMachineScaleSetListSkusResultPage struct {
10220	fn      func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)
10221	vmsslsr VirtualMachineScaleSetListSkusResult
10222}
10223
10224// NextWithContext advances to the next page of values.  If there was an error making
10225// the request the page does not advance and the error is returned.
10226func (page *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx context.Context) (err error) {
10227	if tracing.IsEnabled() {
10228		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultPage.NextWithContext")
10229		defer func() {
10230			sc := -1
10231			if page.Response().Response.Response != nil {
10232				sc = page.Response().Response.Response.StatusCode
10233			}
10234			tracing.EndSpan(ctx, sc, err)
10235		}()
10236	}
10237	for {
10238		next, err := page.fn(ctx, page.vmsslsr)
10239		if err != nil {
10240			return err
10241		}
10242		page.vmsslsr = next
10243		if !next.hasNextLink() || !next.IsEmpty() {
10244			break
10245		}
10246	}
10247	return nil
10248}
10249
10250// Next advances to the next page of values.  If there was an error making
10251// the request the page does not advance and the error is returned.
10252// Deprecated: Use NextWithContext() instead.
10253func (page *VirtualMachineScaleSetListSkusResultPage) Next() error {
10254	return page.NextWithContext(context.Background())
10255}
10256
10257// NotDone returns true if the page enumeration should be started or is not yet complete.
10258func (page VirtualMachineScaleSetListSkusResultPage) NotDone() bool {
10259	return !page.vmsslsr.IsEmpty()
10260}
10261
10262// Response returns the raw server response from the last page request.
10263func (page VirtualMachineScaleSetListSkusResultPage) Response() VirtualMachineScaleSetListSkusResult {
10264	return page.vmsslsr
10265}
10266
10267// Values returns the slice of values for the current page or nil if there are no values.
10268func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineScaleSetSku {
10269	if page.vmsslsr.IsEmpty() {
10270		return nil
10271	}
10272	return *page.vmsslsr.Value
10273}
10274
10275// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type.
10276func NewVirtualMachineScaleSetListSkusResultPage(cur VirtualMachineScaleSetListSkusResult, getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
10277	return VirtualMachineScaleSetListSkusResultPage{
10278		fn:      getNextPage,
10279		vmsslsr: cur,
10280	}
10281}
10282
10283// VirtualMachineScaleSetListWithLinkResult the List Virtual Machine operation response.
10284type VirtualMachineScaleSetListWithLinkResult struct {
10285	autorest.Response `json:"-"`
10286	// Value - The list of virtual machine scale sets.
10287	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
10288	// NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of Virtual Machine Scale Sets.
10289	NextLink *string `json:"nextLink,omitempty"`
10290}
10291
10292// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of
10293// VirtualMachineScaleSet values.
10294type VirtualMachineScaleSetListWithLinkResultIterator struct {
10295	i    int
10296	page VirtualMachineScaleSetListWithLinkResultPage
10297}
10298
10299// NextWithContext advances to the next value.  If there was an error making
10300// the request the iterator does not advance and the error is returned.
10301func (iter *VirtualMachineScaleSetListWithLinkResultIterator) NextWithContext(ctx context.Context) (err error) {
10302	if tracing.IsEnabled() {
10303		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultIterator.NextWithContext")
10304		defer func() {
10305			sc := -1
10306			if iter.Response().Response.Response != nil {
10307				sc = iter.Response().Response.Response.StatusCode
10308			}
10309			tracing.EndSpan(ctx, sc, err)
10310		}()
10311	}
10312	iter.i++
10313	if iter.i < len(iter.page.Values()) {
10314		return nil
10315	}
10316	err = iter.page.NextWithContext(ctx)
10317	if err != nil {
10318		iter.i--
10319		return err
10320	}
10321	iter.i = 0
10322	return nil
10323}
10324
10325// Next advances to the next value.  If there was an error making
10326// the request the iterator does not advance and the error is returned.
10327// Deprecated: Use NextWithContext() instead.
10328func (iter *VirtualMachineScaleSetListWithLinkResultIterator) Next() error {
10329	return iter.NextWithContext(context.Background())
10330}
10331
10332// NotDone returns true if the enumeration should be started or is not yet complete.
10333func (iter VirtualMachineScaleSetListWithLinkResultIterator) NotDone() bool {
10334	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10335}
10336
10337// Response returns the raw server response from the last page request.
10338func (iter VirtualMachineScaleSetListWithLinkResultIterator) Response() VirtualMachineScaleSetListWithLinkResult {
10339	return iter.page.Response()
10340}
10341
10342// Value returns the current value or a zero-initialized value if the
10343// iterator has advanced beyond the end of the collection.
10344func (iter VirtualMachineScaleSetListWithLinkResultIterator) Value() VirtualMachineScaleSet {
10345	if !iter.page.NotDone() {
10346		return VirtualMachineScaleSet{}
10347	}
10348	return iter.page.Values()[iter.i]
10349}
10350
10351// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultIterator type.
10352func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator {
10353	return VirtualMachineScaleSetListWithLinkResultIterator{page: page}
10354}
10355
10356// IsEmpty returns true if the ListResult contains no values.
10357func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool {
10358	return vmsslwlr.Value == nil || len(*vmsslwlr.Value) == 0
10359}
10360
10361// hasNextLink returns true if the NextLink is not empty.
10362func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) hasNextLink() bool {
10363	return vmsslwlr.NextLink != nil && len(*vmsslwlr.NextLink) != 0
10364}
10365
10366// virtualMachineScaleSetListWithLinkResultPreparer prepares a request to retrieve the next set of results.
10367// It returns nil if no more results exist.
10368func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer(ctx context.Context) (*http.Request, error) {
10369	if !vmsslwlr.hasNextLink() {
10370		return nil, nil
10371	}
10372	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10373		autorest.AsJSON(),
10374		autorest.AsGet(),
10375		autorest.WithBaseURL(to.String(vmsslwlr.NextLink)))
10376}
10377
10378// VirtualMachineScaleSetListWithLinkResultPage contains a page of VirtualMachineScaleSet values.
10379type VirtualMachineScaleSetListWithLinkResultPage struct {
10380	fn       func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)
10381	vmsslwlr VirtualMachineScaleSetListWithLinkResult
10382}
10383
10384// NextWithContext advances to the next page of values.  If there was an error making
10385// the request the page does not advance and the error is returned.
10386func (page *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx context.Context) (err error) {
10387	if tracing.IsEnabled() {
10388		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultPage.NextWithContext")
10389		defer func() {
10390			sc := -1
10391			if page.Response().Response.Response != nil {
10392				sc = page.Response().Response.Response.StatusCode
10393			}
10394			tracing.EndSpan(ctx, sc, err)
10395		}()
10396	}
10397	for {
10398		next, err := page.fn(ctx, page.vmsslwlr)
10399		if err != nil {
10400			return err
10401		}
10402		page.vmsslwlr = next
10403		if !next.hasNextLink() || !next.IsEmpty() {
10404			break
10405		}
10406	}
10407	return nil
10408}
10409
10410// Next advances to the next page of values.  If there was an error making
10411// the request the page does not advance and the error is returned.
10412// Deprecated: Use NextWithContext() instead.
10413func (page *VirtualMachineScaleSetListWithLinkResultPage) Next() error {
10414	return page.NextWithContext(context.Background())
10415}
10416
10417// NotDone returns true if the page enumeration should be started or is not yet complete.
10418func (page VirtualMachineScaleSetListWithLinkResultPage) NotDone() bool {
10419	return !page.vmsslwlr.IsEmpty()
10420}
10421
10422// Response returns the raw server response from the last page request.
10423func (page VirtualMachineScaleSetListWithLinkResultPage) Response() VirtualMachineScaleSetListWithLinkResult {
10424	return page.vmsslwlr
10425}
10426
10427// Values returns the slice of values for the current page or nil if there are no values.
10428func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachineScaleSet {
10429	if page.vmsslwlr.IsEmpty() {
10430		return nil
10431	}
10432	return *page.vmsslwlr.Value
10433}
10434
10435// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type.
10436func NewVirtualMachineScaleSetListWithLinkResultPage(cur VirtualMachineScaleSetListWithLinkResult, getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
10437	return VirtualMachineScaleSetListWithLinkResultPage{
10438		fn:       getNextPage,
10439		vmsslwlr: cur,
10440	}
10441}
10442
10443// VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk.
10444type VirtualMachineScaleSetManagedDiskParameters struct {
10445	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
10446	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
10447}
10448
10449// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's
10450// network configurations.
10451type VirtualMachineScaleSetNetworkConfiguration struct {
10452	// Name - The network configuration name.
10453	Name                                                  *string `json:"name,omitempty"`
10454	*VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"`
10455	// ID - Resource Id
10456	ID *string `json:"id,omitempty"`
10457}
10458
10459// MarshalJSON is the custom marshaler for VirtualMachineScaleSetNetworkConfiguration.
10460func (vmssnc VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) {
10461	objectMap := make(map[string]interface{})
10462	if vmssnc.Name != nil {
10463		objectMap["name"] = vmssnc.Name
10464	}
10465	if vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties != nil {
10466		objectMap["properties"] = vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties
10467	}
10468	if vmssnc.ID != nil {
10469		objectMap["id"] = vmssnc.ID
10470	}
10471	return json.Marshal(objectMap)
10472}
10473
10474// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetNetworkConfiguration struct.
10475func (vmssnc *VirtualMachineScaleSetNetworkConfiguration) UnmarshalJSON(body []byte) error {
10476	var m map[string]*json.RawMessage
10477	err := json.Unmarshal(body, &m)
10478	if err != nil {
10479		return err
10480	}
10481	for k, v := range m {
10482		switch k {
10483		case "name":
10484			if v != nil {
10485				var name string
10486				err = json.Unmarshal(*v, &name)
10487				if err != nil {
10488					return err
10489				}
10490				vmssnc.Name = &name
10491			}
10492		case "properties":
10493			if v != nil {
10494				var virtualMachineScaleSetNetworkConfigurationProperties VirtualMachineScaleSetNetworkConfigurationProperties
10495				err = json.Unmarshal(*v, &virtualMachineScaleSetNetworkConfigurationProperties)
10496				if err != nil {
10497					return err
10498				}
10499				vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties = &virtualMachineScaleSetNetworkConfigurationProperties
10500			}
10501		case "id":
10502			if v != nil {
10503				var ID string
10504				err = json.Unmarshal(*v, &ID)
10505				if err != nil {
10506					return err
10507				}
10508				vmssnc.ID = &ID
10509			}
10510		}
10511	}
10512
10513	return nil
10514}
10515
10516// VirtualMachineScaleSetNetworkConfigurationDNSSettings describes a virtual machines scale sets network
10517// configuration's DNS settings.
10518type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
10519	// DNSServers - List of DNS servers IP addresses
10520	DNSServers *[]string `json:"dnsServers,omitempty"`
10521}
10522
10523// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network
10524// profile's IP configuration.
10525type VirtualMachineScaleSetNetworkConfigurationProperties struct {
10526	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
10527	Primary *bool `json:"primary,omitempty"`
10528	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
10529	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
10530	// NetworkSecurityGroup - The network security group.
10531	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
10532	// DNSSettings - The dns settings to be applied on the network interfaces.
10533	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
10534	// IPConfigurations - Specifies the IP configurations of the network interface.
10535	IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"`
10536	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
10537	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
10538}
10539
10540// VirtualMachineScaleSetNetworkProfile describes a virtual machine scale set network profile.
10541type VirtualMachineScaleSetNetworkProfile struct {
10542	// HealthProbe - A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.
10543	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
10544	// NetworkInterfaceConfigurations - The list of network configurations.
10545	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
10546}
10547
10548// VirtualMachineScaleSetOSDisk describes a virtual machine scale set operating system disk.
10549type VirtualMachineScaleSetOSDisk struct {
10550	// Name - The disk name.
10551	Name *string `json:"name,omitempty"`
10552	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
10553	Caching CachingTypes `json:"caching,omitempty"`
10554	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
10555	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
10556	// CreateOption - Specifies how the virtual machines in the scale set should be created.<br><br> The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you  also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
10557	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
10558	// DiffDiskSettings - Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
10559	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
10560	// DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
10561	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
10562	// OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
10563	OsType OperatingSystemTypes `json:"osType,omitempty"`
10564	// Image - Specifies information about the unmanaged user image to base the scale set on.
10565	Image *VirtualHardDisk `json:"image,omitempty"`
10566	// VhdContainers - Specifies the container urls that are used to store operating system disks for the scale set.
10567	VhdContainers *[]string `json:"vhdContainers,omitempty"`
10568	// ManagedDisk - The managed disk parameters.
10569	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
10570}
10571
10572// VirtualMachineScaleSetOSProfile describes a virtual machine scale set OS profile.
10573type VirtualMachineScaleSetOSProfile struct {
10574	// ComputerNamePrefix - Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long.
10575	ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"`
10576	// AdminUsername - Specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1  character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters  <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
10577	AdminUsername *string `json:"adminUsername,omitempty"`
10578	// AdminPassword - Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password)
10579	AdminPassword *string `json:"adminPassword,omitempty"`
10580	// CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
10581	CustomData *string `json:"customData,omitempty"`
10582	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
10583	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
10584	// LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
10585	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
10586	// Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set.
10587	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
10588}
10589
10590// VirtualMachineScaleSetProperties describes the properties of a Virtual Machine Scale Set.
10591type VirtualMachineScaleSetProperties struct {
10592	// UpgradePolicy - The upgrade policy.
10593	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
10594	// AutomaticRepairsPolicy - Policy for automatic repairs.
10595	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
10596	// VirtualMachineProfile - The virtual machine profile.
10597	VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"`
10598	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
10599	ProvisioningState *string `json:"provisioningState,omitempty"`
10600	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
10601	Overprovision *bool `json:"overprovision,omitempty"`
10602	// DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
10603	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
10604	// UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
10605	UniqueID *string `json:"uniqueId,omitempty"`
10606	// SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines.
10607	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
10608	// ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.
10609	ZoneBalance *bool `json:"zoneBalance,omitempty"`
10610	// PlatformFaultDomainCount - Fault Domain count for each placement group.
10611	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
10612	// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. <br><br>Minimum api-version: 2018-04-01.
10613	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
10614	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
10615	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
10616	// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
10617	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
10618}
10619
10620// MarshalJSON is the custom marshaler for VirtualMachineScaleSetProperties.
10621func (vmssp VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) {
10622	objectMap := make(map[string]interface{})
10623	if vmssp.UpgradePolicy != nil {
10624		objectMap["upgradePolicy"] = vmssp.UpgradePolicy
10625	}
10626	if vmssp.AutomaticRepairsPolicy != nil {
10627		objectMap["automaticRepairsPolicy"] = vmssp.AutomaticRepairsPolicy
10628	}
10629	if vmssp.VirtualMachineProfile != nil {
10630		objectMap["virtualMachineProfile"] = vmssp.VirtualMachineProfile
10631	}
10632	if vmssp.Overprovision != nil {
10633		objectMap["overprovision"] = vmssp.Overprovision
10634	}
10635	if vmssp.DoNotRunExtensionsOnOverprovisionedVMs != nil {
10636		objectMap["doNotRunExtensionsOnOverprovisionedVMs"] = vmssp.DoNotRunExtensionsOnOverprovisionedVMs
10637	}
10638	if vmssp.SinglePlacementGroup != nil {
10639		objectMap["singlePlacementGroup"] = vmssp.SinglePlacementGroup
10640	}
10641	if vmssp.ZoneBalance != nil {
10642		objectMap["zoneBalance"] = vmssp.ZoneBalance
10643	}
10644	if vmssp.PlatformFaultDomainCount != nil {
10645		objectMap["platformFaultDomainCount"] = vmssp.PlatformFaultDomainCount
10646	}
10647	if vmssp.ProximityPlacementGroup != nil {
10648		objectMap["proximityPlacementGroup"] = vmssp.ProximityPlacementGroup
10649	}
10650	if vmssp.AdditionalCapabilities != nil {
10651		objectMap["additionalCapabilities"] = vmssp.AdditionalCapabilities
10652	}
10653	if vmssp.ScaleInPolicy != nil {
10654		objectMap["scaleInPolicy"] = vmssp.ScaleInPolicy
10655	}
10656	return json.Marshal(objectMap)
10657}
10658
10659// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP
10660// Configuration's PublicIPAddress configuration
10661type VirtualMachineScaleSetPublicIPAddressConfiguration struct {
10662	// Name - The publicIP address configuration name.
10663	Name                                                          *string `json:"name,omitempty"`
10664	*VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"`
10665}
10666
10667// MarshalJSON is the custom marshaler for VirtualMachineScaleSetPublicIPAddressConfiguration.
10668func (vmsspiac VirtualMachineScaleSetPublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
10669	objectMap := make(map[string]interface{})
10670	if vmsspiac.Name != nil {
10671		objectMap["name"] = vmsspiac.Name
10672	}
10673	if vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties != nil {
10674		objectMap["properties"] = vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties
10675	}
10676	return json.Marshal(objectMap)
10677}
10678
10679// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetPublicIPAddressConfiguration struct.
10680func (vmsspiac *VirtualMachineScaleSetPublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
10681	var m map[string]*json.RawMessage
10682	err := json.Unmarshal(body, &m)
10683	if err != nil {
10684		return err
10685	}
10686	for k, v := range m {
10687		switch k {
10688		case "name":
10689			if v != nil {
10690				var name string
10691				err = json.Unmarshal(*v, &name)
10692				if err != nil {
10693					return err
10694				}
10695				vmsspiac.Name = &name
10696			}
10697		case "properties":
10698			if v != nil {
10699				var virtualMachineScaleSetPublicIPAddressConfigurationProperties VirtualMachineScaleSetPublicIPAddressConfigurationProperties
10700				err = json.Unmarshal(*v, &virtualMachineScaleSetPublicIPAddressConfigurationProperties)
10701				if err != nil {
10702					return err
10703				}
10704				vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties = &virtualMachineScaleSetPublicIPAddressConfigurationProperties
10705			}
10706		}
10707	}
10708
10709	return nil
10710}
10711
10712// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets
10713// network configuration's DNS settings.
10714type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct {
10715	// DomainNameLabel - The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created
10716	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
10717}
10718
10719// VirtualMachineScaleSetPublicIPAddressConfigurationProperties describes a virtual machines scale set IP
10720// Configuration's PublicIPAddress configuration
10721type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
10722	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
10723	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
10724	// DNSSettings - The dns settings to be applied on the publicIP addresses .
10725	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
10726	// IPTags - The list of IP tags associated with the public IP address.
10727	IPTags *[]VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"`
10728	// PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses.
10729	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
10730}
10731
10732// VirtualMachineScaleSetReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
10733type VirtualMachineScaleSetReimageParameters struct {
10734	// InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
10735	InstanceIds *[]string `json:"instanceIds,omitempty"`
10736	// TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
10737	TempDisk *bool `json:"tempDisk,omitempty"`
10738}
10739
10740// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the
10741// results of a long-running operation.
10742type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
10743	azure.FutureAPI
10744	// Result returns the result of the asynchronous operation.
10745	// If the operation has not completed it will return an error.
10746	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
10747}
10748
10749// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10750func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) UnmarshalJSON(body []byte) error {
10751	var azFuture azure.Future
10752	if err := json.Unmarshal(body, &azFuture); err != nil {
10753		return err
10754	}
10755	future.FutureAPI = &azFuture
10756	future.Result = future.result
10757	return nil
10758}
10759
10760// result is the default implementation for VirtualMachineScaleSetRollingUpgradesCancelFuture.Result.
10761func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
10762	var done bool
10763	done, err = future.DoneWithContext(context.Background(), client)
10764	if err != nil {
10765		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Polling failure")
10766		return
10767	}
10768	if !done {
10769		ar.Response = future.Response()
10770		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
10771		return
10772	}
10773	ar.Response = future.Response()
10774	return
10775}
10776
10777// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and
10778// retrieving the results of a long-running operation.
10779type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct {
10780	azure.FutureAPI
10781	// Result returns the result of the asynchronous operation.
10782	// If the operation has not completed it will return an error.
10783	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
10784}
10785
10786// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10787func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) UnmarshalJSON(body []byte) error {
10788	var azFuture azure.Future
10789	if err := json.Unmarshal(body, &azFuture); err != nil {
10790		return err
10791	}
10792	future.FutureAPI = &azFuture
10793	future.Result = future.result
10794	return nil
10795}
10796
10797// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.Result.
10798func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
10799	var done bool
10800	done, err = future.DoneWithContext(context.Background(), client)
10801	if err != nil {
10802		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture", "Result", future.Response(), "Polling failure")
10803		return
10804	}
10805	if !done {
10806		ar.Response = future.Response()
10807		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture")
10808		return
10809	}
10810	ar.Response = future.Response()
10811	return
10812}
10813
10814// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving
10815// the results of a long-running operation.
10816type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
10817	azure.FutureAPI
10818	// Result returns the result of the asynchronous operation.
10819	// If the operation has not completed it will return an error.
10820	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
10821}
10822
10823// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10824func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) UnmarshalJSON(body []byte) error {
10825	var azFuture azure.Future
10826	if err := json.Unmarshal(body, &azFuture); err != nil {
10827		return err
10828	}
10829	future.FutureAPI = &azFuture
10830	future.Result = future.result
10831	return nil
10832}
10833
10834// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.Result.
10835func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
10836	var done bool
10837	done, err = future.DoneWithContext(context.Background(), client)
10838	if err != nil {
10839		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Polling failure")
10840		return
10841	}
10842	if !done {
10843		ar.Response = future.Response()
10844		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
10845		return
10846	}
10847	ar.Response = future.Response()
10848	return
10849}
10850
10851// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
10852// a long-running operation.
10853type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
10854	azure.FutureAPI
10855	// Result returns the result of the asynchronous operation.
10856	// If the operation has not completed it will return an error.
10857	Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
10858}
10859
10860// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10861func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10862	var azFuture azure.Future
10863	if err := json.Unmarshal(body, &azFuture); err != nil {
10864		return err
10865	}
10866	future.FutureAPI = &azFuture
10867	future.Result = future.result
10868	return nil
10869}
10870
10871// result is the default implementation for VirtualMachineScaleSetsCreateOrUpdateFuture.Result.
10872func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
10873	var done bool
10874	done, err = future.DoneWithContext(context.Background(), client)
10875	if err != nil {
10876		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10877		return
10878	}
10879	if !done {
10880		vmss.Response.Response = future.Response()
10881		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
10882		return
10883	}
10884	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10885	if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
10886		vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
10887		if err != nil {
10888			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
10889		}
10890	}
10891	return
10892}
10893
10894// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a
10895// long-running operation.
10896type VirtualMachineScaleSetsDeallocateFuture struct {
10897	azure.FutureAPI
10898	// Result returns the result of the asynchronous operation.
10899	// If the operation has not completed it will return an error.
10900	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
10901}
10902
10903// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10904func (future *VirtualMachineScaleSetsDeallocateFuture) UnmarshalJSON(body []byte) error {
10905	var azFuture azure.Future
10906	if err := json.Unmarshal(body, &azFuture); err != nil {
10907		return err
10908	}
10909	future.FutureAPI = &azFuture
10910	future.Result = future.result
10911	return nil
10912}
10913
10914// result is the default implementation for VirtualMachineScaleSetsDeallocateFuture.Result.
10915func (future *VirtualMachineScaleSetsDeallocateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
10916	var done bool
10917	done, err = future.DoneWithContext(context.Background(), client)
10918	if err != nil {
10919		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Polling failure")
10920		return
10921	}
10922	if !done {
10923		ar.Response = future.Response()
10924		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
10925		return
10926	}
10927	ar.Response = future.Response()
10928	return
10929}
10930
10931// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
10932// long-running operation.
10933type VirtualMachineScaleSetsDeleteFuture struct {
10934	azure.FutureAPI
10935	// Result returns the result of the asynchronous operation.
10936	// If the operation has not completed it will return an error.
10937	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
10938}
10939
10940// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10941func (future *VirtualMachineScaleSetsDeleteFuture) UnmarshalJSON(body []byte) error {
10942	var azFuture azure.Future
10943	if err := json.Unmarshal(body, &azFuture); err != nil {
10944		return err
10945	}
10946	future.FutureAPI = &azFuture
10947	future.Result = future.result
10948	return nil
10949}
10950
10951// result is the default implementation for VirtualMachineScaleSetsDeleteFuture.Result.
10952func (future *VirtualMachineScaleSetsDeleteFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
10953	var done bool
10954	done, err = future.DoneWithContext(context.Background(), client)
10955	if err != nil {
10956		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Polling failure")
10957		return
10958	}
10959	if !done {
10960		ar.Response = future.Response()
10961		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
10962		return
10963	}
10964	ar.Response = future.Response()
10965	return
10966}
10967
10968// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of
10969// a long-running operation.
10970type VirtualMachineScaleSetsDeleteInstancesFuture struct {
10971	azure.FutureAPI
10972	// Result returns the result of the asynchronous operation.
10973	// If the operation has not completed it will return an error.
10974	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
10975}
10976
10977// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10978func (future *VirtualMachineScaleSetsDeleteInstancesFuture) UnmarshalJSON(body []byte) error {
10979	var azFuture azure.Future
10980	if err := json.Unmarshal(body, &azFuture); err != nil {
10981		return err
10982	}
10983	future.FutureAPI = &azFuture
10984	future.Result = future.result
10985	return nil
10986}
10987
10988// result is the default implementation for VirtualMachineScaleSetsDeleteInstancesFuture.Result.
10989func (future *VirtualMachineScaleSetsDeleteInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
10990	var done bool
10991	done, err = future.DoneWithContext(context.Background(), client)
10992	if err != nil {
10993		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Polling failure")
10994		return
10995	}
10996	if !done {
10997		ar.Response = future.Response()
10998		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
10999		return
11000	}
11001	ar.Response = future.Response()
11002	return
11003}
11004
11005// VirtualMachineScaleSetSku describes an available virtual machine scale set sku.
11006type VirtualMachineScaleSetSku struct {
11007	// ResourceType - READ-ONLY; The type of resource the sku applies to.
11008	ResourceType *string `json:"resourceType,omitempty"`
11009	// Sku - READ-ONLY; The Sku.
11010	Sku *Sku `json:"sku,omitempty"`
11011	// Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
11012	Capacity *VirtualMachineScaleSetSkuCapacity `json:"capacity,omitempty"`
11013}
11014
11015// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSku.
11016func (vmsss VirtualMachineScaleSetSku) MarshalJSON() ([]byte, error) {
11017	objectMap := make(map[string]interface{})
11018	return json.Marshal(objectMap)
11019}
11020
11021// VirtualMachineScaleSetSkuCapacity describes scaling information of a sku.
11022type VirtualMachineScaleSetSkuCapacity struct {
11023	// Minimum - READ-ONLY; The minimum capacity.
11024	Minimum *int64 `json:"minimum,omitempty"`
11025	// Maximum - READ-ONLY; The maximum capacity that can be set.
11026	Maximum *int64 `json:"maximum,omitempty"`
11027	// DefaultCapacity - READ-ONLY; The default capacity.
11028	DefaultCapacity *int64 `json:"defaultCapacity,omitempty"`
11029	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'VirtualMachineScaleSetSkuScaleTypeAutomatic', 'VirtualMachineScaleSetSkuScaleTypeNone'
11030	ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"`
11031}
11032
11033// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSkuCapacity.
11034func (vmsssc VirtualMachineScaleSetSkuCapacity) MarshalJSON() ([]byte, error) {
11035	objectMap := make(map[string]interface{})
11036	return json.Marshal(objectMap)
11037}
11038
11039// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results
11040// of a long-running operation.
11041type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
11042	azure.FutureAPI
11043	// Result returns the result of the asynchronous operation.
11044	// If the operation has not completed it will return an error.
11045	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
11046}
11047
11048// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11049func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
11050	var azFuture azure.Future
11051	if err := json.Unmarshal(body, &azFuture); err != nil {
11052		return err
11053	}
11054	future.FutureAPI = &azFuture
11055	future.Result = future.result
11056	return nil
11057}
11058
11059// result is the default implementation for VirtualMachineScaleSetsPerformMaintenanceFuture.Result.
11060func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
11061	var done bool
11062	done, err = future.DoneWithContext(context.Background(), client)
11063	if err != nil {
11064		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
11065		return
11066	}
11067	if !done {
11068		ar.Response = future.Response()
11069		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
11070		return
11071	}
11072	ar.Response = future.Response()
11073	return
11074}
11075
11076// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a
11077// long-running operation.
11078type VirtualMachineScaleSetsPowerOffFuture struct {
11079	azure.FutureAPI
11080	// Result returns the result of the asynchronous operation.
11081	// If the operation has not completed it will return an error.
11082	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
11083}
11084
11085// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11086func (future *VirtualMachineScaleSetsPowerOffFuture) UnmarshalJSON(body []byte) error {
11087	var azFuture azure.Future
11088	if err := json.Unmarshal(body, &azFuture); err != nil {
11089		return err
11090	}
11091	future.FutureAPI = &azFuture
11092	future.Result = future.result
11093	return nil
11094}
11095
11096// result is the default implementation for VirtualMachineScaleSetsPowerOffFuture.Result.
11097func (future *VirtualMachineScaleSetsPowerOffFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
11098	var done bool
11099	done, err = future.DoneWithContext(context.Background(), client)
11100	if err != nil {
11101		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Polling failure")
11102		return
11103	}
11104	if !done {
11105		ar.Response = future.Response()
11106		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
11107		return
11108	}
11109	ar.Response = future.Response()
11110	return
11111}
11112
11113// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a
11114// long-running operation.
11115type VirtualMachineScaleSetsRedeployFuture struct {
11116	azure.FutureAPI
11117	// Result returns the result of the asynchronous operation.
11118	// If the operation has not completed it will return an error.
11119	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
11120}
11121
11122// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11123func (future *VirtualMachineScaleSetsRedeployFuture) UnmarshalJSON(body []byte) error {
11124	var azFuture azure.Future
11125	if err := json.Unmarshal(body, &azFuture); err != nil {
11126		return err
11127	}
11128	future.FutureAPI = &azFuture
11129	future.Result = future.result
11130	return nil
11131}
11132
11133// result is the default implementation for VirtualMachineScaleSetsRedeployFuture.Result.
11134func (future *VirtualMachineScaleSetsRedeployFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
11135	var done bool
11136	done, err = future.DoneWithContext(context.Background(), client)
11137	if err != nil {
11138		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Polling failure")
11139		return
11140	}
11141	if !done {
11142		ar.Response = future.Response()
11143		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
11144		return
11145	}
11146	ar.Response = future.Response()
11147	return
11148}
11149
11150// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a
11151// long-running operation.
11152type VirtualMachineScaleSetsReimageAllFuture struct {
11153	azure.FutureAPI
11154	// Result returns the result of the asynchronous operation.
11155	// If the operation has not completed it will return an error.
11156	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
11157}
11158
11159// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11160func (future *VirtualMachineScaleSetsReimageAllFuture) UnmarshalJSON(body []byte) error {
11161	var azFuture azure.Future
11162	if err := json.Unmarshal(body, &azFuture); err != nil {
11163		return err
11164	}
11165	future.FutureAPI = &azFuture
11166	future.Result = future.result
11167	return nil
11168}
11169
11170// result is the default implementation for VirtualMachineScaleSetsReimageAllFuture.Result.
11171func (future *VirtualMachineScaleSetsReimageAllFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
11172	var done bool
11173	done, err = future.DoneWithContext(context.Background(), client)
11174	if err != nil {
11175		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Polling failure")
11176		return
11177	}
11178	if !done {
11179		ar.Response = future.Response()
11180		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
11181		return
11182	}
11183	ar.Response = future.Response()
11184	return
11185}
11186
11187// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a
11188// long-running operation.
11189type VirtualMachineScaleSetsReimageFuture struct {
11190	azure.FutureAPI
11191	// Result returns the result of the asynchronous operation.
11192	// If the operation has not completed it will return an error.
11193	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
11194}
11195
11196// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11197func (future *VirtualMachineScaleSetsReimageFuture) UnmarshalJSON(body []byte) error {
11198	var azFuture azure.Future
11199	if err := json.Unmarshal(body, &azFuture); err != nil {
11200		return err
11201	}
11202	future.FutureAPI = &azFuture
11203	future.Result = future.result
11204	return nil
11205}
11206
11207// result is the default implementation for VirtualMachineScaleSetsReimageFuture.Result.
11208func (future *VirtualMachineScaleSetsReimageFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
11209	var done bool
11210	done, err = future.DoneWithContext(context.Background(), client)
11211	if err != nil {
11212		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Polling failure")
11213		return
11214	}
11215	if !done {
11216		ar.Response = future.Response()
11217		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
11218		return
11219	}
11220	ar.Response = future.Response()
11221	return
11222}
11223
11224// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a
11225// long-running operation.
11226type VirtualMachineScaleSetsRestartFuture struct {
11227	azure.FutureAPI
11228	// Result returns the result of the asynchronous operation.
11229	// If the operation has not completed it will return an error.
11230	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
11231}
11232
11233// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11234func (future *VirtualMachineScaleSetsRestartFuture) UnmarshalJSON(body []byte) error {
11235	var azFuture azure.Future
11236	if err := json.Unmarshal(body, &azFuture); err != nil {
11237		return err
11238	}
11239	future.FutureAPI = &azFuture
11240	future.Result = future.result
11241	return nil
11242}
11243
11244// result is the default implementation for VirtualMachineScaleSetsRestartFuture.Result.
11245func (future *VirtualMachineScaleSetsRestartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
11246	var done bool
11247	done, err = future.DoneWithContext(context.Background(), client)
11248	if err != nil {
11249		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Polling failure")
11250		return
11251	}
11252	if !done {
11253		ar.Response = future.Response()
11254		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
11255		return
11256	}
11257	ar.Response = future.Response()
11258	return
11259}
11260
11261// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a
11262// long-running operation.
11263type VirtualMachineScaleSetsStartFuture struct {
11264	azure.FutureAPI
11265	// Result returns the result of the asynchronous operation.
11266	// If the operation has not completed it will return an error.
11267	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
11268}
11269
11270// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11271func (future *VirtualMachineScaleSetsStartFuture) UnmarshalJSON(body []byte) error {
11272	var azFuture azure.Future
11273	if err := json.Unmarshal(body, &azFuture); err != nil {
11274		return err
11275	}
11276	future.FutureAPI = &azFuture
11277	future.Result = future.result
11278	return nil
11279}
11280
11281// result is the default implementation for VirtualMachineScaleSetsStartFuture.Result.
11282func (future *VirtualMachineScaleSetsStartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
11283	var done bool
11284	done, err = future.DoneWithContext(context.Background(), client)
11285	if err != nil {
11286		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Polling failure")
11287		return
11288	}
11289	if !done {
11290		ar.Response = future.Response()
11291		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
11292		return
11293	}
11294	ar.Response = future.Response()
11295	return
11296}
11297
11298// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile.
11299type VirtualMachineScaleSetStorageProfile struct {
11300	// ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.
11301	ImageReference *ImageReference `json:"imageReference,omitempty"`
11302	// OsDisk - Specifies information about the operating system disk used by the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
11303	OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"`
11304	// DataDisks - Specifies the parameters that are used to add data disks to the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
11305	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
11306}
11307
11308// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
11309// long-running operation.
11310type VirtualMachineScaleSetsUpdateFuture struct {
11311	azure.FutureAPI
11312	// Result returns the result of the asynchronous operation.
11313	// If the operation has not completed it will return an error.
11314	Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
11315}
11316
11317// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11318func (future *VirtualMachineScaleSetsUpdateFuture) UnmarshalJSON(body []byte) error {
11319	var azFuture azure.Future
11320	if err := json.Unmarshal(body, &azFuture); err != nil {
11321		return err
11322	}
11323	future.FutureAPI = &azFuture
11324	future.Result = future.result
11325	return nil
11326}
11327
11328// result is the default implementation for VirtualMachineScaleSetsUpdateFuture.Result.
11329func (future *VirtualMachineScaleSetsUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
11330	var done bool
11331	done, err = future.DoneWithContext(context.Background(), client)
11332	if err != nil {
11333		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Polling failure")
11334		return
11335	}
11336	if !done {
11337		vmss.Response.Response = future.Response()
11338		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
11339		return
11340	}
11341	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11342	if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
11343		vmss, err = client.UpdateResponder(vmss.Response.Response)
11344		if err != nil {
11345			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
11346		}
11347	}
11348	return
11349}
11350
11351// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of
11352// a long-running operation.
11353type VirtualMachineScaleSetsUpdateInstancesFuture struct {
11354	azure.FutureAPI
11355	// Result returns the result of the asynchronous operation.
11356	// If the operation has not completed it will return an error.
11357	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
11358}
11359
11360// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11361func (future *VirtualMachineScaleSetsUpdateInstancesFuture) UnmarshalJSON(body []byte) error {
11362	var azFuture azure.Future
11363	if err := json.Unmarshal(body, &azFuture); err != nil {
11364		return err
11365	}
11366	future.FutureAPI = &azFuture
11367	future.Result = future.result
11368	return nil
11369}
11370
11371// result is the default implementation for VirtualMachineScaleSetsUpdateInstancesFuture.Result.
11372func (future *VirtualMachineScaleSetsUpdateInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
11373	var done bool
11374	done, err = future.DoneWithContext(context.Background(), client)
11375	if err != nil {
11376		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Polling failure")
11377		return
11378	}
11379	if !done {
11380		ar.Response = future.Response()
11381		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
11382		return
11383	}
11384	ar.Response = future.Response()
11385	return
11386}
11387
11388// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set.
11389type VirtualMachineScaleSetUpdate struct {
11390	// Sku - The virtual machine scale set sku.
11391	Sku *Sku `json:"sku,omitempty"`
11392	// Plan - The purchase plan when deploying a virtual machine scale set from VM Marketplace images.
11393	Plan                                    *Plan `json:"plan,omitempty"`
11394	*VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"`
11395	// Identity - The identity of the virtual machine scale set, if configured.
11396	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
11397	// Tags - Resource tags
11398	Tags map[string]*string `json:"tags"`
11399}
11400
11401// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate.
11402func (vmssu VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) {
11403	objectMap := make(map[string]interface{})
11404	if vmssu.Sku != nil {
11405		objectMap["sku"] = vmssu.Sku
11406	}
11407	if vmssu.Plan != nil {
11408		objectMap["plan"] = vmssu.Plan
11409	}
11410	if vmssu.VirtualMachineScaleSetUpdateProperties != nil {
11411		objectMap["properties"] = vmssu.VirtualMachineScaleSetUpdateProperties
11412	}
11413	if vmssu.Identity != nil {
11414		objectMap["identity"] = vmssu.Identity
11415	}
11416	if vmssu.Tags != nil {
11417		objectMap["tags"] = vmssu.Tags
11418	}
11419	return json.Marshal(objectMap)
11420}
11421
11422// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdate struct.
11423func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error {
11424	var m map[string]*json.RawMessage
11425	err := json.Unmarshal(body, &m)
11426	if err != nil {
11427		return err
11428	}
11429	for k, v := range m {
11430		switch k {
11431		case "sku":
11432			if v != nil {
11433				var sku Sku
11434				err = json.Unmarshal(*v, &sku)
11435				if err != nil {
11436					return err
11437				}
11438				vmssu.Sku = &sku
11439			}
11440		case "plan":
11441			if v != nil {
11442				var plan Plan
11443				err = json.Unmarshal(*v, &plan)
11444				if err != nil {
11445					return err
11446				}
11447				vmssu.Plan = &plan
11448			}
11449		case "properties":
11450			if v != nil {
11451				var virtualMachineScaleSetUpdateProperties VirtualMachineScaleSetUpdateProperties
11452				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateProperties)
11453				if err != nil {
11454					return err
11455				}
11456				vmssu.VirtualMachineScaleSetUpdateProperties = &virtualMachineScaleSetUpdateProperties
11457			}
11458		case "identity":
11459			if v != nil {
11460				var identity VirtualMachineScaleSetIdentity
11461				err = json.Unmarshal(*v, &identity)
11462				if err != nil {
11463					return err
11464				}
11465				vmssu.Identity = &identity
11466			}
11467		case "tags":
11468			if v != nil {
11469				var tags map[string]*string
11470				err = json.Unmarshal(*v, &tags)
11471				if err != nil {
11472					return err
11473				}
11474				vmssu.Tags = tags
11475			}
11476		}
11477	}
11478
11479	return nil
11480}
11481
11482// VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP
11483// configuration.
11484type VirtualMachineScaleSetUpdateIPConfiguration struct {
11485	// Name - The IP configuration name.
11486	Name                                                   *string `json:"name,omitempty"`
11487	*VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"`
11488	// ID - Resource Id
11489	ID *string `json:"id,omitempty"`
11490}
11491
11492// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateIPConfiguration.
11493func (vmssuic VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) {
11494	objectMap := make(map[string]interface{})
11495	if vmssuic.Name != nil {
11496		objectMap["name"] = vmssuic.Name
11497	}
11498	if vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties != nil {
11499		objectMap["properties"] = vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties
11500	}
11501	if vmssuic.ID != nil {
11502		objectMap["id"] = vmssuic.ID
11503	}
11504	return json.Marshal(objectMap)
11505}
11506
11507// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateIPConfiguration struct.
11508func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body []byte) error {
11509	var m map[string]*json.RawMessage
11510	err := json.Unmarshal(body, &m)
11511	if err != nil {
11512		return err
11513	}
11514	for k, v := range m {
11515		switch k {
11516		case "name":
11517			if v != nil {
11518				var name string
11519				err = json.Unmarshal(*v, &name)
11520				if err != nil {
11521					return err
11522				}
11523				vmssuic.Name = &name
11524			}
11525		case "properties":
11526			if v != nil {
11527				var virtualMachineScaleSetUpdateIPConfigurationProperties VirtualMachineScaleSetUpdateIPConfigurationProperties
11528				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateIPConfigurationProperties)
11529				if err != nil {
11530					return err
11531				}
11532				vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties = &virtualMachineScaleSetUpdateIPConfigurationProperties
11533			}
11534		case "id":
11535			if v != nil {
11536				var ID string
11537				err = json.Unmarshal(*v, &ID)
11538				if err != nil {
11539					return err
11540				}
11541				vmssuic.ID = &ID
11542			}
11543		}
11544	}
11545
11546	return nil
11547}
11548
11549// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network
11550// profile's IP configuration properties. NOTE: The subnet of a scale set may be modified as long as the
11551// original subnet and the new subnet are in the same virtual network.
11552type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
11553	// Subnet - The subnet.
11554	Subnet *APIEntityReference `json:"subnet,omitempty"`
11555	// Primary - Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.
11556	Primary *bool `json:"primary,omitempty"`
11557	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
11558	PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
11559	// PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
11560	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
11561	// ApplicationGatewayBackendAddressPools - The application gateway backend address pools.
11562	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
11563	// ApplicationSecurityGroups - Specifies an array of references to application security group.
11564	ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
11565	// LoadBalancerBackendAddressPools - The load balancer backend address pools.
11566	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
11567	// LoadBalancerInboundNatPools - The load balancer inbound nat pools.
11568	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
11569}
11570
11571// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's
11572// network configurations.
11573type VirtualMachineScaleSetUpdateNetworkConfiguration struct {
11574	// Name - The network configuration name.
11575	Name                                                        *string `json:"name,omitempty"`
11576	*VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"`
11577	// ID - Resource Id
11578	ID *string `json:"id,omitempty"`
11579}
11580
11581// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateNetworkConfiguration.
11582func (vmssunc VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) {
11583	objectMap := make(map[string]interface{})
11584	if vmssunc.Name != nil {
11585		objectMap["name"] = vmssunc.Name
11586	}
11587	if vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties != nil {
11588		objectMap["properties"] = vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties
11589	}
11590	if vmssunc.ID != nil {
11591		objectMap["id"] = vmssunc.ID
11592	}
11593	return json.Marshal(objectMap)
11594}
11595
11596// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateNetworkConfiguration struct.
11597func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(body []byte) error {
11598	var m map[string]*json.RawMessage
11599	err := json.Unmarshal(body, &m)
11600	if err != nil {
11601		return err
11602	}
11603	for k, v := range m {
11604		switch k {
11605		case "name":
11606			if v != nil {
11607				var name string
11608				err = json.Unmarshal(*v, &name)
11609				if err != nil {
11610					return err
11611				}
11612				vmssunc.Name = &name
11613			}
11614		case "properties":
11615			if v != nil {
11616				var virtualMachineScaleSetUpdateNetworkConfigurationProperties VirtualMachineScaleSetUpdateNetworkConfigurationProperties
11617				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateNetworkConfigurationProperties)
11618				if err != nil {
11619					return err
11620				}
11621				vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties = &virtualMachineScaleSetUpdateNetworkConfigurationProperties
11622			}
11623		case "id":
11624			if v != nil {
11625				var ID string
11626				err = json.Unmarshal(*v, &ID)
11627				if err != nil {
11628					return err
11629				}
11630				vmssunc.ID = &ID
11631			}
11632		}
11633	}
11634
11635	return nil
11636}
11637
11638// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set
11639// updatable network profile's IP configuration.Use this object for updating network profile's IP
11640// Configuration.
11641type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct {
11642	// Primary - Whether this is a primary NIC on a virtual machine.
11643	Primary *bool `json:"primary,omitempty"`
11644	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
11645	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
11646	// NetworkSecurityGroup - The network security group.
11647	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
11648	// DNSSettings - The dns settings to be applied on the network interfaces.
11649	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
11650	// IPConfigurations - The virtual machine scale set IP Configuration.
11651	IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"`
11652	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
11653	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
11654}
11655
11656// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile.
11657type VirtualMachineScaleSetUpdateNetworkProfile struct {
11658	// HealthProbe - A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.
11659	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
11660	// NetworkInterfaceConfigurations - The list of network configurations.
11661	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
11662}
11663
11664// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update
11665// Object. This should be used for Updating VMSS OS Disk.
11666type VirtualMachineScaleSetUpdateOSDisk struct {
11667	// Caching - The caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
11668	Caching CachingTypes `json:"caching,omitempty"`
11669	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
11670	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
11671	// DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
11672	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
11673	// Image - The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist.
11674	Image *VirtualHardDisk `json:"image,omitempty"`
11675	// VhdContainers - The list of virtual hard disk container uris.
11676	VhdContainers *[]string `json:"vhdContainers,omitempty"`
11677	// ManagedDisk - The managed disk parameters.
11678	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
11679}
11680
11681// VirtualMachineScaleSetUpdateOSProfile describes a virtual machine scale set OS profile.
11682type VirtualMachineScaleSetUpdateOSProfile struct {
11683	// CustomData - A base-64 encoded string of custom data.
11684	CustomData *string `json:"customData,omitempty"`
11685	// WindowsConfiguration - The Windows Configuration of the OS profile.
11686	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
11687	// LinuxConfiguration - The Linux Configuration of the OS profile.
11688	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
11689	// Secrets - The List of certificates for addition to the VM.
11690	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
11691}
11692
11693// VirtualMachineScaleSetUpdateProperties describes the properties of a Virtual Machine Scale Set.
11694type VirtualMachineScaleSetUpdateProperties struct {
11695	// UpgradePolicy - The upgrade policy.
11696	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
11697	// AutomaticRepairsPolicy - Policy for automatic repairs.
11698	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
11699	// VirtualMachineProfile - The virtual machine profile.
11700	VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"`
11701	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
11702	Overprovision *bool `json:"overprovision,omitempty"`
11703	// DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
11704	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
11705	// SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
11706	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
11707	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
11708	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
11709	// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
11710	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
11711	// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. <br><br>Minimum api-version: 2018-04-01.
11712	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
11713}
11714
11715// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP
11716// Configuration's PublicIPAddress configuration
11717type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct {
11718	// Name - The publicIP address configuration name.
11719	Name                                                                *string `json:"name,omitempty"`
11720	*VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"`
11721}
11722
11723// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.
11724func (vmssupiac VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
11725	objectMap := make(map[string]interface{})
11726	if vmssupiac.Name != nil {
11727		objectMap["name"] = vmssupiac.Name
11728	}
11729	if vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties != nil {
11730		objectMap["properties"] = vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
11731	}
11732	return json.Marshal(objectMap)
11733}
11734
11735// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct.
11736func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
11737	var m map[string]*json.RawMessage
11738	err := json.Unmarshal(body, &m)
11739	if err != nil {
11740		return err
11741	}
11742	for k, v := range m {
11743		switch k {
11744		case "name":
11745			if v != nil {
11746				var name string
11747				err = json.Unmarshal(*v, &name)
11748				if err != nil {
11749					return err
11750				}
11751				vmssupiac.Name = &name
11752			}
11753		case "properties":
11754			if v != nil {
11755				var virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
11756				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties)
11757				if err != nil {
11758					return err
11759				}
11760				vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
11761			}
11762		}
11763	}
11764
11765	return nil
11766}
11767
11768// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale
11769// set IP Configuration's PublicIPAddress configuration
11770type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct {
11771	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
11772	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
11773	// DNSSettings - The dns settings to be applied on the publicIP addresses .
11774	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
11775}
11776
11777// VirtualMachineScaleSetUpdateStorageProfile describes a virtual machine scale set storage profile.
11778type VirtualMachineScaleSetUpdateStorageProfile struct {
11779	// ImageReference - The image reference.
11780	ImageReference *ImageReference `json:"imageReference,omitempty"`
11781	// OsDisk - The OS disk.
11782	OsDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"`
11783	// DataDisks - The data disks.
11784	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
11785}
11786
11787// VirtualMachineScaleSetUpdateVMProfile describes a virtual machine scale set virtual machine profile.
11788type VirtualMachineScaleSetUpdateVMProfile struct {
11789	// OsProfile - The virtual machine scale set OS profile.
11790	OsProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"`
11791	// StorageProfile - The virtual machine scale set storage profile.
11792	StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"`
11793	// NetworkProfile - The virtual machine scale set network profile.
11794	NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"`
11795	// DiagnosticsProfile - The virtual machine scale set diagnostics profile.
11796	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
11797	// ExtensionProfile - The virtual machine scale set extension profile.
11798	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
11799	// LicenseType - The license type, which is for bring your own license scenario.
11800	LicenseType *string `json:"licenseType,omitempty"`
11801	// BillingProfile - Specifies the billing related details of a low priority VMSS. <br><br>Minimum api-version: 2019-03-01.
11802	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
11803	// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
11804	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
11805}
11806
11807// VirtualMachineScaleSetVM describes a virtual machine scale set virtual machine.
11808type VirtualMachineScaleSetVM struct {
11809	autorest.Response `json:"-"`
11810	// InstanceID - READ-ONLY; The virtual machine instance ID.
11811	InstanceID *string `json:"instanceId,omitempty"`
11812	// Sku - READ-ONLY; The virtual machine SKU.
11813	Sku                                 *Sku `json:"sku,omitempty"`
11814	*VirtualMachineScaleSetVMProperties `json:"properties,omitempty"`
11815	// Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use.  In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
11816	Plan *Plan `json:"plan,omitempty"`
11817	// Resources - READ-ONLY; The virtual machine child extension resources.
11818	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
11819	// Zones - READ-ONLY; The virtual machine zones.
11820	Zones *[]string `json:"zones,omitempty"`
11821	// ID - READ-ONLY; Resource Id
11822	ID *string `json:"id,omitempty"`
11823	// Name - READ-ONLY; Resource name
11824	Name *string `json:"name,omitempty"`
11825	// Type - READ-ONLY; Resource type
11826	Type *string `json:"type,omitempty"`
11827	// Location - Resource location
11828	Location *string `json:"location,omitempty"`
11829	// Tags - Resource tags
11830	Tags map[string]*string `json:"tags"`
11831}
11832
11833// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVM.
11834func (vmssv VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) {
11835	objectMap := make(map[string]interface{})
11836	if vmssv.VirtualMachineScaleSetVMProperties != nil {
11837		objectMap["properties"] = vmssv.VirtualMachineScaleSetVMProperties
11838	}
11839	if vmssv.Plan != nil {
11840		objectMap["plan"] = vmssv.Plan
11841	}
11842	if vmssv.Location != nil {
11843		objectMap["location"] = vmssv.Location
11844	}
11845	if vmssv.Tags != nil {
11846		objectMap["tags"] = vmssv.Tags
11847	}
11848	return json.Marshal(objectMap)
11849}
11850
11851// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVM struct.
11852func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error {
11853	var m map[string]*json.RawMessage
11854	err := json.Unmarshal(body, &m)
11855	if err != nil {
11856		return err
11857	}
11858	for k, v := range m {
11859		switch k {
11860		case "instanceId":
11861			if v != nil {
11862				var instanceID string
11863				err = json.Unmarshal(*v, &instanceID)
11864				if err != nil {
11865					return err
11866				}
11867				vmssv.InstanceID = &instanceID
11868			}
11869		case "sku":
11870			if v != nil {
11871				var sku Sku
11872				err = json.Unmarshal(*v, &sku)
11873				if err != nil {
11874					return err
11875				}
11876				vmssv.Sku = &sku
11877			}
11878		case "properties":
11879			if v != nil {
11880				var virtualMachineScaleSetVMProperties VirtualMachineScaleSetVMProperties
11881				err = json.Unmarshal(*v, &virtualMachineScaleSetVMProperties)
11882				if err != nil {
11883					return err
11884				}
11885				vmssv.VirtualMachineScaleSetVMProperties = &virtualMachineScaleSetVMProperties
11886			}
11887		case "plan":
11888			if v != nil {
11889				var plan Plan
11890				err = json.Unmarshal(*v, &plan)
11891				if err != nil {
11892					return err
11893				}
11894				vmssv.Plan = &plan
11895			}
11896		case "resources":
11897			if v != nil {
11898				var resources []VirtualMachineExtension
11899				err = json.Unmarshal(*v, &resources)
11900				if err != nil {
11901					return err
11902				}
11903				vmssv.Resources = &resources
11904			}
11905		case "zones":
11906			if v != nil {
11907				var zones []string
11908				err = json.Unmarshal(*v, &zones)
11909				if err != nil {
11910					return err
11911				}
11912				vmssv.Zones = &zones
11913			}
11914		case "id":
11915			if v != nil {
11916				var ID string
11917				err = json.Unmarshal(*v, &ID)
11918				if err != nil {
11919					return err
11920				}
11921				vmssv.ID = &ID
11922			}
11923		case "name":
11924			if v != nil {
11925				var name string
11926				err = json.Unmarshal(*v, &name)
11927				if err != nil {
11928					return err
11929				}
11930				vmssv.Name = &name
11931			}
11932		case "type":
11933			if v != nil {
11934				var typeVar string
11935				err = json.Unmarshal(*v, &typeVar)
11936				if err != nil {
11937					return err
11938				}
11939				vmssv.Type = &typeVar
11940			}
11941		case "location":
11942			if v != nil {
11943				var location string
11944				err = json.Unmarshal(*v, &location)
11945				if err != nil {
11946					return err
11947				}
11948				vmssv.Location = &location
11949			}
11950		case "tags":
11951			if v != nil {
11952				var tags map[string]*string
11953				err = json.Unmarshal(*v, &tags)
11954				if err != nil {
11955					return err
11956				}
11957				vmssv.Tags = tags
11958			}
11959		}
11960	}
11961
11962	return nil
11963}
11964
11965// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine
11966// scale set.
11967type VirtualMachineScaleSetVMExtensionsSummary struct {
11968	// Name - READ-ONLY; The extension name.
11969	Name *string `json:"name,omitempty"`
11970	// StatusesSummary - READ-ONLY; The extensions information.
11971	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
11972}
11973
11974// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionsSummary.
11975func (vmssves VirtualMachineScaleSetVMExtensionsSummary) MarshalJSON() ([]byte, error) {
11976	objectMap := make(map[string]interface{})
11977	return json.Marshal(objectMap)
11978}
11979
11980// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale
11981// set.
11982type VirtualMachineScaleSetVMInstanceIDs struct {
11983	// InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
11984	InstanceIds *[]string `json:"instanceIds,omitempty"`
11985}
11986
11987// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM
11988// scale set.
11989type VirtualMachineScaleSetVMInstanceRequiredIDs struct {
11990	// InstanceIds - The virtual machine scale set instance ids.
11991	InstanceIds *[]string `json:"instanceIds,omitempty"`
11992}
11993
11994// VirtualMachineScaleSetVMInstanceView the instance view of a virtual machine scale set VM.
11995type VirtualMachineScaleSetVMInstanceView struct {
11996	autorest.Response `json:"-"`
11997	// PlatformUpdateDomain - The Update Domain count.
11998	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
11999	// PlatformFaultDomain - The Fault Domain count.
12000	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
12001	// RdpThumbPrint - The Remote desktop certificate thumbprint.
12002	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
12003	// VMAgent - The VM Agent running on the virtual machine.
12004	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
12005	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
12006	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
12007	// Disks - The disks information.
12008	Disks *[]DiskInstanceView `json:"disks,omitempty"`
12009	// Extensions - The extensions information.
12010	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
12011	// VMHealth - READ-ONLY; The health status for the VM.
12012	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
12013	// BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor.
12014	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
12015	// Statuses - The resource status information.
12016	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
12017	// PlacementGroupID - The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId.
12018	PlacementGroupID *string `json:"placementGroupId,omitempty"`
12019}
12020
12021// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMInstanceView.
12022func (vmssviv VirtualMachineScaleSetVMInstanceView) MarshalJSON() ([]byte, error) {
12023	objectMap := make(map[string]interface{})
12024	if vmssviv.PlatformUpdateDomain != nil {
12025		objectMap["platformUpdateDomain"] = vmssviv.PlatformUpdateDomain
12026	}
12027	if vmssviv.PlatformFaultDomain != nil {
12028		objectMap["platformFaultDomain"] = vmssviv.PlatformFaultDomain
12029	}
12030	if vmssviv.RdpThumbPrint != nil {
12031		objectMap["rdpThumbPrint"] = vmssviv.RdpThumbPrint
12032	}
12033	if vmssviv.VMAgent != nil {
12034		objectMap["vmAgent"] = vmssviv.VMAgent
12035	}
12036	if vmssviv.MaintenanceRedeployStatus != nil {
12037		objectMap["maintenanceRedeployStatus"] = vmssviv.MaintenanceRedeployStatus
12038	}
12039	if vmssviv.Disks != nil {
12040		objectMap["disks"] = vmssviv.Disks
12041	}
12042	if vmssviv.Extensions != nil {
12043		objectMap["extensions"] = vmssviv.Extensions
12044	}
12045	if vmssviv.BootDiagnostics != nil {
12046		objectMap["bootDiagnostics"] = vmssviv.BootDiagnostics
12047	}
12048	if vmssviv.Statuses != nil {
12049		objectMap["statuses"] = vmssviv.Statuses
12050	}
12051	if vmssviv.PlacementGroupID != nil {
12052		objectMap["placementGroupId"] = vmssviv.PlacementGroupID
12053	}
12054	return json.Marshal(objectMap)
12055}
12056
12057// VirtualMachineScaleSetVMListResult the List Virtual Machine Scale Set VMs operation response.
12058type VirtualMachineScaleSetVMListResult struct {
12059	autorest.Response `json:"-"`
12060	// Value - The list of virtual machine scale sets VMs.
12061	Value *[]VirtualMachineScaleSetVM `json:"value,omitempty"`
12062	// NextLink - The uri to fetch the next page of Virtual Machine Scale Set VMs. Call ListNext() with this to fetch the next page of VMSS VMs
12063	NextLink *string `json:"nextLink,omitempty"`
12064}
12065
12066// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of
12067// VirtualMachineScaleSetVM values.
12068type VirtualMachineScaleSetVMListResultIterator struct {
12069	i    int
12070	page VirtualMachineScaleSetVMListResultPage
12071}
12072
12073// NextWithContext advances to the next value.  If there was an error making
12074// the request the iterator does not advance and the error is returned.
12075func (iter *VirtualMachineScaleSetVMListResultIterator) NextWithContext(ctx context.Context) (err error) {
12076	if tracing.IsEnabled() {
12077		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultIterator.NextWithContext")
12078		defer func() {
12079			sc := -1
12080			if iter.Response().Response.Response != nil {
12081				sc = iter.Response().Response.Response.StatusCode
12082			}
12083			tracing.EndSpan(ctx, sc, err)
12084		}()
12085	}
12086	iter.i++
12087	if iter.i < len(iter.page.Values()) {
12088		return nil
12089	}
12090	err = iter.page.NextWithContext(ctx)
12091	if err != nil {
12092		iter.i--
12093		return err
12094	}
12095	iter.i = 0
12096	return nil
12097}
12098
12099// Next advances to the next value.  If there was an error making
12100// the request the iterator does not advance and the error is returned.
12101// Deprecated: Use NextWithContext() instead.
12102func (iter *VirtualMachineScaleSetVMListResultIterator) Next() error {
12103	return iter.NextWithContext(context.Background())
12104}
12105
12106// NotDone returns true if the enumeration should be started or is not yet complete.
12107func (iter VirtualMachineScaleSetVMListResultIterator) NotDone() bool {
12108	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12109}
12110
12111// Response returns the raw server response from the last page request.
12112func (iter VirtualMachineScaleSetVMListResultIterator) Response() VirtualMachineScaleSetVMListResult {
12113	return iter.page.Response()
12114}
12115
12116// Value returns the current value or a zero-initialized value if the
12117// iterator has advanced beyond the end of the collection.
12118func (iter VirtualMachineScaleSetVMListResultIterator) Value() VirtualMachineScaleSetVM {
12119	if !iter.page.NotDone() {
12120		return VirtualMachineScaleSetVM{}
12121	}
12122	return iter.page.Values()[iter.i]
12123}
12124
12125// Creates a new instance of the VirtualMachineScaleSetVMListResultIterator type.
12126func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator {
12127	return VirtualMachineScaleSetVMListResultIterator{page: page}
12128}
12129
12130// IsEmpty returns true if the ListResult contains no values.
12131func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool {
12132	return vmssvlr.Value == nil || len(*vmssvlr.Value) == 0
12133}
12134
12135// hasNextLink returns true if the NextLink is not empty.
12136func (vmssvlr VirtualMachineScaleSetVMListResult) hasNextLink() bool {
12137	return vmssvlr.NextLink != nil && len(*vmssvlr.NextLink) != 0
12138}
12139
12140// virtualMachineScaleSetVMListResultPreparer prepares a request to retrieve the next set of results.
12141// It returns nil if no more results exist.
12142func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer(ctx context.Context) (*http.Request, error) {
12143	if !vmssvlr.hasNextLink() {
12144		return nil, nil
12145	}
12146	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12147		autorest.AsJSON(),
12148		autorest.AsGet(),
12149		autorest.WithBaseURL(to.String(vmssvlr.NextLink)))
12150}
12151
12152// VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values.
12153type VirtualMachineScaleSetVMListResultPage struct {
12154	fn      func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)
12155	vmssvlr VirtualMachineScaleSetVMListResult
12156}
12157
12158// NextWithContext advances to the next page of values.  If there was an error making
12159// the request the page does not advance and the error is returned.
12160func (page *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context.Context) (err error) {
12161	if tracing.IsEnabled() {
12162		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultPage.NextWithContext")
12163		defer func() {
12164			sc := -1
12165			if page.Response().Response.Response != nil {
12166				sc = page.Response().Response.Response.StatusCode
12167			}
12168			tracing.EndSpan(ctx, sc, err)
12169		}()
12170	}
12171	for {
12172		next, err := page.fn(ctx, page.vmssvlr)
12173		if err != nil {
12174			return err
12175		}
12176		page.vmssvlr = next
12177		if !next.hasNextLink() || !next.IsEmpty() {
12178			break
12179		}
12180	}
12181	return nil
12182}
12183
12184// Next advances to the next page of values.  If there was an error making
12185// the request the page does not advance and the error is returned.
12186// Deprecated: Use NextWithContext() instead.
12187func (page *VirtualMachineScaleSetVMListResultPage) Next() error {
12188	return page.NextWithContext(context.Background())
12189}
12190
12191// NotDone returns true if the page enumeration should be started or is not yet complete.
12192func (page VirtualMachineScaleSetVMListResultPage) NotDone() bool {
12193	return !page.vmssvlr.IsEmpty()
12194}
12195
12196// Response returns the raw server response from the last page request.
12197func (page VirtualMachineScaleSetVMListResultPage) Response() VirtualMachineScaleSetVMListResult {
12198	return page.vmssvlr
12199}
12200
12201// Values returns the slice of values for the current page or nil if there are no values.
12202func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScaleSetVM {
12203	if page.vmssvlr.IsEmpty() {
12204		return nil
12205	}
12206	return *page.vmssvlr.Value
12207}
12208
12209// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type.
12210func NewVirtualMachineScaleSetVMListResultPage(cur VirtualMachineScaleSetVMListResult, getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
12211	return VirtualMachineScaleSetVMListResultPage{
12212		fn:      getNextPage,
12213		vmssvlr: cur,
12214	}
12215}
12216
12217// VirtualMachineScaleSetVMNetworkProfileConfiguration describes a virtual machine scale set VM network
12218// profile.
12219type VirtualMachineScaleSetVMNetworkProfileConfiguration struct {
12220	// NetworkInterfaceConfigurations - The list of network configurations.
12221	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
12222}
12223
12224// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile.
12225type VirtualMachineScaleSetVMProfile struct {
12226	// OsProfile - Specifies the operating system settings for the virtual machines in the scale set.
12227	OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"`
12228	// StorageProfile - Specifies the storage settings for the virtual machine disks.
12229	StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"`
12230	// NetworkProfile - Specifies properties of the network interfaces of the virtual machines in the scale set.
12231	NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"`
12232	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
12233	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
12234	// ExtensionProfile - Specifies a collection of settings for extensions installed on virtual machines in the scale set.
12235	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
12236	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15
12237	LicenseType *string `json:"licenseType,omitempty"`
12238	// Priority - Specifies the priority for the virtual machines in the scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot'
12239	Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
12240	// EvictionPolicy - Specifies the eviction policy for virtual machines in a Azure Spot scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
12241	EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
12242	// BillingProfile - Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01.
12243	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
12244	// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
12245	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
12246}
12247
12248// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual
12249// machine.
12250type VirtualMachineScaleSetVMProperties struct {
12251	// LatestModelApplied - READ-ONLY; Specifies whether the latest model has been applied to the virtual machine.
12252	LatestModelApplied *bool `json:"latestModelApplied,omitempty"`
12253	// VMID - READ-ONLY; Azure VM unique ID.
12254	VMID *string `json:"vmId,omitempty"`
12255	// InstanceView - READ-ONLY; The virtual machine instance view.
12256	InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty"`
12257	// HardwareProfile - Specifies the hardware settings for the virtual machine.
12258	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
12259	// StorageProfile - Specifies the storage settings for the virtual machine disks.
12260	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
12261	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
12262	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
12263	// OsProfile - Specifies the operating system settings for the virtual machine.
12264	OsProfile *OSProfile `json:"osProfile,omitempty"`
12265	// NetworkProfile - Specifies the network interfaces of the virtual machine.
12266	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
12267	// NetworkProfileConfiguration - Specifies the network profile configuration of the virtual machine.
12268	NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration `json:"networkProfileConfiguration,omitempty"`
12269	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
12270	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
12271	// AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.
12272	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
12273	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
12274	ProvisioningState *string `json:"provisioningState,omitempty"`
12275	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15
12276	LicenseType *string `json:"licenseType,omitempty"`
12277	// ModelDefinitionApplied - READ-ONLY; Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine.
12278	ModelDefinitionApplied *string `json:"modelDefinitionApplied,omitempty"`
12279	// ProtectionPolicy - Specifies the protection policy of the virtual machine.
12280	ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy `json:"protectionPolicy,omitempty"`
12281}
12282
12283// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMProperties.
12284func (vmssvp VirtualMachineScaleSetVMProperties) MarshalJSON() ([]byte, error) {
12285	objectMap := make(map[string]interface{})
12286	if vmssvp.HardwareProfile != nil {
12287		objectMap["hardwareProfile"] = vmssvp.HardwareProfile
12288	}
12289	if vmssvp.StorageProfile != nil {
12290		objectMap["storageProfile"] = vmssvp.StorageProfile
12291	}
12292	if vmssvp.AdditionalCapabilities != nil {
12293		objectMap["additionalCapabilities"] = vmssvp.AdditionalCapabilities
12294	}
12295	if vmssvp.OsProfile != nil {
12296		objectMap["osProfile"] = vmssvp.OsProfile
12297	}
12298	if vmssvp.NetworkProfile != nil {
12299		objectMap["networkProfile"] = vmssvp.NetworkProfile
12300	}
12301	if vmssvp.NetworkProfileConfiguration != nil {
12302		objectMap["networkProfileConfiguration"] = vmssvp.NetworkProfileConfiguration
12303	}
12304	if vmssvp.DiagnosticsProfile != nil {
12305		objectMap["diagnosticsProfile"] = vmssvp.DiagnosticsProfile
12306	}
12307	if vmssvp.AvailabilitySet != nil {
12308		objectMap["availabilitySet"] = vmssvp.AvailabilitySet
12309	}
12310	if vmssvp.LicenseType != nil {
12311		objectMap["licenseType"] = vmssvp.LicenseType
12312	}
12313	if vmssvp.ProtectionPolicy != nil {
12314		objectMap["protectionPolicy"] = vmssvp.ProtectionPolicy
12315	}
12316	return json.Marshal(objectMap)
12317}
12318
12319// VirtualMachineScaleSetVMProtectionPolicy the protection policy of a virtual machine scale set VM.
12320type VirtualMachineScaleSetVMProtectionPolicy struct {
12321	// ProtectFromScaleIn - Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.
12322	ProtectFromScaleIn *bool `json:"protectFromScaleIn,omitempty"`
12323	// ProtectFromScaleSetActions - Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM.
12324	ProtectFromScaleSetActions *bool `json:"protectFromScaleSetActions,omitempty"`
12325}
12326
12327// VirtualMachineScaleSetVMReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
12328type VirtualMachineScaleSetVMReimageParameters struct {
12329	// TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
12330	TempDisk *bool `json:"tempDisk,omitempty"`
12331}
12332
12333// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a
12334// long-running operation.
12335type VirtualMachineScaleSetVMsDeallocateFuture struct {
12336	azure.FutureAPI
12337	// Result returns the result of the asynchronous operation.
12338	// If the operation has not completed it will return an error.
12339	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
12340}
12341
12342// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12343func (future *VirtualMachineScaleSetVMsDeallocateFuture) UnmarshalJSON(body []byte) error {
12344	var azFuture azure.Future
12345	if err := json.Unmarshal(body, &azFuture); err != nil {
12346		return err
12347	}
12348	future.FutureAPI = &azFuture
12349	future.Result = future.result
12350	return nil
12351}
12352
12353// result is the default implementation for VirtualMachineScaleSetVMsDeallocateFuture.Result.
12354func (future *VirtualMachineScaleSetVMsDeallocateFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
12355	var done bool
12356	done, err = future.DoneWithContext(context.Background(), client)
12357	if err != nil {
12358		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Polling failure")
12359		return
12360	}
12361	if !done {
12362		ar.Response = future.Response()
12363		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
12364		return
12365	}
12366	ar.Response = future.Response()
12367	return
12368}
12369
12370// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
12371// long-running operation.
12372type VirtualMachineScaleSetVMsDeleteFuture struct {
12373	azure.FutureAPI
12374	// Result returns the result of the asynchronous operation.
12375	// If the operation has not completed it will return an error.
12376	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
12377}
12378
12379// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12380func (future *VirtualMachineScaleSetVMsDeleteFuture) UnmarshalJSON(body []byte) error {
12381	var azFuture azure.Future
12382	if err := json.Unmarshal(body, &azFuture); err != nil {
12383		return err
12384	}
12385	future.FutureAPI = &azFuture
12386	future.Result = future.result
12387	return nil
12388}
12389
12390// result is the default implementation for VirtualMachineScaleSetVMsDeleteFuture.Result.
12391func (future *VirtualMachineScaleSetVMsDeleteFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
12392	var done bool
12393	done, err = future.DoneWithContext(context.Background(), client)
12394	if err != nil {
12395		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Polling failure")
12396		return
12397	}
12398	if !done {
12399		ar.Response = future.Response()
12400		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
12401		return
12402	}
12403	ar.Response = future.Response()
12404	return
12405}
12406
12407// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the
12408// results of a long-running operation.
12409type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
12410	azure.FutureAPI
12411	// Result returns the result of the asynchronous operation.
12412	// If the operation has not completed it will return an error.
12413	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
12414}
12415
12416// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12417func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
12418	var azFuture azure.Future
12419	if err := json.Unmarshal(body, &azFuture); err != nil {
12420		return err
12421	}
12422	future.FutureAPI = &azFuture
12423	future.Result = future.result
12424	return nil
12425}
12426
12427// result is the default implementation for VirtualMachineScaleSetVMsPerformMaintenanceFuture.Result.
12428func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
12429	var done bool
12430	done, err = future.DoneWithContext(context.Background(), client)
12431	if err != nil {
12432		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
12433		return
12434	}
12435	if !done {
12436		ar.Response = future.Response()
12437		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
12438		return
12439	}
12440	ar.Response = future.Response()
12441	return
12442}
12443
12444// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a
12445// long-running operation.
12446type VirtualMachineScaleSetVMsPowerOffFuture struct {
12447	azure.FutureAPI
12448	// Result returns the result of the asynchronous operation.
12449	// If the operation has not completed it will return an error.
12450	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
12451}
12452
12453// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12454func (future *VirtualMachineScaleSetVMsPowerOffFuture) UnmarshalJSON(body []byte) error {
12455	var azFuture azure.Future
12456	if err := json.Unmarshal(body, &azFuture); err != nil {
12457		return err
12458	}
12459	future.FutureAPI = &azFuture
12460	future.Result = future.result
12461	return nil
12462}
12463
12464// result is the default implementation for VirtualMachineScaleSetVMsPowerOffFuture.Result.
12465func (future *VirtualMachineScaleSetVMsPowerOffFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
12466	var done bool
12467	done, err = future.DoneWithContext(context.Background(), client)
12468	if err != nil {
12469		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Polling failure")
12470		return
12471	}
12472	if !done {
12473		ar.Response = future.Response()
12474		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
12475		return
12476	}
12477	ar.Response = future.Response()
12478	return
12479}
12480
12481// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a
12482// long-running operation.
12483type VirtualMachineScaleSetVMsRedeployFuture struct {
12484	azure.FutureAPI
12485	// Result returns the result of the asynchronous operation.
12486	// If the operation has not completed it will return an error.
12487	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
12488}
12489
12490// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12491func (future *VirtualMachineScaleSetVMsRedeployFuture) UnmarshalJSON(body []byte) error {
12492	var azFuture azure.Future
12493	if err := json.Unmarshal(body, &azFuture); err != nil {
12494		return err
12495	}
12496	future.FutureAPI = &azFuture
12497	future.Result = future.result
12498	return nil
12499}
12500
12501// result is the default implementation for VirtualMachineScaleSetVMsRedeployFuture.Result.
12502func (future *VirtualMachineScaleSetVMsRedeployFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
12503	var done bool
12504	done, err = future.DoneWithContext(context.Background(), client)
12505	if err != nil {
12506		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Polling failure")
12507		return
12508	}
12509	if !done {
12510		ar.Response = future.Response()
12511		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
12512		return
12513	}
12514	ar.Response = future.Response()
12515	return
12516}
12517
12518// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a
12519// long-running operation.
12520type VirtualMachineScaleSetVMsReimageAllFuture struct {
12521	azure.FutureAPI
12522	// Result returns the result of the asynchronous operation.
12523	// If the operation has not completed it will return an error.
12524	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
12525}
12526
12527// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12528func (future *VirtualMachineScaleSetVMsReimageAllFuture) UnmarshalJSON(body []byte) error {
12529	var azFuture azure.Future
12530	if err := json.Unmarshal(body, &azFuture); err != nil {
12531		return err
12532	}
12533	future.FutureAPI = &azFuture
12534	future.Result = future.result
12535	return nil
12536}
12537
12538// result is the default implementation for VirtualMachineScaleSetVMsReimageAllFuture.Result.
12539func (future *VirtualMachineScaleSetVMsReimageAllFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
12540	var done bool
12541	done, err = future.DoneWithContext(context.Background(), client)
12542	if err != nil {
12543		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Polling failure")
12544		return
12545	}
12546	if !done {
12547		ar.Response = future.Response()
12548		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
12549		return
12550	}
12551	ar.Response = future.Response()
12552	return
12553}
12554
12555// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a
12556// long-running operation.
12557type VirtualMachineScaleSetVMsReimageFuture struct {
12558	azure.FutureAPI
12559	// Result returns the result of the asynchronous operation.
12560	// If the operation has not completed it will return an error.
12561	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
12562}
12563
12564// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12565func (future *VirtualMachineScaleSetVMsReimageFuture) UnmarshalJSON(body []byte) error {
12566	var azFuture azure.Future
12567	if err := json.Unmarshal(body, &azFuture); err != nil {
12568		return err
12569	}
12570	future.FutureAPI = &azFuture
12571	future.Result = future.result
12572	return nil
12573}
12574
12575// result is the default implementation for VirtualMachineScaleSetVMsReimageFuture.Result.
12576func (future *VirtualMachineScaleSetVMsReimageFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
12577	var done bool
12578	done, err = future.DoneWithContext(context.Background(), client)
12579	if err != nil {
12580		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Polling failure")
12581		return
12582	}
12583	if !done {
12584		ar.Response = future.Response()
12585		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
12586		return
12587	}
12588	ar.Response = future.Response()
12589	return
12590}
12591
12592// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a
12593// long-running operation.
12594type VirtualMachineScaleSetVMsRestartFuture struct {
12595	azure.FutureAPI
12596	// Result returns the result of the asynchronous operation.
12597	// If the operation has not completed it will return an error.
12598	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
12599}
12600
12601// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12602func (future *VirtualMachineScaleSetVMsRestartFuture) UnmarshalJSON(body []byte) error {
12603	var azFuture azure.Future
12604	if err := json.Unmarshal(body, &azFuture); err != nil {
12605		return err
12606	}
12607	future.FutureAPI = &azFuture
12608	future.Result = future.result
12609	return nil
12610}
12611
12612// result is the default implementation for VirtualMachineScaleSetVMsRestartFuture.Result.
12613func (future *VirtualMachineScaleSetVMsRestartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
12614	var done bool
12615	done, err = future.DoneWithContext(context.Background(), client)
12616	if err != nil {
12617		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Polling failure")
12618		return
12619	}
12620	if !done {
12621		ar.Response = future.Response()
12622		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
12623		return
12624	}
12625	ar.Response = future.Response()
12626	return
12627}
12628
12629// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a
12630// long-running operation.
12631type VirtualMachineScaleSetVMsRunCommandFuture struct {
12632	azure.FutureAPI
12633	// Result returns the result of the asynchronous operation.
12634	// If the operation has not completed it will return an error.
12635	Result func(VirtualMachineScaleSetVMsClient) (RunCommandResult, error)
12636}
12637
12638// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12639func (future *VirtualMachineScaleSetVMsRunCommandFuture) UnmarshalJSON(body []byte) error {
12640	var azFuture azure.Future
12641	if err := json.Unmarshal(body, &azFuture); err != nil {
12642		return err
12643	}
12644	future.FutureAPI = &azFuture
12645	future.Result = future.result
12646	return nil
12647}
12648
12649// result is the default implementation for VirtualMachineScaleSetVMsRunCommandFuture.Result.
12650func (future *VirtualMachineScaleSetVMsRunCommandFuture) result(client VirtualMachineScaleSetVMsClient) (rcr RunCommandResult, err error) {
12651	var done bool
12652	done, err = future.DoneWithContext(context.Background(), client)
12653	if err != nil {
12654		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", future.Response(), "Polling failure")
12655		return
12656	}
12657	if !done {
12658		rcr.Response.Response = future.Response()
12659		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture")
12660		return
12661	}
12662	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12663	if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
12664		rcr, err = client.RunCommandResponder(rcr.Response.Response)
12665		if err != nil {
12666			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
12667		}
12668	}
12669	return
12670}
12671
12672// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a
12673// long-running operation.
12674type VirtualMachineScaleSetVMsStartFuture struct {
12675	azure.FutureAPI
12676	// Result returns the result of the asynchronous operation.
12677	// If the operation has not completed it will return an error.
12678	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
12679}
12680
12681// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12682func (future *VirtualMachineScaleSetVMsStartFuture) UnmarshalJSON(body []byte) error {
12683	var azFuture azure.Future
12684	if err := json.Unmarshal(body, &azFuture); err != nil {
12685		return err
12686	}
12687	future.FutureAPI = &azFuture
12688	future.Result = future.result
12689	return nil
12690}
12691
12692// result is the default implementation for VirtualMachineScaleSetVMsStartFuture.Result.
12693func (future *VirtualMachineScaleSetVMsStartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
12694	var done bool
12695	done, err = future.DoneWithContext(context.Background(), client)
12696	if err != nil {
12697		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Polling failure")
12698		return
12699	}
12700	if !done {
12701		ar.Response = future.Response()
12702		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
12703		return
12704	}
12705	ar.Response = future.Response()
12706	return
12707}
12708
12709// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a
12710// long-running operation.
12711type VirtualMachineScaleSetVMsUpdateFuture struct {
12712	azure.FutureAPI
12713	// Result returns the result of the asynchronous operation.
12714	// If the operation has not completed it will return an error.
12715	Result func(VirtualMachineScaleSetVMsClient) (VirtualMachineScaleSetVM, error)
12716}
12717
12718// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12719func (future *VirtualMachineScaleSetVMsUpdateFuture) UnmarshalJSON(body []byte) error {
12720	var azFuture azure.Future
12721	if err := json.Unmarshal(body, &azFuture); err != nil {
12722		return err
12723	}
12724	future.FutureAPI = &azFuture
12725	future.Result = future.result
12726	return nil
12727}
12728
12729// result is the default implementation for VirtualMachineScaleSetVMsUpdateFuture.Result.
12730func (future *VirtualMachineScaleSetVMsUpdateFuture) result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) {
12731	var done bool
12732	done, err = future.DoneWithContext(context.Background(), client)
12733	if err != nil {
12734		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Polling failure")
12735		return
12736	}
12737	if !done {
12738		vmssv.Response.Response = future.Response()
12739		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
12740		return
12741	}
12742	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12743	if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent {
12744		vmssv, err = client.UpdateResponder(vmssv.Response.Response)
12745		if err != nil {
12746			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request")
12747		}
12748	}
12749	return
12750}
12751
12752// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running
12753// operation.
12754type VirtualMachinesCaptureFuture struct {
12755	azure.FutureAPI
12756	// Result returns the result of the asynchronous operation.
12757	// If the operation has not completed it will return an error.
12758	Result func(VirtualMachinesClient) (VirtualMachineCaptureResult, error)
12759}
12760
12761// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12762func (future *VirtualMachinesCaptureFuture) UnmarshalJSON(body []byte) error {
12763	var azFuture azure.Future
12764	if err := json.Unmarshal(body, &azFuture); err != nil {
12765		return err
12766	}
12767	future.FutureAPI = &azFuture
12768	future.Result = future.result
12769	return nil
12770}
12771
12772// result is the default implementation for VirtualMachinesCaptureFuture.Result.
12773func (future *VirtualMachinesCaptureFuture) result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
12774	var done bool
12775	done, err = future.DoneWithContext(context.Background(), client)
12776	if err != nil {
12777		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Polling failure")
12778		return
12779	}
12780	if !done {
12781		vmcr.Response.Response = future.Response()
12782		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
12783		return
12784	}
12785	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12786	if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
12787		vmcr, err = client.CaptureResponder(vmcr.Response.Response)
12788		if err != nil {
12789			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
12790		}
12791	}
12792	return
12793}
12794
12795// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a
12796// long-running operation.
12797type VirtualMachinesConvertToManagedDisksFuture struct {
12798	azure.FutureAPI
12799	// Result returns the result of the asynchronous operation.
12800	// If the operation has not completed it will return an error.
12801	Result func(VirtualMachinesClient) (autorest.Response, error)
12802}
12803
12804// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12805func (future *VirtualMachinesConvertToManagedDisksFuture) UnmarshalJSON(body []byte) error {
12806	var azFuture azure.Future
12807	if err := json.Unmarshal(body, &azFuture); err != nil {
12808		return err
12809	}
12810	future.FutureAPI = &azFuture
12811	future.Result = future.result
12812	return nil
12813}
12814
12815// result is the default implementation for VirtualMachinesConvertToManagedDisksFuture.Result.
12816func (future *VirtualMachinesConvertToManagedDisksFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
12817	var done bool
12818	done, err = future.DoneWithContext(context.Background(), client)
12819	if err != nil {
12820		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Polling failure")
12821		return
12822	}
12823	if !done {
12824		ar.Response = future.Response()
12825		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
12826		return
12827	}
12828	ar.Response = future.Response()
12829	return
12830}
12831
12832// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12833// long-running operation.
12834type VirtualMachinesCreateOrUpdateFuture struct {
12835	azure.FutureAPI
12836	// Result returns the result of the asynchronous operation.
12837	// If the operation has not completed it will return an error.
12838	Result func(VirtualMachinesClient) (VirtualMachine, error)
12839}
12840
12841// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12842func (future *VirtualMachinesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12843	var azFuture azure.Future
12844	if err := json.Unmarshal(body, &azFuture); err != nil {
12845		return err
12846	}
12847	future.FutureAPI = &azFuture
12848	future.Result = future.result
12849	return nil
12850}
12851
12852// result is the default implementation for VirtualMachinesCreateOrUpdateFuture.Result.
12853func (future *VirtualMachinesCreateOrUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
12854	var done bool
12855	done, err = future.DoneWithContext(context.Background(), client)
12856	if err != nil {
12857		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12858		return
12859	}
12860	if !done {
12861		VM.Response.Response = future.Response()
12862		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
12863		return
12864	}
12865	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12866	if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
12867		VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
12868		if err != nil {
12869			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
12870		}
12871	}
12872	return
12873}
12874
12875// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a
12876// long-running operation.
12877type VirtualMachinesDeallocateFuture struct {
12878	azure.FutureAPI
12879	// Result returns the result of the asynchronous operation.
12880	// If the operation has not completed it will return an error.
12881	Result func(VirtualMachinesClient) (autorest.Response, error)
12882}
12883
12884// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12885func (future *VirtualMachinesDeallocateFuture) UnmarshalJSON(body []byte) error {
12886	var azFuture azure.Future
12887	if err := json.Unmarshal(body, &azFuture); err != nil {
12888		return err
12889	}
12890	future.FutureAPI = &azFuture
12891	future.Result = future.result
12892	return nil
12893}
12894
12895// result is the default implementation for VirtualMachinesDeallocateFuture.Result.
12896func (future *VirtualMachinesDeallocateFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
12897	var done bool
12898	done, err = future.DoneWithContext(context.Background(), client)
12899	if err != nil {
12900		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Polling failure")
12901		return
12902	}
12903	if !done {
12904		ar.Response = future.Response()
12905		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
12906		return
12907	}
12908	ar.Response = future.Response()
12909	return
12910}
12911
12912// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12913// operation.
12914type VirtualMachinesDeleteFuture struct {
12915	azure.FutureAPI
12916	// Result returns the result of the asynchronous operation.
12917	// If the operation has not completed it will return an error.
12918	Result func(VirtualMachinesClient) (autorest.Response, error)
12919}
12920
12921// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12922func (future *VirtualMachinesDeleteFuture) UnmarshalJSON(body []byte) error {
12923	var azFuture azure.Future
12924	if err := json.Unmarshal(body, &azFuture); err != nil {
12925		return err
12926	}
12927	future.FutureAPI = &azFuture
12928	future.Result = future.result
12929	return nil
12930}
12931
12932// result is the default implementation for VirtualMachinesDeleteFuture.Result.
12933func (future *VirtualMachinesDeleteFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
12934	var done bool
12935	done, err = future.DoneWithContext(context.Background(), client)
12936	if err != nil {
12937		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure")
12938		return
12939	}
12940	if !done {
12941		ar.Response = future.Response()
12942		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
12943		return
12944	}
12945	ar.Response = future.Response()
12946	return
12947}
12948
12949// VirtualMachineSize describes the properties of a VM size.
12950type VirtualMachineSize struct {
12951	// Name - The name of the virtual machine size.
12952	Name *string `json:"name,omitempty"`
12953	// NumberOfCores - The number of cores supported by the virtual machine size.
12954	NumberOfCores *int32 `json:"numberOfCores,omitempty"`
12955	// OsDiskSizeInMB - The OS disk size, in MB, allowed by the virtual machine size.
12956	OsDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"`
12957	// ResourceDiskSizeInMB - The resource disk size, in MB, allowed by the virtual machine size.
12958	ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"`
12959	// MemoryInMB - The amount of memory, in MB, supported by the virtual machine size.
12960	MemoryInMB *int32 `json:"memoryInMB,omitempty"`
12961	// MaxDataDiskCount - The maximum number of data disks that can be attached to the virtual machine size.
12962	MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"`
12963}
12964
12965// VirtualMachineSizeListResult the List Virtual Machine operation response.
12966type VirtualMachineSizeListResult struct {
12967	autorest.Response `json:"-"`
12968	// Value - The list of virtual machine sizes.
12969	Value *[]VirtualMachineSize `json:"value,omitempty"`
12970}
12971
12972// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a
12973// long-running operation.
12974type VirtualMachinesPerformMaintenanceFuture struct {
12975	azure.FutureAPI
12976	// Result returns the result of the asynchronous operation.
12977	// If the operation has not completed it will return an error.
12978	Result func(VirtualMachinesClient) (autorest.Response, error)
12979}
12980
12981// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12982func (future *VirtualMachinesPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
12983	var azFuture azure.Future
12984	if err := json.Unmarshal(body, &azFuture); err != nil {
12985		return err
12986	}
12987	future.FutureAPI = &azFuture
12988	future.Result = future.result
12989	return nil
12990}
12991
12992// result is the default implementation for VirtualMachinesPerformMaintenanceFuture.Result.
12993func (future *VirtualMachinesPerformMaintenanceFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
12994	var done bool
12995	done, err = future.DoneWithContext(context.Background(), client)
12996	if err != nil {
12997		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
12998		return
12999	}
13000	if !done {
13001		ar.Response = future.Response()
13002		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
13003		return
13004	}
13005	ar.Response = future.Response()
13006	return
13007}
13008
13009// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
13010// operation.
13011type VirtualMachinesPowerOffFuture struct {
13012	azure.FutureAPI
13013	// Result returns the result of the asynchronous operation.
13014	// If the operation has not completed it will return an error.
13015	Result func(VirtualMachinesClient) (autorest.Response, error)
13016}
13017
13018// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13019func (future *VirtualMachinesPowerOffFuture) UnmarshalJSON(body []byte) error {
13020	var azFuture azure.Future
13021	if err := json.Unmarshal(body, &azFuture); err != nil {
13022		return err
13023	}
13024	future.FutureAPI = &azFuture
13025	future.Result = future.result
13026	return nil
13027}
13028
13029// result is the default implementation for VirtualMachinesPowerOffFuture.Result.
13030func (future *VirtualMachinesPowerOffFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
13031	var done bool
13032	done, err = future.DoneWithContext(context.Background(), client)
13033	if err != nil {
13034		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Polling failure")
13035		return
13036	}
13037	if !done {
13038		ar.Response = future.Response()
13039		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
13040		return
13041	}
13042	ar.Response = future.Response()
13043	return
13044}
13045
13046// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running
13047// operation.
13048type VirtualMachinesRedeployFuture struct {
13049	azure.FutureAPI
13050	// Result returns the result of the asynchronous operation.
13051	// If the operation has not completed it will return an error.
13052	Result func(VirtualMachinesClient) (autorest.Response, error)
13053}
13054
13055// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13056func (future *VirtualMachinesRedeployFuture) UnmarshalJSON(body []byte) error {
13057	var azFuture azure.Future
13058	if err := json.Unmarshal(body, &azFuture); err != nil {
13059		return err
13060	}
13061	future.FutureAPI = &azFuture
13062	future.Result = future.result
13063	return nil
13064}
13065
13066// result is the default implementation for VirtualMachinesRedeployFuture.Result.
13067func (future *VirtualMachinesRedeployFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
13068	var done bool
13069	done, err = future.DoneWithContext(context.Background(), client)
13070	if err != nil {
13071		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Polling failure")
13072		return
13073	}
13074	if !done {
13075		ar.Response = future.Response()
13076		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
13077		return
13078	}
13079	ar.Response = future.Response()
13080	return
13081}
13082
13083// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
13084// operation.
13085type VirtualMachinesReimageFuture struct {
13086	azure.FutureAPI
13087	// Result returns the result of the asynchronous operation.
13088	// If the operation has not completed it will return an error.
13089	Result func(VirtualMachinesClient) (autorest.Response, error)
13090}
13091
13092// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13093func (future *VirtualMachinesReimageFuture) UnmarshalJSON(body []byte) error {
13094	var azFuture azure.Future
13095	if err := json.Unmarshal(body, &azFuture); err != nil {
13096		return err
13097	}
13098	future.FutureAPI = &azFuture
13099	future.Result = future.result
13100	return nil
13101}
13102
13103// result is the default implementation for VirtualMachinesReimageFuture.Result.
13104func (future *VirtualMachinesReimageFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
13105	var done bool
13106	done, err = future.DoneWithContext(context.Background(), client)
13107	if err != nil {
13108		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReimageFuture", "Result", future.Response(), "Polling failure")
13109		return
13110	}
13111	if !done {
13112		ar.Response = future.Response()
13113		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
13114		return
13115	}
13116	ar.Response = future.Response()
13117	return
13118}
13119
13120// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
13121// operation.
13122type VirtualMachinesRestartFuture struct {
13123	azure.FutureAPI
13124	// Result returns the result of the asynchronous operation.
13125	// If the operation has not completed it will return an error.
13126	Result func(VirtualMachinesClient) (autorest.Response, error)
13127}
13128
13129// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13130func (future *VirtualMachinesRestartFuture) UnmarshalJSON(body []byte) error {
13131	var azFuture azure.Future
13132	if err := json.Unmarshal(body, &azFuture); err != nil {
13133		return err
13134	}
13135	future.FutureAPI = &azFuture
13136	future.Result = future.result
13137	return nil
13138}
13139
13140// result is the default implementation for VirtualMachinesRestartFuture.Result.
13141func (future *VirtualMachinesRestartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
13142	var done bool
13143	done, err = future.DoneWithContext(context.Background(), client)
13144	if err != nil {
13145		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Polling failure")
13146		return
13147	}
13148	if !done {
13149		ar.Response = future.Response()
13150		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
13151		return
13152	}
13153	ar.Response = future.Response()
13154	return
13155}
13156
13157// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a
13158// long-running operation.
13159type VirtualMachinesRunCommandFuture struct {
13160	azure.FutureAPI
13161	// Result returns the result of the asynchronous operation.
13162	// If the operation has not completed it will return an error.
13163	Result func(VirtualMachinesClient) (RunCommandResult, error)
13164}
13165
13166// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13167func (future *VirtualMachinesRunCommandFuture) UnmarshalJSON(body []byte) error {
13168	var azFuture azure.Future
13169	if err := json.Unmarshal(body, &azFuture); err != nil {
13170		return err
13171	}
13172	future.FutureAPI = &azFuture
13173	future.Result = future.result
13174	return nil
13175}
13176
13177// result is the default implementation for VirtualMachinesRunCommandFuture.Result.
13178func (future *VirtualMachinesRunCommandFuture) result(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
13179	var done bool
13180	done, err = future.DoneWithContext(context.Background(), client)
13181	if err != nil {
13182		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Polling failure")
13183		return
13184	}
13185	if !done {
13186		rcr.Response.Response = future.Response()
13187		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
13188		return
13189	}
13190	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13191	if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
13192		rcr, err = client.RunCommandResponder(rcr.Response.Response)
13193		if err != nil {
13194			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
13195		}
13196	}
13197	return
13198}
13199
13200// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
13201// operation.
13202type VirtualMachinesStartFuture struct {
13203	azure.FutureAPI
13204	// Result returns the result of the asynchronous operation.
13205	// If the operation has not completed it will return an error.
13206	Result func(VirtualMachinesClient) (autorest.Response, error)
13207}
13208
13209// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13210func (future *VirtualMachinesStartFuture) UnmarshalJSON(body []byte) error {
13211	var azFuture azure.Future
13212	if err := json.Unmarshal(body, &azFuture); err != nil {
13213		return err
13214	}
13215	future.FutureAPI = &azFuture
13216	future.Result = future.result
13217	return nil
13218}
13219
13220// result is the default implementation for VirtualMachinesStartFuture.Result.
13221func (future *VirtualMachinesStartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
13222	var done bool
13223	done, err = future.DoneWithContext(context.Background(), client)
13224	if err != nil {
13225		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure")
13226		return
13227	}
13228	if !done {
13229		ar.Response = future.Response()
13230		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
13231		return
13232	}
13233	ar.Response = future.Response()
13234	return
13235}
13236
13237// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view
13238// status summary.
13239type VirtualMachineStatusCodeCount struct {
13240	// Code - READ-ONLY; The instance view status code.
13241	Code *string `json:"code,omitempty"`
13242	// Count - READ-ONLY; The number of instances having a particular status code.
13243	Count *int32 `json:"count,omitempty"`
13244}
13245
13246// MarshalJSON is the custom marshaler for VirtualMachineStatusCodeCount.
13247func (vmscc VirtualMachineStatusCodeCount) MarshalJSON() ([]byte, error) {
13248	objectMap := make(map[string]interface{})
13249	return json.Marshal(objectMap)
13250}
13251
13252// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
13253// operation.
13254type VirtualMachinesUpdateFuture struct {
13255	azure.FutureAPI
13256	// Result returns the result of the asynchronous operation.
13257	// If the operation has not completed it will return an error.
13258	Result func(VirtualMachinesClient) (VirtualMachine, error)
13259}
13260
13261// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13262func (future *VirtualMachinesUpdateFuture) UnmarshalJSON(body []byte) error {
13263	var azFuture azure.Future
13264	if err := json.Unmarshal(body, &azFuture); err != nil {
13265		return err
13266	}
13267	future.FutureAPI = &azFuture
13268	future.Result = future.result
13269	return nil
13270}
13271
13272// result is the default implementation for VirtualMachinesUpdateFuture.Result.
13273func (future *VirtualMachinesUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
13274	var done bool
13275	done, err = future.DoneWithContext(context.Background(), client)
13276	if err != nil {
13277		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Polling failure")
13278		return
13279	}
13280	if !done {
13281		VM.Response.Response = future.Response()
13282		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
13283		return
13284	}
13285	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13286	if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
13287		VM, err = client.UpdateResponder(VM.Response.Response)
13288		if err != nil {
13289			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
13290		}
13291	}
13292	return
13293}
13294
13295// VirtualMachineUpdate describes a Virtual Machine Update.
13296type VirtualMachineUpdate struct {
13297	// Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use.  In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
13298	Plan                      *Plan `json:"plan,omitempty"`
13299	*VirtualMachineProperties `json:"properties,omitempty"`
13300	// Identity - The identity of the virtual machine, if configured.
13301	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
13302	// Zones - The virtual machine zones.
13303	Zones *[]string `json:"zones,omitempty"`
13304	// Tags - Resource tags
13305	Tags map[string]*string `json:"tags"`
13306}
13307
13308// MarshalJSON is the custom marshaler for VirtualMachineUpdate.
13309func (vmu VirtualMachineUpdate) MarshalJSON() ([]byte, error) {
13310	objectMap := make(map[string]interface{})
13311	if vmu.Plan != nil {
13312		objectMap["plan"] = vmu.Plan
13313	}
13314	if vmu.VirtualMachineProperties != nil {
13315		objectMap["properties"] = vmu.VirtualMachineProperties
13316	}
13317	if vmu.Identity != nil {
13318		objectMap["identity"] = vmu.Identity
13319	}
13320	if vmu.Zones != nil {
13321		objectMap["zones"] = vmu.Zones
13322	}
13323	if vmu.Tags != nil {
13324		objectMap["tags"] = vmu.Tags
13325	}
13326	return json.Marshal(objectMap)
13327}
13328
13329// UnmarshalJSON is the custom unmarshaler for VirtualMachineUpdate struct.
13330func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error {
13331	var m map[string]*json.RawMessage
13332	err := json.Unmarshal(body, &m)
13333	if err != nil {
13334		return err
13335	}
13336	for k, v := range m {
13337		switch k {
13338		case "plan":
13339			if v != nil {
13340				var plan Plan
13341				err = json.Unmarshal(*v, &plan)
13342				if err != nil {
13343					return err
13344				}
13345				vmu.Plan = &plan
13346			}
13347		case "properties":
13348			if v != nil {
13349				var virtualMachineProperties VirtualMachineProperties
13350				err = json.Unmarshal(*v, &virtualMachineProperties)
13351				if err != nil {
13352					return err
13353				}
13354				vmu.VirtualMachineProperties = &virtualMachineProperties
13355			}
13356		case "identity":
13357			if v != nil {
13358				var identity VirtualMachineIdentity
13359				err = json.Unmarshal(*v, &identity)
13360				if err != nil {
13361					return err
13362				}
13363				vmu.Identity = &identity
13364			}
13365		case "zones":
13366			if v != nil {
13367				var zones []string
13368				err = json.Unmarshal(*v, &zones)
13369				if err != nil {
13370					return err
13371				}
13372				vmu.Zones = &zones
13373			}
13374		case "tags":
13375			if v != nil {
13376				var tags map[string]*string
13377				err = json.Unmarshal(*v, &tags)
13378				if err != nil {
13379					return err
13380				}
13381				vmu.Tags = tags
13382			}
13383		}
13384	}
13385
13386	return nil
13387}
13388
13389// VMScaleSetConvertToSinglePlacementGroupInput ...
13390type VMScaleSetConvertToSinglePlacementGroupInput struct {
13391	// ActivePlacementGroupID - Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances.
13392	ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"`
13393}
13394
13395// WindowsConfiguration specifies Windows operating system settings on the virtual machine.
13396type WindowsConfiguration struct {
13397	// ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> When this property is not specified in the request body, default behavior is to set it to true.  This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.
13398	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
13399	// EnableAutomaticUpdates - Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. <br><br> For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.
13400	EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
13401	// TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"
13402	TimeZone *string `json:"timeZone,omitempty"`
13403	// AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.
13404	AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"`
13405	// WinRM - Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.
13406	WinRM *WinRMConfiguration `json:"winRM,omitempty"`
13407}
13408
13409// WinRMConfiguration describes Windows Remote Management configuration of the VM
13410type WinRMConfiguration struct {
13411	// Listeners - The list of Windows Remote Management listeners
13412	Listeners *[]WinRMListener `json:"listeners,omitempty"`
13413}
13414
13415// WinRMListener describes Protocol and thumbprint of Windows Remote Management listener
13416type WinRMListener struct {
13417	// Protocol - Specifies the protocol of listener. <br><br> Possible values are: <br>**http** <br><br> **https**. Possible values include: 'HTTP', 'HTTPS'
13418	Protocol ProtocolTypes `json:"protocol,omitempty"`
13419	// CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br>  "data":"<Base64-encoded-certificate>",<br>  "dataType":"pfx",<br>  "password":"<pfx-file-password>"<br>}
13420	CertificateURL *string `json:"certificateUrl,omitempty"`
13421}
13422