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/2020-12-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// AvailablePatchSummary describes the properties of an virtual machine instance view for available patch
492// summary.
493type AvailablePatchSummary struct {
494	// Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
495	Status PatchOperationStatus `json:"status,omitempty"`
496	// AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
497	AssessmentActivityID *string `json:"assessmentActivityId,omitempty"`
498	// RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.
499	RebootPending *bool `json:"rebootPending,omitempty"`
500	// CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
501	CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"`
502	// OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security.
503	OtherPatchCount *int32 `json:"otherPatchCount,omitempty"`
504	// StartTime - READ-ONLY; The UTC timestamp when the operation began.
505	StartTime *date.Time `json:"startTime,omitempty"`
506	// LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began.
507	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
508	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
509	Error *APIError `json:"error,omitempty"`
510}
511
512// MarshalJSON is the custom marshaler for AvailablePatchSummary.
513func (aps AvailablePatchSummary) MarshalJSON() ([]byte, error) {
514	objectMap := make(map[string]interface{})
515	return json.Marshal(objectMap)
516}
517
518// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS. <br><br>Minimum
519// api-version: 2019-03-01.
520type BillingProfile struct {
521	// 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.
522	MaxPrice *float64 `json:"maxPrice,omitempty"`
523}
524
525// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and
526// Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br>
527// Azure also enables you to see a screenshot of the VM from the hypervisor.
528type BootDiagnostics struct {
529	// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
530	Enabled *bool `json:"enabled,omitempty"`
531	// StorageURI - Uri of the storage account to use for placing the console output and screenshot. <br><br>If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
532	StorageURI *string `json:"storageUri,omitempty"`
533}
534
535// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics.
536type BootDiagnosticsInstanceView struct {
537	// ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI. <br><br>NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage.
538	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
539	// SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob Uri. <br><br>NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage.
540	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
541	// 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.
542	Status *InstanceViewStatus `json:"status,omitempty"`
543}
544
545// MarshalJSON is the custom marshaler for BootDiagnosticsInstanceView.
546func (bdiv BootDiagnosticsInstanceView) MarshalJSON() ([]byte, error) {
547	objectMap := make(map[string]interface{})
548	return json.Marshal(objectMap)
549}
550
551// CloudError an error response from the Compute service.
552type CloudError struct {
553	Error *APIError `json:"error,omitempty"`
554}
555
556// CreationData data used when creating a disk.
557type CreationData struct {
558	// CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload'
559	CreateOption DiskCreateOption `json:"createOption,omitempty"`
560	// StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
561	StorageAccountID *string `json:"storageAccountId,omitempty"`
562	// ImageReference - Disk source information.
563	ImageReference *ImageDiskReference `json:"imageReference,omitempty"`
564	// GalleryImageReference - Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
565	GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"`
566	// SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk.
567	SourceURI *string `json:"sourceUri,omitempty"`
568	// SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk.
569	SourceResourceID *string `json:"sourceResourceId,omitempty"`
570	// SourceUniqueID - READ-ONLY; If this field is set, this is the unique id identifying the source of this resource.
571	SourceUniqueID *string `json:"sourceUniqueId,omitempty"`
572	// 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).
573	UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"`
574	// LogicalSectorSize - Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
575	LogicalSectorSize *int32 `json:"logicalSectorSize,omitempty"`
576}
577
578// MarshalJSON is the custom marshaler for CreationData.
579func (cd CreationData) MarshalJSON() ([]byte, error) {
580	objectMap := make(map[string]interface{})
581	if cd.CreateOption != "" {
582		objectMap["createOption"] = cd.CreateOption
583	}
584	if cd.StorageAccountID != nil {
585		objectMap["storageAccountId"] = cd.StorageAccountID
586	}
587	if cd.ImageReference != nil {
588		objectMap["imageReference"] = cd.ImageReference
589	}
590	if cd.GalleryImageReference != nil {
591		objectMap["galleryImageReference"] = cd.GalleryImageReference
592	}
593	if cd.SourceURI != nil {
594		objectMap["sourceUri"] = cd.SourceURI
595	}
596	if cd.SourceResourceID != nil {
597		objectMap["sourceResourceId"] = cd.SourceResourceID
598	}
599	if cd.UploadSizeBytes != nil {
600		objectMap["uploadSizeBytes"] = cd.UploadSizeBytes
601	}
602	if cd.LogicalSectorSize != nil {
603		objectMap["logicalSectorSize"] = cd.LogicalSectorSize
604	}
605	return json.Marshal(objectMap)
606}
607
608// DataDisk describes a data disk.
609type DataDisk struct {
610	// 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.
611	Lun *int32 `json:"lun,omitempty"`
612	// Name - The disk name.
613	Name *string `json:"name,omitempty"`
614	// Vhd - The virtual hard disk.
615	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
616	// 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.
617	Image *VirtualHardDisk `json:"image,omitempty"`
618	// 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'
619	Caching CachingTypes `json:"caching,omitempty"`
620	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
621	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
622	// 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'
623	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
624	// 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
625	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
626	// ManagedDisk - The managed disk parameters.
627	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
628	// ToBeDetached - Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
629	ToBeDetached *bool `json:"toBeDetached,omitempty"`
630	// DiskIOPSReadWrite - READ-ONLY; Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
631	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
632	// DiskMBpsReadWrite - READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
633	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
634	// DetachOption - Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach**. <br><br> detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. <br><br> This feature is still in preview mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. Possible values include: 'ForceDetach'
635	DetachOption DiskDetachOptionTypes `json:"detachOption,omitempty"`
636}
637
638// MarshalJSON is the custom marshaler for DataDisk.
639func (dd DataDisk) MarshalJSON() ([]byte, error) {
640	objectMap := make(map[string]interface{})
641	if dd.Lun != nil {
642		objectMap["lun"] = dd.Lun
643	}
644	if dd.Name != nil {
645		objectMap["name"] = dd.Name
646	}
647	if dd.Vhd != nil {
648		objectMap["vhd"] = dd.Vhd
649	}
650	if dd.Image != nil {
651		objectMap["image"] = dd.Image
652	}
653	if dd.Caching != "" {
654		objectMap["caching"] = dd.Caching
655	}
656	if dd.WriteAcceleratorEnabled != nil {
657		objectMap["writeAcceleratorEnabled"] = dd.WriteAcceleratorEnabled
658	}
659	if dd.CreateOption != "" {
660		objectMap["createOption"] = dd.CreateOption
661	}
662	if dd.DiskSizeGB != nil {
663		objectMap["diskSizeGB"] = dd.DiskSizeGB
664	}
665	if dd.ManagedDisk != nil {
666		objectMap["managedDisk"] = dd.ManagedDisk
667	}
668	if dd.ToBeDetached != nil {
669		objectMap["toBeDetached"] = dd.ToBeDetached
670	}
671	if dd.DetachOption != "" {
672		objectMap["detachOption"] = dd.DetachOption
673	}
674	return json.Marshal(objectMap)
675}
676
677// DataDiskImage contains the data disk images information.
678type DataDiskImage struct {
679	// 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.
680	Lun *int32 `json:"lun,omitempty"`
681}
682
683// MarshalJSON is the custom marshaler for DataDiskImage.
684func (ddi DataDiskImage) MarshalJSON() ([]byte, error) {
685	objectMap := make(map[string]interface{})
686	return json.Marshal(objectMap)
687}
688
689// DataDiskImageEncryption contains encryption settings for a data disk image.
690type DataDiskImageEncryption struct {
691	// Lun - 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.
692	Lun *int32 `json:"lun,omitempty"`
693	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
694	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
695}
696
697// DedicatedHost specifies information about the Dedicated host.
698type DedicatedHost struct {
699	autorest.Response        `json:"-"`
700	*DedicatedHostProperties `json:"properties,omitempty"`
701	// 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.
702	Sku *Sku `json:"sku,omitempty"`
703	// ID - READ-ONLY; Resource Id
704	ID *string `json:"id,omitempty"`
705	// Name - READ-ONLY; Resource name
706	Name *string `json:"name,omitempty"`
707	// Type - READ-ONLY; Resource type
708	Type *string `json:"type,omitempty"`
709	// Location - Resource location
710	Location *string `json:"location,omitempty"`
711	// Tags - Resource tags
712	Tags map[string]*string `json:"tags"`
713}
714
715// MarshalJSON is the custom marshaler for DedicatedHost.
716func (dh DedicatedHost) MarshalJSON() ([]byte, error) {
717	objectMap := make(map[string]interface{})
718	if dh.DedicatedHostProperties != nil {
719		objectMap["properties"] = dh.DedicatedHostProperties
720	}
721	if dh.Sku != nil {
722		objectMap["sku"] = dh.Sku
723	}
724	if dh.Location != nil {
725		objectMap["location"] = dh.Location
726	}
727	if dh.Tags != nil {
728		objectMap["tags"] = dh.Tags
729	}
730	return json.Marshal(objectMap)
731}
732
733// UnmarshalJSON is the custom unmarshaler for DedicatedHost struct.
734func (dh *DedicatedHost) UnmarshalJSON(body []byte) error {
735	var m map[string]*json.RawMessage
736	err := json.Unmarshal(body, &m)
737	if err != nil {
738		return err
739	}
740	for k, v := range m {
741		switch k {
742		case "properties":
743			if v != nil {
744				var dedicatedHostProperties DedicatedHostProperties
745				err = json.Unmarshal(*v, &dedicatedHostProperties)
746				if err != nil {
747					return err
748				}
749				dh.DedicatedHostProperties = &dedicatedHostProperties
750			}
751		case "sku":
752			if v != nil {
753				var sku Sku
754				err = json.Unmarshal(*v, &sku)
755				if err != nil {
756					return err
757				}
758				dh.Sku = &sku
759			}
760		case "id":
761			if v != nil {
762				var ID string
763				err = json.Unmarshal(*v, &ID)
764				if err != nil {
765					return err
766				}
767				dh.ID = &ID
768			}
769		case "name":
770			if v != nil {
771				var name string
772				err = json.Unmarshal(*v, &name)
773				if err != nil {
774					return err
775				}
776				dh.Name = &name
777			}
778		case "type":
779			if v != nil {
780				var typeVar string
781				err = json.Unmarshal(*v, &typeVar)
782				if err != nil {
783					return err
784				}
785				dh.Type = &typeVar
786			}
787		case "location":
788			if v != nil {
789				var location string
790				err = json.Unmarshal(*v, &location)
791				if err != nil {
792					return err
793				}
794				dh.Location = &location
795			}
796		case "tags":
797			if v != nil {
798				var tags map[string]*string
799				err = json.Unmarshal(*v, &tags)
800				if err != nil {
801					return err
802				}
803				dh.Tags = tags
804			}
805		}
806	}
807
808	return nil
809}
810
811// DedicatedHostAllocatableVM represents the dedicated host unutilized capacity in terms of a specific VM
812// size.
813type DedicatedHostAllocatableVM struct {
814	// VMSize - VM size in terms of which the unutilized capacity is represented.
815	VMSize *string `json:"vmSize,omitempty"`
816	// Count - Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.
817	Count *float64 `json:"count,omitempty"`
818}
819
820// DedicatedHostAvailableCapacity dedicated host unutilized capacity.
821type DedicatedHostAvailableCapacity struct {
822	// 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.
823	AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"`
824}
825
826// DedicatedHostGroup specifies information about the dedicated host group that the dedicated hosts should
827// be assigned to. <br><br> Currently, a dedicated host can only be added to a dedicated host group at
828// creation time. An existing dedicated host cannot be added to another dedicated host group.
829type DedicatedHostGroup struct {
830	autorest.Response             `json:"-"`
831	*DedicatedHostGroupProperties `json:"properties,omitempty"`
832	// 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.
833	Zones *[]string `json:"zones,omitempty"`
834	// ID - READ-ONLY; Resource Id
835	ID *string `json:"id,omitempty"`
836	// Name - READ-ONLY; Resource name
837	Name *string `json:"name,omitempty"`
838	// Type - READ-ONLY; Resource type
839	Type *string `json:"type,omitempty"`
840	// Location - Resource location
841	Location *string `json:"location,omitempty"`
842	// Tags - Resource tags
843	Tags map[string]*string `json:"tags"`
844}
845
846// MarshalJSON is the custom marshaler for DedicatedHostGroup.
847func (dhg DedicatedHostGroup) MarshalJSON() ([]byte, error) {
848	objectMap := make(map[string]interface{})
849	if dhg.DedicatedHostGroupProperties != nil {
850		objectMap["properties"] = dhg.DedicatedHostGroupProperties
851	}
852	if dhg.Zones != nil {
853		objectMap["zones"] = dhg.Zones
854	}
855	if dhg.Location != nil {
856		objectMap["location"] = dhg.Location
857	}
858	if dhg.Tags != nil {
859		objectMap["tags"] = dhg.Tags
860	}
861	return json.Marshal(objectMap)
862}
863
864// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroup struct.
865func (dhg *DedicatedHostGroup) UnmarshalJSON(body []byte) error {
866	var m map[string]*json.RawMessage
867	err := json.Unmarshal(body, &m)
868	if err != nil {
869		return err
870	}
871	for k, v := range m {
872		switch k {
873		case "properties":
874			if v != nil {
875				var dedicatedHostGroupProperties DedicatedHostGroupProperties
876				err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
877				if err != nil {
878					return err
879				}
880				dhg.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
881			}
882		case "zones":
883			if v != nil {
884				var zones []string
885				err = json.Unmarshal(*v, &zones)
886				if err != nil {
887					return err
888				}
889				dhg.Zones = &zones
890			}
891		case "id":
892			if v != nil {
893				var ID string
894				err = json.Unmarshal(*v, &ID)
895				if err != nil {
896					return err
897				}
898				dhg.ID = &ID
899			}
900		case "name":
901			if v != nil {
902				var name string
903				err = json.Unmarshal(*v, &name)
904				if err != nil {
905					return err
906				}
907				dhg.Name = &name
908			}
909		case "type":
910			if v != nil {
911				var typeVar string
912				err = json.Unmarshal(*v, &typeVar)
913				if err != nil {
914					return err
915				}
916				dhg.Type = &typeVar
917			}
918		case "location":
919			if v != nil {
920				var location string
921				err = json.Unmarshal(*v, &location)
922				if err != nil {
923					return err
924				}
925				dhg.Location = &location
926			}
927		case "tags":
928			if v != nil {
929				var tags map[string]*string
930				err = json.Unmarshal(*v, &tags)
931				if err != nil {
932					return err
933				}
934				dhg.Tags = tags
935			}
936		}
937	}
938
939	return nil
940}
941
942// DedicatedHostGroupInstanceView ...
943type DedicatedHostGroupInstanceView struct {
944	// Hosts - List of instance view of the dedicated hosts under the dedicated host group.
945	Hosts *[]DedicatedHostInstanceViewWithName `json:"hosts,omitempty"`
946}
947
948// DedicatedHostGroupListResult the List Dedicated Host Group with resource group response.
949type DedicatedHostGroupListResult struct {
950	autorest.Response `json:"-"`
951	// Value - The list of dedicated host groups
952	Value *[]DedicatedHostGroup `json:"value,omitempty"`
953	// 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.
954	NextLink *string `json:"nextLink,omitempty"`
955}
956
957// DedicatedHostGroupListResultIterator provides access to a complete listing of DedicatedHostGroup values.
958type DedicatedHostGroupListResultIterator struct {
959	i    int
960	page DedicatedHostGroupListResultPage
961}
962
963// NextWithContext advances to the next value.  If there was an error making
964// the request the iterator does not advance and the error is returned.
965func (iter *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
966	if tracing.IsEnabled() {
967		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultIterator.NextWithContext")
968		defer func() {
969			sc := -1
970			if iter.Response().Response.Response != nil {
971				sc = iter.Response().Response.Response.StatusCode
972			}
973			tracing.EndSpan(ctx, sc, err)
974		}()
975	}
976	iter.i++
977	if iter.i < len(iter.page.Values()) {
978		return nil
979	}
980	err = iter.page.NextWithContext(ctx)
981	if err != nil {
982		iter.i--
983		return err
984	}
985	iter.i = 0
986	return nil
987}
988
989// Next advances to the next value.  If there was an error making
990// the request the iterator does not advance and the error is returned.
991// Deprecated: Use NextWithContext() instead.
992func (iter *DedicatedHostGroupListResultIterator) Next() error {
993	return iter.NextWithContext(context.Background())
994}
995
996// NotDone returns true if the enumeration should be started or is not yet complete.
997func (iter DedicatedHostGroupListResultIterator) NotDone() bool {
998	return iter.page.NotDone() && iter.i < len(iter.page.Values())
999}
1000
1001// Response returns the raw server response from the last page request.
1002func (iter DedicatedHostGroupListResultIterator) Response() DedicatedHostGroupListResult {
1003	return iter.page.Response()
1004}
1005
1006// Value returns the current value or a zero-initialized value if the
1007// iterator has advanced beyond the end of the collection.
1008func (iter DedicatedHostGroupListResultIterator) Value() DedicatedHostGroup {
1009	if !iter.page.NotDone() {
1010		return DedicatedHostGroup{}
1011	}
1012	return iter.page.Values()[iter.i]
1013}
1014
1015// Creates a new instance of the DedicatedHostGroupListResultIterator type.
1016func NewDedicatedHostGroupListResultIterator(page DedicatedHostGroupListResultPage) DedicatedHostGroupListResultIterator {
1017	return DedicatedHostGroupListResultIterator{page: page}
1018}
1019
1020// IsEmpty returns true if the ListResult contains no values.
1021func (dhglr DedicatedHostGroupListResult) IsEmpty() bool {
1022	return dhglr.Value == nil || len(*dhglr.Value) == 0
1023}
1024
1025// hasNextLink returns true if the NextLink is not empty.
1026func (dhglr DedicatedHostGroupListResult) hasNextLink() bool {
1027	return dhglr.NextLink != nil && len(*dhglr.NextLink) != 0
1028}
1029
1030// dedicatedHostGroupListResultPreparer prepares a request to retrieve the next set of results.
1031// It returns nil if no more results exist.
1032func (dhglr DedicatedHostGroupListResult) dedicatedHostGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
1033	if !dhglr.hasNextLink() {
1034		return nil, nil
1035	}
1036	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1037		autorest.AsJSON(),
1038		autorest.AsGet(),
1039		autorest.WithBaseURL(to.String(dhglr.NextLink)))
1040}
1041
1042// DedicatedHostGroupListResultPage contains a page of DedicatedHostGroup values.
1043type DedicatedHostGroupListResultPage struct {
1044	fn    func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)
1045	dhglr DedicatedHostGroupListResult
1046}
1047
1048// NextWithContext advances to the next page of values.  If there was an error making
1049// the request the page does not advance and the error is returned.
1050func (page *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
1051	if tracing.IsEnabled() {
1052		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultPage.NextWithContext")
1053		defer func() {
1054			sc := -1
1055			if page.Response().Response.Response != nil {
1056				sc = page.Response().Response.Response.StatusCode
1057			}
1058			tracing.EndSpan(ctx, sc, err)
1059		}()
1060	}
1061	for {
1062		next, err := page.fn(ctx, page.dhglr)
1063		if err != nil {
1064			return err
1065		}
1066		page.dhglr = next
1067		if !next.hasNextLink() || !next.IsEmpty() {
1068			break
1069		}
1070	}
1071	return nil
1072}
1073
1074// Next advances to the next page of values.  If there was an error making
1075// the request the page does not advance and the error is returned.
1076// Deprecated: Use NextWithContext() instead.
1077func (page *DedicatedHostGroupListResultPage) Next() error {
1078	return page.NextWithContext(context.Background())
1079}
1080
1081// NotDone returns true if the page enumeration should be started or is not yet complete.
1082func (page DedicatedHostGroupListResultPage) NotDone() bool {
1083	return !page.dhglr.IsEmpty()
1084}
1085
1086// Response returns the raw server response from the last page request.
1087func (page DedicatedHostGroupListResultPage) Response() DedicatedHostGroupListResult {
1088	return page.dhglr
1089}
1090
1091// Values returns the slice of values for the current page or nil if there are no values.
1092func (page DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup {
1093	if page.dhglr.IsEmpty() {
1094		return nil
1095	}
1096	return *page.dhglr.Value
1097}
1098
1099// Creates a new instance of the DedicatedHostGroupListResultPage type.
1100func NewDedicatedHostGroupListResultPage(cur DedicatedHostGroupListResult, getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage {
1101	return DedicatedHostGroupListResultPage{
1102		fn:    getNextPage,
1103		dhglr: cur,
1104	}
1105}
1106
1107// DedicatedHostGroupProperties dedicated Host Group Properties.
1108type DedicatedHostGroupProperties struct {
1109	// PlatformFaultDomainCount - Number of fault domains that the host group can span.
1110	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
1111	// Hosts - READ-ONLY; A list of references to all dedicated hosts in the dedicated host group.
1112	Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"`
1113	// InstanceView - READ-ONLY; The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group.
1114	InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty"`
1115	// SupportAutomaticPlacement - Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. <br><br>Minimum api-version: 2020-06-01.
1116	SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"`
1117}
1118
1119// MarshalJSON is the custom marshaler for DedicatedHostGroupProperties.
1120func (dhgp DedicatedHostGroupProperties) MarshalJSON() ([]byte, error) {
1121	objectMap := make(map[string]interface{})
1122	if dhgp.PlatformFaultDomainCount != nil {
1123		objectMap["platformFaultDomainCount"] = dhgp.PlatformFaultDomainCount
1124	}
1125	if dhgp.SupportAutomaticPlacement != nil {
1126		objectMap["supportAutomaticPlacement"] = dhgp.SupportAutomaticPlacement
1127	}
1128	return json.Marshal(objectMap)
1129}
1130
1131// DedicatedHostGroupUpdate specifies information about the dedicated host group that the dedicated host
1132// should be assigned to. Only tags may be updated.
1133type DedicatedHostGroupUpdate struct {
1134	*DedicatedHostGroupProperties `json:"properties,omitempty"`
1135	// 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.
1136	Zones *[]string `json:"zones,omitempty"`
1137	// Tags - Resource tags
1138	Tags map[string]*string `json:"tags"`
1139}
1140
1141// MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate.
1142func (dhgu DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) {
1143	objectMap := make(map[string]interface{})
1144	if dhgu.DedicatedHostGroupProperties != nil {
1145		objectMap["properties"] = dhgu.DedicatedHostGroupProperties
1146	}
1147	if dhgu.Zones != nil {
1148		objectMap["zones"] = dhgu.Zones
1149	}
1150	if dhgu.Tags != nil {
1151		objectMap["tags"] = dhgu.Tags
1152	}
1153	return json.Marshal(objectMap)
1154}
1155
1156// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroupUpdate struct.
1157func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error {
1158	var m map[string]*json.RawMessage
1159	err := json.Unmarshal(body, &m)
1160	if err != nil {
1161		return err
1162	}
1163	for k, v := range m {
1164		switch k {
1165		case "properties":
1166			if v != nil {
1167				var dedicatedHostGroupProperties DedicatedHostGroupProperties
1168				err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
1169				if err != nil {
1170					return err
1171				}
1172				dhgu.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
1173			}
1174		case "zones":
1175			if v != nil {
1176				var zones []string
1177				err = json.Unmarshal(*v, &zones)
1178				if err != nil {
1179					return err
1180				}
1181				dhgu.Zones = &zones
1182			}
1183		case "tags":
1184			if v != nil {
1185				var tags map[string]*string
1186				err = json.Unmarshal(*v, &tags)
1187				if err != nil {
1188					return err
1189				}
1190				dhgu.Tags = tags
1191			}
1192		}
1193	}
1194
1195	return nil
1196}
1197
1198// DedicatedHostInstanceView the instance view of a dedicated host.
1199type DedicatedHostInstanceView struct {
1200	// AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
1201	AssetID *string `json:"assetId,omitempty"`
1202	// AvailableCapacity - Unutilized capacity of the dedicated host.
1203	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
1204	// Statuses - The resource status information.
1205	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
1206}
1207
1208// MarshalJSON is the custom marshaler for DedicatedHostInstanceView.
1209func (dhiv DedicatedHostInstanceView) MarshalJSON() ([]byte, error) {
1210	objectMap := make(map[string]interface{})
1211	if dhiv.AvailableCapacity != nil {
1212		objectMap["availableCapacity"] = dhiv.AvailableCapacity
1213	}
1214	if dhiv.Statuses != nil {
1215		objectMap["statuses"] = dhiv.Statuses
1216	}
1217	return json.Marshal(objectMap)
1218}
1219
1220// DedicatedHostInstanceViewWithName the instance view of a dedicated host that includes the name of the
1221// dedicated host. It is used for the response to the instance view of a dedicated host group.
1222type DedicatedHostInstanceViewWithName struct {
1223	// Name - READ-ONLY; The name of the dedicated host.
1224	Name *string `json:"name,omitempty"`
1225	// AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
1226	AssetID *string `json:"assetId,omitempty"`
1227	// AvailableCapacity - Unutilized capacity of the dedicated host.
1228	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
1229	// Statuses - The resource status information.
1230	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
1231}
1232
1233// MarshalJSON is the custom marshaler for DedicatedHostInstanceViewWithName.
1234func (dhivwn DedicatedHostInstanceViewWithName) MarshalJSON() ([]byte, error) {
1235	objectMap := make(map[string]interface{})
1236	if dhivwn.AvailableCapacity != nil {
1237		objectMap["availableCapacity"] = dhivwn.AvailableCapacity
1238	}
1239	if dhivwn.Statuses != nil {
1240		objectMap["statuses"] = dhivwn.Statuses
1241	}
1242	return json.Marshal(objectMap)
1243}
1244
1245// DedicatedHostListResult the list dedicated host operation response.
1246type DedicatedHostListResult struct {
1247	autorest.Response `json:"-"`
1248	// Value - The list of dedicated hosts
1249	Value *[]DedicatedHost `json:"value,omitempty"`
1250	// NextLink - The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts.
1251	NextLink *string `json:"nextLink,omitempty"`
1252}
1253
1254// DedicatedHostListResultIterator provides access to a complete listing of DedicatedHost values.
1255type DedicatedHostListResultIterator struct {
1256	i    int
1257	page DedicatedHostListResultPage
1258}
1259
1260// NextWithContext advances to the next value.  If there was an error making
1261// the request the iterator does not advance and the error is returned.
1262func (iter *DedicatedHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
1263	if tracing.IsEnabled() {
1264		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultIterator.NextWithContext")
1265		defer func() {
1266			sc := -1
1267			if iter.Response().Response.Response != nil {
1268				sc = iter.Response().Response.Response.StatusCode
1269			}
1270			tracing.EndSpan(ctx, sc, err)
1271		}()
1272	}
1273	iter.i++
1274	if iter.i < len(iter.page.Values()) {
1275		return nil
1276	}
1277	err = iter.page.NextWithContext(ctx)
1278	if err != nil {
1279		iter.i--
1280		return err
1281	}
1282	iter.i = 0
1283	return nil
1284}
1285
1286// Next advances to the next value.  If there was an error making
1287// the request the iterator does not advance and the error is returned.
1288// Deprecated: Use NextWithContext() instead.
1289func (iter *DedicatedHostListResultIterator) Next() error {
1290	return iter.NextWithContext(context.Background())
1291}
1292
1293// NotDone returns true if the enumeration should be started or is not yet complete.
1294func (iter DedicatedHostListResultIterator) NotDone() bool {
1295	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1296}
1297
1298// Response returns the raw server response from the last page request.
1299func (iter DedicatedHostListResultIterator) Response() DedicatedHostListResult {
1300	return iter.page.Response()
1301}
1302
1303// Value returns the current value or a zero-initialized value if the
1304// iterator has advanced beyond the end of the collection.
1305func (iter DedicatedHostListResultIterator) Value() DedicatedHost {
1306	if !iter.page.NotDone() {
1307		return DedicatedHost{}
1308	}
1309	return iter.page.Values()[iter.i]
1310}
1311
1312// Creates a new instance of the DedicatedHostListResultIterator type.
1313func NewDedicatedHostListResultIterator(page DedicatedHostListResultPage) DedicatedHostListResultIterator {
1314	return DedicatedHostListResultIterator{page: page}
1315}
1316
1317// IsEmpty returns true if the ListResult contains no values.
1318func (dhlr DedicatedHostListResult) IsEmpty() bool {
1319	return dhlr.Value == nil || len(*dhlr.Value) == 0
1320}
1321
1322// hasNextLink returns true if the NextLink is not empty.
1323func (dhlr DedicatedHostListResult) hasNextLink() bool {
1324	return dhlr.NextLink != nil && len(*dhlr.NextLink) != 0
1325}
1326
1327// dedicatedHostListResultPreparer prepares a request to retrieve the next set of results.
1328// It returns nil if no more results exist.
1329func (dhlr DedicatedHostListResult) dedicatedHostListResultPreparer(ctx context.Context) (*http.Request, error) {
1330	if !dhlr.hasNextLink() {
1331		return nil, nil
1332	}
1333	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1334		autorest.AsJSON(),
1335		autorest.AsGet(),
1336		autorest.WithBaseURL(to.String(dhlr.NextLink)))
1337}
1338
1339// DedicatedHostListResultPage contains a page of DedicatedHost values.
1340type DedicatedHostListResultPage struct {
1341	fn   func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)
1342	dhlr DedicatedHostListResult
1343}
1344
1345// NextWithContext advances to the next page of values.  If there was an error making
1346// the request the page does not advance and the error is returned.
1347func (page *DedicatedHostListResultPage) NextWithContext(ctx context.Context) (err error) {
1348	if tracing.IsEnabled() {
1349		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultPage.NextWithContext")
1350		defer func() {
1351			sc := -1
1352			if page.Response().Response.Response != nil {
1353				sc = page.Response().Response.Response.StatusCode
1354			}
1355			tracing.EndSpan(ctx, sc, err)
1356		}()
1357	}
1358	for {
1359		next, err := page.fn(ctx, page.dhlr)
1360		if err != nil {
1361			return err
1362		}
1363		page.dhlr = next
1364		if !next.hasNextLink() || !next.IsEmpty() {
1365			break
1366		}
1367	}
1368	return nil
1369}
1370
1371// Next advances to the next page of values.  If there was an error making
1372// the request the page does not advance and the error is returned.
1373// Deprecated: Use NextWithContext() instead.
1374func (page *DedicatedHostListResultPage) Next() error {
1375	return page.NextWithContext(context.Background())
1376}
1377
1378// NotDone returns true if the page enumeration should be started or is not yet complete.
1379func (page DedicatedHostListResultPage) NotDone() bool {
1380	return !page.dhlr.IsEmpty()
1381}
1382
1383// Response returns the raw server response from the last page request.
1384func (page DedicatedHostListResultPage) Response() DedicatedHostListResult {
1385	return page.dhlr
1386}
1387
1388// Values returns the slice of values for the current page or nil if there are no values.
1389func (page DedicatedHostListResultPage) Values() []DedicatedHost {
1390	if page.dhlr.IsEmpty() {
1391		return nil
1392	}
1393	return *page.dhlr.Value
1394}
1395
1396// Creates a new instance of the DedicatedHostListResultPage type.
1397func NewDedicatedHostListResultPage(cur DedicatedHostListResult, getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage {
1398	return DedicatedHostListResultPage{
1399		fn:   getNextPage,
1400		dhlr: cur,
1401	}
1402}
1403
1404// DedicatedHostProperties properties of the dedicated host.
1405type DedicatedHostProperties struct {
1406	// PlatformFaultDomain - Fault domain of the dedicated host within a dedicated host group.
1407	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
1408	// AutoReplaceOnFailure - Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided.
1409	AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"`
1410	// 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.
1411	HostID *string `json:"hostId,omitempty"`
1412	// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the Dedicated Host.
1413	VirtualMachines *[]SubResourceReadOnly `json:"virtualMachines,omitempty"`
1414	// 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'
1415	LicenseType DedicatedHostLicenseTypes `json:"licenseType,omitempty"`
1416	// ProvisioningTime - READ-ONLY; The date when the host was first provisioned.
1417	ProvisioningTime *date.Time `json:"provisioningTime,omitempty"`
1418	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
1419	ProvisioningState *string `json:"provisioningState,omitempty"`
1420	// InstanceView - READ-ONLY; The dedicated host instance view.
1421	InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty"`
1422}
1423
1424// MarshalJSON is the custom marshaler for DedicatedHostProperties.
1425func (dhp DedicatedHostProperties) MarshalJSON() ([]byte, error) {
1426	objectMap := make(map[string]interface{})
1427	if dhp.PlatformFaultDomain != nil {
1428		objectMap["platformFaultDomain"] = dhp.PlatformFaultDomain
1429	}
1430	if dhp.AutoReplaceOnFailure != nil {
1431		objectMap["autoReplaceOnFailure"] = dhp.AutoReplaceOnFailure
1432	}
1433	if dhp.LicenseType != "" {
1434		objectMap["licenseType"] = dhp.LicenseType
1435	}
1436	return json.Marshal(objectMap)
1437}
1438
1439// DedicatedHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1440// long-running operation.
1441type DedicatedHostsCreateOrUpdateFuture struct {
1442	azure.FutureAPI
1443	// Result returns the result of the asynchronous operation.
1444	// If the operation has not completed it will return an error.
1445	Result func(DedicatedHostsClient) (DedicatedHost, error)
1446}
1447
1448// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1449func (future *DedicatedHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
1450	var azFuture azure.Future
1451	if err := json.Unmarshal(body, &azFuture); err != nil {
1452		return err
1453	}
1454	future.FutureAPI = &azFuture
1455	future.Result = future.result
1456	return nil
1457}
1458
1459// result is the default implementation for DedicatedHostsCreateOrUpdateFuture.Result.
1460func (future *DedicatedHostsCreateOrUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
1461	var done bool
1462	done, err = future.DoneWithContext(context.Background(), client)
1463	if err != nil {
1464		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1465		return
1466	}
1467	if !done {
1468		dh.Response.Response = future.Response()
1469		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsCreateOrUpdateFuture")
1470		return
1471	}
1472	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1473	if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
1474		dh, err = client.CreateOrUpdateResponder(dh.Response.Response)
1475		if err != nil {
1476			err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
1477		}
1478	}
1479	return
1480}
1481
1482// DedicatedHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1483// operation.
1484type DedicatedHostsDeleteFuture struct {
1485	azure.FutureAPI
1486	// Result returns the result of the asynchronous operation.
1487	// If the operation has not completed it will return an error.
1488	Result func(DedicatedHostsClient) (autorest.Response, error)
1489}
1490
1491// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1492func (future *DedicatedHostsDeleteFuture) UnmarshalJSON(body []byte) error {
1493	var azFuture azure.Future
1494	if err := json.Unmarshal(body, &azFuture); err != nil {
1495		return err
1496	}
1497	future.FutureAPI = &azFuture
1498	future.Result = future.result
1499	return nil
1500}
1501
1502// result is the default implementation for DedicatedHostsDeleteFuture.Result.
1503func (future *DedicatedHostsDeleteFuture) result(client DedicatedHostsClient) (ar autorest.Response, err error) {
1504	var done bool
1505	done, err = future.DoneWithContext(context.Background(), client)
1506	if err != nil {
1507		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsDeleteFuture", "Result", future.Response(), "Polling failure")
1508		return
1509	}
1510	if !done {
1511		ar.Response = future.Response()
1512		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsDeleteFuture")
1513		return
1514	}
1515	ar.Response = future.Response()
1516	return
1517}
1518
1519// DedicatedHostsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1520// operation.
1521type DedicatedHostsUpdateFuture struct {
1522	azure.FutureAPI
1523	// Result returns the result of the asynchronous operation.
1524	// If the operation has not completed it will return an error.
1525	Result func(DedicatedHostsClient) (DedicatedHost, error)
1526}
1527
1528// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1529func (future *DedicatedHostsUpdateFuture) UnmarshalJSON(body []byte) error {
1530	var azFuture azure.Future
1531	if err := json.Unmarshal(body, &azFuture); err != nil {
1532		return err
1533	}
1534	future.FutureAPI = &azFuture
1535	future.Result = future.result
1536	return nil
1537}
1538
1539// result is the default implementation for DedicatedHostsUpdateFuture.Result.
1540func (future *DedicatedHostsUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
1541	var done bool
1542	done, err = future.DoneWithContext(context.Background(), client)
1543	if err != nil {
1544		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", future.Response(), "Polling failure")
1545		return
1546	}
1547	if !done {
1548		dh.Response.Response = future.Response()
1549		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsUpdateFuture")
1550		return
1551	}
1552	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1553	if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
1554		dh, err = client.UpdateResponder(dh.Response.Response)
1555		if err != nil {
1556			err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
1557		}
1558	}
1559	return
1560}
1561
1562// DedicatedHostUpdate specifies information about the dedicated host. Only tags, autoReplaceOnFailure and
1563// licenseType may be updated.
1564type DedicatedHostUpdate struct {
1565	*DedicatedHostProperties `json:"properties,omitempty"`
1566	// Tags - Resource tags
1567	Tags map[string]*string `json:"tags"`
1568}
1569
1570// MarshalJSON is the custom marshaler for DedicatedHostUpdate.
1571func (dhu DedicatedHostUpdate) MarshalJSON() ([]byte, error) {
1572	objectMap := make(map[string]interface{})
1573	if dhu.DedicatedHostProperties != nil {
1574		objectMap["properties"] = dhu.DedicatedHostProperties
1575	}
1576	if dhu.Tags != nil {
1577		objectMap["tags"] = dhu.Tags
1578	}
1579	return json.Marshal(objectMap)
1580}
1581
1582// UnmarshalJSON is the custom unmarshaler for DedicatedHostUpdate struct.
1583func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error {
1584	var m map[string]*json.RawMessage
1585	err := json.Unmarshal(body, &m)
1586	if err != nil {
1587		return err
1588	}
1589	for k, v := range m {
1590		switch k {
1591		case "properties":
1592			if v != nil {
1593				var dedicatedHostProperties DedicatedHostProperties
1594				err = json.Unmarshal(*v, &dedicatedHostProperties)
1595				if err != nil {
1596					return err
1597				}
1598				dhu.DedicatedHostProperties = &dedicatedHostProperties
1599			}
1600		case "tags":
1601			if v != nil {
1602				var tags map[string]*string
1603				err = json.Unmarshal(*v, &tags)
1604				if err != nil {
1605					return err
1606				}
1607				dhu.Tags = tags
1608			}
1609		}
1610	}
1611
1612	return nil
1613}
1614
1615// DiagnosticsProfile specifies the boot diagnostic settings state. <br><br>Minimum api-version:
1616// 2015-06-15.
1617type DiagnosticsProfile struct {
1618	// 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.
1619	BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
1620}
1621
1622// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating
1623// system disk. <br><br> NOTE: The ephemeral disk settings can only be specified for managed disk.
1624type DiffDiskSettings struct {
1625	// Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local'
1626	Option DiffDiskOptions `json:"option,omitempty"`
1627	// Placement - Specifies the ephemeral disk placement for operating system disk.<br><br> Possible values are: <br><br> **CacheDisk** <br><br> **ResourceDisk** <br><br> Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.<br><br> Refer to VM size documentation for Windows VM at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'CacheDisk', 'ResourceDisk'
1628	Placement DiffDiskPlacement `json:"placement,omitempty"`
1629}
1630
1631// Disallowed describes the disallowed disk types.
1632type Disallowed struct {
1633	// DiskTypes - A list of disk types.
1634	DiskTypes *[]string `json:"diskTypes,omitempty"`
1635}
1636
1637// DisallowedConfiguration specifies the disallowed configuration for a virtual machine image.
1638type DisallowedConfiguration struct {
1639	// VMDiskType - VM disk types which are disallowed. Possible values include: 'VMDiskTypesNone', 'VMDiskTypesUnmanaged'
1640	VMDiskType VMDiskTypes `json:"vmDiskType,omitempty"`
1641}
1642
1643// Disk disk resource.
1644type Disk struct {
1645	autorest.Response `json:"-"`
1646	// ManagedBy - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
1647	ManagedBy *string `json:"managedBy,omitempty"`
1648	// ManagedByExtended - READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
1649	ManagedByExtended *[]string `json:"managedByExtended,omitempty"`
1650	Sku               *DiskSku  `json:"sku,omitempty"`
1651	// Zones - The Logical zone list for Disk.
1652	Zones *[]string `json:"zones,omitempty"`
1653	// ExtendedLocation - The extended location where the disk will be created. Extended location cannot be changed.
1654	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
1655	*DiskProperties  `json:"properties,omitempty"`
1656	// ID - READ-ONLY; Resource Id
1657	ID *string `json:"id,omitempty"`
1658	// Name - READ-ONLY; Resource name
1659	Name *string `json:"name,omitempty"`
1660	// Type - READ-ONLY; Resource type
1661	Type *string `json:"type,omitempty"`
1662	// Location - Resource location
1663	Location *string `json:"location,omitempty"`
1664	// Tags - Resource tags
1665	Tags map[string]*string `json:"tags"`
1666}
1667
1668// MarshalJSON is the custom marshaler for Disk.
1669func (d Disk) MarshalJSON() ([]byte, error) {
1670	objectMap := make(map[string]interface{})
1671	if d.Sku != nil {
1672		objectMap["sku"] = d.Sku
1673	}
1674	if d.Zones != nil {
1675		objectMap["zones"] = d.Zones
1676	}
1677	if d.ExtendedLocation != nil {
1678		objectMap["extendedLocation"] = d.ExtendedLocation
1679	}
1680	if d.DiskProperties != nil {
1681		objectMap["properties"] = d.DiskProperties
1682	}
1683	if d.Location != nil {
1684		objectMap["location"] = d.Location
1685	}
1686	if d.Tags != nil {
1687		objectMap["tags"] = d.Tags
1688	}
1689	return json.Marshal(objectMap)
1690}
1691
1692// UnmarshalJSON is the custom unmarshaler for Disk struct.
1693func (d *Disk) UnmarshalJSON(body []byte) error {
1694	var m map[string]*json.RawMessage
1695	err := json.Unmarshal(body, &m)
1696	if err != nil {
1697		return err
1698	}
1699	for k, v := range m {
1700		switch k {
1701		case "managedBy":
1702			if v != nil {
1703				var managedBy string
1704				err = json.Unmarshal(*v, &managedBy)
1705				if err != nil {
1706					return err
1707				}
1708				d.ManagedBy = &managedBy
1709			}
1710		case "managedByExtended":
1711			if v != nil {
1712				var managedByExtended []string
1713				err = json.Unmarshal(*v, &managedByExtended)
1714				if err != nil {
1715					return err
1716				}
1717				d.ManagedByExtended = &managedByExtended
1718			}
1719		case "sku":
1720			if v != nil {
1721				var sku DiskSku
1722				err = json.Unmarshal(*v, &sku)
1723				if err != nil {
1724					return err
1725				}
1726				d.Sku = &sku
1727			}
1728		case "zones":
1729			if v != nil {
1730				var zones []string
1731				err = json.Unmarshal(*v, &zones)
1732				if err != nil {
1733					return err
1734				}
1735				d.Zones = &zones
1736			}
1737		case "extendedLocation":
1738			if v != nil {
1739				var extendedLocation ExtendedLocation
1740				err = json.Unmarshal(*v, &extendedLocation)
1741				if err != nil {
1742					return err
1743				}
1744				d.ExtendedLocation = &extendedLocation
1745			}
1746		case "properties":
1747			if v != nil {
1748				var diskProperties DiskProperties
1749				err = json.Unmarshal(*v, &diskProperties)
1750				if err != nil {
1751					return err
1752				}
1753				d.DiskProperties = &diskProperties
1754			}
1755		case "id":
1756			if v != nil {
1757				var ID string
1758				err = json.Unmarshal(*v, &ID)
1759				if err != nil {
1760					return err
1761				}
1762				d.ID = &ID
1763			}
1764		case "name":
1765			if v != nil {
1766				var name string
1767				err = json.Unmarshal(*v, &name)
1768				if err != nil {
1769					return err
1770				}
1771				d.Name = &name
1772			}
1773		case "type":
1774			if v != nil {
1775				var typeVar string
1776				err = json.Unmarshal(*v, &typeVar)
1777				if err != nil {
1778					return err
1779				}
1780				d.Type = &typeVar
1781			}
1782		case "location":
1783			if v != nil {
1784				var location string
1785				err = json.Unmarshal(*v, &location)
1786				if err != nil {
1787					return err
1788				}
1789				d.Location = &location
1790			}
1791		case "tags":
1792			if v != nil {
1793				var tags map[string]*string
1794				err = json.Unmarshal(*v, &tags)
1795				if err != nil {
1796					return err
1797				}
1798				d.Tags = tags
1799			}
1800		}
1801	}
1802
1803	return nil
1804}
1805
1806// DiskAccess disk access resource.
1807type DiskAccess struct {
1808	autorest.Response     `json:"-"`
1809	*DiskAccessProperties `json:"properties,omitempty"`
1810	// ID - READ-ONLY; Resource Id
1811	ID *string `json:"id,omitempty"`
1812	// Name - READ-ONLY; Resource name
1813	Name *string `json:"name,omitempty"`
1814	// Type - READ-ONLY; Resource type
1815	Type *string `json:"type,omitempty"`
1816	// Location - Resource location
1817	Location *string `json:"location,omitempty"`
1818	// Tags - Resource tags
1819	Tags map[string]*string `json:"tags"`
1820}
1821
1822// MarshalJSON is the custom marshaler for DiskAccess.
1823func (da DiskAccess) MarshalJSON() ([]byte, error) {
1824	objectMap := make(map[string]interface{})
1825	if da.DiskAccessProperties != nil {
1826		objectMap["properties"] = da.DiskAccessProperties
1827	}
1828	if da.Location != nil {
1829		objectMap["location"] = da.Location
1830	}
1831	if da.Tags != nil {
1832		objectMap["tags"] = da.Tags
1833	}
1834	return json.Marshal(objectMap)
1835}
1836
1837// UnmarshalJSON is the custom unmarshaler for DiskAccess struct.
1838func (da *DiskAccess) UnmarshalJSON(body []byte) error {
1839	var m map[string]*json.RawMessage
1840	err := json.Unmarshal(body, &m)
1841	if err != nil {
1842		return err
1843	}
1844	for k, v := range m {
1845		switch k {
1846		case "properties":
1847			if v != nil {
1848				var diskAccessProperties DiskAccessProperties
1849				err = json.Unmarshal(*v, &diskAccessProperties)
1850				if err != nil {
1851					return err
1852				}
1853				da.DiskAccessProperties = &diskAccessProperties
1854			}
1855		case "id":
1856			if v != nil {
1857				var ID string
1858				err = json.Unmarshal(*v, &ID)
1859				if err != nil {
1860					return err
1861				}
1862				da.ID = &ID
1863			}
1864		case "name":
1865			if v != nil {
1866				var name string
1867				err = json.Unmarshal(*v, &name)
1868				if err != nil {
1869					return err
1870				}
1871				da.Name = &name
1872			}
1873		case "type":
1874			if v != nil {
1875				var typeVar string
1876				err = json.Unmarshal(*v, &typeVar)
1877				if err != nil {
1878					return err
1879				}
1880				da.Type = &typeVar
1881			}
1882		case "location":
1883			if v != nil {
1884				var location string
1885				err = json.Unmarshal(*v, &location)
1886				if err != nil {
1887					return err
1888				}
1889				da.Location = &location
1890			}
1891		case "tags":
1892			if v != nil {
1893				var tags map[string]*string
1894				err = json.Unmarshal(*v, &tags)
1895				if err != nil {
1896					return err
1897				}
1898				da.Tags = tags
1899			}
1900		}
1901	}
1902
1903	return nil
1904}
1905
1906// DiskAccessesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1907// long-running operation.
1908type DiskAccessesCreateOrUpdateFuture struct {
1909	azure.FutureAPI
1910	// Result returns the result of the asynchronous operation.
1911	// If the operation has not completed it will return an error.
1912	Result func(DiskAccessesClient) (DiskAccess, error)
1913}
1914
1915// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1916func (future *DiskAccessesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
1917	var azFuture azure.Future
1918	if err := json.Unmarshal(body, &azFuture); err != nil {
1919		return err
1920	}
1921	future.FutureAPI = &azFuture
1922	future.Result = future.result
1923	return nil
1924}
1925
1926// result is the default implementation for DiskAccessesCreateOrUpdateFuture.Result.
1927func (future *DiskAccessesCreateOrUpdateFuture) result(client DiskAccessesClient) (da DiskAccess, err error) {
1928	var done bool
1929	done, err = future.DoneWithContext(context.Background(), client)
1930	if err != nil {
1931		err = autorest.NewErrorWithError(err, "compute.DiskAccessesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1932		return
1933	}
1934	if !done {
1935		da.Response.Response = future.Response()
1936		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesCreateOrUpdateFuture")
1937		return
1938	}
1939	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1940	if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
1941		da, err = client.CreateOrUpdateResponder(da.Response.Response)
1942		if err != nil {
1943			err = autorest.NewErrorWithError(err, "compute.DiskAccessesCreateOrUpdateFuture", "Result", da.Response.Response, "Failure responding to request")
1944		}
1945	}
1946	return
1947}
1948
1949// DiskAccessesDeleteAPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the
1950// results of a long-running operation.
1951type DiskAccessesDeleteAPrivateEndpointConnectionFuture struct {
1952	azure.FutureAPI
1953	// Result returns the result of the asynchronous operation.
1954	// If the operation has not completed it will return an error.
1955	Result func(DiskAccessesClient) (autorest.Response, error)
1956}
1957
1958// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1959func (future *DiskAccessesDeleteAPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
1960	var azFuture azure.Future
1961	if err := json.Unmarshal(body, &azFuture); err != nil {
1962		return err
1963	}
1964	future.FutureAPI = &azFuture
1965	future.Result = future.result
1966	return nil
1967}
1968
1969// result is the default implementation for DiskAccessesDeleteAPrivateEndpointConnectionFuture.Result.
1970func (future *DiskAccessesDeleteAPrivateEndpointConnectionFuture) result(client DiskAccessesClient) (ar autorest.Response, err error) {
1971	var done bool
1972	done, err = future.DoneWithContext(context.Background(), client)
1973	if err != nil {
1974		err = autorest.NewErrorWithError(err, "compute.DiskAccessesDeleteAPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
1975		return
1976	}
1977	if !done {
1978		ar.Response = future.Response()
1979		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesDeleteAPrivateEndpointConnectionFuture")
1980		return
1981	}
1982	ar.Response = future.Response()
1983	return
1984}
1985
1986// DiskAccessesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1987// operation.
1988type DiskAccessesDeleteFuture struct {
1989	azure.FutureAPI
1990	// Result returns the result of the asynchronous operation.
1991	// If the operation has not completed it will return an error.
1992	Result func(DiskAccessesClient) (autorest.Response, error)
1993}
1994
1995// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1996func (future *DiskAccessesDeleteFuture) UnmarshalJSON(body []byte) error {
1997	var azFuture azure.Future
1998	if err := json.Unmarshal(body, &azFuture); err != nil {
1999		return err
2000	}
2001	future.FutureAPI = &azFuture
2002	future.Result = future.result
2003	return nil
2004}
2005
2006// result is the default implementation for DiskAccessesDeleteFuture.Result.
2007func (future *DiskAccessesDeleteFuture) result(client DiskAccessesClient) (ar autorest.Response, err error) {
2008	var done bool
2009	done, err = future.DoneWithContext(context.Background(), client)
2010	if err != nil {
2011		err = autorest.NewErrorWithError(err, "compute.DiskAccessesDeleteFuture", "Result", future.Response(), "Polling failure")
2012		return
2013	}
2014	if !done {
2015		ar.Response = future.Response()
2016		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesDeleteFuture")
2017		return
2018	}
2019	ar.Response = future.Response()
2020	return
2021}
2022
2023// DiskAccessesUpdateAPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the
2024// results of a long-running operation.
2025type DiskAccessesUpdateAPrivateEndpointConnectionFuture struct {
2026	azure.FutureAPI
2027	// Result returns the result of the asynchronous operation.
2028	// If the operation has not completed it will return an error.
2029	Result func(DiskAccessesClient) (PrivateEndpointConnection, error)
2030}
2031
2032// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2033func (future *DiskAccessesUpdateAPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
2034	var azFuture azure.Future
2035	if err := json.Unmarshal(body, &azFuture); err != nil {
2036		return err
2037	}
2038	future.FutureAPI = &azFuture
2039	future.Result = future.result
2040	return nil
2041}
2042
2043// result is the default implementation for DiskAccessesUpdateAPrivateEndpointConnectionFuture.Result.
2044func (future *DiskAccessesUpdateAPrivateEndpointConnectionFuture) result(client DiskAccessesClient) (pec PrivateEndpointConnection, err error) {
2045	var done bool
2046	done, err = future.DoneWithContext(context.Background(), client)
2047	if err != nil {
2048		err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
2049		return
2050	}
2051	if !done {
2052		pec.Response.Response = future.Response()
2053		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture")
2054		return
2055	}
2056	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2057	if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent {
2058		pec, err = client.UpdateAPrivateEndpointConnectionResponder(pec.Response.Response)
2059		if err != nil {
2060			err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture", "Result", pec.Response.Response, "Failure responding to request")
2061		}
2062	}
2063	return
2064}
2065
2066// DiskAccessesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
2067// operation.
2068type DiskAccessesUpdateFuture struct {
2069	azure.FutureAPI
2070	// Result returns the result of the asynchronous operation.
2071	// If the operation has not completed it will return an error.
2072	Result func(DiskAccessesClient) (DiskAccess, error)
2073}
2074
2075// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2076func (future *DiskAccessesUpdateFuture) UnmarshalJSON(body []byte) error {
2077	var azFuture azure.Future
2078	if err := json.Unmarshal(body, &azFuture); err != nil {
2079		return err
2080	}
2081	future.FutureAPI = &azFuture
2082	future.Result = future.result
2083	return nil
2084}
2085
2086// result is the default implementation for DiskAccessesUpdateFuture.Result.
2087func (future *DiskAccessesUpdateFuture) result(client DiskAccessesClient) (da DiskAccess, err error) {
2088	var done bool
2089	done, err = future.DoneWithContext(context.Background(), client)
2090	if err != nil {
2091		err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateFuture", "Result", future.Response(), "Polling failure")
2092		return
2093	}
2094	if !done {
2095		da.Response.Response = future.Response()
2096		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesUpdateFuture")
2097		return
2098	}
2099	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2100	if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
2101		da, err = client.UpdateResponder(da.Response.Response)
2102		if err != nil {
2103			err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateFuture", "Result", da.Response.Response, "Failure responding to request")
2104		}
2105	}
2106	return
2107}
2108
2109// DiskAccessList the List disk access operation response.
2110type DiskAccessList struct {
2111	autorest.Response `json:"-"`
2112	// Value - A list of disk access resources.
2113	Value *[]DiskAccess `json:"value,omitempty"`
2114	// NextLink - The uri to fetch the next page of disk access resources. Call ListNext() with this to fetch the next page of disk access resources.
2115	NextLink *string `json:"nextLink,omitempty"`
2116}
2117
2118// DiskAccessListIterator provides access to a complete listing of DiskAccess values.
2119type DiskAccessListIterator struct {
2120	i    int
2121	page DiskAccessListPage
2122}
2123
2124// NextWithContext advances to the next value.  If there was an error making
2125// the request the iterator does not advance and the error is returned.
2126func (iter *DiskAccessListIterator) NextWithContext(ctx context.Context) (err error) {
2127	if tracing.IsEnabled() {
2128		ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListIterator.NextWithContext")
2129		defer func() {
2130			sc := -1
2131			if iter.Response().Response.Response != nil {
2132				sc = iter.Response().Response.Response.StatusCode
2133			}
2134			tracing.EndSpan(ctx, sc, err)
2135		}()
2136	}
2137	iter.i++
2138	if iter.i < len(iter.page.Values()) {
2139		return nil
2140	}
2141	err = iter.page.NextWithContext(ctx)
2142	if err != nil {
2143		iter.i--
2144		return err
2145	}
2146	iter.i = 0
2147	return nil
2148}
2149
2150// Next advances to the next value.  If there was an error making
2151// the request the iterator does not advance and the error is returned.
2152// Deprecated: Use NextWithContext() instead.
2153func (iter *DiskAccessListIterator) Next() error {
2154	return iter.NextWithContext(context.Background())
2155}
2156
2157// NotDone returns true if the enumeration should be started or is not yet complete.
2158func (iter DiskAccessListIterator) NotDone() bool {
2159	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2160}
2161
2162// Response returns the raw server response from the last page request.
2163func (iter DiskAccessListIterator) Response() DiskAccessList {
2164	return iter.page.Response()
2165}
2166
2167// Value returns the current value or a zero-initialized value if the
2168// iterator has advanced beyond the end of the collection.
2169func (iter DiskAccessListIterator) Value() DiskAccess {
2170	if !iter.page.NotDone() {
2171		return DiskAccess{}
2172	}
2173	return iter.page.Values()[iter.i]
2174}
2175
2176// Creates a new instance of the DiskAccessListIterator type.
2177func NewDiskAccessListIterator(page DiskAccessListPage) DiskAccessListIterator {
2178	return DiskAccessListIterator{page: page}
2179}
2180
2181// IsEmpty returns true if the ListResult contains no values.
2182func (dal DiskAccessList) IsEmpty() bool {
2183	return dal.Value == nil || len(*dal.Value) == 0
2184}
2185
2186// hasNextLink returns true if the NextLink is not empty.
2187func (dal DiskAccessList) hasNextLink() bool {
2188	return dal.NextLink != nil && len(*dal.NextLink) != 0
2189}
2190
2191// diskAccessListPreparer prepares a request to retrieve the next set of results.
2192// It returns nil if no more results exist.
2193func (dal DiskAccessList) diskAccessListPreparer(ctx context.Context) (*http.Request, error) {
2194	if !dal.hasNextLink() {
2195		return nil, nil
2196	}
2197	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2198		autorest.AsJSON(),
2199		autorest.AsGet(),
2200		autorest.WithBaseURL(to.String(dal.NextLink)))
2201}
2202
2203// DiskAccessListPage contains a page of DiskAccess values.
2204type DiskAccessListPage struct {
2205	fn  func(context.Context, DiskAccessList) (DiskAccessList, error)
2206	dal DiskAccessList
2207}
2208
2209// NextWithContext advances to the next page of values.  If there was an error making
2210// the request the page does not advance and the error is returned.
2211func (page *DiskAccessListPage) NextWithContext(ctx context.Context) (err error) {
2212	if tracing.IsEnabled() {
2213		ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListPage.NextWithContext")
2214		defer func() {
2215			sc := -1
2216			if page.Response().Response.Response != nil {
2217				sc = page.Response().Response.Response.StatusCode
2218			}
2219			tracing.EndSpan(ctx, sc, err)
2220		}()
2221	}
2222	for {
2223		next, err := page.fn(ctx, page.dal)
2224		if err != nil {
2225			return err
2226		}
2227		page.dal = next
2228		if !next.hasNextLink() || !next.IsEmpty() {
2229			break
2230		}
2231	}
2232	return nil
2233}
2234
2235// Next advances to the next page of values.  If there was an error making
2236// the request the page does not advance and the error is returned.
2237// Deprecated: Use NextWithContext() instead.
2238func (page *DiskAccessListPage) Next() error {
2239	return page.NextWithContext(context.Background())
2240}
2241
2242// NotDone returns true if the page enumeration should be started or is not yet complete.
2243func (page DiskAccessListPage) NotDone() bool {
2244	return !page.dal.IsEmpty()
2245}
2246
2247// Response returns the raw server response from the last page request.
2248func (page DiskAccessListPage) Response() DiskAccessList {
2249	return page.dal
2250}
2251
2252// Values returns the slice of values for the current page or nil if there are no values.
2253func (page DiskAccessListPage) Values() []DiskAccess {
2254	if page.dal.IsEmpty() {
2255		return nil
2256	}
2257	return *page.dal.Value
2258}
2259
2260// Creates a new instance of the DiskAccessListPage type.
2261func NewDiskAccessListPage(cur DiskAccessList, getNextPage func(context.Context, DiskAccessList) (DiskAccessList, error)) DiskAccessListPage {
2262	return DiskAccessListPage{
2263		fn:  getNextPage,
2264		dal: cur,
2265	}
2266}
2267
2268// DiskAccessProperties ...
2269type DiskAccessProperties struct {
2270	// PrivateEndpointConnections - READ-ONLY; A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection is supported.
2271	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
2272	// ProvisioningState - READ-ONLY; The disk access resource provisioning state.
2273	ProvisioningState *string `json:"provisioningState,omitempty"`
2274	// TimeCreated - READ-ONLY; The time when the disk access was created.
2275	TimeCreated *date.Time `json:"timeCreated,omitempty"`
2276}
2277
2278// MarshalJSON is the custom marshaler for DiskAccessProperties.
2279func (dap DiskAccessProperties) MarshalJSON() ([]byte, error) {
2280	objectMap := make(map[string]interface{})
2281	return json.Marshal(objectMap)
2282}
2283
2284// DiskAccessUpdate used for updating a disk access resource.
2285type DiskAccessUpdate struct {
2286	// Tags - Resource tags
2287	Tags map[string]*string `json:"tags"`
2288}
2289
2290// MarshalJSON is the custom marshaler for DiskAccessUpdate.
2291func (dau DiskAccessUpdate) MarshalJSON() ([]byte, error) {
2292	objectMap := make(map[string]interface{})
2293	if dau.Tags != nil {
2294		objectMap["tags"] = dau.Tags
2295	}
2296	return json.Marshal(objectMap)
2297}
2298
2299// DiskEncryptionSet disk encryption set resource.
2300type DiskEncryptionSet struct {
2301	autorest.Response        `json:"-"`
2302	Identity                 *EncryptionSetIdentity `json:"identity,omitempty"`
2303	*EncryptionSetProperties `json:"properties,omitempty"`
2304	// ID - READ-ONLY; Resource Id
2305	ID *string `json:"id,omitempty"`
2306	// Name - READ-ONLY; Resource name
2307	Name *string `json:"name,omitempty"`
2308	// Type - READ-ONLY; Resource type
2309	Type *string `json:"type,omitempty"`
2310	// Location - Resource location
2311	Location *string `json:"location,omitempty"`
2312	// Tags - Resource tags
2313	Tags map[string]*string `json:"tags"`
2314}
2315
2316// MarshalJSON is the custom marshaler for DiskEncryptionSet.
2317func (desVar DiskEncryptionSet) MarshalJSON() ([]byte, error) {
2318	objectMap := make(map[string]interface{})
2319	if desVar.Identity != nil {
2320		objectMap["identity"] = desVar.Identity
2321	}
2322	if desVar.EncryptionSetProperties != nil {
2323		objectMap["properties"] = desVar.EncryptionSetProperties
2324	}
2325	if desVar.Location != nil {
2326		objectMap["location"] = desVar.Location
2327	}
2328	if desVar.Tags != nil {
2329		objectMap["tags"] = desVar.Tags
2330	}
2331	return json.Marshal(objectMap)
2332}
2333
2334// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSet struct.
2335func (desVar *DiskEncryptionSet) UnmarshalJSON(body []byte) error {
2336	var m map[string]*json.RawMessage
2337	err := json.Unmarshal(body, &m)
2338	if err != nil {
2339		return err
2340	}
2341	for k, v := range m {
2342		switch k {
2343		case "identity":
2344			if v != nil {
2345				var identity EncryptionSetIdentity
2346				err = json.Unmarshal(*v, &identity)
2347				if err != nil {
2348					return err
2349				}
2350				desVar.Identity = &identity
2351			}
2352		case "properties":
2353			if v != nil {
2354				var encryptionSetProperties EncryptionSetProperties
2355				err = json.Unmarshal(*v, &encryptionSetProperties)
2356				if err != nil {
2357					return err
2358				}
2359				desVar.EncryptionSetProperties = &encryptionSetProperties
2360			}
2361		case "id":
2362			if v != nil {
2363				var ID string
2364				err = json.Unmarshal(*v, &ID)
2365				if err != nil {
2366					return err
2367				}
2368				desVar.ID = &ID
2369			}
2370		case "name":
2371			if v != nil {
2372				var name string
2373				err = json.Unmarshal(*v, &name)
2374				if err != nil {
2375					return err
2376				}
2377				desVar.Name = &name
2378			}
2379		case "type":
2380			if v != nil {
2381				var typeVar string
2382				err = json.Unmarshal(*v, &typeVar)
2383				if err != nil {
2384					return err
2385				}
2386				desVar.Type = &typeVar
2387			}
2388		case "location":
2389			if v != nil {
2390				var location string
2391				err = json.Unmarshal(*v, &location)
2392				if err != nil {
2393					return err
2394				}
2395				desVar.Location = &location
2396			}
2397		case "tags":
2398			if v != nil {
2399				var tags map[string]*string
2400				err = json.Unmarshal(*v, &tags)
2401				if err != nil {
2402					return err
2403				}
2404				desVar.Tags = tags
2405			}
2406		}
2407	}
2408
2409	return nil
2410}
2411
2412// DiskEncryptionSetList the List disk encryption set operation response.
2413type DiskEncryptionSetList struct {
2414	autorest.Response `json:"-"`
2415	// Value - A list of disk encryption sets.
2416	Value *[]DiskEncryptionSet `json:"value,omitempty"`
2417	// NextLink - The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the next page of disk encryption sets.
2418	NextLink *string `json:"nextLink,omitempty"`
2419}
2420
2421// DiskEncryptionSetListIterator provides access to a complete listing of DiskEncryptionSet values.
2422type DiskEncryptionSetListIterator struct {
2423	i    int
2424	page DiskEncryptionSetListPage
2425}
2426
2427// NextWithContext advances to the next value.  If there was an error making
2428// the request the iterator does not advance and the error is returned.
2429func (iter *DiskEncryptionSetListIterator) NextWithContext(ctx context.Context) (err error) {
2430	if tracing.IsEnabled() {
2431		ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListIterator.NextWithContext")
2432		defer func() {
2433			sc := -1
2434			if iter.Response().Response.Response != nil {
2435				sc = iter.Response().Response.Response.StatusCode
2436			}
2437			tracing.EndSpan(ctx, sc, err)
2438		}()
2439	}
2440	iter.i++
2441	if iter.i < len(iter.page.Values()) {
2442		return nil
2443	}
2444	err = iter.page.NextWithContext(ctx)
2445	if err != nil {
2446		iter.i--
2447		return err
2448	}
2449	iter.i = 0
2450	return nil
2451}
2452
2453// Next advances to the next value.  If there was an error making
2454// the request the iterator does not advance and the error is returned.
2455// Deprecated: Use NextWithContext() instead.
2456func (iter *DiskEncryptionSetListIterator) Next() error {
2457	return iter.NextWithContext(context.Background())
2458}
2459
2460// NotDone returns true if the enumeration should be started or is not yet complete.
2461func (iter DiskEncryptionSetListIterator) NotDone() bool {
2462	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2463}
2464
2465// Response returns the raw server response from the last page request.
2466func (iter DiskEncryptionSetListIterator) Response() DiskEncryptionSetList {
2467	return iter.page.Response()
2468}
2469
2470// Value returns the current value or a zero-initialized value if the
2471// iterator has advanced beyond the end of the collection.
2472func (iter DiskEncryptionSetListIterator) Value() DiskEncryptionSet {
2473	if !iter.page.NotDone() {
2474		return DiskEncryptionSet{}
2475	}
2476	return iter.page.Values()[iter.i]
2477}
2478
2479// Creates a new instance of the DiskEncryptionSetListIterator type.
2480func NewDiskEncryptionSetListIterator(page DiskEncryptionSetListPage) DiskEncryptionSetListIterator {
2481	return DiskEncryptionSetListIterator{page: page}
2482}
2483
2484// IsEmpty returns true if the ListResult contains no values.
2485func (desl DiskEncryptionSetList) IsEmpty() bool {
2486	return desl.Value == nil || len(*desl.Value) == 0
2487}
2488
2489// hasNextLink returns true if the NextLink is not empty.
2490func (desl DiskEncryptionSetList) hasNextLink() bool {
2491	return desl.NextLink != nil && len(*desl.NextLink) != 0
2492}
2493
2494// diskEncryptionSetListPreparer prepares a request to retrieve the next set of results.
2495// It returns nil if no more results exist.
2496func (desl DiskEncryptionSetList) diskEncryptionSetListPreparer(ctx context.Context) (*http.Request, error) {
2497	if !desl.hasNextLink() {
2498		return nil, nil
2499	}
2500	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2501		autorest.AsJSON(),
2502		autorest.AsGet(),
2503		autorest.WithBaseURL(to.String(desl.NextLink)))
2504}
2505
2506// DiskEncryptionSetListPage contains a page of DiskEncryptionSet values.
2507type DiskEncryptionSetListPage struct {
2508	fn   func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)
2509	desl DiskEncryptionSetList
2510}
2511
2512// NextWithContext advances to the next page of values.  If there was an error making
2513// the request the page does not advance and the error is returned.
2514func (page *DiskEncryptionSetListPage) NextWithContext(ctx context.Context) (err error) {
2515	if tracing.IsEnabled() {
2516		ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListPage.NextWithContext")
2517		defer func() {
2518			sc := -1
2519			if page.Response().Response.Response != nil {
2520				sc = page.Response().Response.Response.StatusCode
2521			}
2522			tracing.EndSpan(ctx, sc, err)
2523		}()
2524	}
2525	for {
2526		next, err := page.fn(ctx, page.desl)
2527		if err != nil {
2528			return err
2529		}
2530		page.desl = next
2531		if !next.hasNextLink() || !next.IsEmpty() {
2532			break
2533		}
2534	}
2535	return nil
2536}
2537
2538// Next advances to the next page of values.  If there was an error making
2539// the request the page does not advance and the error is returned.
2540// Deprecated: Use NextWithContext() instead.
2541func (page *DiskEncryptionSetListPage) Next() error {
2542	return page.NextWithContext(context.Background())
2543}
2544
2545// NotDone returns true if the page enumeration should be started or is not yet complete.
2546func (page DiskEncryptionSetListPage) NotDone() bool {
2547	return !page.desl.IsEmpty()
2548}
2549
2550// Response returns the raw server response from the last page request.
2551func (page DiskEncryptionSetListPage) Response() DiskEncryptionSetList {
2552	return page.desl
2553}
2554
2555// Values returns the slice of values for the current page or nil if there are no values.
2556func (page DiskEncryptionSetListPage) Values() []DiskEncryptionSet {
2557	if page.desl.IsEmpty() {
2558		return nil
2559	}
2560	return *page.desl.Value
2561}
2562
2563// Creates a new instance of the DiskEncryptionSetListPage type.
2564func NewDiskEncryptionSetListPage(cur DiskEncryptionSetList, getNextPage func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)) DiskEncryptionSetListPage {
2565	return DiskEncryptionSetListPage{
2566		fn:   getNextPage,
2567		desl: cur,
2568	}
2569}
2570
2571// DiskEncryptionSetParameters describes the parameter of customer managed disk encryption set resource id
2572// that can be specified for disk. <br><br> NOTE: The disk encryption set resource id can only be specified
2573// for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.
2574type DiskEncryptionSetParameters struct {
2575	// ID - Resource Id
2576	ID *string `json:"id,omitempty"`
2577}
2578
2579// DiskEncryptionSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2580// long-running operation.
2581type DiskEncryptionSetsCreateOrUpdateFuture struct {
2582	azure.FutureAPI
2583	// Result returns the result of the asynchronous operation.
2584	// If the operation has not completed it will return an error.
2585	Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
2586}
2587
2588// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2589func (future *DiskEncryptionSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2590	var azFuture azure.Future
2591	if err := json.Unmarshal(body, &azFuture); err != nil {
2592		return err
2593	}
2594	future.FutureAPI = &azFuture
2595	future.Result = future.result
2596	return nil
2597}
2598
2599// result is the default implementation for DiskEncryptionSetsCreateOrUpdateFuture.Result.
2600func (future *DiskEncryptionSetsCreateOrUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
2601	var done bool
2602	done, err = future.DoneWithContext(context.Background(), client)
2603	if err != nil {
2604		err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2605		return
2606	}
2607	if !done {
2608		desVar.Response.Response = future.Response()
2609		err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsCreateOrUpdateFuture")
2610		return
2611	}
2612	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2613	if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
2614		desVar, err = client.CreateOrUpdateResponder(desVar.Response.Response)
2615		if err != nil {
2616			err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
2617		}
2618	}
2619	return
2620}
2621
2622// DiskEncryptionSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
2623// long-running operation.
2624type DiskEncryptionSetsDeleteFuture struct {
2625	azure.FutureAPI
2626	// Result returns the result of the asynchronous operation.
2627	// If the operation has not completed it will return an error.
2628	Result func(DiskEncryptionSetsClient) (autorest.Response, error)
2629}
2630
2631// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2632func (future *DiskEncryptionSetsDeleteFuture) UnmarshalJSON(body []byte) error {
2633	var azFuture azure.Future
2634	if err := json.Unmarshal(body, &azFuture); err != nil {
2635		return err
2636	}
2637	future.FutureAPI = &azFuture
2638	future.Result = future.result
2639	return nil
2640}
2641
2642// result is the default implementation for DiskEncryptionSetsDeleteFuture.Result.
2643func (future *DiskEncryptionSetsDeleteFuture) result(client DiskEncryptionSetsClient) (ar autorest.Response, err error) {
2644	var done bool
2645	done, err = future.DoneWithContext(context.Background(), client)
2646	if err != nil {
2647		err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsDeleteFuture", "Result", future.Response(), "Polling failure")
2648		return
2649	}
2650	if !done {
2651		ar.Response = future.Response()
2652		err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsDeleteFuture")
2653		return
2654	}
2655	ar.Response = future.Response()
2656	return
2657}
2658
2659// DiskEncryptionSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
2660// long-running operation.
2661type DiskEncryptionSetsUpdateFuture struct {
2662	azure.FutureAPI
2663	// Result returns the result of the asynchronous operation.
2664	// If the operation has not completed it will return an error.
2665	Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
2666}
2667
2668// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2669func (future *DiskEncryptionSetsUpdateFuture) UnmarshalJSON(body []byte) error {
2670	var azFuture azure.Future
2671	if err := json.Unmarshal(body, &azFuture); err != nil {
2672		return err
2673	}
2674	future.FutureAPI = &azFuture
2675	future.Result = future.result
2676	return nil
2677}
2678
2679// result is the default implementation for DiskEncryptionSetsUpdateFuture.Result.
2680func (future *DiskEncryptionSetsUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
2681	var done bool
2682	done, err = future.DoneWithContext(context.Background(), client)
2683	if err != nil {
2684		err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", future.Response(), "Polling failure")
2685		return
2686	}
2687	if !done {
2688		desVar.Response.Response = future.Response()
2689		err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsUpdateFuture")
2690		return
2691	}
2692	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2693	if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
2694		desVar, err = client.UpdateResponder(desVar.Response.Response)
2695		if err != nil {
2696			err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
2697		}
2698	}
2699	return
2700}
2701
2702// DiskEncryptionSettings describes a Encryption Settings for a Disk
2703type DiskEncryptionSettings struct {
2704	// DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret.
2705	DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"`
2706	// KeyEncryptionKey - Specifies the location of the key encryption key in Key Vault.
2707	KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"`
2708	// Enabled - Specifies whether disk encryption should be enabled on the virtual machine.
2709	Enabled *bool `json:"enabled,omitempty"`
2710}
2711
2712// DiskEncryptionSetUpdate disk encryption set update resource.
2713type DiskEncryptionSetUpdate struct {
2714	*DiskEncryptionSetUpdateProperties `json:"properties,omitempty"`
2715	// Tags - Resource tags
2716	Tags     map[string]*string     `json:"tags"`
2717	Identity *EncryptionSetIdentity `json:"identity,omitempty"`
2718}
2719
2720// MarshalJSON is the custom marshaler for DiskEncryptionSetUpdate.
2721func (desu DiskEncryptionSetUpdate) MarshalJSON() ([]byte, error) {
2722	objectMap := make(map[string]interface{})
2723	if desu.DiskEncryptionSetUpdateProperties != nil {
2724		objectMap["properties"] = desu.DiskEncryptionSetUpdateProperties
2725	}
2726	if desu.Tags != nil {
2727		objectMap["tags"] = desu.Tags
2728	}
2729	if desu.Identity != nil {
2730		objectMap["identity"] = desu.Identity
2731	}
2732	return json.Marshal(objectMap)
2733}
2734
2735// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSetUpdate struct.
2736func (desu *DiskEncryptionSetUpdate) UnmarshalJSON(body []byte) error {
2737	var m map[string]*json.RawMessage
2738	err := json.Unmarshal(body, &m)
2739	if err != nil {
2740		return err
2741	}
2742	for k, v := range m {
2743		switch k {
2744		case "properties":
2745			if v != nil {
2746				var diskEncryptionSetUpdateProperties DiskEncryptionSetUpdateProperties
2747				err = json.Unmarshal(*v, &diskEncryptionSetUpdateProperties)
2748				if err != nil {
2749					return err
2750				}
2751				desu.DiskEncryptionSetUpdateProperties = &diskEncryptionSetUpdateProperties
2752			}
2753		case "tags":
2754			if v != nil {
2755				var tags map[string]*string
2756				err = json.Unmarshal(*v, &tags)
2757				if err != nil {
2758					return err
2759				}
2760				desu.Tags = tags
2761			}
2762		case "identity":
2763			if v != nil {
2764				var identity EncryptionSetIdentity
2765				err = json.Unmarshal(*v, &identity)
2766				if err != nil {
2767					return err
2768				}
2769				desu.Identity = &identity
2770			}
2771		}
2772	}
2773
2774	return nil
2775}
2776
2777// DiskEncryptionSetUpdateProperties disk encryption set resource update properties.
2778type DiskEncryptionSetUpdateProperties struct {
2779	// EncryptionType - Possible values include: 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys'
2780	EncryptionType DiskEncryptionSetType    `json:"encryptionType,omitempty"`
2781	ActiveKey      *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`
2782	// RotationToLatestKeyVersionEnabled - Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.
2783	RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"`
2784}
2785
2786// DiskImageEncryption this is the disk image encryption base class.
2787type DiskImageEncryption struct {
2788	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
2789	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
2790}
2791
2792// DiskInstanceView the instance view of the disk.
2793type DiskInstanceView struct {
2794	// Name - The disk name.
2795	Name *string `json:"name,omitempty"`
2796	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
2797	EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
2798	// Statuses - The resource status information.
2799	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
2800}
2801
2802// DiskList the List Disks operation response.
2803type DiskList struct {
2804	autorest.Response `json:"-"`
2805	// Value - A list of disks.
2806	Value *[]Disk `json:"value,omitempty"`
2807	// NextLink - The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks.
2808	NextLink *string `json:"nextLink,omitempty"`
2809}
2810
2811// DiskListIterator provides access to a complete listing of Disk values.
2812type DiskListIterator struct {
2813	i    int
2814	page DiskListPage
2815}
2816
2817// NextWithContext advances to the next value.  If there was an error making
2818// the request the iterator does not advance and the error is returned.
2819func (iter *DiskListIterator) NextWithContext(ctx context.Context) (err error) {
2820	if tracing.IsEnabled() {
2821		ctx = tracing.StartSpan(ctx, fqdn+"/DiskListIterator.NextWithContext")
2822		defer func() {
2823			sc := -1
2824			if iter.Response().Response.Response != nil {
2825				sc = iter.Response().Response.Response.StatusCode
2826			}
2827			tracing.EndSpan(ctx, sc, err)
2828		}()
2829	}
2830	iter.i++
2831	if iter.i < len(iter.page.Values()) {
2832		return nil
2833	}
2834	err = iter.page.NextWithContext(ctx)
2835	if err != nil {
2836		iter.i--
2837		return err
2838	}
2839	iter.i = 0
2840	return nil
2841}
2842
2843// Next advances to the next value.  If there was an error making
2844// the request the iterator does not advance and the error is returned.
2845// Deprecated: Use NextWithContext() instead.
2846func (iter *DiskListIterator) Next() error {
2847	return iter.NextWithContext(context.Background())
2848}
2849
2850// NotDone returns true if the enumeration should be started or is not yet complete.
2851func (iter DiskListIterator) NotDone() bool {
2852	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2853}
2854
2855// Response returns the raw server response from the last page request.
2856func (iter DiskListIterator) Response() DiskList {
2857	return iter.page.Response()
2858}
2859
2860// Value returns the current value or a zero-initialized value if the
2861// iterator has advanced beyond the end of the collection.
2862func (iter DiskListIterator) Value() Disk {
2863	if !iter.page.NotDone() {
2864		return Disk{}
2865	}
2866	return iter.page.Values()[iter.i]
2867}
2868
2869// Creates a new instance of the DiskListIterator type.
2870func NewDiskListIterator(page DiskListPage) DiskListIterator {
2871	return DiskListIterator{page: page}
2872}
2873
2874// IsEmpty returns true if the ListResult contains no values.
2875func (dl DiskList) IsEmpty() bool {
2876	return dl.Value == nil || len(*dl.Value) == 0
2877}
2878
2879// hasNextLink returns true if the NextLink is not empty.
2880func (dl DiskList) hasNextLink() bool {
2881	return dl.NextLink != nil && len(*dl.NextLink) != 0
2882}
2883
2884// diskListPreparer prepares a request to retrieve the next set of results.
2885// It returns nil if no more results exist.
2886func (dl DiskList) diskListPreparer(ctx context.Context) (*http.Request, error) {
2887	if !dl.hasNextLink() {
2888		return nil, nil
2889	}
2890	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2891		autorest.AsJSON(),
2892		autorest.AsGet(),
2893		autorest.WithBaseURL(to.String(dl.NextLink)))
2894}
2895
2896// DiskListPage contains a page of Disk values.
2897type DiskListPage struct {
2898	fn func(context.Context, DiskList) (DiskList, error)
2899	dl DiskList
2900}
2901
2902// NextWithContext advances to the next page of values.  If there was an error making
2903// the request the page does not advance and the error is returned.
2904func (page *DiskListPage) NextWithContext(ctx context.Context) (err error) {
2905	if tracing.IsEnabled() {
2906		ctx = tracing.StartSpan(ctx, fqdn+"/DiskListPage.NextWithContext")
2907		defer func() {
2908			sc := -1
2909			if page.Response().Response.Response != nil {
2910				sc = page.Response().Response.Response.StatusCode
2911			}
2912			tracing.EndSpan(ctx, sc, err)
2913		}()
2914	}
2915	for {
2916		next, err := page.fn(ctx, page.dl)
2917		if err != nil {
2918			return err
2919		}
2920		page.dl = next
2921		if !next.hasNextLink() || !next.IsEmpty() {
2922			break
2923		}
2924	}
2925	return nil
2926}
2927
2928// Next advances to the next page of values.  If there was an error making
2929// the request the page does not advance and the error is returned.
2930// Deprecated: Use NextWithContext() instead.
2931func (page *DiskListPage) Next() error {
2932	return page.NextWithContext(context.Background())
2933}
2934
2935// NotDone returns true if the page enumeration should be started or is not yet complete.
2936func (page DiskListPage) NotDone() bool {
2937	return !page.dl.IsEmpty()
2938}
2939
2940// Response returns the raw server response from the last page request.
2941func (page DiskListPage) Response() DiskList {
2942	return page.dl
2943}
2944
2945// Values returns the slice of values for the current page or nil if there are no values.
2946func (page DiskListPage) Values() []Disk {
2947	if page.dl.IsEmpty() {
2948		return nil
2949	}
2950	return *page.dl.Value
2951}
2952
2953// Creates a new instance of the DiskListPage type.
2954func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
2955	return DiskListPage{
2956		fn: getNextPage,
2957		dl: cur,
2958	}
2959}
2960
2961// DiskProperties disk resource properties.
2962type DiskProperties struct {
2963	// TimeCreated - READ-ONLY; The time when the disk was created.
2964	TimeCreated *date.Time `json:"timeCreated,omitempty"`
2965	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
2966	OsType OperatingSystemTypes `json:"osType,omitempty"`
2967	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
2968	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
2969	// PurchasePlan - Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}
2970	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
2971	// CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
2972	CreationData *CreationData `json:"creationData,omitempty"`
2973	// 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.
2974	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
2975	// DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
2976	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
2977	// UniqueID - READ-ONLY; Unique Guid identifying the resource.
2978	UniqueID *string `json:"uniqueId,omitempty"`
2979	// EncryptionSettingsCollection - Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
2980	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
2981	// ProvisioningState - READ-ONLY; The disk provisioning state.
2982	ProvisioningState *string `json:"provisioningState,omitempty"`
2983	// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
2984	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
2985	// 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.
2986	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
2987	// DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
2988	DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
2989	// DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
2990	DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
2991	// DiskState - The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
2992	DiskState DiskState `json:"diskState,omitempty"`
2993	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
2994	Encryption *Encryption `json:"encryption,omitempty"`
2995	// MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
2996	MaxShares *int32 `json:"maxShares,omitempty"`
2997	// ShareInfo - READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
2998	ShareInfo *[]ShareInfoElement `json:"shareInfo,omitempty"`
2999	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
3000	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
3001	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
3002	DiskAccessID *string `json:"diskAccessId,omitempty"`
3003	// Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.
3004	Tier *string `json:"tier,omitempty"`
3005	// BurstingEnabled - Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
3006	BurstingEnabled *bool `json:"burstingEnabled,omitempty"`
3007	// PropertyUpdatesInProgress - READ-ONLY; Properties of the disk for which update is pending.
3008	PropertyUpdatesInProgress *PropertyUpdatesInProgress `json:"propertyUpdatesInProgress,omitempty"`
3009	// SupportsHibernation - Indicates the OS on a disk supports hibernation.
3010	SupportsHibernation *bool `json:"supportsHibernation,omitempty"`
3011	// SecurityProfile - Contains the security related information for the resource.
3012	SecurityProfile *DiskSecurityProfile `json:"securityProfile,omitempty"`
3013}
3014
3015// MarshalJSON is the custom marshaler for DiskProperties.
3016func (dp DiskProperties) MarshalJSON() ([]byte, error) {
3017	objectMap := make(map[string]interface{})
3018	if dp.OsType != "" {
3019		objectMap["osType"] = dp.OsType
3020	}
3021	if dp.HyperVGeneration != "" {
3022		objectMap["hyperVGeneration"] = dp.HyperVGeneration
3023	}
3024	if dp.PurchasePlan != nil {
3025		objectMap["purchasePlan"] = dp.PurchasePlan
3026	}
3027	if dp.CreationData != nil {
3028		objectMap["creationData"] = dp.CreationData
3029	}
3030	if dp.DiskSizeGB != nil {
3031		objectMap["diskSizeGB"] = dp.DiskSizeGB
3032	}
3033	if dp.EncryptionSettingsCollection != nil {
3034		objectMap["encryptionSettingsCollection"] = dp.EncryptionSettingsCollection
3035	}
3036	if dp.DiskIOPSReadWrite != nil {
3037		objectMap["diskIOPSReadWrite"] = dp.DiskIOPSReadWrite
3038	}
3039	if dp.DiskMBpsReadWrite != nil {
3040		objectMap["diskMBpsReadWrite"] = dp.DiskMBpsReadWrite
3041	}
3042	if dp.DiskIOPSReadOnly != nil {
3043		objectMap["diskIOPSReadOnly"] = dp.DiskIOPSReadOnly
3044	}
3045	if dp.DiskMBpsReadOnly != nil {
3046		objectMap["diskMBpsReadOnly"] = dp.DiskMBpsReadOnly
3047	}
3048	if dp.DiskState != "" {
3049		objectMap["diskState"] = dp.DiskState
3050	}
3051	if dp.Encryption != nil {
3052		objectMap["encryption"] = dp.Encryption
3053	}
3054	if dp.MaxShares != nil {
3055		objectMap["maxShares"] = dp.MaxShares
3056	}
3057	if dp.NetworkAccessPolicy != "" {
3058		objectMap["networkAccessPolicy"] = dp.NetworkAccessPolicy
3059	}
3060	if dp.DiskAccessID != nil {
3061		objectMap["diskAccessId"] = dp.DiskAccessID
3062	}
3063	if dp.Tier != nil {
3064		objectMap["tier"] = dp.Tier
3065	}
3066	if dp.BurstingEnabled != nil {
3067		objectMap["burstingEnabled"] = dp.BurstingEnabled
3068	}
3069	if dp.SupportsHibernation != nil {
3070		objectMap["supportsHibernation"] = dp.SupportsHibernation
3071	}
3072	if dp.SecurityProfile != nil {
3073		objectMap["securityProfile"] = dp.SecurityProfile
3074	}
3075	return json.Marshal(objectMap)
3076}
3077
3078// DiskRestorePoint properties of disk restore point
3079type DiskRestorePoint struct {
3080	autorest.Response           `json:"-"`
3081	*DiskRestorePointProperties `json:"properties,omitempty"`
3082	// ID - READ-ONLY; Resource Id
3083	ID *string `json:"id,omitempty"`
3084	// Name - READ-ONLY; Resource name
3085	Name *string `json:"name,omitempty"`
3086	// Type - READ-ONLY; Resource type
3087	Type *string `json:"type,omitempty"`
3088}
3089
3090// MarshalJSON is the custom marshaler for DiskRestorePoint.
3091func (drp DiskRestorePoint) MarshalJSON() ([]byte, error) {
3092	objectMap := make(map[string]interface{})
3093	if drp.DiskRestorePointProperties != nil {
3094		objectMap["properties"] = drp.DiskRestorePointProperties
3095	}
3096	return json.Marshal(objectMap)
3097}
3098
3099// UnmarshalJSON is the custom unmarshaler for DiskRestorePoint struct.
3100func (drp *DiskRestorePoint) UnmarshalJSON(body []byte) error {
3101	var m map[string]*json.RawMessage
3102	err := json.Unmarshal(body, &m)
3103	if err != nil {
3104		return err
3105	}
3106	for k, v := range m {
3107		switch k {
3108		case "properties":
3109			if v != nil {
3110				var diskRestorePointProperties DiskRestorePointProperties
3111				err = json.Unmarshal(*v, &diskRestorePointProperties)
3112				if err != nil {
3113					return err
3114				}
3115				drp.DiskRestorePointProperties = &diskRestorePointProperties
3116			}
3117		case "id":
3118			if v != nil {
3119				var ID string
3120				err = json.Unmarshal(*v, &ID)
3121				if err != nil {
3122					return err
3123				}
3124				drp.ID = &ID
3125			}
3126		case "name":
3127			if v != nil {
3128				var name string
3129				err = json.Unmarshal(*v, &name)
3130				if err != nil {
3131					return err
3132				}
3133				drp.Name = &name
3134			}
3135		case "type":
3136			if v != nil {
3137				var typeVar string
3138				err = json.Unmarshal(*v, &typeVar)
3139				if err != nil {
3140					return err
3141				}
3142				drp.Type = &typeVar
3143			}
3144		}
3145	}
3146
3147	return nil
3148}
3149
3150// DiskRestorePointList the List Disk Restore Points operation response.
3151type DiskRestorePointList struct {
3152	autorest.Response `json:"-"`
3153	// Value - A list of disk restore points.
3154	Value *[]DiskRestorePoint `json:"value,omitempty"`
3155	// NextLink - The uri to fetch the next page of disk restore points. Call ListNext() with this to fetch the next page of disk restore points.
3156	NextLink *string `json:"nextLink,omitempty"`
3157}
3158
3159// DiskRestorePointListIterator provides access to a complete listing of DiskRestorePoint values.
3160type DiskRestorePointListIterator struct {
3161	i    int
3162	page DiskRestorePointListPage
3163}
3164
3165// NextWithContext advances to the next value.  If there was an error making
3166// the request the iterator does not advance and the error is returned.
3167func (iter *DiskRestorePointListIterator) NextWithContext(ctx context.Context) (err error) {
3168	if tracing.IsEnabled() {
3169		ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointListIterator.NextWithContext")
3170		defer func() {
3171			sc := -1
3172			if iter.Response().Response.Response != nil {
3173				sc = iter.Response().Response.Response.StatusCode
3174			}
3175			tracing.EndSpan(ctx, sc, err)
3176		}()
3177	}
3178	iter.i++
3179	if iter.i < len(iter.page.Values()) {
3180		return nil
3181	}
3182	err = iter.page.NextWithContext(ctx)
3183	if err != nil {
3184		iter.i--
3185		return err
3186	}
3187	iter.i = 0
3188	return nil
3189}
3190
3191// Next advances to the next value.  If there was an error making
3192// the request the iterator does not advance and the error is returned.
3193// Deprecated: Use NextWithContext() instead.
3194func (iter *DiskRestorePointListIterator) Next() error {
3195	return iter.NextWithContext(context.Background())
3196}
3197
3198// NotDone returns true if the enumeration should be started or is not yet complete.
3199func (iter DiskRestorePointListIterator) NotDone() bool {
3200	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3201}
3202
3203// Response returns the raw server response from the last page request.
3204func (iter DiskRestorePointListIterator) Response() DiskRestorePointList {
3205	return iter.page.Response()
3206}
3207
3208// Value returns the current value or a zero-initialized value if the
3209// iterator has advanced beyond the end of the collection.
3210func (iter DiskRestorePointListIterator) Value() DiskRestorePoint {
3211	if !iter.page.NotDone() {
3212		return DiskRestorePoint{}
3213	}
3214	return iter.page.Values()[iter.i]
3215}
3216
3217// Creates a new instance of the DiskRestorePointListIterator type.
3218func NewDiskRestorePointListIterator(page DiskRestorePointListPage) DiskRestorePointListIterator {
3219	return DiskRestorePointListIterator{page: page}
3220}
3221
3222// IsEmpty returns true if the ListResult contains no values.
3223func (drpl DiskRestorePointList) IsEmpty() bool {
3224	return drpl.Value == nil || len(*drpl.Value) == 0
3225}
3226
3227// hasNextLink returns true if the NextLink is not empty.
3228func (drpl DiskRestorePointList) hasNextLink() bool {
3229	return drpl.NextLink != nil && len(*drpl.NextLink) != 0
3230}
3231
3232// diskRestorePointListPreparer prepares a request to retrieve the next set of results.
3233// It returns nil if no more results exist.
3234func (drpl DiskRestorePointList) diskRestorePointListPreparer(ctx context.Context) (*http.Request, error) {
3235	if !drpl.hasNextLink() {
3236		return nil, nil
3237	}
3238	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3239		autorest.AsJSON(),
3240		autorest.AsGet(),
3241		autorest.WithBaseURL(to.String(drpl.NextLink)))
3242}
3243
3244// DiskRestorePointListPage contains a page of DiskRestorePoint values.
3245type DiskRestorePointListPage struct {
3246	fn   func(context.Context, DiskRestorePointList) (DiskRestorePointList, error)
3247	drpl DiskRestorePointList
3248}
3249
3250// NextWithContext advances to the next page of values.  If there was an error making
3251// the request the page does not advance and the error is returned.
3252func (page *DiskRestorePointListPage) NextWithContext(ctx context.Context) (err error) {
3253	if tracing.IsEnabled() {
3254		ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointListPage.NextWithContext")
3255		defer func() {
3256			sc := -1
3257			if page.Response().Response.Response != nil {
3258				sc = page.Response().Response.Response.StatusCode
3259			}
3260			tracing.EndSpan(ctx, sc, err)
3261		}()
3262	}
3263	for {
3264		next, err := page.fn(ctx, page.drpl)
3265		if err != nil {
3266			return err
3267		}
3268		page.drpl = next
3269		if !next.hasNextLink() || !next.IsEmpty() {
3270			break
3271		}
3272	}
3273	return nil
3274}
3275
3276// Next advances to the next page of values.  If there was an error making
3277// the request the page does not advance and the error is returned.
3278// Deprecated: Use NextWithContext() instead.
3279func (page *DiskRestorePointListPage) Next() error {
3280	return page.NextWithContext(context.Background())
3281}
3282
3283// NotDone returns true if the page enumeration should be started or is not yet complete.
3284func (page DiskRestorePointListPage) NotDone() bool {
3285	return !page.drpl.IsEmpty()
3286}
3287
3288// Response returns the raw server response from the last page request.
3289func (page DiskRestorePointListPage) Response() DiskRestorePointList {
3290	return page.drpl
3291}
3292
3293// Values returns the slice of values for the current page or nil if there are no values.
3294func (page DiskRestorePointListPage) Values() []DiskRestorePoint {
3295	if page.drpl.IsEmpty() {
3296		return nil
3297	}
3298	return *page.drpl.Value
3299}
3300
3301// Creates a new instance of the DiskRestorePointListPage type.
3302func NewDiskRestorePointListPage(cur DiskRestorePointList, getNextPage func(context.Context, DiskRestorePointList) (DiskRestorePointList, error)) DiskRestorePointListPage {
3303	return DiskRestorePointListPage{
3304		fn:   getNextPage,
3305		drpl: cur,
3306	}
3307}
3308
3309// DiskRestorePointProperties properties of an incremental disk restore point
3310type DiskRestorePointProperties struct {
3311	// TimeCreated - READ-ONLY; The timestamp of restorePoint creation
3312	TimeCreated *date.Time `json:"timeCreated,omitempty"`
3313	// SourceResourceID - READ-ONLY; arm id of source disk
3314	SourceResourceID *string `json:"sourceResourceId,omitempty"`
3315	// OsType - READ-ONLY; The Operating System type. Possible values include: 'Windows', 'Linux'
3316	OsType OperatingSystemTypes `json:"osType,omitempty"`
3317	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
3318	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
3319	// PurchasePlan - Purchase plan information for the the image from which the OS disk was created.
3320	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
3321	// FamilyID - READ-ONLY; id of the backing snapshot's MIS family
3322	FamilyID *string `json:"familyId,omitempty"`
3323	// SourceUniqueID - READ-ONLY; unique incarnation id of the source disk
3324	SourceUniqueID *string `json:"sourceUniqueId,omitempty"`
3325	// Encryption - READ-ONLY; Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
3326	Encryption *Encryption `json:"encryption,omitempty"`
3327	// SupportsHibernation - Indicates the OS on a disk supports hibernation.
3328	SupportsHibernation *bool `json:"supportsHibernation,omitempty"`
3329}
3330
3331// MarshalJSON is the custom marshaler for DiskRestorePointProperties.
3332func (drpp DiskRestorePointProperties) MarshalJSON() ([]byte, error) {
3333	objectMap := make(map[string]interface{})
3334	if drpp.HyperVGeneration != "" {
3335		objectMap["hyperVGeneration"] = drpp.HyperVGeneration
3336	}
3337	if drpp.PurchasePlan != nil {
3338		objectMap["purchasePlan"] = drpp.PurchasePlan
3339	}
3340	if drpp.SupportsHibernation != nil {
3341		objectMap["supportsHibernation"] = drpp.SupportsHibernation
3342	}
3343	return json.Marshal(objectMap)
3344}
3345
3346// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3347// operation.
3348type DisksCreateOrUpdateFuture struct {
3349	azure.FutureAPI
3350	// Result returns the result of the asynchronous operation.
3351	// If the operation has not completed it will return an error.
3352	Result func(DisksClient) (Disk, error)
3353}
3354
3355// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3356func (future *DisksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3357	var azFuture azure.Future
3358	if err := json.Unmarshal(body, &azFuture); err != nil {
3359		return err
3360	}
3361	future.FutureAPI = &azFuture
3362	future.Result = future.result
3363	return nil
3364}
3365
3366// result is the default implementation for DisksCreateOrUpdateFuture.Result.
3367func (future *DisksCreateOrUpdateFuture) result(client DisksClient) (d Disk, err error) {
3368	var done bool
3369	done, err = future.DoneWithContext(context.Background(), client)
3370	if err != nil {
3371		err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3372		return
3373	}
3374	if !done {
3375		d.Response.Response = future.Response()
3376		err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
3377		return
3378	}
3379	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3380	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
3381		d, err = client.CreateOrUpdateResponder(d.Response.Response)
3382		if err != nil {
3383			err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
3384		}
3385	}
3386	return
3387}
3388
3389// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3390type DisksDeleteFuture struct {
3391	azure.FutureAPI
3392	// Result returns the result of the asynchronous operation.
3393	// If the operation has not completed it will return an error.
3394	Result func(DisksClient) (autorest.Response, error)
3395}
3396
3397// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3398func (future *DisksDeleteFuture) UnmarshalJSON(body []byte) error {
3399	var azFuture azure.Future
3400	if err := json.Unmarshal(body, &azFuture); err != nil {
3401		return err
3402	}
3403	future.FutureAPI = &azFuture
3404	future.Result = future.result
3405	return nil
3406}
3407
3408// result is the default implementation for DisksDeleteFuture.Result.
3409func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Response, err error) {
3410	var done bool
3411	done, err = future.DoneWithContext(context.Background(), client)
3412	if err != nil {
3413		err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Polling failure")
3414		return
3415	}
3416	if !done {
3417		ar.Response = future.Response()
3418		err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
3419		return
3420	}
3421	ar.Response = future.Response()
3422	return
3423}
3424
3425// DiskSecurityProfile contains the security related information for the resource.
3426type DiskSecurityProfile struct {
3427	// SecurityType - Possible values include: 'TrustedLaunch'
3428	SecurityType DiskSecurityTypes `json:"securityType,omitempty"`
3429}
3430
3431// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
3432// operation.
3433type DisksGrantAccessFuture struct {
3434	azure.FutureAPI
3435	// Result returns the result of the asynchronous operation.
3436	// If the operation has not completed it will return an error.
3437	Result func(DisksClient) (AccessURI, error)
3438}
3439
3440// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3441func (future *DisksGrantAccessFuture) UnmarshalJSON(body []byte) error {
3442	var azFuture azure.Future
3443	if err := json.Unmarshal(body, &azFuture); err != nil {
3444		return err
3445	}
3446	future.FutureAPI = &azFuture
3447	future.Result = future.result
3448	return nil
3449}
3450
3451// result is the default implementation for DisksGrantAccessFuture.Result.
3452func (future *DisksGrantAccessFuture) result(client DisksClient) (au AccessURI, err error) {
3453	var done bool
3454	done, err = future.DoneWithContext(context.Background(), client)
3455	if err != nil {
3456		err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Polling failure")
3457		return
3458	}
3459	if !done {
3460		au.Response.Response = future.Response()
3461		err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
3462		return
3463	}
3464	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3465	if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
3466		au, err = client.GrantAccessResponder(au.Response.Response)
3467		if err != nil {
3468			err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
3469		}
3470	}
3471	return
3472}
3473
3474// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS,
3475// Premium_ZRS, or StandardSSD_ZRS.
3476type DiskSku struct {
3477	// Name - The sku name. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS', 'UltraSSDLRS', 'PremiumZRS', 'StandardSSDZRS'
3478	Name DiskStorageAccountTypes `json:"name,omitempty"`
3479	// Tier - READ-ONLY; The sku tier.
3480	Tier *string `json:"tier,omitempty"`
3481}
3482
3483// MarshalJSON is the custom marshaler for DiskSku.
3484func (ds DiskSku) MarshalJSON() ([]byte, error) {
3485	objectMap := make(map[string]interface{})
3486	if ds.Name != "" {
3487		objectMap["name"] = ds.Name
3488	}
3489	return json.Marshal(objectMap)
3490}
3491
3492// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
3493// operation.
3494type DisksRevokeAccessFuture struct {
3495	azure.FutureAPI
3496	// Result returns the result of the asynchronous operation.
3497	// If the operation has not completed it will return an error.
3498	Result func(DisksClient) (autorest.Response, error)
3499}
3500
3501// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3502func (future *DisksRevokeAccessFuture) UnmarshalJSON(body []byte) error {
3503	var azFuture azure.Future
3504	if err := json.Unmarshal(body, &azFuture); err != nil {
3505		return err
3506	}
3507	future.FutureAPI = &azFuture
3508	future.Result = future.result
3509	return nil
3510}
3511
3512// result is the default implementation for DisksRevokeAccessFuture.Result.
3513func (future *DisksRevokeAccessFuture) result(client DisksClient) (ar autorest.Response, err error) {
3514	var done bool
3515	done, err = future.DoneWithContext(context.Background(), client)
3516	if err != nil {
3517		err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Polling failure")
3518		return
3519	}
3520	if !done {
3521		ar.Response = future.Response()
3522		err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
3523		return
3524	}
3525	ar.Response = future.Response()
3526	return
3527}
3528
3529// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3530type DisksUpdateFuture struct {
3531	azure.FutureAPI
3532	// Result returns the result of the asynchronous operation.
3533	// If the operation has not completed it will return an error.
3534	Result func(DisksClient) (Disk, error)
3535}
3536
3537// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3538func (future *DisksUpdateFuture) UnmarshalJSON(body []byte) error {
3539	var azFuture azure.Future
3540	if err := json.Unmarshal(body, &azFuture); err != nil {
3541		return err
3542	}
3543	future.FutureAPI = &azFuture
3544	future.Result = future.result
3545	return nil
3546}
3547
3548// result is the default implementation for DisksUpdateFuture.Result.
3549func (future *DisksUpdateFuture) result(client DisksClient) (d Disk, err error) {
3550	var done bool
3551	done, err = future.DoneWithContext(context.Background(), client)
3552	if err != nil {
3553		err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Polling failure")
3554		return
3555	}
3556	if !done {
3557		d.Response.Response = future.Response()
3558		err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
3559		return
3560	}
3561	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3562	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
3563		d, err = client.UpdateResponder(d.Response.Response)
3564		if err != nil {
3565			err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
3566		}
3567	}
3568	return
3569}
3570
3571// DiskUpdate disk update resource.
3572type DiskUpdate struct {
3573	*DiskUpdateProperties `json:"properties,omitempty"`
3574	// Tags - Resource tags
3575	Tags map[string]*string `json:"tags"`
3576	Sku  *DiskSku           `json:"sku,omitempty"`
3577}
3578
3579// MarshalJSON is the custom marshaler for DiskUpdate.
3580func (du DiskUpdate) MarshalJSON() ([]byte, error) {
3581	objectMap := make(map[string]interface{})
3582	if du.DiskUpdateProperties != nil {
3583		objectMap["properties"] = du.DiskUpdateProperties
3584	}
3585	if du.Tags != nil {
3586		objectMap["tags"] = du.Tags
3587	}
3588	if du.Sku != nil {
3589		objectMap["sku"] = du.Sku
3590	}
3591	return json.Marshal(objectMap)
3592}
3593
3594// UnmarshalJSON is the custom unmarshaler for DiskUpdate struct.
3595func (du *DiskUpdate) UnmarshalJSON(body []byte) error {
3596	var m map[string]*json.RawMessage
3597	err := json.Unmarshal(body, &m)
3598	if err != nil {
3599		return err
3600	}
3601	for k, v := range m {
3602		switch k {
3603		case "properties":
3604			if v != nil {
3605				var diskUpdateProperties DiskUpdateProperties
3606				err = json.Unmarshal(*v, &diskUpdateProperties)
3607				if err != nil {
3608					return err
3609				}
3610				du.DiskUpdateProperties = &diskUpdateProperties
3611			}
3612		case "tags":
3613			if v != nil {
3614				var tags map[string]*string
3615				err = json.Unmarshal(*v, &tags)
3616				if err != nil {
3617					return err
3618				}
3619				du.Tags = tags
3620			}
3621		case "sku":
3622			if v != nil {
3623				var sku DiskSku
3624				err = json.Unmarshal(*v, &sku)
3625				if err != nil {
3626					return err
3627				}
3628				du.Sku = &sku
3629			}
3630		}
3631	}
3632
3633	return nil
3634}
3635
3636// DiskUpdateProperties disk resource update properties.
3637type DiskUpdateProperties struct {
3638	// OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
3639	OsType OperatingSystemTypes `json:"osType,omitempty"`
3640	// 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.
3641	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
3642	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
3643	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
3644	// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
3645	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
3646	// 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.
3647	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
3648	// DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
3649	DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
3650	// DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
3651	DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
3652	// MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
3653	MaxShares *int32 `json:"maxShares,omitempty"`
3654	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
3655	Encryption *Encryption `json:"encryption,omitempty"`
3656	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
3657	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
3658	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
3659	DiskAccessID *string `json:"diskAccessId,omitempty"`
3660	// Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.
3661	Tier *string `json:"tier,omitempty"`
3662	// BurstingEnabled - Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
3663	BurstingEnabled *bool `json:"burstingEnabled,omitempty"`
3664	// PurchasePlan - Purchase plan information to be added on the OS disk
3665	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
3666	// PropertyUpdatesInProgress - READ-ONLY; Properties of the disk for which update is pending.
3667	PropertyUpdatesInProgress *PropertyUpdatesInProgress `json:"propertyUpdatesInProgress,omitempty"`
3668	// SupportsHibernation - Indicates the OS on a disk supports hibernation.
3669	SupportsHibernation *bool `json:"supportsHibernation,omitempty"`
3670}
3671
3672// MarshalJSON is the custom marshaler for DiskUpdateProperties.
3673func (dup DiskUpdateProperties) MarshalJSON() ([]byte, error) {
3674	objectMap := make(map[string]interface{})
3675	if dup.OsType != "" {
3676		objectMap["osType"] = dup.OsType
3677	}
3678	if dup.DiskSizeGB != nil {
3679		objectMap["diskSizeGB"] = dup.DiskSizeGB
3680	}
3681	if dup.EncryptionSettingsCollection != nil {
3682		objectMap["encryptionSettingsCollection"] = dup.EncryptionSettingsCollection
3683	}
3684	if dup.DiskIOPSReadWrite != nil {
3685		objectMap["diskIOPSReadWrite"] = dup.DiskIOPSReadWrite
3686	}
3687	if dup.DiskMBpsReadWrite != nil {
3688		objectMap["diskMBpsReadWrite"] = dup.DiskMBpsReadWrite
3689	}
3690	if dup.DiskIOPSReadOnly != nil {
3691		objectMap["diskIOPSReadOnly"] = dup.DiskIOPSReadOnly
3692	}
3693	if dup.DiskMBpsReadOnly != nil {
3694		objectMap["diskMBpsReadOnly"] = dup.DiskMBpsReadOnly
3695	}
3696	if dup.MaxShares != nil {
3697		objectMap["maxShares"] = dup.MaxShares
3698	}
3699	if dup.Encryption != nil {
3700		objectMap["encryption"] = dup.Encryption
3701	}
3702	if dup.NetworkAccessPolicy != "" {
3703		objectMap["networkAccessPolicy"] = dup.NetworkAccessPolicy
3704	}
3705	if dup.DiskAccessID != nil {
3706		objectMap["diskAccessId"] = dup.DiskAccessID
3707	}
3708	if dup.Tier != nil {
3709		objectMap["tier"] = dup.Tier
3710	}
3711	if dup.BurstingEnabled != nil {
3712		objectMap["burstingEnabled"] = dup.BurstingEnabled
3713	}
3714	if dup.PurchasePlan != nil {
3715		objectMap["purchasePlan"] = dup.PurchasePlan
3716	}
3717	if dup.SupportsHibernation != nil {
3718		objectMap["supportsHibernation"] = dup.SupportsHibernation
3719	}
3720	return json.Marshal(objectMap)
3721}
3722
3723// Encryption encryption at rest settings for disk or snapshot
3724type Encryption struct {
3725	// DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest.
3726	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
3727	// Type - Possible values include: 'EncryptionTypeEncryptionAtRestWithPlatformKey', 'EncryptionTypeEncryptionAtRestWithCustomerKey', 'EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys'
3728	Type EncryptionType `json:"type,omitempty"`
3729}
3730
3731// EncryptionImages optional. Allows users to provide customer managed keys for encrypting the OS and data
3732// disks in the gallery artifact.
3733type EncryptionImages struct {
3734	OsDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"`
3735	// DataDiskImages - A list of encryption specifications for data disk images.
3736	DataDiskImages *[]DataDiskImageEncryption `json:"dataDiskImages,omitempty"`
3737}
3738
3739// EncryptionSetIdentity the managed identity for the disk encryption set. It should be given permission on
3740// the key vault before it can be used to encrypt disks.
3741type EncryptionSetIdentity struct {
3742	// Type - The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys. Possible values include: 'DiskEncryptionSetIdentityTypeSystemAssigned', 'DiskEncryptionSetIdentityTypeNone'
3743	Type DiskEncryptionSetIdentityType `json:"type,omitempty"`
3744	// PrincipalID - READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity
3745	PrincipalID *string `json:"principalId,omitempty"`
3746	// TenantID - READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity
3747	TenantID *string `json:"tenantId,omitempty"`
3748}
3749
3750// MarshalJSON is the custom marshaler for EncryptionSetIdentity.
3751func (esi EncryptionSetIdentity) MarshalJSON() ([]byte, error) {
3752	objectMap := make(map[string]interface{})
3753	if esi.Type != "" {
3754		objectMap["type"] = esi.Type
3755	}
3756	return json.Marshal(objectMap)
3757}
3758
3759// EncryptionSetProperties ...
3760type EncryptionSetProperties struct {
3761	// EncryptionType - Possible values include: 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys'
3762	EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"`
3763	// ActiveKey - The key vault key which is currently used by this disk encryption set.
3764	ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`
3765	// PreviousKeys - READ-ONLY; A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation.
3766	PreviousKeys *[]KeyForDiskEncryptionSet `json:"previousKeys,omitempty"`
3767	// ProvisioningState - READ-ONLY; The disk encryption set provisioning state.
3768	ProvisioningState *string `json:"provisioningState,omitempty"`
3769	// RotationToLatestKeyVersionEnabled - Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.
3770	RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"`
3771	// LastKeyRotationTimestamp - READ-ONLY; The time when the active key of this disk encryption set was updated.
3772	LastKeyRotationTimestamp *date.Time `json:"lastKeyRotationTimestamp,omitempty"`
3773}
3774
3775// MarshalJSON is the custom marshaler for EncryptionSetProperties.
3776func (esp EncryptionSetProperties) MarshalJSON() ([]byte, error) {
3777	objectMap := make(map[string]interface{})
3778	if esp.EncryptionType != "" {
3779		objectMap["encryptionType"] = esp.EncryptionType
3780	}
3781	if esp.ActiveKey != nil {
3782		objectMap["activeKey"] = esp.ActiveKey
3783	}
3784	if esp.RotationToLatestKeyVersionEnabled != nil {
3785		objectMap["rotationToLatestKeyVersionEnabled"] = esp.RotationToLatestKeyVersionEnabled
3786	}
3787	return json.Marshal(objectMap)
3788}
3789
3790// EncryptionSettingsCollection encryption settings for disk or snapshot
3791type EncryptionSettingsCollection struct {
3792	// 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.
3793	Enabled *bool `json:"enabled,omitempty"`
3794	// EncryptionSettings - A collection of encryption settings, one for each disk volume.
3795	EncryptionSettings *[]EncryptionSettingsElement `json:"encryptionSettings,omitempty"`
3796	// 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.
3797	EncryptionSettingsVersion *string `json:"encryptionSettingsVersion,omitempty"`
3798}
3799
3800// EncryptionSettingsElement encryption settings for one disk volume.
3801type EncryptionSettingsElement struct {
3802	// DiskEncryptionKey - Key Vault Secret Url and vault id of the disk encryption key
3803	DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"`
3804	// 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.
3805	KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"`
3806}
3807
3808// ExtendedLocation the complex type of the extended location.
3809type ExtendedLocation struct {
3810	// Name - The name of the extended location.
3811	Name *string `json:"name,omitempty"`
3812	// Type - The type of the extended location. Possible values include: 'EdgeZone'
3813	Type ExtendedLocationTypes `json:"type,omitempty"`
3814}
3815
3816// GalleriesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3817// operation.
3818type GalleriesCreateOrUpdateFuture struct {
3819	azure.FutureAPI
3820	// Result returns the result of the asynchronous operation.
3821	// If the operation has not completed it will return an error.
3822	Result func(GalleriesClient) (Gallery, error)
3823}
3824
3825// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3826func (future *GalleriesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3827	var azFuture azure.Future
3828	if err := json.Unmarshal(body, &azFuture); err != nil {
3829		return err
3830	}
3831	future.FutureAPI = &azFuture
3832	future.Result = future.result
3833	return nil
3834}
3835
3836// result is the default implementation for GalleriesCreateOrUpdateFuture.Result.
3837func (future *GalleriesCreateOrUpdateFuture) result(client GalleriesClient) (g Gallery, err error) {
3838	var done bool
3839	done, err = future.DoneWithContext(context.Background(), client)
3840	if err != nil {
3841		err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3842		return
3843	}
3844	if !done {
3845		g.Response.Response = future.Response()
3846		err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture")
3847		return
3848	}
3849	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3850	if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
3851		g, err = client.CreateOrUpdateResponder(g.Response.Response)
3852		if err != nil {
3853			err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
3854		}
3855	}
3856	return
3857}
3858
3859// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
3860// operation.
3861type GalleriesDeleteFuture struct {
3862	azure.FutureAPI
3863	// Result returns the result of the asynchronous operation.
3864	// If the operation has not completed it will return an error.
3865	Result func(GalleriesClient) (autorest.Response, error)
3866}
3867
3868// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3869func (future *GalleriesDeleteFuture) UnmarshalJSON(body []byte) error {
3870	var azFuture azure.Future
3871	if err := json.Unmarshal(body, &azFuture); err != nil {
3872		return err
3873	}
3874	future.FutureAPI = &azFuture
3875	future.Result = future.result
3876	return nil
3877}
3878
3879// result is the default implementation for GalleriesDeleteFuture.Result.
3880func (future *GalleriesDeleteFuture) result(client GalleriesClient) (ar autorest.Response, err error) {
3881	var done bool
3882	done, err = future.DoneWithContext(context.Background(), client)
3883	if err != nil {
3884		err = autorest.NewErrorWithError(err, "compute.GalleriesDeleteFuture", "Result", future.Response(), "Polling failure")
3885		return
3886	}
3887	if !done {
3888		ar.Response = future.Response()
3889		err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture")
3890		return
3891	}
3892	ar.Response = future.Response()
3893	return
3894}
3895
3896// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3897// operation.
3898type GalleriesUpdateFuture struct {
3899	azure.FutureAPI
3900	// Result returns the result of the asynchronous operation.
3901	// If the operation has not completed it will return an error.
3902	Result func(GalleriesClient) (Gallery, error)
3903}
3904
3905// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3906func (future *GalleriesUpdateFuture) UnmarshalJSON(body []byte) error {
3907	var azFuture azure.Future
3908	if err := json.Unmarshal(body, &azFuture); err != nil {
3909		return err
3910	}
3911	future.FutureAPI = &azFuture
3912	future.Result = future.result
3913	return nil
3914}
3915
3916// result is the default implementation for GalleriesUpdateFuture.Result.
3917func (future *GalleriesUpdateFuture) result(client GalleriesClient) (g Gallery, err error) {
3918	var done bool
3919	done, err = future.DoneWithContext(context.Background(), client)
3920	if err != nil {
3921		err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", future.Response(), "Polling failure")
3922		return
3923	}
3924	if !done {
3925		g.Response.Response = future.Response()
3926		err = azure.NewAsyncOpIncompleteError("compute.GalleriesUpdateFuture")
3927		return
3928	}
3929	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3930	if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
3931		g, err = client.UpdateResponder(g.Response.Response)
3932		if err != nil {
3933			err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
3934		}
3935	}
3936	return
3937}
3938
3939// Gallery specifies information about the Shared Image Gallery that you want to create or update.
3940type Gallery struct {
3941	autorest.Response  `json:"-"`
3942	*GalleryProperties `json:"properties,omitempty"`
3943	// ID - READ-ONLY; Resource Id
3944	ID *string `json:"id,omitempty"`
3945	// Name - READ-ONLY; Resource name
3946	Name *string `json:"name,omitempty"`
3947	// Type - READ-ONLY; Resource type
3948	Type *string `json:"type,omitempty"`
3949	// Location - Resource location
3950	Location *string `json:"location,omitempty"`
3951	// Tags - Resource tags
3952	Tags map[string]*string `json:"tags"`
3953}
3954
3955// MarshalJSON is the custom marshaler for Gallery.
3956func (g Gallery) MarshalJSON() ([]byte, error) {
3957	objectMap := make(map[string]interface{})
3958	if g.GalleryProperties != nil {
3959		objectMap["properties"] = g.GalleryProperties
3960	}
3961	if g.Location != nil {
3962		objectMap["location"] = g.Location
3963	}
3964	if g.Tags != nil {
3965		objectMap["tags"] = g.Tags
3966	}
3967	return json.Marshal(objectMap)
3968}
3969
3970// UnmarshalJSON is the custom unmarshaler for Gallery struct.
3971func (g *Gallery) UnmarshalJSON(body []byte) error {
3972	var m map[string]*json.RawMessage
3973	err := json.Unmarshal(body, &m)
3974	if err != nil {
3975		return err
3976	}
3977	for k, v := range m {
3978		switch k {
3979		case "properties":
3980			if v != nil {
3981				var galleryProperties GalleryProperties
3982				err = json.Unmarshal(*v, &galleryProperties)
3983				if err != nil {
3984					return err
3985				}
3986				g.GalleryProperties = &galleryProperties
3987			}
3988		case "id":
3989			if v != nil {
3990				var ID string
3991				err = json.Unmarshal(*v, &ID)
3992				if err != nil {
3993					return err
3994				}
3995				g.ID = &ID
3996			}
3997		case "name":
3998			if v != nil {
3999				var name string
4000				err = json.Unmarshal(*v, &name)
4001				if err != nil {
4002					return err
4003				}
4004				g.Name = &name
4005			}
4006		case "type":
4007			if v != nil {
4008				var typeVar string
4009				err = json.Unmarshal(*v, &typeVar)
4010				if err != nil {
4011					return err
4012				}
4013				g.Type = &typeVar
4014			}
4015		case "location":
4016			if v != nil {
4017				var location string
4018				err = json.Unmarshal(*v, &location)
4019				if err != nil {
4020					return err
4021				}
4022				g.Location = &location
4023			}
4024		case "tags":
4025			if v != nil {
4026				var tags map[string]*string
4027				err = json.Unmarshal(*v, &tags)
4028				if err != nil {
4029					return err
4030				}
4031				g.Tags = tags
4032			}
4033		}
4034	}
4035
4036	return nil
4037}
4038
4039// GalleryApplication specifies information about the gallery Application Definition that you want to
4040// create or update.
4041type GalleryApplication struct {
4042	autorest.Response             `json:"-"`
4043	*GalleryApplicationProperties `json:"properties,omitempty"`
4044	// ID - READ-ONLY; Resource Id
4045	ID *string `json:"id,omitempty"`
4046	// Name - READ-ONLY; Resource name
4047	Name *string `json:"name,omitempty"`
4048	// Type - READ-ONLY; Resource type
4049	Type *string `json:"type,omitempty"`
4050	// Location - Resource location
4051	Location *string `json:"location,omitempty"`
4052	// Tags - Resource tags
4053	Tags map[string]*string `json:"tags"`
4054}
4055
4056// MarshalJSON is the custom marshaler for GalleryApplication.
4057func (ga GalleryApplication) MarshalJSON() ([]byte, error) {
4058	objectMap := make(map[string]interface{})
4059	if ga.GalleryApplicationProperties != nil {
4060		objectMap["properties"] = ga.GalleryApplicationProperties
4061	}
4062	if ga.Location != nil {
4063		objectMap["location"] = ga.Location
4064	}
4065	if ga.Tags != nil {
4066		objectMap["tags"] = ga.Tags
4067	}
4068	return json.Marshal(objectMap)
4069}
4070
4071// UnmarshalJSON is the custom unmarshaler for GalleryApplication struct.
4072func (ga *GalleryApplication) UnmarshalJSON(body []byte) error {
4073	var m map[string]*json.RawMessage
4074	err := json.Unmarshal(body, &m)
4075	if err != nil {
4076		return err
4077	}
4078	for k, v := range m {
4079		switch k {
4080		case "properties":
4081			if v != nil {
4082				var galleryApplicationProperties GalleryApplicationProperties
4083				err = json.Unmarshal(*v, &galleryApplicationProperties)
4084				if err != nil {
4085					return err
4086				}
4087				ga.GalleryApplicationProperties = &galleryApplicationProperties
4088			}
4089		case "id":
4090			if v != nil {
4091				var ID string
4092				err = json.Unmarshal(*v, &ID)
4093				if err != nil {
4094					return err
4095				}
4096				ga.ID = &ID
4097			}
4098		case "name":
4099			if v != nil {
4100				var name string
4101				err = json.Unmarshal(*v, &name)
4102				if err != nil {
4103					return err
4104				}
4105				ga.Name = &name
4106			}
4107		case "type":
4108			if v != nil {
4109				var typeVar string
4110				err = json.Unmarshal(*v, &typeVar)
4111				if err != nil {
4112					return err
4113				}
4114				ga.Type = &typeVar
4115			}
4116		case "location":
4117			if v != nil {
4118				var location string
4119				err = json.Unmarshal(*v, &location)
4120				if err != nil {
4121					return err
4122				}
4123				ga.Location = &location
4124			}
4125		case "tags":
4126			if v != nil {
4127				var tags map[string]*string
4128				err = json.Unmarshal(*v, &tags)
4129				if err != nil {
4130					return err
4131				}
4132				ga.Tags = tags
4133			}
4134		}
4135	}
4136
4137	return nil
4138}
4139
4140// GalleryApplicationList the List Gallery Applications operation response.
4141type GalleryApplicationList struct {
4142	autorest.Response `json:"-"`
4143	// Value - A list of Gallery Applications.
4144	Value *[]GalleryApplication `json:"value,omitempty"`
4145	// 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.
4146	NextLink *string `json:"nextLink,omitempty"`
4147}
4148
4149// GalleryApplicationListIterator provides access to a complete listing of GalleryApplication values.
4150type GalleryApplicationListIterator struct {
4151	i    int
4152	page GalleryApplicationListPage
4153}
4154
4155// NextWithContext advances to the next value.  If there was an error making
4156// the request the iterator does not advance and the error is returned.
4157func (iter *GalleryApplicationListIterator) NextWithContext(ctx context.Context) (err error) {
4158	if tracing.IsEnabled() {
4159		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListIterator.NextWithContext")
4160		defer func() {
4161			sc := -1
4162			if iter.Response().Response.Response != nil {
4163				sc = iter.Response().Response.Response.StatusCode
4164			}
4165			tracing.EndSpan(ctx, sc, err)
4166		}()
4167	}
4168	iter.i++
4169	if iter.i < len(iter.page.Values()) {
4170		return nil
4171	}
4172	err = iter.page.NextWithContext(ctx)
4173	if err != nil {
4174		iter.i--
4175		return err
4176	}
4177	iter.i = 0
4178	return nil
4179}
4180
4181// Next advances to the next value.  If there was an error making
4182// the request the iterator does not advance and the error is returned.
4183// Deprecated: Use NextWithContext() instead.
4184func (iter *GalleryApplicationListIterator) Next() error {
4185	return iter.NextWithContext(context.Background())
4186}
4187
4188// NotDone returns true if the enumeration should be started or is not yet complete.
4189func (iter GalleryApplicationListIterator) NotDone() bool {
4190	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4191}
4192
4193// Response returns the raw server response from the last page request.
4194func (iter GalleryApplicationListIterator) Response() GalleryApplicationList {
4195	return iter.page.Response()
4196}
4197
4198// Value returns the current value or a zero-initialized value if the
4199// iterator has advanced beyond the end of the collection.
4200func (iter GalleryApplicationListIterator) Value() GalleryApplication {
4201	if !iter.page.NotDone() {
4202		return GalleryApplication{}
4203	}
4204	return iter.page.Values()[iter.i]
4205}
4206
4207// Creates a new instance of the GalleryApplicationListIterator type.
4208func NewGalleryApplicationListIterator(page GalleryApplicationListPage) GalleryApplicationListIterator {
4209	return GalleryApplicationListIterator{page: page}
4210}
4211
4212// IsEmpty returns true if the ListResult contains no values.
4213func (gal GalleryApplicationList) IsEmpty() bool {
4214	return gal.Value == nil || len(*gal.Value) == 0
4215}
4216
4217// hasNextLink returns true if the NextLink is not empty.
4218func (gal GalleryApplicationList) hasNextLink() bool {
4219	return gal.NextLink != nil && len(*gal.NextLink) != 0
4220}
4221
4222// galleryApplicationListPreparer prepares a request to retrieve the next set of results.
4223// It returns nil if no more results exist.
4224func (gal GalleryApplicationList) galleryApplicationListPreparer(ctx context.Context) (*http.Request, error) {
4225	if !gal.hasNextLink() {
4226		return nil, nil
4227	}
4228	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4229		autorest.AsJSON(),
4230		autorest.AsGet(),
4231		autorest.WithBaseURL(to.String(gal.NextLink)))
4232}
4233
4234// GalleryApplicationListPage contains a page of GalleryApplication values.
4235type GalleryApplicationListPage struct {
4236	fn  func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)
4237	gal GalleryApplicationList
4238}
4239
4240// NextWithContext advances to the next page of values.  If there was an error making
4241// the request the page does not advance and the error is returned.
4242func (page *GalleryApplicationListPage) NextWithContext(ctx context.Context) (err error) {
4243	if tracing.IsEnabled() {
4244		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListPage.NextWithContext")
4245		defer func() {
4246			sc := -1
4247			if page.Response().Response.Response != nil {
4248				sc = page.Response().Response.Response.StatusCode
4249			}
4250			tracing.EndSpan(ctx, sc, err)
4251		}()
4252	}
4253	for {
4254		next, err := page.fn(ctx, page.gal)
4255		if err != nil {
4256			return err
4257		}
4258		page.gal = next
4259		if !next.hasNextLink() || !next.IsEmpty() {
4260			break
4261		}
4262	}
4263	return nil
4264}
4265
4266// Next advances to the next page of values.  If there was an error making
4267// the request the page does not advance and the error is returned.
4268// Deprecated: Use NextWithContext() instead.
4269func (page *GalleryApplicationListPage) Next() error {
4270	return page.NextWithContext(context.Background())
4271}
4272
4273// NotDone returns true if the page enumeration should be started or is not yet complete.
4274func (page GalleryApplicationListPage) NotDone() bool {
4275	return !page.gal.IsEmpty()
4276}
4277
4278// Response returns the raw server response from the last page request.
4279func (page GalleryApplicationListPage) Response() GalleryApplicationList {
4280	return page.gal
4281}
4282
4283// Values returns the slice of values for the current page or nil if there are no values.
4284func (page GalleryApplicationListPage) Values() []GalleryApplication {
4285	if page.gal.IsEmpty() {
4286		return nil
4287	}
4288	return *page.gal.Value
4289}
4290
4291// Creates a new instance of the GalleryApplicationListPage type.
4292func NewGalleryApplicationListPage(cur GalleryApplicationList, getNextPage func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)) GalleryApplicationListPage {
4293	return GalleryApplicationListPage{
4294		fn:  getNextPage,
4295		gal: cur,
4296	}
4297}
4298
4299// GalleryApplicationProperties describes the properties of a gallery Application Definition.
4300type GalleryApplicationProperties struct {
4301	// Description - The description of this gallery Application Definition resource. This property is updatable.
4302	Description *string `json:"description,omitempty"`
4303	// Eula - The Eula agreement for the gallery Application Definition.
4304	Eula *string `json:"eula,omitempty"`
4305	// PrivacyStatementURI - The privacy statement uri.
4306	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
4307	// ReleaseNoteURI - The release note uri.
4308	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
4309	// EndOfLifeDate - The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable.
4310	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
4311	// 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'
4312	SupportedOSType OperatingSystemTypes `json:"supportedOSType,omitempty"`
4313}
4314
4315// GalleryApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4316// long-running operation.
4317type GalleryApplicationsCreateOrUpdateFuture struct {
4318	azure.FutureAPI
4319	// Result returns the result of the asynchronous operation.
4320	// If the operation has not completed it will return an error.
4321	Result func(GalleryApplicationsClient) (GalleryApplication, error)
4322}
4323
4324// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4325func (future *GalleryApplicationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4326	var azFuture azure.Future
4327	if err := json.Unmarshal(body, &azFuture); err != nil {
4328		return err
4329	}
4330	future.FutureAPI = &azFuture
4331	future.Result = future.result
4332	return nil
4333}
4334
4335// result is the default implementation for GalleryApplicationsCreateOrUpdateFuture.Result.
4336func (future *GalleryApplicationsCreateOrUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
4337	var done bool
4338	done, err = future.DoneWithContext(context.Background(), client)
4339	if err != nil {
4340		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4341		return
4342	}
4343	if !done {
4344		ga.Response.Response = future.Response()
4345		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsCreateOrUpdateFuture")
4346		return
4347	}
4348	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4349	if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
4350		ga, err = client.CreateOrUpdateResponder(ga.Response.Response)
4351		if err != nil {
4352			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
4353		}
4354	}
4355	return
4356}
4357
4358// GalleryApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a
4359// long-running operation.
4360type GalleryApplicationsDeleteFuture struct {
4361	azure.FutureAPI
4362	// Result returns the result of the asynchronous operation.
4363	// If the operation has not completed it will return an error.
4364	Result func(GalleryApplicationsClient) (autorest.Response, error)
4365}
4366
4367// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4368func (future *GalleryApplicationsDeleteFuture) UnmarshalJSON(body []byte) error {
4369	var azFuture azure.Future
4370	if err := json.Unmarshal(body, &azFuture); err != nil {
4371		return err
4372	}
4373	future.FutureAPI = &azFuture
4374	future.Result = future.result
4375	return nil
4376}
4377
4378// result is the default implementation for GalleryApplicationsDeleteFuture.Result.
4379func (future *GalleryApplicationsDeleteFuture) result(client GalleryApplicationsClient) (ar autorest.Response, err error) {
4380	var done bool
4381	done, err = future.DoneWithContext(context.Background(), client)
4382	if err != nil {
4383		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsDeleteFuture", "Result", future.Response(), "Polling failure")
4384		return
4385	}
4386	if !done {
4387		ar.Response = future.Response()
4388		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsDeleteFuture")
4389		return
4390	}
4391	ar.Response = future.Response()
4392	return
4393}
4394
4395// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a
4396// long-running operation.
4397type GalleryApplicationsUpdateFuture struct {
4398	azure.FutureAPI
4399	// Result returns the result of the asynchronous operation.
4400	// If the operation has not completed it will return an error.
4401	Result func(GalleryApplicationsClient) (GalleryApplication, error)
4402}
4403
4404// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4405func (future *GalleryApplicationsUpdateFuture) UnmarshalJSON(body []byte) error {
4406	var azFuture azure.Future
4407	if err := json.Unmarshal(body, &azFuture); err != nil {
4408		return err
4409	}
4410	future.FutureAPI = &azFuture
4411	future.Result = future.result
4412	return nil
4413}
4414
4415// result is the default implementation for GalleryApplicationsUpdateFuture.Result.
4416func (future *GalleryApplicationsUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
4417	var done bool
4418	done, err = future.DoneWithContext(context.Background(), client)
4419	if err != nil {
4420		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", future.Response(), "Polling failure")
4421		return
4422	}
4423	if !done {
4424		ga.Response.Response = future.Response()
4425		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsUpdateFuture")
4426		return
4427	}
4428	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4429	if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
4430		ga, err = client.UpdateResponder(ga.Response.Response)
4431		if err != nil {
4432			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
4433		}
4434	}
4435	return
4436}
4437
4438// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to
4439// update.
4440type GalleryApplicationUpdate struct {
4441	*GalleryApplicationProperties `json:"properties,omitempty"`
4442	// ID - READ-ONLY; Resource Id
4443	ID *string `json:"id,omitempty"`
4444	// Name - READ-ONLY; Resource name
4445	Name *string `json:"name,omitempty"`
4446	// Type - READ-ONLY; Resource type
4447	Type *string `json:"type,omitempty"`
4448	// Tags - Resource tags
4449	Tags map[string]*string `json:"tags"`
4450}
4451
4452// MarshalJSON is the custom marshaler for GalleryApplicationUpdate.
4453func (gau GalleryApplicationUpdate) MarshalJSON() ([]byte, error) {
4454	objectMap := make(map[string]interface{})
4455	if gau.GalleryApplicationProperties != nil {
4456		objectMap["properties"] = gau.GalleryApplicationProperties
4457	}
4458	if gau.Tags != nil {
4459		objectMap["tags"] = gau.Tags
4460	}
4461	return json.Marshal(objectMap)
4462}
4463
4464// UnmarshalJSON is the custom unmarshaler for GalleryApplicationUpdate struct.
4465func (gau *GalleryApplicationUpdate) UnmarshalJSON(body []byte) error {
4466	var m map[string]*json.RawMessage
4467	err := json.Unmarshal(body, &m)
4468	if err != nil {
4469		return err
4470	}
4471	for k, v := range m {
4472		switch k {
4473		case "properties":
4474			if v != nil {
4475				var galleryApplicationProperties GalleryApplicationProperties
4476				err = json.Unmarshal(*v, &galleryApplicationProperties)
4477				if err != nil {
4478					return err
4479				}
4480				gau.GalleryApplicationProperties = &galleryApplicationProperties
4481			}
4482		case "id":
4483			if v != nil {
4484				var ID string
4485				err = json.Unmarshal(*v, &ID)
4486				if err != nil {
4487					return err
4488				}
4489				gau.ID = &ID
4490			}
4491		case "name":
4492			if v != nil {
4493				var name string
4494				err = json.Unmarshal(*v, &name)
4495				if err != nil {
4496					return err
4497				}
4498				gau.Name = &name
4499			}
4500		case "type":
4501			if v != nil {
4502				var typeVar string
4503				err = json.Unmarshal(*v, &typeVar)
4504				if err != nil {
4505					return err
4506				}
4507				gau.Type = &typeVar
4508			}
4509		case "tags":
4510			if v != nil {
4511				var tags map[string]*string
4512				err = json.Unmarshal(*v, &tags)
4513				if err != nil {
4514					return err
4515				}
4516				gau.Tags = tags
4517			}
4518		}
4519	}
4520
4521	return nil
4522}
4523
4524// GalleryApplicationVersion specifies information about the gallery Application Version that you want to
4525// create or update.
4526type GalleryApplicationVersion struct {
4527	autorest.Response                    `json:"-"`
4528	*GalleryApplicationVersionProperties `json:"properties,omitempty"`
4529	// ID - READ-ONLY; Resource Id
4530	ID *string `json:"id,omitempty"`
4531	// Name - READ-ONLY; Resource name
4532	Name *string `json:"name,omitempty"`
4533	// Type - READ-ONLY; Resource type
4534	Type *string `json:"type,omitempty"`
4535	// Location - Resource location
4536	Location *string `json:"location,omitempty"`
4537	// Tags - Resource tags
4538	Tags map[string]*string `json:"tags"`
4539}
4540
4541// MarshalJSON is the custom marshaler for GalleryApplicationVersion.
4542func (gav GalleryApplicationVersion) MarshalJSON() ([]byte, error) {
4543	objectMap := make(map[string]interface{})
4544	if gav.GalleryApplicationVersionProperties != nil {
4545		objectMap["properties"] = gav.GalleryApplicationVersionProperties
4546	}
4547	if gav.Location != nil {
4548		objectMap["location"] = gav.Location
4549	}
4550	if gav.Tags != nil {
4551		objectMap["tags"] = gav.Tags
4552	}
4553	return json.Marshal(objectMap)
4554}
4555
4556// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersion struct.
4557func (gav *GalleryApplicationVersion) UnmarshalJSON(body []byte) error {
4558	var m map[string]*json.RawMessage
4559	err := json.Unmarshal(body, &m)
4560	if err != nil {
4561		return err
4562	}
4563	for k, v := range m {
4564		switch k {
4565		case "properties":
4566			if v != nil {
4567				var galleryApplicationVersionProperties GalleryApplicationVersionProperties
4568				err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
4569				if err != nil {
4570					return err
4571				}
4572				gav.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
4573			}
4574		case "id":
4575			if v != nil {
4576				var ID string
4577				err = json.Unmarshal(*v, &ID)
4578				if err != nil {
4579					return err
4580				}
4581				gav.ID = &ID
4582			}
4583		case "name":
4584			if v != nil {
4585				var name string
4586				err = json.Unmarshal(*v, &name)
4587				if err != nil {
4588					return err
4589				}
4590				gav.Name = &name
4591			}
4592		case "type":
4593			if v != nil {
4594				var typeVar string
4595				err = json.Unmarshal(*v, &typeVar)
4596				if err != nil {
4597					return err
4598				}
4599				gav.Type = &typeVar
4600			}
4601		case "location":
4602			if v != nil {
4603				var location string
4604				err = json.Unmarshal(*v, &location)
4605				if err != nil {
4606					return err
4607				}
4608				gav.Location = &location
4609			}
4610		case "tags":
4611			if v != nil {
4612				var tags map[string]*string
4613				err = json.Unmarshal(*v, &tags)
4614				if err != nil {
4615					return err
4616				}
4617				gav.Tags = tags
4618			}
4619		}
4620	}
4621
4622	return nil
4623}
4624
4625// GalleryApplicationVersionList the List Gallery Application version operation response.
4626type GalleryApplicationVersionList struct {
4627	autorest.Response `json:"-"`
4628	// Value - A list of gallery Application Versions.
4629	Value *[]GalleryApplicationVersion `json:"value,omitempty"`
4630	// 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.
4631	NextLink *string `json:"nextLink,omitempty"`
4632}
4633
4634// GalleryApplicationVersionListIterator provides access to a complete listing of GalleryApplicationVersion
4635// values.
4636type GalleryApplicationVersionListIterator struct {
4637	i    int
4638	page GalleryApplicationVersionListPage
4639}
4640
4641// NextWithContext advances to the next value.  If there was an error making
4642// the request the iterator does not advance and the error is returned.
4643func (iter *GalleryApplicationVersionListIterator) NextWithContext(ctx context.Context) (err error) {
4644	if tracing.IsEnabled() {
4645		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListIterator.NextWithContext")
4646		defer func() {
4647			sc := -1
4648			if iter.Response().Response.Response != nil {
4649				sc = iter.Response().Response.Response.StatusCode
4650			}
4651			tracing.EndSpan(ctx, sc, err)
4652		}()
4653	}
4654	iter.i++
4655	if iter.i < len(iter.page.Values()) {
4656		return nil
4657	}
4658	err = iter.page.NextWithContext(ctx)
4659	if err != nil {
4660		iter.i--
4661		return err
4662	}
4663	iter.i = 0
4664	return nil
4665}
4666
4667// Next advances to the next value.  If there was an error making
4668// the request the iterator does not advance and the error is returned.
4669// Deprecated: Use NextWithContext() instead.
4670func (iter *GalleryApplicationVersionListIterator) Next() error {
4671	return iter.NextWithContext(context.Background())
4672}
4673
4674// NotDone returns true if the enumeration should be started or is not yet complete.
4675func (iter GalleryApplicationVersionListIterator) NotDone() bool {
4676	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4677}
4678
4679// Response returns the raw server response from the last page request.
4680func (iter GalleryApplicationVersionListIterator) Response() GalleryApplicationVersionList {
4681	return iter.page.Response()
4682}
4683
4684// Value returns the current value or a zero-initialized value if the
4685// iterator has advanced beyond the end of the collection.
4686func (iter GalleryApplicationVersionListIterator) Value() GalleryApplicationVersion {
4687	if !iter.page.NotDone() {
4688		return GalleryApplicationVersion{}
4689	}
4690	return iter.page.Values()[iter.i]
4691}
4692
4693// Creates a new instance of the GalleryApplicationVersionListIterator type.
4694func NewGalleryApplicationVersionListIterator(page GalleryApplicationVersionListPage) GalleryApplicationVersionListIterator {
4695	return GalleryApplicationVersionListIterator{page: page}
4696}
4697
4698// IsEmpty returns true if the ListResult contains no values.
4699func (gavl GalleryApplicationVersionList) IsEmpty() bool {
4700	return gavl.Value == nil || len(*gavl.Value) == 0
4701}
4702
4703// hasNextLink returns true if the NextLink is not empty.
4704func (gavl GalleryApplicationVersionList) hasNextLink() bool {
4705	return gavl.NextLink != nil && len(*gavl.NextLink) != 0
4706}
4707
4708// galleryApplicationVersionListPreparer prepares a request to retrieve the next set of results.
4709// It returns nil if no more results exist.
4710func (gavl GalleryApplicationVersionList) galleryApplicationVersionListPreparer(ctx context.Context) (*http.Request, error) {
4711	if !gavl.hasNextLink() {
4712		return nil, nil
4713	}
4714	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4715		autorest.AsJSON(),
4716		autorest.AsGet(),
4717		autorest.WithBaseURL(to.String(gavl.NextLink)))
4718}
4719
4720// GalleryApplicationVersionListPage contains a page of GalleryApplicationVersion values.
4721type GalleryApplicationVersionListPage struct {
4722	fn   func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)
4723	gavl GalleryApplicationVersionList
4724}
4725
4726// NextWithContext advances to the next page of values.  If there was an error making
4727// the request the page does not advance and the error is returned.
4728func (page *GalleryApplicationVersionListPage) NextWithContext(ctx context.Context) (err error) {
4729	if tracing.IsEnabled() {
4730		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListPage.NextWithContext")
4731		defer func() {
4732			sc := -1
4733			if page.Response().Response.Response != nil {
4734				sc = page.Response().Response.Response.StatusCode
4735			}
4736			tracing.EndSpan(ctx, sc, err)
4737		}()
4738	}
4739	for {
4740		next, err := page.fn(ctx, page.gavl)
4741		if err != nil {
4742			return err
4743		}
4744		page.gavl = next
4745		if !next.hasNextLink() || !next.IsEmpty() {
4746			break
4747		}
4748	}
4749	return nil
4750}
4751
4752// Next advances to the next page of values.  If there was an error making
4753// the request the page does not advance and the error is returned.
4754// Deprecated: Use NextWithContext() instead.
4755func (page *GalleryApplicationVersionListPage) Next() error {
4756	return page.NextWithContext(context.Background())
4757}
4758
4759// NotDone returns true if the page enumeration should be started or is not yet complete.
4760func (page GalleryApplicationVersionListPage) NotDone() bool {
4761	return !page.gavl.IsEmpty()
4762}
4763
4764// Response returns the raw server response from the last page request.
4765func (page GalleryApplicationVersionListPage) Response() GalleryApplicationVersionList {
4766	return page.gavl
4767}
4768
4769// Values returns the slice of values for the current page or nil if there are no values.
4770func (page GalleryApplicationVersionListPage) Values() []GalleryApplicationVersion {
4771	if page.gavl.IsEmpty() {
4772		return nil
4773	}
4774	return *page.gavl.Value
4775}
4776
4777// Creates a new instance of the GalleryApplicationVersionListPage type.
4778func NewGalleryApplicationVersionListPage(cur GalleryApplicationVersionList, getNextPage func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)) GalleryApplicationVersionListPage {
4779	return GalleryApplicationVersionListPage{
4780		fn:   getNextPage,
4781		gavl: cur,
4782	}
4783}
4784
4785// GalleryApplicationVersionProperties describes the properties of a gallery Image Version.
4786type GalleryApplicationVersionProperties struct {
4787	PublishingProfile *GalleryApplicationVersionPublishingProfile `json:"publishingProfile,omitempty"`
4788	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1Updating', 'ProvisioningState1Failed', 'ProvisioningState1Succeeded', 'ProvisioningState1Deleting', 'ProvisioningState1Migrating'
4789	ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"`
4790	// ReplicationStatus - READ-ONLY
4791	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
4792}
4793
4794// MarshalJSON is the custom marshaler for GalleryApplicationVersionProperties.
4795func (gavp GalleryApplicationVersionProperties) MarshalJSON() ([]byte, error) {
4796	objectMap := make(map[string]interface{})
4797	if gavp.PublishingProfile != nil {
4798		objectMap["publishingProfile"] = gavp.PublishingProfile
4799	}
4800	return json.Marshal(objectMap)
4801}
4802
4803// GalleryApplicationVersionPublishingProfile the publishing profile of a gallery image version.
4804type GalleryApplicationVersionPublishingProfile struct {
4805	Source        *UserArtifactSource `json:"source,omitempty"`
4806	ManageActions *UserArtifactManage `json:"manageActions,omitempty"`
4807	// EnableHealthCheck - Optional. Whether or not this application reports health.
4808	EnableHealthCheck *bool `json:"enableHealthCheck,omitempty"`
4809	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
4810	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
4811	// 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.
4812	ReplicaCount *int32 `json:"replicaCount,omitempty"`
4813	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
4814	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
4815	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
4816	PublishedDate *date.Time `json:"publishedDate,omitempty"`
4817	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
4818	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
4819	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
4820	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
4821}
4822
4823// MarshalJSON is the custom marshaler for GalleryApplicationVersionPublishingProfile.
4824func (gavpp GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, error) {
4825	objectMap := make(map[string]interface{})
4826	if gavpp.Source != nil {
4827		objectMap["source"] = gavpp.Source
4828	}
4829	if gavpp.ManageActions != nil {
4830		objectMap["manageActions"] = gavpp.ManageActions
4831	}
4832	if gavpp.EnableHealthCheck != nil {
4833		objectMap["enableHealthCheck"] = gavpp.EnableHealthCheck
4834	}
4835	if gavpp.TargetRegions != nil {
4836		objectMap["targetRegions"] = gavpp.TargetRegions
4837	}
4838	if gavpp.ReplicaCount != nil {
4839		objectMap["replicaCount"] = gavpp.ReplicaCount
4840	}
4841	if gavpp.ExcludeFromLatest != nil {
4842		objectMap["excludeFromLatest"] = gavpp.ExcludeFromLatest
4843	}
4844	if gavpp.EndOfLifeDate != nil {
4845		objectMap["endOfLifeDate"] = gavpp.EndOfLifeDate
4846	}
4847	if gavpp.StorageAccountType != "" {
4848		objectMap["storageAccountType"] = gavpp.StorageAccountType
4849	}
4850	return json.Marshal(objectMap)
4851}
4852
4853// GalleryApplicationVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
4854// of a long-running operation.
4855type GalleryApplicationVersionsCreateOrUpdateFuture struct {
4856	azure.FutureAPI
4857	// Result returns the result of the asynchronous operation.
4858	// If the operation has not completed it will return an error.
4859	Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
4860}
4861
4862// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4863func (future *GalleryApplicationVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4864	var azFuture azure.Future
4865	if err := json.Unmarshal(body, &azFuture); err != nil {
4866		return err
4867	}
4868	future.FutureAPI = &azFuture
4869	future.Result = future.result
4870	return nil
4871}
4872
4873// result is the default implementation for GalleryApplicationVersionsCreateOrUpdateFuture.Result.
4874func (future *GalleryApplicationVersionsCreateOrUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
4875	var done bool
4876	done, err = future.DoneWithContext(context.Background(), client)
4877	if err != nil {
4878		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4879		return
4880	}
4881	if !done {
4882		gav.Response.Response = future.Response()
4883		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsCreateOrUpdateFuture")
4884		return
4885	}
4886	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4887	if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
4888		gav, err = client.CreateOrUpdateResponder(gav.Response.Response)
4889		if err != nil {
4890			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
4891		}
4892	}
4893	return
4894}
4895
4896// GalleryApplicationVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
4897// long-running operation.
4898type GalleryApplicationVersionsDeleteFuture struct {
4899	azure.FutureAPI
4900	// Result returns the result of the asynchronous operation.
4901	// If the operation has not completed it will return an error.
4902	Result func(GalleryApplicationVersionsClient) (autorest.Response, error)
4903}
4904
4905// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4906func (future *GalleryApplicationVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
4907	var azFuture azure.Future
4908	if err := json.Unmarshal(body, &azFuture); err != nil {
4909		return err
4910	}
4911	future.FutureAPI = &azFuture
4912	future.Result = future.result
4913	return nil
4914}
4915
4916// result is the default implementation for GalleryApplicationVersionsDeleteFuture.Result.
4917func (future *GalleryApplicationVersionsDeleteFuture) result(client GalleryApplicationVersionsClient) (ar autorest.Response, err error) {
4918	var done bool
4919	done, err = future.DoneWithContext(context.Background(), client)
4920	if err != nil {
4921		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
4922		return
4923	}
4924	if !done {
4925		ar.Response = future.Response()
4926		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsDeleteFuture")
4927		return
4928	}
4929	ar.Response = future.Response()
4930	return
4931}
4932
4933// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
4934// long-running operation.
4935type GalleryApplicationVersionsUpdateFuture struct {
4936	azure.FutureAPI
4937	// Result returns the result of the asynchronous operation.
4938	// If the operation has not completed it will return an error.
4939	Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
4940}
4941
4942// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4943func (future *GalleryApplicationVersionsUpdateFuture) UnmarshalJSON(body []byte) error {
4944	var azFuture azure.Future
4945	if err := json.Unmarshal(body, &azFuture); err != nil {
4946		return err
4947	}
4948	future.FutureAPI = &azFuture
4949	future.Result = future.result
4950	return nil
4951}
4952
4953// result is the default implementation for GalleryApplicationVersionsUpdateFuture.Result.
4954func (future *GalleryApplicationVersionsUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
4955	var done bool
4956	done, err = future.DoneWithContext(context.Background(), client)
4957	if err != nil {
4958		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
4959		return
4960	}
4961	if !done {
4962		gav.Response.Response = future.Response()
4963		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsUpdateFuture")
4964		return
4965	}
4966	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4967	if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
4968		gav, err = client.UpdateResponder(gav.Response.Response)
4969		if err != nil {
4970			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
4971		}
4972	}
4973	return
4974}
4975
4976// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you
4977// want to update.
4978type GalleryApplicationVersionUpdate struct {
4979	*GalleryApplicationVersionProperties `json:"properties,omitempty"`
4980	// ID - READ-ONLY; Resource Id
4981	ID *string `json:"id,omitempty"`
4982	// Name - READ-ONLY; Resource name
4983	Name *string `json:"name,omitempty"`
4984	// Type - READ-ONLY; Resource type
4985	Type *string `json:"type,omitempty"`
4986	// Tags - Resource tags
4987	Tags map[string]*string `json:"tags"`
4988}
4989
4990// MarshalJSON is the custom marshaler for GalleryApplicationVersionUpdate.
4991func (gavu GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) {
4992	objectMap := make(map[string]interface{})
4993	if gavu.GalleryApplicationVersionProperties != nil {
4994		objectMap["properties"] = gavu.GalleryApplicationVersionProperties
4995	}
4996	if gavu.Tags != nil {
4997		objectMap["tags"] = gavu.Tags
4998	}
4999	return json.Marshal(objectMap)
5000}
5001
5002// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersionUpdate struct.
5003func (gavu *GalleryApplicationVersionUpdate) UnmarshalJSON(body []byte) error {
5004	var m map[string]*json.RawMessage
5005	err := json.Unmarshal(body, &m)
5006	if err != nil {
5007		return err
5008	}
5009	for k, v := range m {
5010		switch k {
5011		case "properties":
5012			if v != nil {
5013				var galleryApplicationVersionProperties GalleryApplicationVersionProperties
5014				err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
5015				if err != nil {
5016					return err
5017				}
5018				gavu.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
5019			}
5020		case "id":
5021			if v != nil {
5022				var ID string
5023				err = json.Unmarshal(*v, &ID)
5024				if err != nil {
5025					return err
5026				}
5027				gavu.ID = &ID
5028			}
5029		case "name":
5030			if v != nil {
5031				var name string
5032				err = json.Unmarshal(*v, &name)
5033				if err != nil {
5034					return err
5035				}
5036				gavu.Name = &name
5037			}
5038		case "type":
5039			if v != nil {
5040				var typeVar string
5041				err = json.Unmarshal(*v, &typeVar)
5042				if err != nil {
5043					return err
5044				}
5045				gavu.Type = &typeVar
5046			}
5047		case "tags":
5048			if v != nil {
5049				var tags map[string]*string
5050				err = json.Unmarshal(*v, &tags)
5051				if err != nil {
5052					return err
5053				}
5054				gavu.Tags = tags
5055			}
5056		}
5057	}
5058
5059	return nil
5060}
5061
5062// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile.
5063type GalleryArtifactPublishingProfileBase struct {
5064	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
5065	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
5066	// 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.
5067	ReplicaCount *int32 `json:"replicaCount,omitempty"`
5068	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
5069	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
5070	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
5071	PublishedDate *date.Time `json:"publishedDate,omitempty"`
5072	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
5073	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
5074	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
5075	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
5076}
5077
5078// MarshalJSON is the custom marshaler for GalleryArtifactPublishingProfileBase.
5079func (gappb GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error) {
5080	objectMap := make(map[string]interface{})
5081	if gappb.TargetRegions != nil {
5082		objectMap["targetRegions"] = gappb.TargetRegions
5083	}
5084	if gappb.ReplicaCount != nil {
5085		objectMap["replicaCount"] = gappb.ReplicaCount
5086	}
5087	if gappb.ExcludeFromLatest != nil {
5088		objectMap["excludeFromLatest"] = gappb.ExcludeFromLatest
5089	}
5090	if gappb.EndOfLifeDate != nil {
5091		objectMap["endOfLifeDate"] = gappb.EndOfLifeDate
5092	}
5093	if gappb.StorageAccountType != "" {
5094		objectMap["storageAccountType"] = gappb.StorageAccountType
5095	}
5096	return json.Marshal(objectMap)
5097}
5098
5099// GalleryArtifactSource the source image from which the Image Version is going to be created.
5100type GalleryArtifactSource struct {
5101	ManagedImage *ManagedArtifact `json:"managedImage,omitempty"`
5102}
5103
5104// GalleryArtifactVersionSource the gallery artifact version source.
5105type GalleryArtifactVersionSource struct {
5106	// ID - The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, or user image.
5107	ID *string `json:"id,omitempty"`
5108}
5109
5110// GalleryDataDiskImage this is the data disk image.
5111type GalleryDataDiskImage struct {
5112	// Lun - 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.
5113	Lun *int32 `json:"lun,omitempty"`
5114	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
5115	SizeInGB *int32 `json:"sizeInGB,omitempty"`
5116	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
5117	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
5118	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
5119}
5120
5121// MarshalJSON is the custom marshaler for GalleryDataDiskImage.
5122func (gddi GalleryDataDiskImage) MarshalJSON() ([]byte, error) {
5123	objectMap := make(map[string]interface{})
5124	if gddi.Lun != nil {
5125		objectMap["lun"] = gddi.Lun
5126	}
5127	if gddi.HostCaching != "" {
5128		objectMap["hostCaching"] = gddi.HostCaching
5129	}
5130	if gddi.Source != nil {
5131		objectMap["source"] = gddi.Source
5132	}
5133	return json.Marshal(objectMap)
5134}
5135
5136// GalleryDiskImage this is the disk image base class.
5137type GalleryDiskImage struct {
5138	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
5139	SizeInGB *int32 `json:"sizeInGB,omitempty"`
5140	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
5141	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
5142	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
5143}
5144
5145// MarshalJSON is the custom marshaler for GalleryDiskImage.
5146func (gdi GalleryDiskImage) MarshalJSON() ([]byte, error) {
5147	objectMap := make(map[string]interface{})
5148	if gdi.HostCaching != "" {
5149		objectMap["hostCaching"] = gdi.HostCaching
5150	}
5151	if gdi.Source != nil {
5152		objectMap["source"] = gdi.Source
5153	}
5154	return json.Marshal(objectMap)
5155}
5156
5157// GalleryIdentifier describes the gallery unique name.
5158type GalleryIdentifier struct {
5159	// UniqueName - READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure.
5160	UniqueName *string `json:"uniqueName,omitempty"`
5161}
5162
5163// MarshalJSON is the custom marshaler for GalleryIdentifier.
5164func (gi GalleryIdentifier) MarshalJSON() ([]byte, error) {
5165	objectMap := make(map[string]interface{})
5166	return json.Marshal(objectMap)
5167}
5168
5169// GalleryImage specifies information about the gallery Image Definition that you want to create or update.
5170type GalleryImage struct {
5171	autorest.Response       `json:"-"`
5172	*GalleryImageProperties `json:"properties,omitempty"`
5173	// ID - READ-ONLY; Resource Id
5174	ID *string `json:"id,omitempty"`
5175	// Name - READ-ONLY; Resource name
5176	Name *string `json:"name,omitempty"`
5177	// Type - READ-ONLY; Resource type
5178	Type *string `json:"type,omitempty"`
5179	// Location - Resource location
5180	Location *string `json:"location,omitempty"`
5181	// Tags - Resource tags
5182	Tags map[string]*string `json:"tags"`
5183}
5184
5185// MarshalJSON is the custom marshaler for GalleryImage.
5186func (gi GalleryImage) MarshalJSON() ([]byte, error) {
5187	objectMap := make(map[string]interface{})
5188	if gi.GalleryImageProperties != nil {
5189		objectMap["properties"] = gi.GalleryImageProperties
5190	}
5191	if gi.Location != nil {
5192		objectMap["location"] = gi.Location
5193	}
5194	if gi.Tags != nil {
5195		objectMap["tags"] = gi.Tags
5196	}
5197	return json.Marshal(objectMap)
5198}
5199
5200// UnmarshalJSON is the custom unmarshaler for GalleryImage struct.
5201func (gi *GalleryImage) UnmarshalJSON(body []byte) error {
5202	var m map[string]*json.RawMessage
5203	err := json.Unmarshal(body, &m)
5204	if err != nil {
5205		return err
5206	}
5207	for k, v := range m {
5208		switch k {
5209		case "properties":
5210			if v != nil {
5211				var galleryImageProperties GalleryImageProperties
5212				err = json.Unmarshal(*v, &galleryImageProperties)
5213				if err != nil {
5214					return err
5215				}
5216				gi.GalleryImageProperties = &galleryImageProperties
5217			}
5218		case "id":
5219			if v != nil {
5220				var ID string
5221				err = json.Unmarshal(*v, &ID)
5222				if err != nil {
5223					return err
5224				}
5225				gi.ID = &ID
5226			}
5227		case "name":
5228			if v != nil {
5229				var name string
5230				err = json.Unmarshal(*v, &name)
5231				if err != nil {
5232					return err
5233				}
5234				gi.Name = &name
5235			}
5236		case "type":
5237			if v != nil {
5238				var typeVar string
5239				err = json.Unmarshal(*v, &typeVar)
5240				if err != nil {
5241					return err
5242				}
5243				gi.Type = &typeVar
5244			}
5245		case "location":
5246			if v != nil {
5247				var location string
5248				err = json.Unmarshal(*v, &location)
5249				if err != nil {
5250					return err
5251				}
5252				gi.Location = &location
5253			}
5254		case "tags":
5255			if v != nil {
5256				var tags map[string]*string
5257				err = json.Unmarshal(*v, &tags)
5258				if err != nil {
5259					return err
5260				}
5261				gi.Tags = tags
5262			}
5263		}
5264	}
5265
5266	return nil
5267}
5268
5269// GalleryImageIdentifier this is the gallery Image Definition identifier.
5270type GalleryImageIdentifier struct {
5271	// Publisher - The name of the gallery Image Definition publisher.
5272	Publisher *string `json:"publisher,omitempty"`
5273	// Offer - The name of the gallery Image Definition offer.
5274	Offer *string `json:"offer,omitempty"`
5275	// Sku - The name of the gallery Image Definition SKU.
5276	Sku *string `json:"sku,omitempty"`
5277}
5278
5279// GalleryImageList the List Gallery Images operation response.
5280type GalleryImageList struct {
5281	autorest.Response `json:"-"`
5282	// Value - A list of Shared Image Gallery images.
5283	Value *[]GalleryImage `json:"value,omitempty"`
5284	// 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.
5285	NextLink *string `json:"nextLink,omitempty"`
5286}
5287
5288// GalleryImageListIterator provides access to a complete listing of GalleryImage values.
5289type GalleryImageListIterator struct {
5290	i    int
5291	page GalleryImageListPage
5292}
5293
5294// NextWithContext advances to the next value.  If there was an error making
5295// the request the iterator does not advance and the error is returned.
5296func (iter *GalleryImageListIterator) NextWithContext(ctx context.Context) (err error) {
5297	if tracing.IsEnabled() {
5298		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListIterator.NextWithContext")
5299		defer func() {
5300			sc := -1
5301			if iter.Response().Response.Response != nil {
5302				sc = iter.Response().Response.Response.StatusCode
5303			}
5304			tracing.EndSpan(ctx, sc, err)
5305		}()
5306	}
5307	iter.i++
5308	if iter.i < len(iter.page.Values()) {
5309		return nil
5310	}
5311	err = iter.page.NextWithContext(ctx)
5312	if err != nil {
5313		iter.i--
5314		return err
5315	}
5316	iter.i = 0
5317	return nil
5318}
5319
5320// Next advances to the next value.  If there was an error making
5321// the request the iterator does not advance and the error is returned.
5322// Deprecated: Use NextWithContext() instead.
5323func (iter *GalleryImageListIterator) Next() error {
5324	return iter.NextWithContext(context.Background())
5325}
5326
5327// NotDone returns true if the enumeration should be started or is not yet complete.
5328func (iter GalleryImageListIterator) NotDone() bool {
5329	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5330}
5331
5332// Response returns the raw server response from the last page request.
5333func (iter GalleryImageListIterator) Response() GalleryImageList {
5334	return iter.page.Response()
5335}
5336
5337// Value returns the current value or a zero-initialized value if the
5338// iterator has advanced beyond the end of the collection.
5339func (iter GalleryImageListIterator) Value() GalleryImage {
5340	if !iter.page.NotDone() {
5341		return GalleryImage{}
5342	}
5343	return iter.page.Values()[iter.i]
5344}
5345
5346// Creates a new instance of the GalleryImageListIterator type.
5347func NewGalleryImageListIterator(page GalleryImageListPage) GalleryImageListIterator {
5348	return GalleryImageListIterator{page: page}
5349}
5350
5351// IsEmpty returns true if the ListResult contains no values.
5352func (gil GalleryImageList) IsEmpty() bool {
5353	return gil.Value == nil || len(*gil.Value) == 0
5354}
5355
5356// hasNextLink returns true if the NextLink is not empty.
5357func (gil GalleryImageList) hasNextLink() bool {
5358	return gil.NextLink != nil && len(*gil.NextLink) != 0
5359}
5360
5361// galleryImageListPreparer prepares a request to retrieve the next set of results.
5362// It returns nil if no more results exist.
5363func (gil GalleryImageList) galleryImageListPreparer(ctx context.Context) (*http.Request, error) {
5364	if !gil.hasNextLink() {
5365		return nil, nil
5366	}
5367	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5368		autorest.AsJSON(),
5369		autorest.AsGet(),
5370		autorest.WithBaseURL(to.String(gil.NextLink)))
5371}
5372
5373// GalleryImageListPage contains a page of GalleryImage values.
5374type GalleryImageListPage struct {
5375	fn  func(context.Context, GalleryImageList) (GalleryImageList, error)
5376	gil GalleryImageList
5377}
5378
5379// NextWithContext advances to the next page of values.  If there was an error making
5380// the request the page does not advance and the error is returned.
5381func (page *GalleryImageListPage) NextWithContext(ctx context.Context) (err error) {
5382	if tracing.IsEnabled() {
5383		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListPage.NextWithContext")
5384		defer func() {
5385			sc := -1
5386			if page.Response().Response.Response != nil {
5387				sc = page.Response().Response.Response.StatusCode
5388			}
5389			tracing.EndSpan(ctx, sc, err)
5390		}()
5391	}
5392	for {
5393		next, err := page.fn(ctx, page.gil)
5394		if err != nil {
5395			return err
5396		}
5397		page.gil = next
5398		if !next.hasNextLink() || !next.IsEmpty() {
5399			break
5400		}
5401	}
5402	return nil
5403}
5404
5405// Next advances to the next page of values.  If there was an error making
5406// the request the page does not advance and the error is returned.
5407// Deprecated: Use NextWithContext() instead.
5408func (page *GalleryImageListPage) Next() error {
5409	return page.NextWithContext(context.Background())
5410}
5411
5412// NotDone returns true if the page enumeration should be started or is not yet complete.
5413func (page GalleryImageListPage) NotDone() bool {
5414	return !page.gil.IsEmpty()
5415}
5416
5417// Response returns the raw server response from the last page request.
5418func (page GalleryImageListPage) Response() GalleryImageList {
5419	return page.gil
5420}
5421
5422// Values returns the slice of values for the current page or nil if there are no values.
5423func (page GalleryImageListPage) Values() []GalleryImage {
5424	if page.gil.IsEmpty() {
5425		return nil
5426	}
5427	return *page.gil.Value
5428}
5429
5430// Creates a new instance of the GalleryImageListPage type.
5431func NewGalleryImageListPage(cur GalleryImageList, getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage {
5432	return GalleryImageListPage{
5433		fn:  getNextPage,
5434		gil: cur,
5435	}
5436}
5437
5438// GalleryImageProperties describes the properties of a gallery Image Definition.
5439type GalleryImageProperties struct {
5440	// Description - The description of this gallery Image Definition resource. This property is updatable.
5441	Description *string `json:"description,omitempty"`
5442	// Eula - The Eula agreement for the gallery Image Definition.
5443	Eula *string `json:"eula,omitempty"`
5444	// PrivacyStatementURI - The privacy statement uri.
5445	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
5446	// ReleaseNoteURI - The release note uri.
5447	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
5448	// 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'
5449	OsType OperatingSystemTypes `json:"osType,omitempty"`
5450	// 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'
5451	OsState OperatingSystemStateTypes `json:"osState,omitempty"`
5452	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
5453	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
5454	// EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable.
5455	EndOfLifeDate *date.Time                       `json:"endOfLifeDate,omitempty"`
5456	Identifier    *GalleryImageIdentifier          `json:"identifier,omitempty"`
5457	Recommended   *RecommendedMachineConfiguration `json:"recommended,omitempty"`
5458	Disallowed    *Disallowed                      `json:"disallowed,omitempty"`
5459	PurchasePlan  *ImagePurchasePlan               `json:"purchasePlan,omitempty"`
5460	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState2Creating', 'ProvisioningState2Updating', 'ProvisioningState2Failed', 'ProvisioningState2Succeeded', 'ProvisioningState2Deleting', 'ProvisioningState2Migrating'
5461	ProvisioningState ProvisioningState2 `json:"provisioningState,omitempty"`
5462}
5463
5464// MarshalJSON is the custom marshaler for GalleryImageProperties.
5465func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) {
5466	objectMap := make(map[string]interface{})
5467	if gip.Description != nil {
5468		objectMap["description"] = gip.Description
5469	}
5470	if gip.Eula != nil {
5471		objectMap["eula"] = gip.Eula
5472	}
5473	if gip.PrivacyStatementURI != nil {
5474		objectMap["privacyStatementUri"] = gip.PrivacyStatementURI
5475	}
5476	if gip.ReleaseNoteURI != nil {
5477		objectMap["releaseNoteUri"] = gip.ReleaseNoteURI
5478	}
5479	if gip.OsType != "" {
5480		objectMap["osType"] = gip.OsType
5481	}
5482	if gip.OsState != "" {
5483		objectMap["osState"] = gip.OsState
5484	}
5485	if gip.HyperVGeneration != "" {
5486		objectMap["hyperVGeneration"] = gip.HyperVGeneration
5487	}
5488	if gip.EndOfLifeDate != nil {
5489		objectMap["endOfLifeDate"] = gip.EndOfLifeDate
5490	}
5491	if gip.Identifier != nil {
5492		objectMap["identifier"] = gip.Identifier
5493	}
5494	if gip.Recommended != nil {
5495		objectMap["recommended"] = gip.Recommended
5496	}
5497	if gip.Disallowed != nil {
5498		objectMap["disallowed"] = gip.Disallowed
5499	}
5500	if gip.PurchasePlan != nil {
5501		objectMap["purchasePlan"] = gip.PurchasePlan
5502	}
5503	return json.Marshal(objectMap)
5504}
5505
5506// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5507// long-running operation.
5508type GalleryImagesCreateOrUpdateFuture struct {
5509	azure.FutureAPI
5510	// Result returns the result of the asynchronous operation.
5511	// If the operation has not completed it will return an error.
5512	Result func(GalleryImagesClient) (GalleryImage, error)
5513}
5514
5515// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5516func (future *GalleryImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5517	var azFuture azure.Future
5518	if err := json.Unmarshal(body, &azFuture); err != nil {
5519		return err
5520	}
5521	future.FutureAPI = &azFuture
5522	future.Result = future.result
5523	return nil
5524}
5525
5526// result is the default implementation for GalleryImagesCreateOrUpdateFuture.Result.
5527func (future *GalleryImagesCreateOrUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) {
5528	var done bool
5529	done, err = future.DoneWithContext(context.Background(), client)
5530	if err != nil {
5531		err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5532		return
5533	}
5534	if !done {
5535		gi.Response.Response = future.Response()
5536		err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture")
5537		return
5538	}
5539	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5540	if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
5541		gi, err = client.CreateOrUpdateResponder(gi.Response.Response)
5542		if err != nil {
5543			err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
5544		}
5545	}
5546	return
5547}
5548
5549// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5550// operation.
5551type GalleryImagesDeleteFuture struct {
5552	azure.FutureAPI
5553	// Result returns the result of the asynchronous operation.
5554	// If the operation has not completed it will return an error.
5555	Result func(GalleryImagesClient) (autorest.Response, error)
5556}
5557
5558// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5559func (future *GalleryImagesDeleteFuture) UnmarshalJSON(body []byte) error {
5560	var azFuture azure.Future
5561	if err := json.Unmarshal(body, &azFuture); err != nil {
5562		return err
5563	}
5564	future.FutureAPI = &azFuture
5565	future.Result = future.result
5566	return nil
5567}
5568
5569// result is the default implementation for GalleryImagesDeleteFuture.Result.
5570func (future *GalleryImagesDeleteFuture) result(client GalleryImagesClient) (ar autorest.Response, err error) {
5571	var done bool
5572	done, err = future.DoneWithContext(context.Background(), client)
5573	if err != nil {
5574		err = autorest.NewErrorWithError(err, "compute.GalleryImagesDeleteFuture", "Result", future.Response(), "Polling failure")
5575		return
5576	}
5577	if !done {
5578		ar.Response = future.Response()
5579		err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture")
5580		return
5581	}
5582	ar.Response = future.Response()
5583	return
5584}
5585
5586// GalleryImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
5587// operation.
5588type GalleryImagesUpdateFuture struct {
5589	azure.FutureAPI
5590	// Result returns the result of the asynchronous operation.
5591	// If the operation has not completed it will return an error.
5592	Result func(GalleryImagesClient) (GalleryImage, error)
5593}
5594
5595// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5596func (future *GalleryImagesUpdateFuture) UnmarshalJSON(body []byte) error {
5597	var azFuture azure.Future
5598	if err := json.Unmarshal(body, &azFuture); err != nil {
5599		return err
5600	}
5601	future.FutureAPI = &azFuture
5602	future.Result = future.result
5603	return nil
5604}
5605
5606// result is the default implementation for GalleryImagesUpdateFuture.Result.
5607func (future *GalleryImagesUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) {
5608	var done bool
5609	done, err = future.DoneWithContext(context.Background(), client)
5610	if err != nil {
5611		err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", future.Response(), "Polling failure")
5612		return
5613	}
5614	if !done {
5615		gi.Response.Response = future.Response()
5616		err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesUpdateFuture")
5617		return
5618	}
5619	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5620	if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
5621		gi, err = client.UpdateResponder(gi.Response.Response)
5622		if err != nil {
5623			err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
5624		}
5625	}
5626	return
5627}
5628
5629// GalleryImageUpdate specifies information about the gallery Image Definition that you want to update.
5630type GalleryImageUpdate struct {
5631	*GalleryImageProperties `json:"properties,omitempty"`
5632	// ID - READ-ONLY; Resource Id
5633	ID *string `json:"id,omitempty"`
5634	// Name - READ-ONLY; Resource name
5635	Name *string `json:"name,omitempty"`
5636	// Type - READ-ONLY; Resource type
5637	Type *string `json:"type,omitempty"`
5638	// Tags - Resource tags
5639	Tags map[string]*string `json:"tags"`
5640}
5641
5642// MarshalJSON is the custom marshaler for GalleryImageUpdate.
5643func (giu GalleryImageUpdate) MarshalJSON() ([]byte, error) {
5644	objectMap := make(map[string]interface{})
5645	if giu.GalleryImageProperties != nil {
5646		objectMap["properties"] = giu.GalleryImageProperties
5647	}
5648	if giu.Tags != nil {
5649		objectMap["tags"] = giu.Tags
5650	}
5651	return json.Marshal(objectMap)
5652}
5653
5654// UnmarshalJSON is the custom unmarshaler for GalleryImageUpdate struct.
5655func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error {
5656	var m map[string]*json.RawMessage
5657	err := json.Unmarshal(body, &m)
5658	if err != nil {
5659		return err
5660	}
5661	for k, v := range m {
5662		switch k {
5663		case "properties":
5664			if v != nil {
5665				var galleryImageProperties GalleryImageProperties
5666				err = json.Unmarshal(*v, &galleryImageProperties)
5667				if err != nil {
5668					return err
5669				}
5670				giu.GalleryImageProperties = &galleryImageProperties
5671			}
5672		case "id":
5673			if v != nil {
5674				var ID string
5675				err = json.Unmarshal(*v, &ID)
5676				if err != nil {
5677					return err
5678				}
5679				giu.ID = &ID
5680			}
5681		case "name":
5682			if v != nil {
5683				var name string
5684				err = json.Unmarshal(*v, &name)
5685				if err != nil {
5686					return err
5687				}
5688				giu.Name = &name
5689			}
5690		case "type":
5691			if v != nil {
5692				var typeVar string
5693				err = json.Unmarshal(*v, &typeVar)
5694				if err != nil {
5695					return err
5696				}
5697				giu.Type = &typeVar
5698			}
5699		case "tags":
5700			if v != nil {
5701				var tags map[string]*string
5702				err = json.Unmarshal(*v, &tags)
5703				if err != nil {
5704					return err
5705				}
5706				giu.Tags = tags
5707			}
5708		}
5709	}
5710
5711	return nil
5712}
5713
5714// GalleryImageVersion specifies information about the gallery Image Version that you want to create or
5715// update.
5716type GalleryImageVersion struct {
5717	autorest.Response              `json:"-"`
5718	*GalleryImageVersionProperties `json:"properties,omitempty"`
5719	// ID - READ-ONLY; Resource Id
5720	ID *string `json:"id,omitempty"`
5721	// Name - READ-ONLY; Resource name
5722	Name *string `json:"name,omitempty"`
5723	// Type - READ-ONLY; Resource type
5724	Type *string `json:"type,omitempty"`
5725	// Location - Resource location
5726	Location *string `json:"location,omitempty"`
5727	// Tags - Resource tags
5728	Tags map[string]*string `json:"tags"`
5729}
5730
5731// MarshalJSON is the custom marshaler for GalleryImageVersion.
5732func (giv GalleryImageVersion) MarshalJSON() ([]byte, error) {
5733	objectMap := make(map[string]interface{})
5734	if giv.GalleryImageVersionProperties != nil {
5735		objectMap["properties"] = giv.GalleryImageVersionProperties
5736	}
5737	if giv.Location != nil {
5738		objectMap["location"] = giv.Location
5739	}
5740	if giv.Tags != nil {
5741		objectMap["tags"] = giv.Tags
5742	}
5743	return json.Marshal(objectMap)
5744}
5745
5746// UnmarshalJSON is the custom unmarshaler for GalleryImageVersion struct.
5747func (giv *GalleryImageVersion) UnmarshalJSON(body []byte) error {
5748	var m map[string]*json.RawMessage
5749	err := json.Unmarshal(body, &m)
5750	if err != nil {
5751		return err
5752	}
5753	for k, v := range m {
5754		switch k {
5755		case "properties":
5756			if v != nil {
5757				var galleryImageVersionProperties GalleryImageVersionProperties
5758				err = json.Unmarshal(*v, &galleryImageVersionProperties)
5759				if err != nil {
5760					return err
5761				}
5762				giv.GalleryImageVersionProperties = &galleryImageVersionProperties
5763			}
5764		case "id":
5765			if v != nil {
5766				var ID string
5767				err = json.Unmarshal(*v, &ID)
5768				if err != nil {
5769					return err
5770				}
5771				giv.ID = &ID
5772			}
5773		case "name":
5774			if v != nil {
5775				var name string
5776				err = json.Unmarshal(*v, &name)
5777				if err != nil {
5778					return err
5779				}
5780				giv.Name = &name
5781			}
5782		case "type":
5783			if v != nil {
5784				var typeVar string
5785				err = json.Unmarshal(*v, &typeVar)
5786				if err != nil {
5787					return err
5788				}
5789				giv.Type = &typeVar
5790			}
5791		case "location":
5792			if v != nil {
5793				var location string
5794				err = json.Unmarshal(*v, &location)
5795				if err != nil {
5796					return err
5797				}
5798				giv.Location = &location
5799			}
5800		case "tags":
5801			if v != nil {
5802				var tags map[string]*string
5803				err = json.Unmarshal(*v, &tags)
5804				if err != nil {
5805					return err
5806				}
5807				giv.Tags = tags
5808			}
5809		}
5810	}
5811
5812	return nil
5813}
5814
5815// GalleryImageVersionList the List Gallery Image version operation response.
5816type GalleryImageVersionList struct {
5817	autorest.Response `json:"-"`
5818	// Value - A list of gallery Image Versions.
5819	Value *[]GalleryImageVersion `json:"value,omitempty"`
5820	// 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.
5821	NextLink *string `json:"nextLink,omitempty"`
5822}
5823
5824// GalleryImageVersionListIterator provides access to a complete listing of GalleryImageVersion values.
5825type GalleryImageVersionListIterator struct {
5826	i    int
5827	page GalleryImageVersionListPage
5828}
5829
5830// NextWithContext advances to the next value.  If there was an error making
5831// the request the iterator does not advance and the error is returned.
5832func (iter *GalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) {
5833	if tracing.IsEnabled() {
5834		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListIterator.NextWithContext")
5835		defer func() {
5836			sc := -1
5837			if iter.Response().Response.Response != nil {
5838				sc = iter.Response().Response.Response.StatusCode
5839			}
5840			tracing.EndSpan(ctx, sc, err)
5841		}()
5842	}
5843	iter.i++
5844	if iter.i < len(iter.page.Values()) {
5845		return nil
5846	}
5847	err = iter.page.NextWithContext(ctx)
5848	if err != nil {
5849		iter.i--
5850		return err
5851	}
5852	iter.i = 0
5853	return nil
5854}
5855
5856// Next advances to the next value.  If there was an error making
5857// the request the iterator does not advance and the error is returned.
5858// Deprecated: Use NextWithContext() instead.
5859func (iter *GalleryImageVersionListIterator) Next() error {
5860	return iter.NextWithContext(context.Background())
5861}
5862
5863// NotDone returns true if the enumeration should be started or is not yet complete.
5864func (iter GalleryImageVersionListIterator) NotDone() bool {
5865	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5866}
5867
5868// Response returns the raw server response from the last page request.
5869func (iter GalleryImageVersionListIterator) Response() GalleryImageVersionList {
5870	return iter.page.Response()
5871}
5872
5873// Value returns the current value or a zero-initialized value if the
5874// iterator has advanced beyond the end of the collection.
5875func (iter GalleryImageVersionListIterator) Value() GalleryImageVersion {
5876	if !iter.page.NotDone() {
5877		return GalleryImageVersion{}
5878	}
5879	return iter.page.Values()[iter.i]
5880}
5881
5882// Creates a new instance of the GalleryImageVersionListIterator type.
5883func NewGalleryImageVersionListIterator(page GalleryImageVersionListPage) GalleryImageVersionListIterator {
5884	return GalleryImageVersionListIterator{page: page}
5885}
5886
5887// IsEmpty returns true if the ListResult contains no values.
5888func (givl GalleryImageVersionList) IsEmpty() bool {
5889	return givl.Value == nil || len(*givl.Value) == 0
5890}
5891
5892// hasNextLink returns true if the NextLink is not empty.
5893func (givl GalleryImageVersionList) hasNextLink() bool {
5894	return givl.NextLink != nil && len(*givl.NextLink) != 0
5895}
5896
5897// galleryImageVersionListPreparer prepares a request to retrieve the next set of results.
5898// It returns nil if no more results exist.
5899func (givl GalleryImageVersionList) galleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) {
5900	if !givl.hasNextLink() {
5901		return nil, nil
5902	}
5903	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5904		autorest.AsJSON(),
5905		autorest.AsGet(),
5906		autorest.WithBaseURL(to.String(givl.NextLink)))
5907}
5908
5909// GalleryImageVersionListPage contains a page of GalleryImageVersion values.
5910type GalleryImageVersionListPage struct {
5911	fn   func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)
5912	givl GalleryImageVersionList
5913}
5914
5915// NextWithContext advances to the next page of values.  If there was an error making
5916// the request the page does not advance and the error is returned.
5917func (page *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) {
5918	if tracing.IsEnabled() {
5919		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListPage.NextWithContext")
5920		defer func() {
5921			sc := -1
5922			if page.Response().Response.Response != nil {
5923				sc = page.Response().Response.Response.StatusCode
5924			}
5925			tracing.EndSpan(ctx, sc, err)
5926		}()
5927	}
5928	for {
5929		next, err := page.fn(ctx, page.givl)
5930		if err != nil {
5931			return err
5932		}
5933		page.givl = next
5934		if !next.hasNextLink() || !next.IsEmpty() {
5935			break
5936		}
5937	}
5938	return nil
5939}
5940
5941// Next advances to the next page of values.  If there was an error making
5942// the request the page does not advance and the error is returned.
5943// Deprecated: Use NextWithContext() instead.
5944func (page *GalleryImageVersionListPage) Next() error {
5945	return page.NextWithContext(context.Background())
5946}
5947
5948// NotDone returns true if the page enumeration should be started or is not yet complete.
5949func (page GalleryImageVersionListPage) NotDone() bool {
5950	return !page.givl.IsEmpty()
5951}
5952
5953// Response returns the raw server response from the last page request.
5954func (page GalleryImageVersionListPage) Response() GalleryImageVersionList {
5955	return page.givl
5956}
5957
5958// Values returns the slice of values for the current page or nil if there are no values.
5959func (page GalleryImageVersionListPage) Values() []GalleryImageVersion {
5960	if page.givl.IsEmpty() {
5961		return nil
5962	}
5963	return *page.givl.Value
5964}
5965
5966// Creates a new instance of the GalleryImageVersionListPage type.
5967func NewGalleryImageVersionListPage(cur GalleryImageVersionList, getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage {
5968	return GalleryImageVersionListPage{
5969		fn:   getNextPage,
5970		givl: cur,
5971	}
5972}
5973
5974// GalleryImageVersionProperties describes the properties of a gallery Image Version.
5975type GalleryImageVersionProperties struct {
5976	PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"`
5977	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState3Creating', 'ProvisioningState3Updating', 'ProvisioningState3Failed', 'ProvisioningState3Succeeded', 'ProvisioningState3Deleting', 'ProvisioningState3Migrating'
5978	ProvisioningState ProvisioningState3                 `json:"provisioningState,omitempty"`
5979	StorageProfile    *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"`
5980	// ReplicationStatus - READ-ONLY
5981	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
5982}
5983
5984// MarshalJSON is the custom marshaler for GalleryImageVersionProperties.
5985func (givp GalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
5986	objectMap := make(map[string]interface{})
5987	if givp.PublishingProfile != nil {
5988		objectMap["publishingProfile"] = givp.PublishingProfile
5989	}
5990	if givp.StorageProfile != nil {
5991		objectMap["storageProfile"] = givp.StorageProfile
5992	}
5993	return json.Marshal(objectMap)
5994}
5995
5996// GalleryImageVersionPublishingProfile the publishing profile of a gallery Image Version.
5997type GalleryImageVersionPublishingProfile struct {
5998	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
5999	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
6000	// 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.
6001	ReplicaCount *int32 `json:"replicaCount,omitempty"`
6002	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
6003	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
6004	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
6005	PublishedDate *date.Time `json:"publishedDate,omitempty"`
6006	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
6007	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
6008	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
6009	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
6010}
6011
6012// MarshalJSON is the custom marshaler for GalleryImageVersionPublishingProfile.
6013func (givpp GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error) {
6014	objectMap := make(map[string]interface{})
6015	if givpp.TargetRegions != nil {
6016		objectMap["targetRegions"] = givpp.TargetRegions
6017	}
6018	if givpp.ReplicaCount != nil {
6019		objectMap["replicaCount"] = givpp.ReplicaCount
6020	}
6021	if givpp.ExcludeFromLatest != nil {
6022		objectMap["excludeFromLatest"] = givpp.ExcludeFromLatest
6023	}
6024	if givpp.EndOfLifeDate != nil {
6025		objectMap["endOfLifeDate"] = givpp.EndOfLifeDate
6026	}
6027	if givpp.StorageAccountType != "" {
6028		objectMap["storageAccountType"] = givpp.StorageAccountType
6029	}
6030	return json.Marshal(objectMap)
6031}
6032
6033// GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6034// long-running operation.
6035type GalleryImageVersionsCreateOrUpdateFuture struct {
6036	azure.FutureAPI
6037	// Result returns the result of the asynchronous operation.
6038	// If the operation has not completed it will return an error.
6039	Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
6040}
6041
6042// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6043func (future *GalleryImageVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6044	var azFuture azure.Future
6045	if err := json.Unmarshal(body, &azFuture); err != nil {
6046		return err
6047	}
6048	future.FutureAPI = &azFuture
6049	future.Result = future.result
6050	return nil
6051}
6052
6053// result is the default implementation for GalleryImageVersionsCreateOrUpdateFuture.Result.
6054func (future *GalleryImageVersionsCreateOrUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
6055	var done bool
6056	done, err = future.DoneWithContext(context.Background(), client)
6057	if err != nil {
6058		err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6059		return
6060	}
6061	if !done {
6062		giv.Response.Response = future.Response()
6063		err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture")
6064		return
6065	}
6066	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6067	if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
6068		giv, err = client.CreateOrUpdateResponder(giv.Response.Response)
6069		if err != nil {
6070			err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
6071		}
6072	}
6073	return
6074}
6075
6076// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
6077// long-running operation.
6078type GalleryImageVersionsDeleteFuture struct {
6079	azure.FutureAPI
6080	// Result returns the result of the asynchronous operation.
6081	// If the operation has not completed it will return an error.
6082	Result func(GalleryImageVersionsClient) (autorest.Response, error)
6083}
6084
6085// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6086func (future *GalleryImageVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
6087	var azFuture azure.Future
6088	if err := json.Unmarshal(body, &azFuture); err != nil {
6089		return err
6090	}
6091	future.FutureAPI = &azFuture
6092	future.Result = future.result
6093	return nil
6094}
6095
6096// result is the default implementation for GalleryImageVersionsDeleteFuture.Result.
6097func (future *GalleryImageVersionsDeleteFuture) result(client GalleryImageVersionsClient) (ar autorest.Response, err error) {
6098	var done bool
6099	done, err = future.DoneWithContext(context.Background(), client)
6100	if err != nil {
6101		err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
6102		return
6103	}
6104	if !done {
6105		ar.Response = future.Response()
6106		err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture")
6107		return
6108	}
6109	ar.Response = future.Response()
6110	return
6111}
6112
6113// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version.
6114type GalleryImageVersionStorageProfile struct {
6115	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
6116	OsDiskImage *GalleryOSDiskImage           `json:"osDiskImage,omitempty"`
6117	// DataDiskImages - A list of data disk images.
6118	DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"`
6119}
6120
6121// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
6122// long-running operation.
6123type GalleryImageVersionsUpdateFuture struct {
6124	azure.FutureAPI
6125	// Result returns the result of the asynchronous operation.
6126	// If the operation has not completed it will return an error.
6127	Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
6128}
6129
6130// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6131func (future *GalleryImageVersionsUpdateFuture) UnmarshalJSON(body []byte) error {
6132	var azFuture azure.Future
6133	if err := json.Unmarshal(body, &azFuture); err != nil {
6134		return err
6135	}
6136	future.FutureAPI = &azFuture
6137	future.Result = future.result
6138	return nil
6139}
6140
6141// result is the default implementation for GalleryImageVersionsUpdateFuture.Result.
6142func (future *GalleryImageVersionsUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
6143	var done bool
6144	done, err = future.DoneWithContext(context.Background(), client)
6145	if err != nil {
6146		err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
6147		return
6148	}
6149	if !done {
6150		giv.Response.Response = future.Response()
6151		err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsUpdateFuture")
6152		return
6153	}
6154	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6155	if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
6156		giv, err = client.UpdateResponder(giv.Response.Response)
6157		if err != nil {
6158			err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
6159		}
6160	}
6161	return
6162}
6163
6164// GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update.
6165type GalleryImageVersionUpdate struct {
6166	*GalleryImageVersionProperties `json:"properties,omitempty"`
6167	// ID - READ-ONLY; Resource Id
6168	ID *string `json:"id,omitempty"`
6169	// Name - READ-ONLY; Resource name
6170	Name *string `json:"name,omitempty"`
6171	// Type - READ-ONLY; Resource type
6172	Type *string `json:"type,omitempty"`
6173	// Tags - Resource tags
6174	Tags map[string]*string `json:"tags"`
6175}
6176
6177// MarshalJSON is the custom marshaler for GalleryImageVersionUpdate.
6178func (givu GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) {
6179	objectMap := make(map[string]interface{})
6180	if givu.GalleryImageVersionProperties != nil {
6181		objectMap["properties"] = givu.GalleryImageVersionProperties
6182	}
6183	if givu.Tags != nil {
6184		objectMap["tags"] = givu.Tags
6185	}
6186	return json.Marshal(objectMap)
6187}
6188
6189// UnmarshalJSON is the custom unmarshaler for GalleryImageVersionUpdate struct.
6190func (givu *GalleryImageVersionUpdate) UnmarshalJSON(body []byte) error {
6191	var m map[string]*json.RawMessage
6192	err := json.Unmarshal(body, &m)
6193	if err != nil {
6194		return err
6195	}
6196	for k, v := range m {
6197		switch k {
6198		case "properties":
6199			if v != nil {
6200				var galleryImageVersionProperties GalleryImageVersionProperties
6201				err = json.Unmarshal(*v, &galleryImageVersionProperties)
6202				if err != nil {
6203					return err
6204				}
6205				givu.GalleryImageVersionProperties = &galleryImageVersionProperties
6206			}
6207		case "id":
6208			if v != nil {
6209				var ID string
6210				err = json.Unmarshal(*v, &ID)
6211				if err != nil {
6212					return err
6213				}
6214				givu.ID = &ID
6215			}
6216		case "name":
6217			if v != nil {
6218				var name string
6219				err = json.Unmarshal(*v, &name)
6220				if err != nil {
6221					return err
6222				}
6223				givu.Name = &name
6224			}
6225		case "type":
6226			if v != nil {
6227				var typeVar string
6228				err = json.Unmarshal(*v, &typeVar)
6229				if err != nil {
6230					return err
6231				}
6232				givu.Type = &typeVar
6233			}
6234		case "tags":
6235			if v != nil {
6236				var tags map[string]*string
6237				err = json.Unmarshal(*v, &tags)
6238				if err != nil {
6239					return err
6240				}
6241				givu.Tags = tags
6242			}
6243		}
6244	}
6245
6246	return nil
6247}
6248
6249// GalleryList the List Galleries operation response.
6250type GalleryList struct {
6251	autorest.Response `json:"-"`
6252	// Value - A list of galleries.
6253	Value *[]Gallery `json:"value,omitempty"`
6254	// NextLink - The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries.
6255	NextLink *string `json:"nextLink,omitempty"`
6256}
6257
6258// GalleryListIterator provides access to a complete listing of Gallery values.
6259type GalleryListIterator struct {
6260	i    int
6261	page GalleryListPage
6262}
6263
6264// NextWithContext advances to the next value.  If there was an error making
6265// the request the iterator does not advance and the error is returned.
6266func (iter *GalleryListIterator) NextWithContext(ctx context.Context) (err error) {
6267	if tracing.IsEnabled() {
6268		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListIterator.NextWithContext")
6269		defer func() {
6270			sc := -1
6271			if iter.Response().Response.Response != nil {
6272				sc = iter.Response().Response.Response.StatusCode
6273			}
6274			tracing.EndSpan(ctx, sc, err)
6275		}()
6276	}
6277	iter.i++
6278	if iter.i < len(iter.page.Values()) {
6279		return nil
6280	}
6281	err = iter.page.NextWithContext(ctx)
6282	if err != nil {
6283		iter.i--
6284		return err
6285	}
6286	iter.i = 0
6287	return nil
6288}
6289
6290// Next advances to the next value.  If there was an error making
6291// the request the iterator does not advance and the error is returned.
6292// Deprecated: Use NextWithContext() instead.
6293func (iter *GalleryListIterator) Next() error {
6294	return iter.NextWithContext(context.Background())
6295}
6296
6297// NotDone returns true if the enumeration should be started or is not yet complete.
6298func (iter GalleryListIterator) NotDone() bool {
6299	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6300}
6301
6302// Response returns the raw server response from the last page request.
6303func (iter GalleryListIterator) Response() GalleryList {
6304	return iter.page.Response()
6305}
6306
6307// Value returns the current value or a zero-initialized value if the
6308// iterator has advanced beyond the end of the collection.
6309func (iter GalleryListIterator) Value() Gallery {
6310	if !iter.page.NotDone() {
6311		return Gallery{}
6312	}
6313	return iter.page.Values()[iter.i]
6314}
6315
6316// Creates a new instance of the GalleryListIterator type.
6317func NewGalleryListIterator(page GalleryListPage) GalleryListIterator {
6318	return GalleryListIterator{page: page}
6319}
6320
6321// IsEmpty returns true if the ListResult contains no values.
6322func (gl GalleryList) IsEmpty() bool {
6323	return gl.Value == nil || len(*gl.Value) == 0
6324}
6325
6326// hasNextLink returns true if the NextLink is not empty.
6327func (gl GalleryList) hasNextLink() bool {
6328	return gl.NextLink != nil && len(*gl.NextLink) != 0
6329}
6330
6331// galleryListPreparer prepares a request to retrieve the next set of results.
6332// It returns nil if no more results exist.
6333func (gl GalleryList) galleryListPreparer(ctx context.Context) (*http.Request, error) {
6334	if !gl.hasNextLink() {
6335		return nil, nil
6336	}
6337	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6338		autorest.AsJSON(),
6339		autorest.AsGet(),
6340		autorest.WithBaseURL(to.String(gl.NextLink)))
6341}
6342
6343// GalleryListPage contains a page of Gallery values.
6344type GalleryListPage struct {
6345	fn func(context.Context, GalleryList) (GalleryList, error)
6346	gl GalleryList
6347}
6348
6349// NextWithContext advances to the next page of values.  If there was an error making
6350// the request the page does not advance and the error is returned.
6351func (page *GalleryListPage) NextWithContext(ctx context.Context) (err error) {
6352	if tracing.IsEnabled() {
6353		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListPage.NextWithContext")
6354		defer func() {
6355			sc := -1
6356			if page.Response().Response.Response != nil {
6357				sc = page.Response().Response.Response.StatusCode
6358			}
6359			tracing.EndSpan(ctx, sc, err)
6360		}()
6361	}
6362	for {
6363		next, err := page.fn(ctx, page.gl)
6364		if err != nil {
6365			return err
6366		}
6367		page.gl = next
6368		if !next.hasNextLink() || !next.IsEmpty() {
6369			break
6370		}
6371	}
6372	return nil
6373}
6374
6375// Next advances to the next page of values.  If there was an error making
6376// the request the page does not advance and the error is returned.
6377// Deprecated: Use NextWithContext() instead.
6378func (page *GalleryListPage) Next() error {
6379	return page.NextWithContext(context.Background())
6380}
6381
6382// NotDone returns true if the page enumeration should be started or is not yet complete.
6383func (page GalleryListPage) NotDone() bool {
6384	return !page.gl.IsEmpty()
6385}
6386
6387// Response returns the raw server response from the last page request.
6388func (page GalleryListPage) Response() GalleryList {
6389	return page.gl
6390}
6391
6392// Values returns the slice of values for the current page or nil if there are no values.
6393func (page GalleryListPage) Values() []Gallery {
6394	if page.gl.IsEmpty() {
6395		return nil
6396	}
6397	return *page.gl.Value
6398}
6399
6400// Creates a new instance of the GalleryListPage type.
6401func NewGalleryListPage(cur GalleryList, getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage {
6402	return GalleryListPage{
6403		fn: getNextPage,
6404		gl: cur,
6405	}
6406}
6407
6408// GalleryOSDiskImage this is the OS disk image.
6409type GalleryOSDiskImage struct {
6410	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
6411	SizeInGB *int32 `json:"sizeInGB,omitempty"`
6412	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
6413	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
6414	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
6415}
6416
6417// MarshalJSON is the custom marshaler for GalleryOSDiskImage.
6418func (godi GalleryOSDiskImage) MarshalJSON() ([]byte, error) {
6419	objectMap := make(map[string]interface{})
6420	if godi.HostCaching != "" {
6421		objectMap["hostCaching"] = godi.HostCaching
6422	}
6423	if godi.Source != nil {
6424		objectMap["source"] = godi.Source
6425	}
6426	return json.Marshal(objectMap)
6427}
6428
6429// GalleryProperties describes the properties of a Shared Image Gallery.
6430type GalleryProperties struct {
6431	// Description - The description of this Shared Image Gallery resource. This property is updatable.
6432	Description *string            `json:"description,omitempty"`
6433	Identifier  *GalleryIdentifier `json:"identifier,omitempty"`
6434	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating'
6435	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6436}
6437
6438// MarshalJSON is the custom marshaler for GalleryProperties.
6439func (gp GalleryProperties) MarshalJSON() ([]byte, error) {
6440	objectMap := make(map[string]interface{})
6441	if gp.Description != nil {
6442		objectMap["description"] = gp.Description
6443	}
6444	if gp.Identifier != nil {
6445		objectMap["identifier"] = gp.Identifier
6446	}
6447	return json.Marshal(objectMap)
6448}
6449
6450// GalleryUpdate specifies information about the Shared Image Gallery that you want to update.
6451type GalleryUpdate struct {
6452	*GalleryProperties `json:"properties,omitempty"`
6453	// ID - READ-ONLY; Resource Id
6454	ID *string `json:"id,omitempty"`
6455	// Name - READ-ONLY; Resource name
6456	Name *string `json:"name,omitempty"`
6457	// Type - READ-ONLY; Resource type
6458	Type *string `json:"type,omitempty"`
6459	// Tags - Resource tags
6460	Tags map[string]*string `json:"tags"`
6461}
6462
6463// MarshalJSON is the custom marshaler for GalleryUpdate.
6464func (gu GalleryUpdate) MarshalJSON() ([]byte, error) {
6465	objectMap := make(map[string]interface{})
6466	if gu.GalleryProperties != nil {
6467		objectMap["properties"] = gu.GalleryProperties
6468	}
6469	if gu.Tags != nil {
6470		objectMap["tags"] = gu.Tags
6471	}
6472	return json.Marshal(objectMap)
6473}
6474
6475// UnmarshalJSON is the custom unmarshaler for GalleryUpdate struct.
6476func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error {
6477	var m map[string]*json.RawMessage
6478	err := json.Unmarshal(body, &m)
6479	if err != nil {
6480		return err
6481	}
6482	for k, v := range m {
6483		switch k {
6484		case "properties":
6485			if v != nil {
6486				var galleryProperties GalleryProperties
6487				err = json.Unmarshal(*v, &galleryProperties)
6488				if err != nil {
6489					return err
6490				}
6491				gu.GalleryProperties = &galleryProperties
6492			}
6493		case "id":
6494			if v != nil {
6495				var ID string
6496				err = json.Unmarshal(*v, &ID)
6497				if err != nil {
6498					return err
6499				}
6500				gu.ID = &ID
6501			}
6502		case "name":
6503			if v != nil {
6504				var name string
6505				err = json.Unmarshal(*v, &name)
6506				if err != nil {
6507					return err
6508				}
6509				gu.Name = &name
6510			}
6511		case "type":
6512			if v != nil {
6513				var typeVar string
6514				err = json.Unmarshal(*v, &typeVar)
6515				if err != nil {
6516					return err
6517				}
6518				gu.Type = &typeVar
6519			}
6520		case "tags":
6521			if v != nil {
6522				var tags map[string]*string
6523				err = json.Unmarshal(*v, &tags)
6524				if err != nil {
6525					return err
6526				}
6527				gu.Tags = tags
6528			}
6529		}
6530	}
6531
6532	return nil
6533}
6534
6535// GrantAccessData data used for requesting a SAS.
6536type GrantAccessData struct {
6537	// Access - Possible values include: 'None', 'Read', 'Write'
6538	Access AccessLevel `json:"access,omitempty"`
6539	// DurationInSeconds - Time duration in seconds until the SAS access expires.
6540	DurationInSeconds *int32 `json:"durationInSeconds,omitempty"`
6541}
6542
6543// HardwareProfile specifies the hardware settings for the virtual machine.
6544type HardwareProfile struct {
6545	// VMSize - Specifies the size of the virtual machine. <br><br> The enum data type is currently deprecated and will be removed by December 23rd 2023. <br><br> Recommended way to get the list of available sizes is using 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/en-us/rest/api/compute/resourceskus/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes). <br><br> The available VM sizes depend on region and availability set. Possible values include: 'BasicA0', 'BasicA1', 'BasicA2', 'BasicA3', 'BasicA4', 'StandardA0', 'StandardA1', 'StandardA2', 'StandardA3', 'StandardA4', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA9', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2V2', 'StandardA4V2', 'StandardA8V2', 'StandardA2mV2', 'StandardA4mV2', 'StandardA8mV2', 'StandardB1s', 'StandardB1ms', 'StandardB2s', 'StandardB2ms', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD2', 'StandardD3', 'StandardD4', 'StandardD11', 'StandardD12', 'StandardD13', 'StandardD14', 'StandardD1V2', 'StandardD2V2', 'StandardD3V2', 'StandardD4V2', 'StandardD5V2', 'StandardD2V3', 'StandardD4V3', 'StandardD8V3', 'StandardD16V3', 'StandardD32V3', 'StandardD64V3', 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardD11V2', 'StandardD12V2', 'StandardD13V2', 'StandardD14V2', 'StandardD15V2', 'StandardDS1', 'StandardDS2', 'StandardDS3', 'StandardDS4', 'StandardDS11', 'StandardDS12', 'StandardDS13', 'StandardDS14', 'StandardDS1V2', 'StandardDS2V2', 'StandardDS3V2', 'StandardDS4V2', 'StandardDS5V2', 'StandardDS11V2', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardDS134V2', 'StandardDS132V2', 'StandardDS148V2', 'StandardDS144V2', 'StandardE2V3', 'StandardE4V3', 'StandardE8V3', 'StandardE16V3', 'StandardE32V3', 'StandardE64V3', 'StandardE2sV3', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardE3216V3', 'StandardE328sV3', 'StandardE6432sV3', 'StandardE6416sV3', 'StandardF1', 'StandardF2', 'StandardF4', 'StandardF8', 'StandardF16', 'StandardF1s', 'StandardF2s', 'StandardF4s', 'StandardF8s', 'StandardF16s', 'StandardF2sV2', 'StandardF4sV2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardGS48', 'StandardGS44', 'StandardGS516', 'StandardGS58', 'StandardH8', 'StandardH16', 'StandardH8m', 'StandardH16m', 'StandardH16r', 'StandardH16mr', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s', 'StandardM64s', 'StandardM64ms', 'StandardM128s', 'StandardM128ms', 'StandardM6432ms', 'StandardM6416ms', 'StandardM12864ms', 'StandardM12832ms', 'StandardNC6', 'StandardNC12', 'StandardNC24', 'StandardNC24r', 'StandardNC6sV2', 'StandardNC12sV2', 'StandardNC24sV2', 'StandardNC24rsV2', 'StandardNC6sV3', 'StandardNC12sV3', 'StandardNC24sV3', 'StandardNC24rsV3', 'StandardND6s', 'StandardND12s', 'StandardND24s', 'StandardND24rs', 'StandardNV6', 'StandardNV12', 'StandardNV24'
6546	VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"`
6547}
6548
6549// Image the source user image virtual hard disk. The virtual hard disk will be copied before being
6550// attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not
6551// exist.
6552type Image struct {
6553	autorest.Response `json:"-"`
6554	*ImageProperties  `json:"properties,omitempty"`
6555	// ExtendedLocation - The extended location of the Image.
6556	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
6557	// ID - READ-ONLY; Resource Id
6558	ID *string `json:"id,omitempty"`
6559	// Name - READ-ONLY; Resource name
6560	Name *string `json:"name,omitempty"`
6561	// Type - READ-ONLY; Resource type
6562	Type *string `json:"type,omitempty"`
6563	// Location - Resource location
6564	Location *string `json:"location,omitempty"`
6565	// Tags - Resource tags
6566	Tags map[string]*string `json:"tags"`
6567}
6568
6569// MarshalJSON is the custom marshaler for Image.
6570func (i Image) MarshalJSON() ([]byte, error) {
6571	objectMap := make(map[string]interface{})
6572	if i.ImageProperties != nil {
6573		objectMap["properties"] = i.ImageProperties
6574	}
6575	if i.ExtendedLocation != nil {
6576		objectMap["extendedLocation"] = i.ExtendedLocation
6577	}
6578	if i.Location != nil {
6579		objectMap["location"] = i.Location
6580	}
6581	if i.Tags != nil {
6582		objectMap["tags"] = i.Tags
6583	}
6584	return json.Marshal(objectMap)
6585}
6586
6587// UnmarshalJSON is the custom unmarshaler for Image struct.
6588func (i *Image) UnmarshalJSON(body []byte) error {
6589	var m map[string]*json.RawMessage
6590	err := json.Unmarshal(body, &m)
6591	if err != nil {
6592		return err
6593	}
6594	for k, v := range m {
6595		switch k {
6596		case "properties":
6597			if v != nil {
6598				var imageProperties ImageProperties
6599				err = json.Unmarshal(*v, &imageProperties)
6600				if err != nil {
6601					return err
6602				}
6603				i.ImageProperties = &imageProperties
6604			}
6605		case "extendedLocation":
6606			if v != nil {
6607				var extendedLocation ExtendedLocation
6608				err = json.Unmarshal(*v, &extendedLocation)
6609				if err != nil {
6610					return err
6611				}
6612				i.ExtendedLocation = &extendedLocation
6613			}
6614		case "id":
6615			if v != nil {
6616				var ID string
6617				err = json.Unmarshal(*v, &ID)
6618				if err != nil {
6619					return err
6620				}
6621				i.ID = &ID
6622			}
6623		case "name":
6624			if v != nil {
6625				var name string
6626				err = json.Unmarshal(*v, &name)
6627				if err != nil {
6628					return err
6629				}
6630				i.Name = &name
6631			}
6632		case "type":
6633			if v != nil {
6634				var typeVar string
6635				err = json.Unmarshal(*v, &typeVar)
6636				if err != nil {
6637					return err
6638				}
6639				i.Type = &typeVar
6640			}
6641		case "location":
6642			if v != nil {
6643				var location string
6644				err = json.Unmarshal(*v, &location)
6645				if err != nil {
6646					return err
6647				}
6648				i.Location = &location
6649			}
6650		case "tags":
6651			if v != nil {
6652				var tags map[string]*string
6653				err = json.Unmarshal(*v, &tags)
6654				if err != nil {
6655					return err
6656				}
6657				i.Tags = tags
6658			}
6659		}
6660	}
6661
6662	return nil
6663}
6664
6665// ImageDataDisk describes a data disk.
6666type ImageDataDisk struct {
6667	// 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.
6668	Lun *int32 `json:"lun,omitempty"`
6669	// Snapshot - The snapshot.
6670	Snapshot *SubResource `json:"snapshot,omitempty"`
6671	// ManagedDisk - The managedDisk.
6672	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
6673	// BlobURI - The Virtual Hard Disk.
6674	BlobURI *string `json:"blobUri,omitempty"`
6675	// 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'
6676	Caching CachingTypes `json:"caching,omitempty"`
6677	// 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
6678	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
6679	// 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', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
6680	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
6681	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
6682	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
6683}
6684
6685// ImageDisk describes a image disk.
6686type ImageDisk struct {
6687	// Snapshot - The snapshot.
6688	Snapshot *SubResource `json:"snapshot,omitempty"`
6689	// ManagedDisk - The managedDisk.
6690	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
6691	// BlobURI - The Virtual Hard Disk.
6692	BlobURI *string `json:"blobUri,omitempty"`
6693	// 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'
6694	Caching CachingTypes `json:"caching,omitempty"`
6695	// 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
6696	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
6697	// 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', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
6698	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
6699	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
6700	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
6701}
6702
6703// ImageDiskReference the source image used for creating the disk.
6704type ImageDiskReference struct {
6705	// ID - A relative uri containing either a Platform Image Repository or user image reference.
6706	ID *string `json:"id,omitempty"`
6707	// 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.
6708	Lun *int32 `json:"lun,omitempty"`
6709}
6710
6711// ImageListResult the List Image operation response.
6712type ImageListResult struct {
6713	autorest.Response `json:"-"`
6714	// Value - The list of Images.
6715	Value *[]Image `json:"value,omitempty"`
6716	// NextLink - The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images.
6717	NextLink *string `json:"nextLink,omitempty"`
6718}
6719
6720// ImageListResultIterator provides access to a complete listing of Image values.
6721type ImageListResultIterator struct {
6722	i    int
6723	page ImageListResultPage
6724}
6725
6726// NextWithContext advances to the next value.  If there was an error making
6727// the request the iterator does not advance and the error is returned.
6728func (iter *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) {
6729	if tracing.IsEnabled() {
6730		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.NextWithContext")
6731		defer func() {
6732			sc := -1
6733			if iter.Response().Response.Response != nil {
6734				sc = iter.Response().Response.Response.StatusCode
6735			}
6736			tracing.EndSpan(ctx, sc, err)
6737		}()
6738	}
6739	iter.i++
6740	if iter.i < len(iter.page.Values()) {
6741		return nil
6742	}
6743	err = iter.page.NextWithContext(ctx)
6744	if err != nil {
6745		iter.i--
6746		return err
6747	}
6748	iter.i = 0
6749	return nil
6750}
6751
6752// Next advances to the next value.  If there was an error making
6753// the request the iterator does not advance and the error is returned.
6754// Deprecated: Use NextWithContext() instead.
6755func (iter *ImageListResultIterator) Next() error {
6756	return iter.NextWithContext(context.Background())
6757}
6758
6759// NotDone returns true if the enumeration should be started or is not yet complete.
6760func (iter ImageListResultIterator) NotDone() bool {
6761	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6762}
6763
6764// Response returns the raw server response from the last page request.
6765func (iter ImageListResultIterator) Response() ImageListResult {
6766	return iter.page.Response()
6767}
6768
6769// Value returns the current value or a zero-initialized value if the
6770// iterator has advanced beyond the end of the collection.
6771func (iter ImageListResultIterator) Value() Image {
6772	if !iter.page.NotDone() {
6773		return Image{}
6774	}
6775	return iter.page.Values()[iter.i]
6776}
6777
6778// Creates a new instance of the ImageListResultIterator type.
6779func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator {
6780	return ImageListResultIterator{page: page}
6781}
6782
6783// IsEmpty returns true if the ListResult contains no values.
6784func (ilr ImageListResult) IsEmpty() bool {
6785	return ilr.Value == nil || len(*ilr.Value) == 0
6786}
6787
6788// hasNextLink returns true if the NextLink is not empty.
6789func (ilr ImageListResult) hasNextLink() bool {
6790	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
6791}
6792
6793// imageListResultPreparer prepares a request to retrieve the next set of results.
6794// It returns nil if no more results exist.
6795func (ilr ImageListResult) imageListResultPreparer(ctx context.Context) (*http.Request, error) {
6796	if !ilr.hasNextLink() {
6797		return nil, nil
6798	}
6799	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6800		autorest.AsJSON(),
6801		autorest.AsGet(),
6802		autorest.WithBaseURL(to.String(ilr.NextLink)))
6803}
6804
6805// ImageListResultPage contains a page of Image values.
6806type ImageListResultPage struct {
6807	fn  func(context.Context, ImageListResult) (ImageListResult, error)
6808	ilr ImageListResult
6809}
6810
6811// NextWithContext advances to the next page of values.  If there was an error making
6812// the request the page does not advance and the error is returned.
6813func (page *ImageListResultPage) NextWithContext(ctx context.Context) (err error) {
6814	if tracing.IsEnabled() {
6815		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultPage.NextWithContext")
6816		defer func() {
6817			sc := -1
6818			if page.Response().Response.Response != nil {
6819				sc = page.Response().Response.Response.StatusCode
6820			}
6821			tracing.EndSpan(ctx, sc, err)
6822		}()
6823	}
6824	for {
6825		next, err := page.fn(ctx, page.ilr)
6826		if err != nil {
6827			return err
6828		}
6829		page.ilr = next
6830		if !next.hasNextLink() || !next.IsEmpty() {
6831			break
6832		}
6833	}
6834	return nil
6835}
6836
6837// Next advances to the next page of values.  If there was an error making
6838// the request the page does not advance and the error is returned.
6839// Deprecated: Use NextWithContext() instead.
6840func (page *ImageListResultPage) Next() error {
6841	return page.NextWithContext(context.Background())
6842}
6843
6844// NotDone returns true if the page enumeration should be started or is not yet complete.
6845func (page ImageListResultPage) NotDone() bool {
6846	return !page.ilr.IsEmpty()
6847}
6848
6849// Response returns the raw server response from the last page request.
6850func (page ImageListResultPage) Response() ImageListResult {
6851	return page.ilr
6852}
6853
6854// Values returns the slice of values for the current page or nil if there are no values.
6855func (page ImageListResultPage) Values() []Image {
6856	if page.ilr.IsEmpty() {
6857		return nil
6858	}
6859	return *page.ilr.Value
6860}
6861
6862// Creates a new instance of the ImageListResultPage type.
6863func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
6864	return ImageListResultPage{
6865		fn:  getNextPage,
6866		ilr: cur,
6867	}
6868}
6869
6870// ImageOSDisk describes an Operating System disk.
6871type ImageOSDisk struct {
6872	// 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'
6873	OsType OperatingSystemTypes `json:"osType,omitempty"`
6874	// OsState - The OS State. Possible values include: 'Generalized', 'Specialized'
6875	OsState OperatingSystemStateTypes `json:"osState,omitempty"`
6876	// Snapshot - The snapshot.
6877	Snapshot *SubResource `json:"snapshot,omitempty"`
6878	// ManagedDisk - The managedDisk.
6879	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
6880	// BlobURI - The Virtual Hard Disk.
6881	BlobURI *string `json:"blobUri,omitempty"`
6882	// 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'
6883	Caching CachingTypes `json:"caching,omitempty"`
6884	// 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
6885	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
6886	// 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', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
6887	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
6888	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
6889	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
6890}
6891
6892// ImageProperties describes the properties of an Image.
6893type ImageProperties struct {
6894	// SourceVirtualMachine - The source virtual machine from which Image is created.
6895	SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"`
6896	// StorageProfile - Specifies the storage settings for the virtual machine disks.
6897	StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"`
6898	// ProvisioningState - READ-ONLY; The provisioning state.
6899	ProvisioningState *string `json:"provisioningState,omitempty"`
6900	// HyperVGeneration - Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource. Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
6901	HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
6902}
6903
6904// MarshalJSON is the custom marshaler for ImageProperties.
6905func (IP ImageProperties) MarshalJSON() ([]byte, error) {
6906	objectMap := make(map[string]interface{})
6907	if IP.SourceVirtualMachine != nil {
6908		objectMap["sourceVirtualMachine"] = IP.SourceVirtualMachine
6909	}
6910	if IP.StorageProfile != nil {
6911		objectMap["storageProfile"] = IP.StorageProfile
6912	}
6913	if IP.HyperVGeneration != "" {
6914		objectMap["hyperVGeneration"] = IP.HyperVGeneration
6915	}
6916	return json.Marshal(objectMap)
6917}
6918
6919// ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace
6920// images.
6921type ImagePurchasePlan struct {
6922	// Name - The plan ID.
6923	Name *string `json:"name,omitempty"`
6924	// Publisher - The publisher ID.
6925	Publisher *string `json:"publisher,omitempty"`
6926	// Product - The product ID.
6927	Product *string `json:"product,omitempty"`
6928}
6929
6930// ImageReference specifies information about the image to use. You can specify information about platform
6931// images, marketplace images, or virtual machine images. This element is required when you want to use a
6932// platform image, marketplace image, or virtual machine image, but is not used in other creation
6933// operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.
6934type ImageReference struct {
6935	// Publisher - The image publisher.
6936	Publisher *string `json:"publisher,omitempty"`
6937	// Offer - Specifies the offer of the platform image or marketplace image used to create the virtual machine.
6938	Offer *string `json:"offer,omitempty"`
6939	// Sku - The image SKU.
6940	Sku *string `json:"sku,omitempty"`
6941	// 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.
6942	Version *string `json:"version,omitempty"`
6943	// ExactVersion - READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.
6944	ExactVersion *string `json:"exactVersion,omitempty"`
6945	// ID - Resource Id
6946	ID *string `json:"id,omitempty"`
6947}
6948
6949// MarshalJSON is the custom marshaler for ImageReference.
6950func (ir ImageReference) MarshalJSON() ([]byte, error) {
6951	objectMap := make(map[string]interface{})
6952	if ir.Publisher != nil {
6953		objectMap["publisher"] = ir.Publisher
6954	}
6955	if ir.Offer != nil {
6956		objectMap["offer"] = ir.Offer
6957	}
6958	if ir.Sku != nil {
6959		objectMap["sku"] = ir.Sku
6960	}
6961	if ir.Version != nil {
6962		objectMap["version"] = ir.Version
6963	}
6964	if ir.ID != nil {
6965		objectMap["id"] = ir.ID
6966	}
6967	return json.Marshal(objectMap)
6968}
6969
6970// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
6971// operation.
6972type ImagesCreateOrUpdateFuture struct {
6973	azure.FutureAPI
6974	// Result returns the result of the asynchronous operation.
6975	// If the operation has not completed it will return an error.
6976	Result func(ImagesClient) (Image, error)
6977}
6978
6979// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6980func (future *ImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6981	var azFuture azure.Future
6982	if err := json.Unmarshal(body, &azFuture); err != nil {
6983		return err
6984	}
6985	future.FutureAPI = &azFuture
6986	future.Result = future.result
6987	return nil
6988}
6989
6990// result is the default implementation for ImagesCreateOrUpdateFuture.Result.
6991func (future *ImagesCreateOrUpdateFuture) result(client ImagesClient) (i Image, err error) {
6992	var done bool
6993	done, err = future.DoneWithContext(context.Background(), client)
6994	if err != nil {
6995		err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6996		return
6997	}
6998	if !done {
6999		i.Response.Response = future.Response()
7000		err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
7001		return
7002	}
7003	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7004	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
7005		i, err = client.CreateOrUpdateResponder(i.Response.Response)
7006		if err != nil {
7007			err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
7008		}
7009	}
7010	return
7011}
7012
7013// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
7014type ImagesDeleteFuture struct {
7015	azure.FutureAPI
7016	// Result returns the result of the asynchronous operation.
7017	// If the operation has not completed it will return an error.
7018	Result func(ImagesClient) (autorest.Response, error)
7019}
7020
7021// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7022func (future *ImagesDeleteFuture) UnmarshalJSON(body []byte) error {
7023	var azFuture azure.Future
7024	if err := json.Unmarshal(body, &azFuture); err != nil {
7025		return err
7026	}
7027	future.FutureAPI = &azFuture
7028	future.Result = future.result
7029	return nil
7030}
7031
7032// result is the default implementation for ImagesDeleteFuture.Result.
7033func (future *ImagesDeleteFuture) result(client ImagesClient) (ar autorest.Response, err error) {
7034	var done bool
7035	done, err = future.DoneWithContext(context.Background(), client)
7036	if err != nil {
7037		err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Polling failure")
7038		return
7039	}
7040	if !done {
7041		ar.Response = future.Response()
7042		err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
7043		return
7044	}
7045	ar.Response = future.Response()
7046	return
7047}
7048
7049// ImageStorageProfile describes a storage profile.
7050type ImageStorageProfile struct {
7051	// 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).
7052	OsDisk *ImageOSDisk `json:"osDisk,omitempty"`
7053	// 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).
7054	DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"`
7055	// 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).
7056	ZoneResilient *bool `json:"zoneResilient,omitempty"`
7057}
7058
7059// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
7060type ImagesUpdateFuture struct {
7061	azure.FutureAPI
7062	// Result returns the result of the asynchronous operation.
7063	// If the operation has not completed it will return an error.
7064	Result func(ImagesClient) (Image, error)
7065}
7066
7067// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7068func (future *ImagesUpdateFuture) UnmarshalJSON(body []byte) error {
7069	var azFuture azure.Future
7070	if err := json.Unmarshal(body, &azFuture); err != nil {
7071		return err
7072	}
7073	future.FutureAPI = &azFuture
7074	future.Result = future.result
7075	return nil
7076}
7077
7078// result is the default implementation for ImagesUpdateFuture.Result.
7079func (future *ImagesUpdateFuture) result(client ImagesClient) (i Image, err error) {
7080	var done bool
7081	done, err = future.DoneWithContext(context.Background(), client)
7082	if err != nil {
7083		err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Polling failure")
7084		return
7085	}
7086	if !done {
7087		i.Response.Response = future.Response()
7088		err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
7089		return
7090	}
7091	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7092	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
7093		i, err = client.UpdateResponder(i.Response.Response)
7094		if err != nil {
7095			err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
7096		}
7097	}
7098	return
7099}
7100
7101// ImageUpdate the source user image virtual hard disk. Only tags may be updated.
7102type ImageUpdate struct {
7103	*ImageProperties `json:"properties,omitempty"`
7104	// Tags - Resource tags
7105	Tags map[string]*string `json:"tags"`
7106}
7107
7108// MarshalJSON is the custom marshaler for ImageUpdate.
7109func (iu ImageUpdate) MarshalJSON() ([]byte, error) {
7110	objectMap := make(map[string]interface{})
7111	if iu.ImageProperties != nil {
7112		objectMap["properties"] = iu.ImageProperties
7113	}
7114	if iu.Tags != nil {
7115		objectMap["tags"] = iu.Tags
7116	}
7117	return json.Marshal(objectMap)
7118}
7119
7120// UnmarshalJSON is the custom unmarshaler for ImageUpdate struct.
7121func (iu *ImageUpdate) UnmarshalJSON(body []byte) error {
7122	var m map[string]*json.RawMessage
7123	err := json.Unmarshal(body, &m)
7124	if err != nil {
7125		return err
7126	}
7127	for k, v := range m {
7128		switch k {
7129		case "properties":
7130			if v != nil {
7131				var imageProperties ImageProperties
7132				err = json.Unmarshal(*v, &imageProperties)
7133				if err != nil {
7134					return err
7135				}
7136				iu.ImageProperties = &imageProperties
7137			}
7138		case "tags":
7139			if v != nil {
7140				var tags map[string]*string
7141				err = json.Unmarshal(*v, &tags)
7142				if err != nil {
7143					return err
7144				}
7145				iu.Tags = tags
7146			}
7147		}
7148	}
7149
7150	return nil
7151}
7152
7153// InnerError inner error details.
7154type InnerError struct {
7155	// Exceptiontype - The exception type.
7156	Exceptiontype *string `json:"exceptiontype,omitempty"`
7157	// Errordetail - The internal error message or exception dump.
7158	Errordetail *string `json:"errordetail,omitempty"`
7159}
7160
7161// InstanceViewStatus instance view status.
7162type InstanceViewStatus struct {
7163	// Code - The status code.
7164	Code *string `json:"code,omitempty"`
7165	// Level - The level code. Possible values include: 'Info', 'Warning', 'Error'
7166	Level StatusLevelTypes `json:"level,omitempty"`
7167	// DisplayStatus - The short localizable label for the status.
7168	DisplayStatus *string `json:"displayStatus,omitempty"`
7169	// Message - The detailed status message, including for alerts and error messages.
7170	Message *string `json:"message,omitempty"`
7171	// Time - The time of the status.
7172	Time *date.Time `json:"time,omitempty"`
7173}
7174
7175// KeyForDiskEncryptionSet key Vault Key Url to be used for server side encryption of Managed Disks and
7176// Snapshots
7177type KeyForDiskEncryptionSet struct {
7178	// SourceVault - Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription.
7179	SourceVault *SourceVault `json:"sourceVault,omitempty"`
7180	// KeyURL - Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value.
7181	KeyURL *string `json:"keyUrl,omitempty"`
7182}
7183
7184// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used
7185// to unwrap the encryptionKey
7186type KeyVaultAndKeyReference struct {
7187	// SourceVault - Resource id of the KeyVault containing the key or secret
7188	SourceVault *SourceVault `json:"sourceVault,omitempty"`
7189	// KeyURL - Url pointing to a key or secret in KeyVault
7190	KeyURL *string `json:"keyUrl,omitempty"`
7191}
7192
7193// KeyVaultAndSecretReference key Vault Secret Url and vault id of the encryption key
7194type KeyVaultAndSecretReference struct {
7195	// SourceVault - Resource id of the KeyVault containing the key or secret
7196	SourceVault *SourceVault `json:"sourceVault,omitempty"`
7197	// SecretURL - Url pointing to a key or secret in KeyVault
7198	SecretURL *string `json:"secretUrl,omitempty"`
7199}
7200
7201// KeyVaultKeyReference describes a reference to Key Vault Key
7202type KeyVaultKeyReference struct {
7203	// KeyURL - The URL referencing a key encryption key in Key Vault.
7204	KeyURL *string `json:"keyUrl,omitempty"`
7205	// SourceVault - The relative URL of the Key Vault containing the key.
7206	SourceVault *SubResource `json:"sourceVault,omitempty"`
7207}
7208
7209// KeyVaultSecretReference describes a reference to Key Vault Secret
7210type KeyVaultSecretReference struct {
7211	// SecretURL - The URL referencing a secret in a Key Vault.
7212	SecretURL *string `json:"secretUrl,omitempty"`
7213	// SourceVault - The relative URL of the Key Vault containing the secret.
7214	SourceVault *SubResource `json:"sourceVault,omitempty"`
7215}
7216
7217// LastPatchInstallationSummary describes the properties of the last installed patch summary.
7218type LastPatchInstallationSummary struct {
7219	// Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
7220	Status PatchOperationStatus `json:"status,omitempty"`
7221	// InstallationActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
7222	InstallationActivityID *string `json:"installationActivityId,omitempty"`
7223	// MaintenanceWindowExceeded - READ-ONLY; Describes whether the operation ran out of time before it completed all its intended actions
7224	MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"`
7225	// NotSelectedPatchCount - READ-ONLY; The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry.
7226	NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty"`
7227	// ExcludedPatchCount - READ-ONLY; The number of all available patches but excluded explicitly by a customer-specified exclusion list match.
7228	ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty"`
7229	// PendingPatchCount - READ-ONLY; The number of all available patches expected to be installed over the course of the patch installation operation.
7230	PendingPatchCount *int32 `json:"pendingPatchCount,omitempty"`
7231	// InstalledPatchCount - READ-ONLY; The count of patches that successfully installed.
7232	InstalledPatchCount *int32 `json:"installedPatchCount,omitempty"`
7233	// FailedPatchCount - READ-ONLY; The count of patches that failed installation.
7234	FailedPatchCount *int32 `json:"failedPatchCount,omitempty"`
7235	// StartTime - READ-ONLY; The UTC timestamp when the operation began.
7236	StartTime *date.Time `json:"startTime,omitempty"`
7237	// LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began.
7238	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
7239	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
7240	Error *APIError `json:"error,omitempty"`
7241}
7242
7243// MarshalJSON is the custom marshaler for LastPatchInstallationSummary.
7244func (lpis LastPatchInstallationSummary) MarshalJSON() ([]byte, error) {
7245	objectMap := make(map[string]interface{})
7246	return json.Marshal(objectMap)
7247}
7248
7249// LinuxConfiguration specifies the Linux operating system settings on the virtual machine. <br><br>For a
7250// list of supported Linux distributions, see [Linux on Azure-Endorsed
7251// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
7252// <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed
7253// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
7254type LinuxConfiguration struct {
7255	// DisablePasswordAuthentication - Specifies whether password authentication should be disabled.
7256	DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"`
7257	// SSH - Specifies the ssh key configuration for a Linux OS.
7258	SSH *SSHConfiguration `json:"ssh,omitempty"`
7259	// 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.
7260	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
7261	// PatchSettings - [Preview Feature] Specifies settings related to VM Guest Patching on Linux.
7262	PatchSettings *LinuxPatchSettings `json:"patchSettings,omitempty"`
7263}
7264
7265// LinuxParameters input for InstallPatches on a Linux VM, as directly received by the API
7266type LinuxParameters struct {
7267	// ClassificationsToInclude - The update classifications to select when installing patches for Linux.
7268	ClassificationsToInclude *[]VMGuestPatchClassificationLinux `json:"classificationsToInclude,omitempty"`
7269	// PackageNameMasksToInclude - packages to include in the patch operation. Format: packageName_packageVersion
7270	PackageNameMasksToInclude *[]string `json:"packageNameMasksToInclude,omitempty"`
7271	// PackageNameMasksToExclude - packages to exclude in the patch operation. Format: packageName_packageVersion
7272	PackageNameMasksToExclude *[]string `json:"packageNameMasksToExclude,omitempty"`
7273	// MaintenanceRunID - This is used as a maintenance run identifier for Auto VM Guest Patching in Linux.
7274	MaintenanceRunID *string `json:"maintenanceRunId,omitempty"`
7275}
7276
7277// LinuxPatchSettings specifies settings related to VM Guest Patching on Linux.
7278type LinuxPatchSettings struct {
7279	// PatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - The virtual machine's default patching configuration is used. <br /><br /> **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true. Possible values include: 'ImageDefault', 'AutomaticByPlatform'
7280	PatchMode LinuxVMGuestPatchMode `json:"patchMode,omitempty"`
7281}
7282
7283// ListUsagesResult the List Usages operation response.
7284type ListUsagesResult struct {
7285	autorest.Response `json:"-"`
7286	// Value - The list of compute resource usages.
7287	Value *[]Usage `json:"value,omitempty"`
7288	// 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.
7289	NextLink *string `json:"nextLink,omitempty"`
7290}
7291
7292// ListUsagesResultIterator provides access to a complete listing of Usage values.
7293type ListUsagesResultIterator struct {
7294	i    int
7295	page ListUsagesResultPage
7296}
7297
7298// NextWithContext advances to the next value.  If there was an error making
7299// the request the iterator does not advance and the error is returned.
7300func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
7301	if tracing.IsEnabled() {
7302		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
7303		defer func() {
7304			sc := -1
7305			if iter.Response().Response.Response != nil {
7306				sc = iter.Response().Response.Response.StatusCode
7307			}
7308			tracing.EndSpan(ctx, sc, err)
7309		}()
7310	}
7311	iter.i++
7312	if iter.i < len(iter.page.Values()) {
7313		return nil
7314	}
7315	err = iter.page.NextWithContext(ctx)
7316	if err != nil {
7317		iter.i--
7318		return err
7319	}
7320	iter.i = 0
7321	return nil
7322}
7323
7324// Next advances to the next value.  If there was an error making
7325// the request the iterator does not advance and the error is returned.
7326// Deprecated: Use NextWithContext() instead.
7327func (iter *ListUsagesResultIterator) Next() error {
7328	return iter.NextWithContext(context.Background())
7329}
7330
7331// NotDone returns true if the enumeration should be started or is not yet complete.
7332func (iter ListUsagesResultIterator) NotDone() bool {
7333	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7334}
7335
7336// Response returns the raw server response from the last page request.
7337func (iter ListUsagesResultIterator) Response() ListUsagesResult {
7338	return iter.page.Response()
7339}
7340
7341// Value returns the current value or a zero-initialized value if the
7342// iterator has advanced beyond the end of the collection.
7343func (iter ListUsagesResultIterator) Value() Usage {
7344	if !iter.page.NotDone() {
7345		return Usage{}
7346	}
7347	return iter.page.Values()[iter.i]
7348}
7349
7350// Creates a new instance of the ListUsagesResultIterator type.
7351func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
7352	return ListUsagesResultIterator{page: page}
7353}
7354
7355// IsEmpty returns true if the ListResult contains no values.
7356func (lur ListUsagesResult) IsEmpty() bool {
7357	return lur.Value == nil || len(*lur.Value) == 0
7358}
7359
7360// hasNextLink returns true if the NextLink is not empty.
7361func (lur ListUsagesResult) hasNextLink() bool {
7362	return lur.NextLink != nil && len(*lur.NextLink) != 0
7363}
7364
7365// listUsagesResultPreparer prepares a request to retrieve the next set of results.
7366// It returns nil if no more results exist.
7367func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
7368	if !lur.hasNextLink() {
7369		return nil, nil
7370	}
7371	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7372		autorest.AsJSON(),
7373		autorest.AsGet(),
7374		autorest.WithBaseURL(to.String(lur.NextLink)))
7375}
7376
7377// ListUsagesResultPage contains a page of Usage values.
7378type ListUsagesResultPage struct {
7379	fn  func(context.Context, ListUsagesResult) (ListUsagesResult, error)
7380	lur ListUsagesResult
7381}
7382
7383// NextWithContext advances to the next page of values.  If there was an error making
7384// the request the page does not advance and the error is returned.
7385func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
7386	if tracing.IsEnabled() {
7387		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
7388		defer func() {
7389			sc := -1
7390			if page.Response().Response.Response != nil {
7391				sc = page.Response().Response.Response.StatusCode
7392			}
7393			tracing.EndSpan(ctx, sc, err)
7394		}()
7395	}
7396	for {
7397		next, err := page.fn(ctx, page.lur)
7398		if err != nil {
7399			return err
7400		}
7401		page.lur = next
7402		if !next.hasNextLink() || !next.IsEmpty() {
7403			break
7404		}
7405	}
7406	return nil
7407}
7408
7409// Next advances to the next page of values.  If there was an error making
7410// the request the page does not advance and the error is returned.
7411// Deprecated: Use NextWithContext() instead.
7412func (page *ListUsagesResultPage) Next() error {
7413	return page.NextWithContext(context.Background())
7414}
7415
7416// NotDone returns true if the page enumeration should be started or is not yet complete.
7417func (page ListUsagesResultPage) NotDone() bool {
7418	return !page.lur.IsEmpty()
7419}
7420
7421// Response returns the raw server response from the last page request.
7422func (page ListUsagesResultPage) Response() ListUsagesResult {
7423	return page.lur
7424}
7425
7426// Values returns the slice of values for the current page or nil if there are no values.
7427func (page ListUsagesResultPage) Values() []Usage {
7428	if page.lur.IsEmpty() {
7429		return nil
7430	}
7431	return *page.lur.Value
7432}
7433
7434// Creates a new instance of the ListUsagesResultPage type.
7435func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
7436	return ListUsagesResultPage{
7437		fn:  getNextPage,
7438		lur: cur,
7439	}
7440}
7441
7442// ListVirtualMachineExtensionImage ...
7443type ListVirtualMachineExtensionImage struct {
7444	autorest.Response `json:"-"`
7445	Value             *[]VirtualMachineExtensionImage `json:"value,omitempty"`
7446}
7447
7448// ListVirtualMachineImageResource ...
7449type ListVirtualMachineImageResource struct {
7450	autorest.Response `json:"-"`
7451	Value             *[]VirtualMachineImageResource `json:"value,omitempty"`
7452}
7453
7454// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results
7455// of a long-running operation.
7456type LogAnalyticsExportRequestRateByIntervalFuture struct {
7457	azure.FutureAPI
7458	// Result returns the result of the asynchronous operation.
7459	// If the operation has not completed it will return an error.
7460	Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
7461}
7462
7463// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7464func (future *LogAnalyticsExportRequestRateByIntervalFuture) UnmarshalJSON(body []byte) error {
7465	var azFuture azure.Future
7466	if err := json.Unmarshal(body, &azFuture); err != nil {
7467		return err
7468	}
7469	future.FutureAPI = &azFuture
7470	future.Result = future.result
7471	return nil
7472}
7473
7474// result is the default implementation for LogAnalyticsExportRequestRateByIntervalFuture.Result.
7475func (future *LogAnalyticsExportRequestRateByIntervalFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
7476	var done bool
7477	done, err = future.DoneWithContext(context.Background(), client)
7478	if err != nil {
7479		err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Polling failure")
7480		return
7481	}
7482	if !done {
7483		laor.Response.Response = future.Response()
7484		err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
7485		return
7486	}
7487	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7488	if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
7489		laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response)
7490		if err != nil {
7491			err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request")
7492		}
7493	}
7494	return
7495}
7496
7497// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a
7498// long-running operation.
7499type LogAnalyticsExportThrottledRequestsFuture struct {
7500	azure.FutureAPI
7501	// Result returns the result of the asynchronous operation.
7502	// If the operation has not completed it will return an error.
7503	Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
7504}
7505
7506// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7507func (future *LogAnalyticsExportThrottledRequestsFuture) UnmarshalJSON(body []byte) error {
7508	var azFuture azure.Future
7509	if err := json.Unmarshal(body, &azFuture); err != nil {
7510		return err
7511	}
7512	future.FutureAPI = &azFuture
7513	future.Result = future.result
7514	return nil
7515}
7516
7517// result is the default implementation for LogAnalyticsExportThrottledRequestsFuture.Result.
7518func (future *LogAnalyticsExportThrottledRequestsFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
7519	var done bool
7520	done, err = future.DoneWithContext(context.Background(), client)
7521	if err != nil {
7522		err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Polling failure")
7523		return
7524	}
7525	if !done {
7526		laor.Response.Response = future.Response()
7527		err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
7528		return
7529	}
7530	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7531	if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
7532		laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response)
7533		if err != nil {
7534			err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request")
7535		}
7536	}
7537	return
7538}
7539
7540// LogAnalyticsInputBase api input base class for LogAnalytics Api.
7541type LogAnalyticsInputBase struct {
7542	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
7543	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
7544	// FromTime - From time of the query
7545	FromTime *date.Time `json:"fromTime,omitempty"`
7546	// ToTime - To time of the query
7547	ToTime *date.Time `json:"toTime,omitempty"`
7548	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
7549	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
7550	// GroupByOperationName - Group query result by Operation Name.
7551	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
7552	// GroupByResourceName - Group query result by Resource Name.
7553	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
7554	// GroupByClientApplicationID - Group query result by Client Application ID.
7555	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
7556	// GroupByUserAgent - Group query result by User Agent.
7557	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
7558}
7559
7560// LogAnalyticsOperationResult logAnalytics operation status response
7561type LogAnalyticsOperationResult struct {
7562	autorest.Response `json:"-"`
7563	// Properties - READ-ONLY; LogAnalyticsOutput
7564	Properties *LogAnalyticsOutput `json:"properties,omitempty"`
7565}
7566
7567// MarshalJSON is the custom marshaler for LogAnalyticsOperationResult.
7568func (laor LogAnalyticsOperationResult) MarshalJSON() ([]byte, error) {
7569	objectMap := make(map[string]interface{})
7570	return json.Marshal(objectMap)
7571}
7572
7573// LogAnalyticsOutput logAnalytics output properties
7574type LogAnalyticsOutput struct {
7575	// Output - READ-ONLY; Output file Uri path to blob container.
7576	Output *string `json:"output,omitempty"`
7577}
7578
7579// MarshalJSON is the custom marshaler for LogAnalyticsOutput.
7580func (lao LogAnalyticsOutput) MarshalJSON() ([]byte, error) {
7581	objectMap := make(map[string]interface{})
7582	return json.Marshal(objectMap)
7583}
7584
7585// MaintenanceRedeployStatus maintenance Operation Status.
7586type MaintenanceRedeployStatus struct {
7587	// IsCustomerInitiatedMaintenanceAllowed - True, if customer is allowed to perform Maintenance.
7588	IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"`
7589	// PreMaintenanceWindowStartTime - Start Time for the Pre Maintenance Window.
7590	PreMaintenanceWindowStartTime *date.Time `json:"preMaintenanceWindowStartTime,omitempty"`
7591	// PreMaintenanceWindowEndTime - End Time for the Pre Maintenance Window.
7592	PreMaintenanceWindowEndTime *date.Time `json:"preMaintenanceWindowEndTime,omitempty"`
7593	// MaintenanceWindowStartTime - Start Time for the Maintenance Window.
7594	MaintenanceWindowStartTime *date.Time `json:"maintenanceWindowStartTime,omitempty"`
7595	// MaintenanceWindowEndTime - End Time for the Maintenance Window.
7596	MaintenanceWindowEndTime *date.Time `json:"maintenanceWindowEndTime,omitempty"`
7597	// LastOperationResultCode - The Last Maintenance Operation Result Code. Possible values include: 'MaintenanceOperationResultCodeTypesNone', 'MaintenanceOperationResultCodeTypesRetryLater', 'MaintenanceOperationResultCodeTypesMaintenanceAborted', 'MaintenanceOperationResultCodeTypesMaintenanceCompleted'
7598	LastOperationResultCode MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"`
7599	// LastOperationMessage - Message returned for the last Maintenance Operation.
7600	LastOperationMessage *string `json:"lastOperationMessage,omitempty"`
7601}
7602
7603// ManagedArtifact the managed artifact.
7604type ManagedArtifact struct {
7605	// ID - The managed artifact id.
7606	ID *string `json:"id,omitempty"`
7607}
7608
7609// ManagedDiskParameters the parameters of a managed disk.
7610type ManagedDiskParameters struct {
7611	// 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', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
7612	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
7613	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
7614	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
7615	// ID - Resource Id
7616	ID *string `json:"id,omitempty"`
7617}
7618
7619// NetworkInterfaceReference describes a network interface reference.
7620type NetworkInterfaceReference struct {
7621	*NetworkInterfaceReferenceProperties `json:"properties,omitempty"`
7622	// ID - Resource Id
7623	ID *string `json:"id,omitempty"`
7624}
7625
7626// MarshalJSON is the custom marshaler for NetworkInterfaceReference.
7627func (nir NetworkInterfaceReference) MarshalJSON() ([]byte, error) {
7628	objectMap := make(map[string]interface{})
7629	if nir.NetworkInterfaceReferenceProperties != nil {
7630		objectMap["properties"] = nir.NetworkInterfaceReferenceProperties
7631	}
7632	if nir.ID != nil {
7633		objectMap["id"] = nir.ID
7634	}
7635	return json.Marshal(objectMap)
7636}
7637
7638// UnmarshalJSON is the custom unmarshaler for NetworkInterfaceReference struct.
7639func (nir *NetworkInterfaceReference) UnmarshalJSON(body []byte) error {
7640	var m map[string]*json.RawMessage
7641	err := json.Unmarshal(body, &m)
7642	if err != nil {
7643		return err
7644	}
7645	for k, v := range m {
7646		switch k {
7647		case "properties":
7648			if v != nil {
7649				var networkInterfaceReferenceProperties NetworkInterfaceReferenceProperties
7650				err = json.Unmarshal(*v, &networkInterfaceReferenceProperties)
7651				if err != nil {
7652					return err
7653				}
7654				nir.NetworkInterfaceReferenceProperties = &networkInterfaceReferenceProperties
7655			}
7656		case "id":
7657			if v != nil {
7658				var ID string
7659				err = json.Unmarshal(*v, &ID)
7660				if err != nil {
7661					return err
7662				}
7663				nir.ID = &ID
7664			}
7665		}
7666	}
7667
7668	return nil
7669}
7670
7671// NetworkInterfaceReferenceProperties describes a network interface reference properties.
7672type NetworkInterfaceReferenceProperties struct {
7673	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
7674	Primary *bool `json:"primary,omitempty"`
7675}
7676
7677// NetworkProfile specifies the network interfaces of the virtual machine.
7678type NetworkProfile struct {
7679	// NetworkInterfaces - Specifies the list of resource Ids for the network interfaces associated with the virtual machine.
7680	NetworkInterfaces *[]NetworkInterfaceReference `json:"networkInterfaces,omitempty"`
7681}
7682
7683// OperationListResult the List Compute Operation operation response.
7684type OperationListResult struct {
7685	autorest.Response `json:"-"`
7686	// Value - READ-ONLY; The list of compute operations
7687	Value *[]OperationValue `json:"value,omitempty"`
7688}
7689
7690// MarshalJSON is the custom marshaler for OperationListResult.
7691func (olr OperationListResult) MarshalJSON() ([]byte, error) {
7692	objectMap := make(map[string]interface{})
7693	return json.Marshal(objectMap)
7694}
7695
7696// OperationValue describes the properties of a Compute Operation value.
7697type OperationValue struct {
7698	// Origin - READ-ONLY; The origin of the compute operation.
7699	Origin *string `json:"origin,omitempty"`
7700	// Name - READ-ONLY; The name of the compute operation.
7701	Name                   *string `json:"name,omitempty"`
7702	*OperationValueDisplay `json:"display,omitempty"`
7703}
7704
7705// MarshalJSON is the custom marshaler for OperationValue.
7706func (ov OperationValue) MarshalJSON() ([]byte, error) {
7707	objectMap := make(map[string]interface{})
7708	if ov.OperationValueDisplay != nil {
7709		objectMap["display"] = ov.OperationValueDisplay
7710	}
7711	return json.Marshal(objectMap)
7712}
7713
7714// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
7715func (ov *OperationValue) UnmarshalJSON(body []byte) error {
7716	var m map[string]*json.RawMessage
7717	err := json.Unmarshal(body, &m)
7718	if err != nil {
7719		return err
7720	}
7721	for k, v := range m {
7722		switch k {
7723		case "origin":
7724			if v != nil {
7725				var origin string
7726				err = json.Unmarshal(*v, &origin)
7727				if err != nil {
7728					return err
7729				}
7730				ov.Origin = &origin
7731			}
7732		case "name":
7733			if v != nil {
7734				var name string
7735				err = json.Unmarshal(*v, &name)
7736				if err != nil {
7737					return err
7738				}
7739				ov.Name = &name
7740			}
7741		case "display":
7742			if v != nil {
7743				var operationValueDisplay OperationValueDisplay
7744				err = json.Unmarshal(*v, &operationValueDisplay)
7745				if err != nil {
7746					return err
7747				}
7748				ov.OperationValueDisplay = &operationValueDisplay
7749			}
7750		}
7751	}
7752
7753	return nil
7754}
7755
7756// OperationValueDisplay describes the properties of a Compute Operation Value Display.
7757type OperationValueDisplay struct {
7758	// Operation - READ-ONLY; The display name of the compute operation.
7759	Operation *string `json:"operation,omitempty"`
7760	// Resource - READ-ONLY; The display name of the resource the operation applies to.
7761	Resource *string `json:"resource,omitempty"`
7762	// Description - READ-ONLY; The description of the operation.
7763	Description *string `json:"description,omitempty"`
7764	// Provider - READ-ONLY; The resource provider for the operation.
7765	Provider *string `json:"provider,omitempty"`
7766}
7767
7768// MarshalJSON is the custom marshaler for OperationValueDisplay.
7769func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) {
7770	objectMap := make(map[string]interface{})
7771	return json.Marshal(objectMap)
7772}
7773
7774// OrchestrationServiceStateInput the input for OrchestrationServiceState
7775type OrchestrationServiceStateInput struct {
7776	// ServiceName - The name of the service. Possible values include: 'AutomaticRepairs'
7777	ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
7778	// Action - The action to be performed. Possible values include: 'Resume', 'Suspend'
7779	Action OrchestrationServiceStateAction `json:"action,omitempty"`
7780}
7781
7782// OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set.
7783type OrchestrationServiceSummary struct {
7784	// ServiceName - READ-ONLY; The name of the service. Possible values include: 'AutomaticRepairs', 'DummyOrchestrationServiceName'
7785	ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
7786	// ServiceState - READ-ONLY; The current state of the service. Possible values include: 'NotRunning', 'Running', 'Suspended'
7787	ServiceState OrchestrationServiceState `json:"serviceState,omitempty"`
7788}
7789
7790// MarshalJSON is the custom marshaler for OrchestrationServiceSummary.
7791func (oss OrchestrationServiceSummary) MarshalJSON() ([]byte, error) {
7792	objectMap := make(map[string]interface{})
7793	return json.Marshal(objectMap)
7794}
7795
7796// OSDisk specifies information about the operating system disk used by the virtual machine. <br><br> For
7797// more information about disks, see [About disks and VHDs for Azure virtual
7798// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
7799type OSDisk struct {
7800	// 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'
7801	OsType OperatingSystemTypes `json:"osType,omitempty"`
7802	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
7803	EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
7804	// Name - The disk name.
7805	Name *string `json:"name,omitempty"`
7806	// Vhd - The virtual hard disk.
7807	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
7808	// 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.
7809	Image *VirtualHardDisk `json:"image,omitempty"`
7810	// 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'
7811	Caching CachingTypes `json:"caching,omitempty"`
7812	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
7813	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
7814	// DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
7815	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
7816	// 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'
7817	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
7818	// 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
7819	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
7820	// ManagedDisk - The managed disk parameters.
7821	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
7822}
7823
7824// OSDiskImage contains the os disk image information.
7825type OSDiskImage struct {
7826	// OperatingSystem - The operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'
7827	OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"`
7828}
7829
7830// OSDiskImageEncryption contains encryption settings for an OS disk image.
7831type OSDiskImageEncryption struct {
7832	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
7833	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
7834}
7835
7836// OSProfile specifies the operating system settings for the virtual machine. Some of the settings cannot
7837// be changed once VM is provisioned.
7838type OSProfile struct {
7839	// 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).
7840	ComputerName *string `json:"computerName,omitempty"`
7841	// AdminUsername - Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <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)
7842	AdminUsername *string `json:"adminUsername,omitempty"`
7843	// 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)
7844	AdminPassword *string `json:"adminPassword,omitempty"`
7845	// 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> **Note: Do not pass any secrets or passwords in customData property** <br><br> This property cannot be updated after the VM is created. <br><br> customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) <br><br> For using cloud-init for your Linux 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)
7846	CustomData *string `json:"customData,omitempty"`
7847	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
7848	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
7849	// 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).
7850	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
7851	// Secrets - Specifies set of certificates that should be installed onto the virtual machine.
7852	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
7853	// 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.
7854	AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"`
7855	// RequireGuestProvisionSignal - Specifies whether the guest provision signal is required to infer provision success of the virtual machine.  **Note: This property is for private testing only, and all customers must not set the property to false.**
7856	RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"`
7857}
7858
7859// PatchInstallationDetail information about a specific patch that was encountered during an installation
7860// action.
7861type PatchInstallationDetail struct {
7862	// PatchID - READ-ONLY; A unique identifier for the patch.
7863	PatchID *string `json:"patchId,omitempty"`
7864	// Name - READ-ONLY; The friendly name of the patch.
7865	Name *string `json:"name,omitempty"`
7866	// Version - READ-ONLY; The version string of the package. It may conform to Semantic Versioning. Only applies to Linux.
7867	Version *string `json:"version,omitempty"`
7868	// KbID - READ-ONLY; The KBID of the patch. Only applies to Windows patches.
7869	KbID *string `json:"kbId,omitempty"`
7870	// Classifications - READ-ONLY; The classification(s) of the patch as provided by the patch publisher.
7871	Classifications *[]string `json:"classifications,omitempty"`
7872	// InstallationState - READ-ONLY; The state of the patch after the installation operation completed. Possible values include: 'PatchInstallationStateUnknown', 'PatchInstallationStateInstalled', 'PatchInstallationStateFailed', 'PatchInstallationStateExcluded', 'PatchInstallationStateNotSelected', 'PatchInstallationStatePending'
7873	InstallationState PatchInstallationState `json:"installationState,omitempty"`
7874}
7875
7876// MarshalJSON is the custom marshaler for PatchInstallationDetail.
7877func (pid PatchInstallationDetail) MarshalJSON() ([]byte, error) {
7878	objectMap := make(map[string]interface{})
7879	return json.Marshal(objectMap)
7880}
7881
7882// PatchSettings specifies settings related to VM Guest Patching on Windows.
7883type PatchSettings struct {
7884	// PatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **Manual** - You  control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'WindowsVMGuestPatchModeManual', 'WindowsVMGuestPatchModeAutomaticByOS', 'WindowsVMGuestPatchModeAutomaticByPlatform'
7885	PatchMode WindowsVMGuestPatchMode `json:"patchMode,omitempty"`
7886	// EnableHotpatching - Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'.
7887	EnableHotpatching *bool `json:"enableHotpatching,omitempty"`
7888}
7889
7890// Plan specifies information about the marketplace image used to create the virtual machine. This element
7891// is only used for marketplace images. Before you can use a marketplace image from an API, you must enable
7892// the image for programmatic use.  In the Azure portal, find the marketplace image that you want to use
7893// and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and
7894// then click **Save**.
7895type Plan struct {
7896	// Name - The plan ID.
7897	Name *string `json:"name,omitempty"`
7898	// Publisher - The publisher ID.
7899	Publisher *string `json:"publisher,omitempty"`
7900	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
7901	Product *string `json:"product,omitempty"`
7902	// PromotionCode - The promotion code.
7903	PromotionCode *string `json:"promotionCode,omitempty"`
7904}
7905
7906// PrivateEndpoint the Private Endpoint resource.
7907type PrivateEndpoint struct {
7908	// ID - READ-ONLY; The ARM identifier for Private Endpoint
7909	ID *string `json:"id,omitempty"`
7910}
7911
7912// MarshalJSON is the custom marshaler for PrivateEndpoint.
7913func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
7914	objectMap := make(map[string]interface{})
7915	return json.Marshal(objectMap)
7916}
7917
7918// PrivateEndpointConnection the Private Endpoint Connection resource.
7919type PrivateEndpointConnection struct {
7920	autorest.Response `json:"-"`
7921	// PrivateEndpointConnectionProperties - Resource properties.
7922	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
7923	// ID - READ-ONLY; private endpoint connection Id
7924	ID *string `json:"id,omitempty"`
7925	// Name - READ-ONLY; private endpoint connection name
7926	Name *string `json:"name,omitempty"`
7927	// Type - READ-ONLY; private endpoint connection type
7928	Type *string `json:"type,omitempty"`
7929}
7930
7931// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
7932func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
7933	objectMap := make(map[string]interface{})
7934	if pec.PrivateEndpointConnectionProperties != nil {
7935		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
7936	}
7937	return json.Marshal(objectMap)
7938}
7939
7940// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
7941func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
7942	var m map[string]*json.RawMessage
7943	err := json.Unmarshal(body, &m)
7944	if err != nil {
7945		return err
7946	}
7947	for k, v := range m {
7948		switch k {
7949		case "properties":
7950			if v != nil {
7951				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
7952				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
7953				if err != nil {
7954					return err
7955				}
7956				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
7957			}
7958		case "id":
7959			if v != nil {
7960				var ID string
7961				err = json.Unmarshal(*v, &ID)
7962				if err != nil {
7963					return err
7964				}
7965				pec.ID = &ID
7966			}
7967		case "name":
7968			if v != nil {
7969				var name string
7970				err = json.Unmarshal(*v, &name)
7971				if err != nil {
7972					return err
7973				}
7974				pec.Name = &name
7975			}
7976		case "type":
7977			if v != nil {
7978				var typeVar string
7979				err = json.Unmarshal(*v, &typeVar)
7980				if err != nil {
7981					return err
7982				}
7983				pec.Type = &typeVar
7984			}
7985		}
7986	}
7987
7988	return nil
7989}
7990
7991// PrivateEndpointConnectionListResult a list of private link resources
7992type PrivateEndpointConnectionListResult struct {
7993	autorest.Response `json:"-"`
7994	// Value - Array of private endpoint connections
7995	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
7996	// NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
7997	NextLink *string `json:"nextLink,omitempty"`
7998}
7999
8000// PrivateEndpointConnectionListResultIterator provides access to a complete listing of
8001// PrivateEndpointConnection values.
8002type PrivateEndpointConnectionListResultIterator struct {
8003	i    int
8004	page PrivateEndpointConnectionListResultPage
8005}
8006
8007// NextWithContext advances to the next value.  If there was an error making
8008// the request the iterator does not advance and the error is returned.
8009func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
8010	if tracing.IsEnabled() {
8011		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext")
8012		defer func() {
8013			sc := -1
8014			if iter.Response().Response.Response != nil {
8015				sc = iter.Response().Response.Response.StatusCode
8016			}
8017			tracing.EndSpan(ctx, sc, err)
8018		}()
8019	}
8020	iter.i++
8021	if iter.i < len(iter.page.Values()) {
8022		return nil
8023	}
8024	err = iter.page.NextWithContext(ctx)
8025	if err != nil {
8026		iter.i--
8027		return err
8028	}
8029	iter.i = 0
8030	return nil
8031}
8032
8033// Next advances to the next value.  If there was an error making
8034// the request the iterator does not advance and the error is returned.
8035// Deprecated: Use NextWithContext() instead.
8036func (iter *PrivateEndpointConnectionListResultIterator) Next() error {
8037	return iter.NextWithContext(context.Background())
8038}
8039
8040// NotDone returns true if the enumeration should be started or is not yet complete.
8041func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool {
8042	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8043}
8044
8045// Response returns the raw server response from the last page request.
8046func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult {
8047	return iter.page.Response()
8048}
8049
8050// Value returns the current value or a zero-initialized value if the
8051// iterator has advanced beyond the end of the collection.
8052func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection {
8053	if !iter.page.NotDone() {
8054		return PrivateEndpointConnection{}
8055	}
8056	return iter.page.Values()[iter.i]
8057}
8058
8059// Creates a new instance of the PrivateEndpointConnectionListResultIterator type.
8060func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator {
8061	return PrivateEndpointConnectionListResultIterator{page: page}
8062}
8063
8064// IsEmpty returns true if the ListResult contains no values.
8065func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool {
8066	return peclr.Value == nil || len(*peclr.Value) == 0
8067}
8068
8069// hasNextLink returns true if the NextLink is not empty.
8070func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool {
8071	return peclr.NextLink != nil && len(*peclr.NextLink) != 0
8072}
8073
8074// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
8075// It returns nil if no more results exist.
8076func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
8077	if !peclr.hasNextLink() {
8078		return nil, nil
8079	}
8080	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8081		autorest.AsJSON(),
8082		autorest.AsGet(),
8083		autorest.WithBaseURL(to.String(peclr.NextLink)))
8084}
8085
8086// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values.
8087type PrivateEndpointConnectionListResultPage struct {
8088	fn    func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)
8089	peclr PrivateEndpointConnectionListResult
8090}
8091
8092// NextWithContext advances to the next page of values.  If there was an error making
8093// the request the page does not advance and the error is returned.
8094func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
8095	if tracing.IsEnabled() {
8096		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext")
8097		defer func() {
8098			sc := -1
8099			if page.Response().Response.Response != nil {
8100				sc = page.Response().Response.Response.StatusCode
8101			}
8102			tracing.EndSpan(ctx, sc, err)
8103		}()
8104	}
8105	for {
8106		next, err := page.fn(ctx, page.peclr)
8107		if err != nil {
8108			return err
8109		}
8110		page.peclr = next
8111		if !next.hasNextLink() || !next.IsEmpty() {
8112			break
8113		}
8114	}
8115	return nil
8116}
8117
8118// Next advances to the next page of values.  If there was an error making
8119// the request the page does not advance and the error is returned.
8120// Deprecated: Use NextWithContext() instead.
8121func (page *PrivateEndpointConnectionListResultPage) Next() error {
8122	return page.NextWithContext(context.Background())
8123}
8124
8125// NotDone returns true if the page enumeration should be started or is not yet complete.
8126func (page PrivateEndpointConnectionListResultPage) NotDone() bool {
8127	return !page.peclr.IsEmpty()
8128}
8129
8130// Response returns the raw server response from the last page request.
8131func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult {
8132	return page.peclr
8133}
8134
8135// Values returns the slice of values for the current page or nil if there are no values.
8136func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection {
8137	if page.peclr.IsEmpty() {
8138		return nil
8139	}
8140	return *page.peclr.Value
8141}
8142
8143// Creates a new instance of the PrivateEndpointConnectionListResultPage type.
8144func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage {
8145	return PrivateEndpointConnectionListResultPage{
8146		fn:    getNextPage,
8147		peclr: cur,
8148	}
8149}
8150
8151// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
8152type PrivateEndpointConnectionProperties struct {
8153	// PrivateEndpoint - READ-ONLY; The resource of private end point.
8154	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
8155	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between DiskAccess and Virtual Network.
8156	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
8157	// ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed'
8158	ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
8159}
8160
8161// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
8162func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
8163	objectMap := make(map[string]interface{})
8164	if pecp.PrivateLinkServiceConnectionState != nil {
8165		objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
8166	}
8167	if pecp.ProvisioningState != "" {
8168		objectMap["provisioningState"] = pecp.ProvisioningState
8169	}
8170	return json.Marshal(objectMap)
8171}
8172
8173// PrivateLinkResource a private link resource
8174type PrivateLinkResource struct {
8175	// PrivateLinkResourceProperties - Resource properties.
8176	*PrivateLinkResourceProperties `json:"properties,omitempty"`
8177	// ID - READ-ONLY; private link resource Id
8178	ID *string `json:"id,omitempty"`
8179	// Name - READ-ONLY; private link resource name
8180	Name *string `json:"name,omitempty"`
8181	// Type - READ-ONLY; private link resource type
8182	Type *string `json:"type,omitempty"`
8183}
8184
8185// MarshalJSON is the custom marshaler for PrivateLinkResource.
8186func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
8187	objectMap := make(map[string]interface{})
8188	if plr.PrivateLinkResourceProperties != nil {
8189		objectMap["properties"] = plr.PrivateLinkResourceProperties
8190	}
8191	return json.Marshal(objectMap)
8192}
8193
8194// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
8195func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
8196	var m map[string]*json.RawMessage
8197	err := json.Unmarshal(body, &m)
8198	if err != nil {
8199		return err
8200	}
8201	for k, v := range m {
8202		switch k {
8203		case "properties":
8204			if v != nil {
8205				var privateLinkResourceProperties PrivateLinkResourceProperties
8206				err = json.Unmarshal(*v, &privateLinkResourceProperties)
8207				if err != nil {
8208					return err
8209				}
8210				plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
8211			}
8212		case "id":
8213			if v != nil {
8214				var ID string
8215				err = json.Unmarshal(*v, &ID)
8216				if err != nil {
8217					return err
8218				}
8219				plr.ID = &ID
8220			}
8221		case "name":
8222			if v != nil {
8223				var name string
8224				err = json.Unmarshal(*v, &name)
8225				if err != nil {
8226					return err
8227				}
8228				plr.Name = &name
8229			}
8230		case "type":
8231			if v != nil {
8232				var typeVar string
8233				err = json.Unmarshal(*v, &typeVar)
8234				if err != nil {
8235					return err
8236				}
8237				plr.Type = &typeVar
8238			}
8239		}
8240	}
8241
8242	return nil
8243}
8244
8245// PrivateLinkResourceListResult a list of private link resources
8246type PrivateLinkResourceListResult struct {
8247	autorest.Response `json:"-"`
8248	// Value - Array of private link resources
8249	Value *[]PrivateLinkResource `json:"value,omitempty"`
8250}
8251
8252// PrivateLinkResourceProperties properties of a private link resource.
8253type PrivateLinkResourceProperties struct {
8254	// GroupID - READ-ONLY; The private link resource group id.
8255	GroupID *string `json:"groupId,omitempty"`
8256	// RequiredMembers - READ-ONLY; The private link resource required member names.
8257	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
8258	// RequiredZoneNames - The private link resource DNS zone name.
8259	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
8260}
8261
8262// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
8263func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
8264	objectMap := make(map[string]interface{})
8265	if plrp.RequiredZoneNames != nil {
8266		objectMap["requiredZoneNames"] = plrp.RequiredZoneNames
8267	}
8268	return json.Marshal(objectMap)
8269}
8270
8271// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
8272// service consumer and provider.
8273type PrivateLinkServiceConnectionState struct {
8274	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected'
8275	Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
8276	// Description - The reason for approval/rejection of the connection.
8277	Description *string `json:"description,omitempty"`
8278	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
8279	ActionsRequired *string `json:"actionsRequired,omitempty"`
8280}
8281
8282// PropertyUpdatesInProgress properties of the disk for which update is pending.
8283type PropertyUpdatesInProgress struct {
8284	// TargetTier - The target performance tier of the disk if a tier change operation is in progress.
8285	TargetTier *string `json:"targetTier,omitempty"`
8286}
8287
8288// ProximityPlacementGroup specifies information about the proximity placement group.
8289type ProximityPlacementGroup struct {
8290	autorest.Response `json:"-"`
8291	// ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group.
8292	*ProximityPlacementGroupProperties `json:"properties,omitempty"`
8293	// ID - READ-ONLY; Resource Id
8294	ID *string `json:"id,omitempty"`
8295	// Name - READ-ONLY; Resource name
8296	Name *string `json:"name,omitempty"`
8297	// Type - READ-ONLY; Resource type
8298	Type *string `json:"type,omitempty"`
8299	// Location - Resource location
8300	Location *string `json:"location,omitempty"`
8301	// Tags - Resource tags
8302	Tags map[string]*string `json:"tags"`
8303}
8304
8305// MarshalJSON is the custom marshaler for ProximityPlacementGroup.
8306func (ppg ProximityPlacementGroup) MarshalJSON() ([]byte, error) {
8307	objectMap := make(map[string]interface{})
8308	if ppg.ProximityPlacementGroupProperties != nil {
8309		objectMap["properties"] = ppg.ProximityPlacementGroupProperties
8310	}
8311	if ppg.Location != nil {
8312		objectMap["location"] = ppg.Location
8313	}
8314	if ppg.Tags != nil {
8315		objectMap["tags"] = ppg.Tags
8316	}
8317	return json.Marshal(objectMap)
8318}
8319
8320// UnmarshalJSON is the custom unmarshaler for ProximityPlacementGroup struct.
8321func (ppg *ProximityPlacementGroup) UnmarshalJSON(body []byte) error {
8322	var m map[string]*json.RawMessage
8323	err := json.Unmarshal(body, &m)
8324	if err != nil {
8325		return err
8326	}
8327	for k, v := range m {
8328		switch k {
8329		case "properties":
8330			if v != nil {
8331				var proximityPlacementGroupProperties ProximityPlacementGroupProperties
8332				err = json.Unmarshal(*v, &proximityPlacementGroupProperties)
8333				if err != nil {
8334					return err
8335				}
8336				ppg.ProximityPlacementGroupProperties = &proximityPlacementGroupProperties
8337			}
8338		case "id":
8339			if v != nil {
8340				var ID string
8341				err = json.Unmarshal(*v, &ID)
8342				if err != nil {
8343					return err
8344				}
8345				ppg.ID = &ID
8346			}
8347		case "name":
8348			if v != nil {
8349				var name string
8350				err = json.Unmarshal(*v, &name)
8351				if err != nil {
8352					return err
8353				}
8354				ppg.Name = &name
8355			}
8356		case "type":
8357			if v != nil {
8358				var typeVar string
8359				err = json.Unmarshal(*v, &typeVar)
8360				if err != nil {
8361					return err
8362				}
8363				ppg.Type = &typeVar
8364			}
8365		case "location":
8366			if v != nil {
8367				var location string
8368				err = json.Unmarshal(*v, &location)
8369				if err != nil {
8370					return err
8371				}
8372				ppg.Location = &location
8373			}
8374		case "tags":
8375			if v != nil {
8376				var tags map[string]*string
8377				err = json.Unmarshal(*v, &tags)
8378				if err != nil {
8379					return err
8380				}
8381				ppg.Tags = tags
8382			}
8383		}
8384	}
8385
8386	return nil
8387}
8388
8389// ProximityPlacementGroupListResult the List Proximity Placement Group operation response.
8390type ProximityPlacementGroupListResult struct {
8391	autorest.Response `json:"-"`
8392	// Value - The list of proximity placement groups
8393	Value *[]ProximityPlacementGroup `json:"value,omitempty"`
8394	// NextLink - The URI to fetch the next page of proximity placement groups.
8395	NextLink *string `json:"nextLink,omitempty"`
8396}
8397
8398// ProximityPlacementGroupListResultIterator provides access to a complete listing of
8399// ProximityPlacementGroup values.
8400type ProximityPlacementGroupListResultIterator struct {
8401	i    int
8402	page ProximityPlacementGroupListResultPage
8403}
8404
8405// NextWithContext advances to the next value.  If there was an error making
8406// the request the iterator does not advance and the error is returned.
8407func (iter *ProximityPlacementGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
8408	if tracing.IsEnabled() {
8409		ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultIterator.NextWithContext")
8410		defer func() {
8411			sc := -1
8412			if iter.Response().Response.Response != nil {
8413				sc = iter.Response().Response.Response.StatusCode
8414			}
8415			tracing.EndSpan(ctx, sc, err)
8416		}()
8417	}
8418	iter.i++
8419	if iter.i < len(iter.page.Values()) {
8420		return nil
8421	}
8422	err = iter.page.NextWithContext(ctx)
8423	if err != nil {
8424		iter.i--
8425		return err
8426	}
8427	iter.i = 0
8428	return nil
8429}
8430
8431// Next advances to the next value.  If there was an error making
8432// the request the iterator does not advance and the error is returned.
8433// Deprecated: Use NextWithContext() instead.
8434func (iter *ProximityPlacementGroupListResultIterator) Next() error {
8435	return iter.NextWithContext(context.Background())
8436}
8437
8438// NotDone returns true if the enumeration should be started or is not yet complete.
8439func (iter ProximityPlacementGroupListResultIterator) NotDone() bool {
8440	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8441}
8442
8443// Response returns the raw server response from the last page request.
8444func (iter ProximityPlacementGroupListResultIterator) Response() ProximityPlacementGroupListResult {
8445	return iter.page.Response()
8446}
8447
8448// Value returns the current value or a zero-initialized value if the
8449// iterator has advanced beyond the end of the collection.
8450func (iter ProximityPlacementGroupListResultIterator) Value() ProximityPlacementGroup {
8451	if !iter.page.NotDone() {
8452		return ProximityPlacementGroup{}
8453	}
8454	return iter.page.Values()[iter.i]
8455}
8456
8457// Creates a new instance of the ProximityPlacementGroupListResultIterator type.
8458func NewProximityPlacementGroupListResultIterator(page ProximityPlacementGroupListResultPage) ProximityPlacementGroupListResultIterator {
8459	return ProximityPlacementGroupListResultIterator{page: page}
8460}
8461
8462// IsEmpty returns true if the ListResult contains no values.
8463func (ppglr ProximityPlacementGroupListResult) IsEmpty() bool {
8464	return ppglr.Value == nil || len(*ppglr.Value) == 0
8465}
8466
8467// hasNextLink returns true if the NextLink is not empty.
8468func (ppglr ProximityPlacementGroupListResult) hasNextLink() bool {
8469	return ppglr.NextLink != nil && len(*ppglr.NextLink) != 0
8470}
8471
8472// proximityPlacementGroupListResultPreparer prepares a request to retrieve the next set of results.
8473// It returns nil if no more results exist.
8474func (ppglr ProximityPlacementGroupListResult) proximityPlacementGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
8475	if !ppglr.hasNextLink() {
8476		return nil, nil
8477	}
8478	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8479		autorest.AsJSON(),
8480		autorest.AsGet(),
8481		autorest.WithBaseURL(to.String(ppglr.NextLink)))
8482}
8483
8484// ProximityPlacementGroupListResultPage contains a page of ProximityPlacementGroup values.
8485type ProximityPlacementGroupListResultPage struct {
8486	fn    func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)
8487	ppglr ProximityPlacementGroupListResult
8488}
8489
8490// NextWithContext advances to the next page of values.  If there was an error making
8491// the request the page does not advance and the error is returned.
8492func (page *ProximityPlacementGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
8493	if tracing.IsEnabled() {
8494		ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultPage.NextWithContext")
8495		defer func() {
8496			sc := -1
8497			if page.Response().Response.Response != nil {
8498				sc = page.Response().Response.Response.StatusCode
8499			}
8500			tracing.EndSpan(ctx, sc, err)
8501		}()
8502	}
8503	for {
8504		next, err := page.fn(ctx, page.ppglr)
8505		if err != nil {
8506			return err
8507		}
8508		page.ppglr = next
8509		if !next.hasNextLink() || !next.IsEmpty() {
8510			break
8511		}
8512	}
8513	return nil
8514}
8515
8516// Next advances to the next page of values.  If there was an error making
8517// the request the page does not advance and the error is returned.
8518// Deprecated: Use NextWithContext() instead.
8519func (page *ProximityPlacementGroupListResultPage) Next() error {
8520	return page.NextWithContext(context.Background())
8521}
8522
8523// NotDone returns true if the page enumeration should be started or is not yet complete.
8524func (page ProximityPlacementGroupListResultPage) NotDone() bool {
8525	return !page.ppglr.IsEmpty()
8526}
8527
8528// Response returns the raw server response from the last page request.
8529func (page ProximityPlacementGroupListResultPage) Response() ProximityPlacementGroupListResult {
8530	return page.ppglr
8531}
8532
8533// Values returns the slice of values for the current page or nil if there are no values.
8534func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementGroup {
8535	if page.ppglr.IsEmpty() {
8536		return nil
8537	}
8538	return *page.ppglr.Value
8539}
8540
8541// Creates a new instance of the ProximityPlacementGroupListResultPage type.
8542func NewProximityPlacementGroupListResultPage(cur ProximityPlacementGroupListResult, getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage {
8543	return ProximityPlacementGroupListResultPage{
8544		fn:    getNextPage,
8545		ppglr: cur,
8546	}
8547}
8548
8549// ProximityPlacementGroupProperties describes the properties of a Proximity Placement Group.
8550type ProximityPlacementGroupProperties struct {
8551	// 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'
8552	ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"`
8553	// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group.
8554	VirtualMachines *[]SubResourceWithColocationStatus `json:"virtualMachines,omitempty"`
8555	// VirtualMachineScaleSets - READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group.
8556	VirtualMachineScaleSets *[]SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty"`
8557	// AvailabilitySets - READ-ONLY; A list of references to all availability sets in the proximity placement group.
8558	AvailabilitySets *[]SubResourceWithColocationStatus `json:"availabilitySets,omitempty"`
8559	// ColocationStatus - Describes colocation status of the Proximity Placement Group.
8560	ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
8561}
8562
8563// MarshalJSON is the custom marshaler for ProximityPlacementGroupProperties.
8564func (ppgp ProximityPlacementGroupProperties) MarshalJSON() ([]byte, error) {
8565	objectMap := make(map[string]interface{})
8566	if ppgp.ProximityPlacementGroupType != "" {
8567		objectMap["proximityPlacementGroupType"] = ppgp.ProximityPlacementGroupType
8568	}
8569	if ppgp.ColocationStatus != nil {
8570		objectMap["colocationStatus"] = ppgp.ColocationStatus
8571	}
8572	return json.Marshal(objectMap)
8573}
8574
8575// ProximityPlacementGroupUpdate specifies information about the proximity placement group.
8576type ProximityPlacementGroupUpdate struct {
8577	// Tags - Resource tags
8578	Tags map[string]*string `json:"tags"`
8579}
8580
8581// MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate.
8582func (ppgu ProximityPlacementGroupUpdate) MarshalJSON() ([]byte, error) {
8583	objectMap := make(map[string]interface{})
8584	if ppgu.Tags != nil {
8585		objectMap["tags"] = ppgu.Tags
8586	}
8587	return json.Marshal(objectMap)
8588}
8589
8590// ProxyOnlyResource the ProxyOnly Resource model definition.
8591type ProxyOnlyResource struct {
8592	// ID - READ-ONLY; Resource Id
8593	ID *string `json:"id,omitempty"`
8594	// Name - READ-ONLY; Resource name
8595	Name *string `json:"name,omitempty"`
8596	// Type - READ-ONLY; Resource type
8597	Type *string `json:"type,omitempty"`
8598}
8599
8600// MarshalJSON is the custom marshaler for ProxyOnlyResource.
8601func (por ProxyOnlyResource) MarshalJSON() ([]byte, error) {
8602	objectMap := make(map[string]interface{})
8603	return json.Marshal(objectMap)
8604}
8605
8606// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
8607type PurchasePlan struct {
8608	// Publisher - The publisher ID.
8609	Publisher *string `json:"publisher,omitempty"`
8610	// Name - The plan ID.
8611	Name *string `json:"name,omitempty"`
8612	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
8613	Product *string `json:"product,omitempty"`
8614	// PromotionCode - The Offer Promotion Code.
8615	PromotionCode *string `json:"promotionCode,omitempty"`
8616}
8617
8618// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this
8619// Image Definition. These properties are updatable.
8620type RecommendedMachineConfiguration struct {
8621	VCPUs  *ResourceRange `json:"vCPUs,omitempty"`
8622	Memory *ResourceRange `json:"memory,omitempty"`
8623}
8624
8625// RecoveryWalkResponse response after calling a manual recovery walk
8626type RecoveryWalkResponse struct {
8627	autorest.Response `json:"-"`
8628	// WalkPerformed - READ-ONLY; Whether the recovery walk was performed
8629	WalkPerformed *bool `json:"walkPerformed,omitempty"`
8630	// NextPlatformUpdateDomain - READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed
8631	NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"`
8632}
8633
8634// MarshalJSON is the custom marshaler for RecoveryWalkResponse.
8635func (rwr RecoveryWalkResponse) MarshalJSON() ([]byte, error) {
8636	objectMap := make(map[string]interface{})
8637	return json.Marshal(objectMap)
8638}
8639
8640// RegionalReplicationStatus this is the regional replication status.
8641type RegionalReplicationStatus struct {
8642	// Region - READ-ONLY; The region to which the gallery Image Version is being replicated to.
8643	Region *string `json:"region,omitempty"`
8644	// State - READ-ONLY; This is the regional replication state. Possible values include: 'ReplicationStateUnknown', 'ReplicationStateReplicating', 'ReplicationStateCompleted', 'ReplicationStateFailed'
8645	State ReplicationState `json:"state,omitempty"`
8646	// Details - READ-ONLY; The details of the replication status.
8647	Details *string `json:"details,omitempty"`
8648	// Progress - READ-ONLY; It indicates progress of the replication job.
8649	Progress *int32 `json:"progress,omitempty"`
8650}
8651
8652// MarshalJSON is the custom marshaler for RegionalReplicationStatus.
8653func (rrs RegionalReplicationStatus) MarshalJSON() ([]byte, error) {
8654	objectMap := make(map[string]interface{})
8655	return json.Marshal(objectMap)
8656}
8657
8658// ReplicationStatus this is the replication status of the gallery Image Version.
8659type ReplicationStatus struct {
8660	// AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed'
8661	AggregatedState AggregatedReplicationState `json:"aggregatedState,omitempty"`
8662	// Summary - READ-ONLY; This is a summary of replication status for each region.
8663	Summary *[]RegionalReplicationStatus `json:"summary,omitempty"`
8664}
8665
8666// MarshalJSON is the custom marshaler for ReplicationStatus.
8667func (rs ReplicationStatus) MarshalJSON() ([]byte, error) {
8668	objectMap := make(map[string]interface{})
8669	return json.Marshal(objectMap)
8670}
8671
8672// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api.
8673type RequestRateByIntervalInput struct {
8674	// IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'
8675	IntervalLength IntervalInMins `json:"intervalLength,omitempty"`
8676	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
8677	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
8678	// FromTime - From time of the query
8679	FromTime *date.Time `json:"fromTime,omitempty"`
8680	// ToTime - To time of the query
8681	ToTime *date.Time `json:"toTime,omitempty"`
8682	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
8683	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
8684	// GroupByOperationName - Group query result by Operation Name.
8685	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
8686	// GroupByResourceName - Group query result by Resource Name.
8687	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
8688	// GroupByClientApplicationID - Group query result by Client Application ID.
8689	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
8690	// GroupByUserAgent - Group query result by User Agent.
8691	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
8692}
8693
8694// Resource the Resource model definition.
8695type Resource struct {
8696	// ID - READ-ONLY; Resource Id
8697	ID *string `json:"id,omitempty"`
8698	// Name - READ-ONLY; Resource name
8699	Name *string `json:"name,omitempty"`
8700	// Type - READ-ONLY; Resource type
8701	Type *string `json:"type,omitempty"`
8702	// Location - Resource location
8703	Location *string `json:"location,omitempty"`
8704	// Tags - Resource tags
8705	Tags map[string]*string `json:"tags"`
8706}
8707
8708// MarshalJSON is the custom marshaler for Resource.
8709func (r Resource) MarshalJSON() ([]byte, error) {
8710	objectMap := make(map[string]interface{})
8711	if r.Location != nil {
8712		objectMap["location"] = r.Location
8713	}
8714	if r.Tags != nil {
8715		objectMap["tags"] = r.Tags
8716	}
8717	return json.Marshal(objectMap)
8718}
8719
8720// ResourceRange describes the resource range.
8721type ResourceRange struct {
8722	// Min - The minimum number of the resource.
8723	Min *int32 `json:"min,omitempty"`
8724	// Max - The maximum number of the resource.
8725	Max *int32 `json:"max,omitempty"`
8726}
8727
8728// ResourceSku describes an available Compute SKU.
8729type ResourceSku struct {
8730	// ResourceType - READ-ONLY; The type of resource the SKU applies to.
8731	ResourceType *string `json:"resourceType,omitempty"`
8732	// Name - READ-ONLY; The name of SKU.
8733	Name *string `json:"name,omitempty"`
8734	// Tier - READ-ONLY; Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
8735	Tier *string `json:"tier,omitempty"`
8736	// Size - READ-ONLY; The Size of the SKU.
8737	Size *string `json:"size,omitempty"`
8738	// Family - READ-ONLY; The Family of this particular SKU.
8739	Family *string `json:"family,omitempty"`
8740	// Kind - READ-ONLY; The Kind of resources that are supported in this SKU.
8741	Kind *string `json:"kind,omitempty"`
8742	// Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
8743	Capacity *ResourceSkuCapacity `json:"capacity,omitempty"`
8744	// Locations - READ-ONLY; The set of locations that the SKU is available.
8745	Locations *[]string `json:"locations,omitempty"`
8746	// LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
8747	LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
8748	// APIVersions - READ-ONLY; The api versions that support this SKU.
8749	APIVersions *[]string `json:"apiVersions,omitempty"`
8750	// Costs - READ-ONLY; Metadata for retrieving price info.
8751	Costs *[]ResourceSkuCosts `json:"costs,omitempty"`
8752	// Capabilities - READ-ONLY; A name value pair to describe the capability.
8753	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
8754	// Restrictions - READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
8755	Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
8756}
8757
8758// MarshalJSON is the custom marshaler for ResourceSku.
8759func (rs ResourceSku) MarshalJSON() ([]byte, error) {
8760	objectMap := make(map[string]interface{})
8761	return json.Marshal(objectMap)
8762}
8763
8764// ResourceSkuCapabilities describes The SKU capabilities object.
8765type ResourceSkuCapabilities struct {
8766	// Name - READ-ONLY; An invariant to describe the feature.
8767	Name *string `json:"name,omitempty"`
8768	// Value - READ-ONLY; An invariant if the feature is measured by quantity.
8769	Value *string `json:"value,omitempty"`
8770}
8771
8772// MarshalJSON is the custom marshaler for ResourceSkuCapabilities.
8773func (rsc ResourceSkuCapabilities) MarshalJSON() ([]byte, error) {
8774	objectMap := make(map[string]interface{})
8775	return json.Marshal(objectMap)
8776}
8777
8778// ResourceSkuCapacity describes scaling information of a SKU.
8779type ResourceSkuCapacity struct {
8780	// Minimum - READ-ONLY; The minimum capacity.
8781	Minimum *int64 `json:"minimum,omitempty"`
8782	// Maximum - READ-ONLY; The maximum capacity that can be set.
8783	Maximum *int64 `json:"maximum,omitempty"`
8784	// Default - READ-ONLY; The default capacity.
8785	Default *int64 `json:"default,omitempty"`
8786	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone'
8787	ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
8788}
8789
8790// MarshalJSON is the custom marshaler for ResourceSkuCapacity.
8791func (rsc ResourceSkuCapacity) MarshalJSON() ([]byte, error) {
8792	objectMap := make(map[string]interface{})
8793	return json.Marshal(objectMap)
8794}
8795
8796// ResourceSkuCosts describes metadata for retrieving price info.
8797type ResourceSkuCosts struct {
8798	// MeterID - READ-ONLY; Used for querying price from commerce.
8799	MeterID *string `json:"meterID,omitempty"`
8800	// Quantity - READ-ONLY; The multiplier is needed to extend the base metered cost.
8801	Quantity *int64 `json:"quantity,omitempty"`
8802	// ExtendedUnit - READ-ONLY; An invariant to show the extended unit.
8803	ExtendedUnit *string `json:"extendedUnit,omitempty"`
8804}
8805
8806// MarshalJSON is the custom marshaler for ResourceSkuCosts.
8807func (rsc ResourceSkuCosts) MarshalJSON() ([]byte, error) {
8808	objectMap := make(map[string]interface{})
8809	return json.Marshal(objectMap)
8810}
8811
8812// ResourceSkuLocationInfo ...
8813type ResourceSkuLocationInfo struct {
8814	// Location - READ-ONLY; Location of the SKU
8815	Location *string `json:"location,omitempty"`
8816	// Zones - READ-ONLY; List of availability zones where the SKU is supported.
8817	Zones *[]string `json:"zones,omitempty"`
8818	// ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones.
8819	ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
8820}
8821
8822// MarshalJSON is the custom marshaler for ResourceSkuLocationInfo.
8823func (rsli ResourceSkuLocationInfo) MarshalJSON() ([]byte, error) {
8824	objectMap := make(map[string]interface{})
8825	return json.Marshal(objectMap)
8826}
8827
8828// ResourceSkuRestrictionInfo ...
8829type ResourceSkuRestrictionInfo struct {
8830	// Locations - READ-ONLY; Locations where the SKU is restricted
8831	Locations *[]string `json:"locations,omitempty"`
8832	// Zones - READ-ONLY; List of availability zones where the SKU is restricted.
8833	Zones *[]string `json:"zones,omitempty"`
8834}
8835
8836// MarshalJSON is the custom marshaler for ResourceSkuRestrictionInfo.
8837func (rsri ResourceSkuRestrictionInfo) MarshalJSON() ([]byte, error) {
8838	objectMap := make(map[string]interface{})
8839	return json.Marshal(objectMap)
8840}
8841
8842// ResourceSkuRestrictions describes scaling information of a SKU.
8843type ResourceSkuRestrictions struct {
8844	// Type - READ-ONLY; The type of restrictions. Possible values include: 'Location', 'Zone'
8845	Type ResourceSkuRestrictionsType `json:"type,omitempty"`
8846	// 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.
8847	Values *[]string `json:"values,omitempty"`
8848	// RestrictionInfo - READ-ONLY; The information about the restriction where the SKU cannot be used.
8849	RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"`
8850	// ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription'
8851	ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
8852}
8853
8854// MarshalJSON is the custom marshaler for ResourceSkuRestrictions.
8855func (rsr ResourceSkuRestrictions) MarshalJSON() ([]byte, error) {
8856	objectMap := make(map[string]interface{})
8857	return json.Marshal(objectMap)
8858}
8859
8860// ResourceSkusResult the List Resource Skus operation response.
8861type ResourceSkusResult struct {
8862	autorest.Response `json:"-"`
8863	// Value - The list of skus available for the subscription.
8864	Value *[]ResourceSku `json:"value,omitempty"`
8865	// NextLink - The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus
8866	NextLink *string `json:"nextLink,omitempty"`
8867}
8868
8869// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values.
8870type ResourceSkusResultIterator struct {
8871	i    int
8872	page ResourceSkusResultPage
8873}
8874
8875// NextWithContext advances to the next value.  If there was an error making
8876// the request the iterator does not advance and the error is returned.
8877func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
8878	if tracing.IsEnabled() {
8879		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext")
8880		defer func() {
8881			sc := -1
8882			if iter.Response().Response.Response != nil {
8883				sc = iter.Response().Response.Response.StatusCode
8884			}
8885			tracing.EndSpan(ctx, sc, err)
8886		}()
8887	}
8888	iter.i++
8889	if iter.i < len(iter.page.Values()) {
8890		return nil
8891	}
8892	err = iter.page.NextWithContext(ctx)
8893	if err != nil {
8894		iter.i--
8895		return err
8896	}
8897	iter.i = 0
8898	return nil
8899}
8900
8901// Next advances to the next value.  If there was an error making
8902// the request the iterator does not advance and the error is returned.
8903// Deprecated: Use NextWithContext() instead.
8904func (iter *ResourceSkusResultIterator) Next() error {
8905	return iter.NextWithContext(context.Background())
8906}
8907
8908// NotDone returns true if the enumeration should be started or is not yet complete.
8909func (iter ResourceSkusResultIterator) NotDone() bool {
8910	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8911}
8912
8913// Response returns the raw server response from the last page request.
8914func (iter ResourceSkusResultIterator) Response() ResourceSkusResult {
8915	return iter.page.Response()
8916}
8917
8918// Value returns the current value or a zero-initialized value if the
8919// iterator has advanced beyond the end of the collection.
8920func (iter ResourceSkusResultIterator) Value() ResourceSku {
8921	if !iter.page.NotDone() {
8922		return ResourceSku{}
8923	}
8924	return iter.page.Values()[iter.i]
8925}
8926
8927// Creates a new instance of the ResourceSkusResultIterator type.
8928func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator {
8929	return ResourceSkusResultIterator{page: page}
8930}
8931
8932// IsEmpty returns true if the ListResult contains no values.
8933func (rsr ResourceSkusResult) IsEmpty() bool {
8934	return rsr.Value == nil || len(*rsr.Value) == 0
8935}
8936
8937// hasNextLink returns true if the NextLink is not empty.
8938func (rsr ResourceSkusResult) hasNextLink() bool {
8939	return rsr.NextLink != nil && len(*rsr.NextLink) != 0
8940}
8941
8942// resourceSkusResultPreparer prepares a request to retrieve the next set of results.
8943// It returns nil if no more results exist.
8944func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) {
8945	if !rsr.hasNextLink() {
8946		return nil, nil
8947	}
8948	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8949		autorest.AsJSON(),
8950		autorest.AsGet(),
8951		autorest.WithBaseURL(to.String(rsr.NextLink)))
8952}
8953
8954// ResourceSkusResultPage contains a page of ResourceSku values.
8955type ResourceSkusResultPage struct {
8956	fn  func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)
8957	rsr ResourceSkusResult
8958}
8959
8960// NextWithContext advances to the next page of values.  If there was an error making
8961// the request the page does not advance and the error is returned.
8962func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) {
8963	if tracing.IsEnabled() {
8964		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext")
8965		defer func() {
8966			sc := -1
8967			if page.Response().Response.Response != nil {
8968				sc = page.Response().Response.Response.StatusCode
8969			}
8970			tracing.EndSpan(ctx, sc, err)
8971		}()
8972	}
8973	for {
8974		next, err := page.fn(ctx, page.rsr)
8975		if err != nil {
8976			return err
8977		}
8978		page.rsr = next
8979		if !next.hasNextLink() || !next.IsEmpty() {
8980			break
8981		}
8982	}
8983	return nil
8984}
8985
8986// Next advances to the next page of values.  If there was an error making
8987// the request the page does not advance and the error is returned.
8988// Deprecated: Use NextWithContext() instead.
8989func (page *ResourceSkusResultPage) Next() error {
8990	return page.NextWithContext(context.Background())
8991}
8992
8993// NotDone returns true if the page enumeration should be started or is not yet complete.
8994func (page ResourceSkusResultPage) NotDone() bool {
8995	return !page.rsr.IsEmpty()
8996}
8997
8998// Response returns the raw server response from the last page request.
8999func (page ResourceSkusResultPage) Response() ResourceSkusResult {
9000	return page.rsr
9001}
9002
9003// Values returns the slice of values for the current page or nil if there are no values.
9004func (page ResourceSkusResultPage) Values() []ResourceSku {
9005	if page.rsr.IsEmpty() {
9006		return nil
9007	}
9008	return *page.rsr.Value
9009}
9010
9011// Creates a new instance of the ResourceSkusResultPage type.
9012func NewResourceSkusResultPage(cur ResourceSkusResult, getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
9013	return ResourceSkusResultPage{
9014		fn:  getNextPage,
9015		rsr: cur,
9016	}
9017}
9018
9019// ResourceSkuZoneDetails describes The zonal capabilities of a SKU.
9020type ResourceSkuZoneDetails struct {
9021	// Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
9022	Name *[]string `json:"name,omitempty"`
9023	// Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
9024	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
9025}
9026
9027// MarshalJSON is the custom marshaler for ResourceSkuZoneDetails.
9028func (rszd ResourceSkuZoneDetails) MarshalJSON() ([]byte, error) {
9029	objectMap := make(map[string]interface{})
9030	return json.Marshal(objectMap)
9031}
9032
9033// ResourceURIList the List resources which are encrypted with the disk encryption set.
9034type ResourceURIList struct {
9035	autorest.Response `json:"-"`
9036	// Value - A list of IDs or Owner IDs of resources which are encrypted with the disk encryption set.
9037	Value *[]string `json:"value,omitempty"`
9038	// NextLink - The uri to fetch the next page of encrypted resources. Call ListNext() with this to fetch the next page of encrypted resources.
9039	NextLink *string `json:"nextLink,omitempty"`
9040}
9041
9042// ResourceURIListIterator provides access to a complete listing of string values.
9043type ResourceURIListIterator struct {
9044	i    int
9045	page ResourceURIListPage
9046}
9047
9048// NextWithContext advances to the next value.  If there was an error making
9049// the request the iterator does not advance and the error is returned.
9050func (iter *ResourceURIListIterator) NextWithContext(ctx context.Context) (err error) {
9051	if tracing.IsEnabled() {
9052		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListIterator.NextWithContext")
9053		defer func() {
9054			sc := -1
9055			if iter.Response().Response.Response != nil {
9056				sc = iter.Response().Response.Response.StatusCode
9057			}
9058			tracing.EndSpan(ctx, sc, err)
9059		}()
9060	}
9061	iter.i++
9062	if iter.i < len(iter.page.Values()) {
9063		return nil
9064	}
9065	err = iter.page.NextWithContext(ctx)
9066	if err != nil {
9067		iter.i--
9068		return err
9069	}
9070	iter.i = 0
9071	return nil
9072}
9073
9074// Next advances to the next value.  If there was an error making
9075// the request the iterator does not advance and the error is returned.
9076// Deprecated: Use NextWithContext() instead.
9077func (iter *ResourceURIListIterator) Next() error {
9078	return iter.NextWithContext(context.Background())
9079}
9080
9081// NotDone returns true if the enumeration should be started or is not yet complete.
9082func (iter ResourceURIListIterator) NotDone() bool {
9083	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9084}
9085
9086// Response returns the raw server response from the last page request.
9087func (iter ResourceURIListIterator) Response() ResourceURIList {
9088	return iter.page.Response()
9089}
9090
9091// Value returns the current value or a zero-initialized value if the
9092// iterator has advanced beyond the end of the collection.
9093func (iter ResourceURIListIterator) Value() string {
9094	if !iter.page.NotDone() {
9095		return ""
9096	}
9097	return iter.page.Values()[iter.i]
9098}
9099
9100// Creates a new instance of the ResourceURIListIterator type.
9101func NewResourceURIListIterator(page ResourceURIListPage) ResourceURIListIterator {
9102	return ResourceURIListIterator{page: page}
9103}
9104
9105// IsEmpty returns true if the ListResult contains no values.
9106func (rul ResourceURIList) IsEmpty() bool {
9107	return rul.Value == nil || len(*rul.Value) == 0
9108}
9109
9110// hasNextLink returns true if the NextLink is not empty.
9111func (rul ResourceURIList) hasNextLink() bool {
9112	return rul.NextLink != nil && len(*rul.NextLink) != 0
9113}
9114
9115// resourceURIListPreparer prepares a request to retrieve the next set of results.
9116// It returns nil if no more results exist.
9117func (rul ResourceURIList) resourceURIListPreparer(ctx context.Context) (*http.Request, error) {
9118	if !rul.hasNextLink() {
9119		return nil, nil
9120	}
9121	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9122		autorest.AsJSON(),
9123		autorest.AsGet(),
9124		autorest.WithBaseURL(to.String(rul.NextLink)))
9125}
9126
9127// ResourceURIListPage contains a page of string values.
9128type ResourceURIListPage struct {
9129	fn  func(context.Context, ResourceURIList) (ResourceURIList, error)
9130	rul ResourceURIList
9131}
9132
9133// NextWithContext advances to the next page of values.  If there was an error making
9134// the request the page does not advance and the error is returned.
9135func (page *ResourceURIListPage) NextWithContext(ctx context.Context) (err error) {
9136	if tracing.IsEnabled() {
9137		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListPage.NextWithContext")
9138		defer func() {
9139			sc := -1
9140			if page.Response().Response.Response != nil {
9141				sc = page.Response().Response.Response.StatusCode
9142			}
9143			tracing.EndSpan(ctx, sc, err)
9144		}()
9145	}
9146	for {
9147		next, err := page.fn(ctx, page.rul)
9148		if err != nil {
9149			return err
9150		}
9151		page.rul = next
9152		if !next.hasNextLink() || !next.IsEmpty() {
9153			break
9154		}
9155	}
9156	return nil
9157}
9158
9159// Next advances to the next page of values.  If there was an error making
9160// the request the page does not advance and the error is returned.
9161// Deprecated: Use NextWithContext() instead.
9162func (page *ResourceURIListPage) Next() error {
9163	return page.NextWithContext(context.Background())
9164}
9165
9166// NotDone returns true if the page enumeration should be started or is not yet complete.
9167func (page ResourceURIListPage) NotDone() bool {
9168	return !page.rul.IsEmpty()
9169}
9170
9171// Response returns the raw server response from the last page request.
9172func (page ResourceURIListPage) Response() ResourceURIList {
9173	return page.rul
9174}
9175
9176// Values returns the slice of values for the current page or nil if there are no values.
9177func (page ResourceURIListPage) Values() []string {
9178	if page.rul.IsEmpty() {
9179		return nil
9180	}
9181	return *page.rul.Value
9182}
9183
9184// Creates a new instance of the ResourceURIListPage type.
9185func NewResourceURIListPage(cur ResourceURIList, getNextPage func(context.Context, ResourceURIList) (ResourceURIList, error)) ResourceURIListPage {
9186	return ResourceURIListPage{
9187		fn:  getNextPage,
9188		rul: cur,
9189	}
9190}
9191
9192// RetrieveBootDiagnosticsDataResult the SAS URIs of the console screenshot and serial log blobs.
9193type RetrieveBootDiagnosticsDataResult struct {
9194	autorest.Response `json:"-"`
9195	// ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI
9196	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
9197	// SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob URI.
9198	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
9199}
9200
9201// MarshalJSON is the custom marshaler for RetrieveBootDiagnosticsDataResult.
9202func (rbddr RetrieveBootDiagnosticsDataResult) MarshalJSON() ([]byte, error) {
9203	objectMap := make(map[string]interface{})
9204	return json.Marshal(objectMap)
9205}
9206
9207// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
9208type RollbackStatusInfo struct {
9209	// SuccessfullyRolledbackInstanceCount - READ-ONLY; The number of instances which have been successfully rolled back.
9210	SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"`
9211	// FailedRolledbackInstanceCount - READ-ONLY; The number of instances which failed to rollback.
9212	FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"`
9213	// RollbackError - READ-ONLY; Error details if OS rollback failed.
9214	RollbackError *APIError `json:"rollbackError,omitempty"`
9215}
9216
9217// MarshalJSON is the custom marshaler for RollbackStatusInfo.
9218func (rsi RollbackStatusInfo) MarshalJSON() ([]byte, error) {
9219	objectMap := make(map[string]interface{})
9220	return json.Marshal(objectMap)
9221}
9222
9223// RollingUpgradePolicy the configuration parameters used while performing a rolling upgrade.
9224type RollingUpgradePolicy struct {
9225	// 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%.
9226	MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"`
9227	// 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%.
9228	MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"`
9229	// 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%.
9230	MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"`
9231	// 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).
9232	PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"`
9233	// EnableCrossZoneUpgrade - Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size.
9234	EnableCrossZoneUpgrade *bool `json:"enableCrossZoneUpgrade,omitempty"`
9235	// PrioritizeUnhealthyInstances - Upgrade all unhealthy instances in a scale set before any healthy instances.
9236	PrioritizeUnhealthyInstances *bool `json:"prioritizeUnhealthyInstances,omitempty"`
9237}
9238
9239// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade
9240// state.
9241type RollingUpgradeProgressInfo struct {
9242	// SuccessfulInstanceCount - READ-ONLY; The number of instances that have been successfully upgraded.
9243	SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"`
9244	// FailedInstanceCount - READ-ONLY; The number of instances that have failed to be upgraded successfully.
9245	FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty"`
9246	// InProgressInstanceCount - READ-ONLY; The number of instances that are currently being upgraded.
9247	InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty"`
9248	// PendingInstanceCount - READ-ONLY; The number of instances that have not yet begun to be upgraded.
9249	PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"`
9250}
9251
9252// MarshalJSON is the custom marshaler for RollingUpgradeProgressInfo.
9253func (rupi RollingUpgradeProgressInfo) MarshalJSON() ([]byte, error) {
9254	objectMap := make(map[string]interface{})
9255	return json.Marshal(objectMap)
9256}
9257
9258// RollingUpgradeRunningStatus information about the current running state of the overall upgrade.
9259type RollingUpgradeRunningStatus struct {
9260	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'RollingUpgradeStatusCodeRollingForward', 'RollingUpgradeStatusCodeCancelled', 'RollingUpgradeStatusCodeCompleted', 'RollingUpgradeStatusCodeFaulted'
9261	Code RollingUpgradeStatusCode `json:"code,omitempty"`
9262	// StartTime - READ-ONLY; Start time of the upgrade.
9263	StartTime *date.Time `json:"startTime,omitempty"`
9264	// LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel'
9265	LastAction RollingUpgradeActionType `json:"lastAction,omitempty"`
9266	// LastActionTime - READ-ONLY; Last action time of the upgrade.
9267	LastActionTime *date.Time `json:"lastActionTime,omitempty"`
9268}
9269
9270// MarshalJSON is the custom marshaler for RollingUpgradeRunningStatus.
9271func (rurs RollingUpgradeRunningStatus) MarshalJSON() ([]byte, error) {
9272	objectMap := make(map[string]interface{})
9273	return json.Marshal(objectMap)
9274}
9275
9276// RollingUpgradeStatusInfo the status of the latest virtual machine scale set rolling upgrade.
9277type RollingUpgradeStatusInfo struct {
9278	autorest.Response                   `json:"-"`
9279	*RollingUpgradeStatusInfoProperties `json:"properties,omitempty"`
9280	// ID - READ-ONLY; Resource Id
9281	ID *string `json:"id,omitempty"`
9282	// Name - READ-ONLY; Resource name
9283	Name *string `json:"name,omitempty"`
9284	// Type - READ-ONLY; Resource type
9285	Type *string `json:"type,omitempty"`
9286	// Location - Resource location
9287	Location *string `json:"location,omitempty"`
9288	// Tags - Resource tags
9289	Tags map[string]*string `json:"tags"`
9290}
9291
9292// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfo.
9293func (rusi RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) {
9294	objectMap := make(map[string]interface{})
9295	if rusi.RollingUpgradeStatusInfoProperties != nil {
9296		objectMap["properties"] = rusi.RollingUpgradeStatusInfoProperties
9297	}
9298	if rusi.Location != nil {
9299		objectMap["location"] = rusi.Location
9300	}
9301	if rusi.Tags != nil {
9302		objectMap["tags"] = rusi.Tags
9303	}
9304	return json.Marshal(objectMap)
9305}
9306
9307// UnmarshalJSON is the custom unmarshaler for RollingUpgradeStatusInfo struct.
9308func (rusi *RollingUpgradeStatusInfo) UnmarshalJSON(body []byte) error {
9309	var m map[string]*json.RawMessage
9310	err := json.Unmarshal(body, &m)
9311	if err != nil {
9312		return err
9313	}
9314	for k, v := range m {
9315		switch k {
9316		case "properties":
9317			if v != nil {
9318				var rollingUpgradeStatusInfoProperties RollingUpgradeStatusInfoProperties
9319				err = json.Unmarshal(*v, &rollingUpgradeStatusInfoProperties)
9320				if err != nil {
9321					return err
9322				}
9323				rusi.RollingUpgradeStatusInfoProperties = &rollingUpgradeStatusInfoProperties
9324			}
9325		case "id":
9326			if v != nil {
9327				var ID string
9328				err = json.Unmarshal(*v, &ID)
9329				if err != nil {
9330					return err
9331				}
9332				rusi.ID = &ID
9333			}
9334		case "name":
9335			if v != nil {
9336				var name string
9337				err = json.Unmarshal(*v, &name)
9338				if err != nil {
9339					return err
9340				}
9341				rusi.Name = &name
9342			}
9343		case "type":
9344			if v != nil {
9345				var typeVar string
9346				err = json.Unmarshal(*v, &typeVar)
9347				if err != nil {
9348					return err
9349				}
9350				rusi.Type = &typeVar
9351			}
9352		case "location":
9353			if v != nil {
9354				var location string
9355				err = json.Unmarshal(*v, &location)
9356				if err != nil {
9357					return err
9358				}
9359				rusi.Location = &location
9360			}
9361		case "tags":
9362			if v != nil {
9363				var tags map[string]*string
9364				err = json.Unmarshal(*v, &tags)
9365				if err != nil {
9366					return err
9367				}
9368				rusi.Tags = tags
9369			}
9370		}
9371	}
9372
9373	return nil
9374}
9375
9376// RollingUpgradeStatusInfoProperties the status of the latest virtual machine scale set rolling upgrade.
9377type RollingUpgradeStatusInfoProperties struct {
9378	// Policy - READ-ONLY; The rolling upgrade policies applied for this upgrade.
9379	Policy *RollingUpgradePolicy `json:"policy,omitempty"`
9380	// RunningStatus - READ-ONLY; Information about the current running state of the overall upgrade.
9381	RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"`
9382	// Progress - READ-ONLY; Information about the number of virtual machine instances in each upgrade state.
9383	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
9384	// Error - READ-ONLY; Error details for this upgrade, if there are any.
9385	Error *APIError `json:"error,omitempty"`
9386}
9387
9388// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfoProperties.
9389func (rusip RollingUpgradeStatusInfoProperties) MarshalJSON() ([]byte, error) {
9390	objectMap := make(map[string]interface{})
9391	return json.Marshal(objectMap)
9392}
9393
9394// RunCommandDocument describes the properties of a Run Command.
9395type RunCommandDocument struct {
9396	autorest.Response `json:"-"`
9397	// Script - The script to be executed.
9398	Script *[]string `json:"script,omitempty"`
9399	// Parameters - The parameters used by the script.
9400	Parameters *[]RunCommandParameterDefinition `json:"parameters,omitempty"`
9401	// Schema - The VM run command schema.
9402	Schema *string `json:"$schema,omitempty"`
9403	// ID - The VM run command id.
9404	ID *string `json:"id,omitempty"`
9405	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
9406	OsType OperatingSystemTypes `json:"osType,omitempty"`
9407	// Label - The VM run command label.
9408	Label *string `json:"label,omitempty"`
9409	// Description - The VM run command description.
9410	Description *string `json:"description,omitempty"`
9411}
9412
9413// RunCommandDocumentBase describes the properties of a Run Command metadata.
9414type RunCommandDocumentBase struct {
9415	// Schema - The VM run command schema.
9416	Schema *string `json:"$schema,omitempty"`
9417	// ID - The VM run command id.
9418	ID *string `json:"id,omitempty"`
9419	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
9420	OsType OperatingSystemTypes `json:"osType,omitempty"`
9421	// Label - The VM run command label.
9422	Label *string `json:"label,omitempty"`
9423	// Description - The VM run command description.
9424	Description *string `json:"description,omitempty"`
9425}
9426
9427// RunCommandInput capture Virtual Machine parameters.
9428type RunCommandInput struct {
9429	// CommandID - The run command id.
9430	CommandID *string `json:"commandId,omitempty"`
9431	// Script - Optional. The script to be executed.  When this value is given, the given script will override the default script of the command.
9432	Script *[]string `json:"script,omitempty"`
9433	// Parameters - The run command parameters.
9434	Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
9435}
9436
9437// RunCommandInputParameter describes the properties of a run command parameter.
9438type RunCommandInputParameter struct {
9439	// Name - The run command parameter name.
9440	Name *string `json:"name,omitempty"`
9441	// Value - The run command parameter value.
9442	Value *string `json:"value,omitempty"`
9443}
9444
9445// RunCommandListResult the List Virtual Machine operation response.
9446type RunCommandListResult struct {
9447	autorest.Response `json:"-"`
9448	// Value - The list of virtual machine run commands.
9449	Value *[]RunCommandDocumentBase `json:"value,omitempty"`
9450	// NextLink - The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands.
9451	NextLink *string `json:"nextLink,omitempty"`
9452}
9453
9454// RunCommandListResultIterator provides access to a complete listing of RunCommandDocumentBase values.
9455type RunCommandListResultIterator struct {
9456	i    int
9457	page RunCommandListResultPage
9458}
9459
9460// NextWithContext advances to the next value.  If there was an error making
9461// the request the iterator does not advance and the error is returned.
9462func (iter *RunCommandListResultIterator) NextWithContext(ctx context.Context) (err error) {
9463	if tracing.IsEnabled() {
9464		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultIterator.NextWithContext")
9465		defer func() {
9466			sc := -1
9467			if iter.Response().Response.Response != nil {
9468				sc = iter.Response().Response.Response.StatusCode
9469			}
9470			tracing.EndSpan(ctx, sc, err)
9471		}()
9472	}
9473	iter.i++
9474	if iter.i < len(iter.page.Values()) {
9475		return nil
9476	}
9477	err = iter.page.NextWithContext(ctx)
9478	if err != nil {
9479		iter.i--
9480		return err
9481	}
9482	iter.i = 0
9483	return nil
9484}
9485
9486// Next advances to the next value.  If there was an error making
9487// the request the iterator does not advance and the error is returned.
9488// Deprecated: Use NextWithContext() instead.
9489func (iter *RunCommandListResultIterator) Next() error {
9490	return iter.NextWithContext(context.Background())
9491}
9492
9493// NotDone returns true if the enumeration should be started or is not yet complete.
9494func (iter RunCommandListResultIterator) NotDone() bool {
9495	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9496}
9497
9498// Response returns the raw server response from the last page request.
9499func (iter RunCommandListResultIterator) Response() RunCommandListResult {
9500	return iter.page.Response()
9501}
9502
9503// Value returns the current value or a zero-initialized value if the
9504// iterator has advanced beyond the end of the collection.
9505func (iter RunCommandListResultIterator) Value() RunCommandDocumentBase {
9506	if !iter.page.NotDone() {
9507		return RunCommandDocumentBase{}
9508	}
9509	return iter.page.Values()[iter.i]
9510}
9511
9512// Creates a new instance of the RunCommandListResultIterator type.
9513func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator {
9514	return RunCommandListResultIterator{page: page}
9515}
9516
9517// IsEmpty returns true if the ListResult contains no values.
9518func (rclr RunCommandListResult) IsEmpty() bool {
9519	return rclr.Value == nil || len(*rclr.Value) == 0
9520}
9521
9522// hasNextLink returns true if the NextLink is not empty.
9523func (rclr RunCommandListResult) hasNextLink() bool {
9524	return rclr.NextLink != nil && len(*rclr.NextLink) != 0
9525}
9526
9527// runCommandListResultPreparer prepares a request to retrieve the next set of results.
9528// It returns nil if no more results exist.
9529func (rclr RunCommandListResult) runCommandListResultPreparer(ctx context.Context) (*http.Request, error) {
9530	if !rclr.hasNextLink() {
9531		return nil, nil
9532	}
9533	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9534		autorest.AsJSON(),
9535		autorest.AsGet(),
9536		autorest.WithBaseURL(to.String(rclr.NextLink)))
9537}
9538
9539// RunCommandListResultPage contains a page of RunCommandDocumentBase values.
9540type RunCommandListResultPage struct {
9541	fn   func(context.Context, RunCommandListResult) (RunCommandListResult, error)
9542	rclr RunCommandListResult
9543}
9544
9545// NextWithContext advances to the next page of values.  If there was an error making
9546// the request the page does not advance and the error is returned.
9547func (page *RunCommandListResultPage) NextWithContext(ctx context.Context) (err error) {
9548	if tracing.IsEnabled() {
9549		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultPage.NextWithContext")
9550		defer func() {
9551			sc := -1
9552			if page.Response().Response.Response != nil {
9553				sc = page.Response().Response.Response.StatusCode
9554			}
9555			tracing.EndSpan(ctx, sc, err)
9556		}()
9557	}
9558	for {
9559		next, err := page.fn(ctx, page.rclr)
9560		if err != nil {
9561			return err
9562		}
9563		page.rclr = next
9564		if !next.hasNextLink() || !next.IsEmpty() {
9565			break
9566		}
9567	}
9568	return nil
9569}
9570
9571// Next advances to the next page of values.  If there was an error making
9572// the request the page does not advance and the error is returned.
9573// Deprecated: Use NextWithContext() instead.
9574func (page *RunCommandListResultPage) Next() error {
9575	return page.NextWithContext(context.Background())
9576}
9577
9578// NotDone returns true if the page enumeration should be started or is not yet complete.
9579func (page RunCommandListResultPage) NotDone() bool {
9580	return !page.rclr.IsEmpty()
9581}
9582
9583// Response returns the raw server response from the last page request.
9584func (page RunCommandListResultPage) Response() RunCommandListResult {
9585	return page.rclr
9586}
9587
9588// Values returns the slice of values for the current page or nil if there are no values.
9589func (page RunCommandListResultPage) Values() []RunCommandDocumentBase {
9590	if page.rclr.IsEmpty() {
9591		return nil
9592	}
9593	return *page.rclr.Value
9594}
9595
9596// Creates a new instance of the RunCommandListResultPage type.
9597func NewRunCommandListResultPage(cur RunCommandListResult, getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
9598	return RunCommandListResultPage{
9599		fn:   getNextPage,
9600		rclr: cur,
9601	}
9602}
9603
9604// RunCommandParameterDefinition describes the properties of a run command parameter.
9605type RunCommandParameterDefinition struct {
9606	// Name - The run command parameter name.
9607	Name *string `json:"name,omitempty"`
9608	// Type - The run command parameter type.
9609	Type *string `json:"type,omitempty"`
9610	// DefaultValue - The run command parameter default value.
9611	DefaultValue *string `json:"defaultValue,omitempty"`
9612	// Required - The run command parameter required.
9613	Required *bool `json:"required,omitempty"`
9614}
9615
9616// RunCommandResult ...
9617type RunCommandResult struct {
9618	autorest.Response `json:"-"`
9619	// Value - Run command operation response.
9620	Value *[]InstanceViewStatus `json:"value,omitempty"`
9621}
9622
9623// ScaleInPolicy describes a scale-in policy for a virtual machine scale set.
9624type ScaleInPolicy struct {
9625	// 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>
9626	Rules *[]VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"`
9627}
9628
9629// ScheduledEventsProfile ...
9630type ScheduledEventsProfile struct {
9631	// TerminateNotificationProfile - Specifies Terminate Scheduled Event related configurations.
9632	TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"`
9633}
9634
9635// SecurityProfile specifies the Security profile settings for the virtual machine or virtual machine scale
9636// set.
9637type SecurityProfile struct {
9638	// UefiSettings - Specifies the security settings like secure boot and vTPM used while creating the virtual machine. <br><br>Minimum api-version: 2020-12-01
9639	UefiSettings *UefiSettings `json:"uefiSettings,omitempty"`
9640	// EncryptionAtHost - This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. <br><br> Default: The Encryption at host will be disabled unless this property is set to true for the resource.
9641	EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"`
9642	// SecurityType - Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings. <br><br> Default: UefiSettings will not be enabled unless this property is set as TrustedLaunch. Possible values include: 'SecurityTypesTrustedLaunch'
9643	SecurityType SecurityTypes `json:"securityType,omitempty"`
9644}
9645
9646// ShareInfoElement ...
9647type ShareInfoElement struct {
9648	// VMURI - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
9649	VMURI *string `json:"vmUri,omitempty"`
9650}
9651
9652// MarshalJSON is the custom marshaler for ShareInfoElement.
9653func (sie ShareInfoElement) MarshalJSON() ([]byte, error) {
9654	objectMap := make(map[string]interface{})
9655	return json.Marshal(objectMap)
9656}
9657
9658// Sku describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware
9659// the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU
9660// name.
9661type Sku struct {
9662	// Name - The sku name.
9663	Name *string `json:"name,omitempty"`
9664	// Tier - Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
9665	Tier *string `json:"tier,omitempty"`
9666	// Capacity - Specifies the number of virtual machines in the scale set.
9667	Capacity *int64 `json:"capacity,omitempty"`
9668}
9669
9670// Snapshot snapshot resource.
9671type Snapshot struct {
9672	autorest.Response `json:"-"`
9673	// ManagedBy - READ-ONLY; Unused. Always Null.
9674	ManagedBy *string      `json:"managedBy,omitempty"`
9675	Sku       *SnapshotSku `json:"sku,omitempty"`
9676	// ExtendedLocation - The extended location where the snapshot will be created. Extended location cannot be changed.
9677	ExtendedLocation    *ExtendedLocation `json:"extendedLocation,omitempty"`
9678	*SnapshotProperties `json:"properties,omitempty"`
9679	// ID - READ-ONLY; Resource Id
9680	ID *string `json:"id,omitempty"`
9681	// Name - READ-ONLY; Resource name
9682	Name *string `json:"name,omitempty"`
9683	// Type - READ-ONLY; Resource type
9684	Type *string `json:"type,omitempty"`
9685	// Location - Resource location
9686	Location *string `json:"location,omitempty"`
9687	// Tags - Resource tags
9688	Tags map[string]*string `json:"tags"`
9689}
9690
9691// MarshalJSON is the custom marshaler for Snapshot.
9692func (s Snapshot) MarshalJSON() ([]byte, error) {
9693	objectMap := make(map[string]interface{})
9694	if s.Sku != nil {
9695		objectMap["sku"] = s.Sku
9696	}
9697	if s.ExtendedLocation != nil {
9698		objectMap["extendedLocation"] = s.ExtendedLocation
9699	}
9700	if s.SnapshotProperties != nil {
9701		objectMap["properties"] = s.SnapshotProperties
9702	}
9703	if s.Location != nil {
9704		objectMap["location"] = s.Location
9705	}
9706	if s.Tags != nil {
9707		objectMap["tags"] = s.Tags
9708	}
9709	return json.Marshal(objectMap)
9710}
9711
9712// UnmarshalJSON is the custom unmarshaler for Snapshot struct.
9713func (s *Snapshot) UnmarshalJSON(body []byte) error {
9714	var m map[string]*json.RawMessage
9715	err := json.Unmarshal(body, &m)
9716	if err != nil {
9717		return err
9718	}
9719	for k, v := range m {
9720		switch k {
9721		case "managedBy":
9722			if v != nil {
9723				var managedBy string
9724				err = json.Unmarshal(*v, &managedBy)
9725				if err != nil {
9726					return err
9727				}
9728				s.ManagedBy = &managedBy
9729			}
9730		case "sku":
9731			if v != nil {
9732				var sku SnapshotSku
9733				err = json.Unmarshal(*v, &sku)
9734				if err != nil {
9735					return err
9736				}
9737				s.Sku = &sku
9738			}
9739		case "extendedLocation":
9740			if v != nil {
9741				var extendedLocation ExtendedLocation
9742				err = json.Unmarshal(*v, &extendedLocation)
9743				if err != nil {
9744					return err
9745				}
9746				s.ExtendedLocation = &extendedLocation
9747			}
9748		case "properties":
9749			if v != nil {
9750				var snapshotProperties SnapshotProperties
9751				err = json.Unmarshal(*v, &snapshotProperties)
9752				if err != nil {
9753					return err
9754				}
9755				s.SnapshotProperties = &snapshotProperties
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				s.ID = &ID
9765			}
9766		case "name":
9767			if v != nil {
9768				var name string
9769				err = json.Unmarshal(*v, &name)
9770				if err != nil {
9771					return err
9772				}
9773				s.Name = &name
9774			}
9775		case "type":
9776			if v != nil {
9777				var typeVar string
9778				err = json.Unmarshal(*v, &typeVar)
9779				if err != nil {
9780					return err
9781				}
9782				s.Type = &typeVar
9783			}
9784		case "location":
9785			if v != nil {
9786				var location string
9787				err = json.Unmarshal(*v, &location)
9788				if err != nil {
9789					return err
9790				}
9791				s.Location = &location
9792			}
9793		case "tags":
9794			if v != nil {
9795				var tags map[string]*string
9796				err = json.Unmarshal(*v, &tags)
9797				if err != nil {
9798					return err
9799				}
9800				s.Tags = tags
9801			}
9802		}
9803	}
9804
9805	return nil
9806}
9807
9808// SnapshotList the List Snapshots operation response.
9809type SnapshotList struct {
9810	autorest.Response `json:"-"`
9811	// Value - A list of snapshots.
9812	Value *[]Snapshot `json:"value,omitempty"`
9813	// NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
9814	NextLink *string `json:"nextLink,omitempty"`
9815}
9816
9817// SnapshotListIterator provides access to a complete listing of Snapshot values.
9818type SnapshotListIterator struct {
9819	i    int
9820	page SnapshotListPage
9821}
9822
9823// NextWithContext advances to the next value.  If there was an error making
9824// the request the iterator does not advance and the error is returned.
9825func (iter *SnapshotListIterator) NextWithContext(ctx context.Context) (err error) {
9826	if tracing.IsEnabled() {
9827		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListIterator.NextWithContext")
9828		defer func() {
9829			sc := -1
9830			if iter.Response().Response.Response != nil {
9831				sc = iter.Response().Response.Response.StatusCode
9832			}
9833			tracing.EndSpan(ctx, sc, err)
9834		}()
9835	}
9836	iter.i++
9837	if iter.i < len(iter.page.Values()) {
9838		return nil
9839	}
9840	err = iter.page.NextWithContext(ctx)
9841	if err != nil {
9842		iter.i--
9843		return err
9844	}
9845	iter.i = 0
9846	return nil
9847}
9848
9849// Next advances to the next value.  If there was an error making
9850// the request the iterator does not advance and the error is returned.
9851// Deprecated: Use NextWithContext() instead.
9852func (iter *SnapshotListIterator) Next() error {
9853	return iter.NextWithContext(context.Background())
9854}
9855
9856// NotDone returns true if the enumeration should be started or is not yet complete.
9857func (iter SnapshotListIterator) NotDone() bool {
9858	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9859}
9860
9861// Response returns the raw server response from the last page request.
9862func (iter SnapshotListIterator) Response() SnapshotList {
9863	return iter.page.Response()
9864}
9865
9866// Value returns the current value or a zero-initialized value if the
9867// iterator has advanced beyond the end of the collection.
9868func (iter SnapshotListIterator) Value() Snapshot {
9869	if !iter.page.NotDone() {
9870		return Snapshot{}
9871	}
9872	return iter.page.Values()[iter.i]
9873}
9874
9875// Creates a new instance of the SnapshotListIterator type.
9876func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator {
9877	return SnapshotListIterator{page: page}
9878}
9879
9880// IsEmpty returns true if the ListResult contains no values.
9881func (sl SnapshotList) IsEmpty() bool {
9882	return sl.Value == nil || len(*sl.Value) == 0
9883}
9884
9885// hasNextLink returns true if the NextLink is not empty.
9886func (sl SnapshotList) hasNextLink() bool {
9887	return sl.NextLink != nil && len(*sl.NextLink) != 0
9888}
9889
9890// snapshotListPreparer prepares a request to retrieve the next set of results.
9891// It returns nil if no more results exist.
9892func (sl SnapshotList) snapshotListPreparer(ctx context.Context) (*http.Request, error) {
9893	if !sl.hasNextLink() {
9894		return nil, nil
9895	}
9896	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9897		autorest.AsJSON(),
9898		autorest.AsGet(),
9899		autorest.WithBaseURL(to.String(sl.NextLink)))
9900}
9901
9902// SnapshotListPage contains a page of Snapshot values.
9903type SnapshotListPage struct {
9904	fn func(context.Context, SnapshotList) (SnapshotList, error)
9905	sl SnapshotList
9906}
9907
9908// NextWithContext advances to the next page of values.  If there was an error making
9909// the request the page does not advance and the error is returned.
9910func (page *SnapshotListPage) NextWithContext(ctx context.Context) (err error) {
9911	if tracing.IsEnabled() {
9912		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListPage.NextWithContext")
9913		defer func() {
9914			sc := -1
9915			if page.Response().Response.Response != nil {
9916				sc = page.Response().Response.Response.StatusCode
9917			}
9918			tracing.EndSpan(ctx, sc, err)
9919		}()
9920	}
9921	for {
9922		next, err := page.fn(ctx, page.sl)
9923		if err != nil {
9924			return err
9925		}
9926		page.sl = next
9927		if !next.hasNextLink() || !next.IsEmpty() {
9928			break
9929		}
9930	}
9931	return nil
9932}
9933
9934// Next advances to the next page of values.  If there was an error making
9935// the request the page does not advance and the error is returned.
9936// Deprecated: Use NextWithContext() instead.
9937func (page *SnapshotListPage) Next() error {
9938	return page.NextWithContext(context.Background())
9939}
9940
9941// NotDone returns true if the page enumeration should be started or is not yet complete.
9942func (page SnapshotListPage) NotDone() bool {
9943	return !page.sl.IsEmpty()
9944}
9945
9946// Response returns the raw server response from the last page request.
9947func (page SnapshotListPage) Response() SnapshotList {
9948	return page.sl
9949}
9950
9951// Values returns the slice of values for the current page or nil if there are no values.
9952func (page SnapshotListPage) Values() []Snapshot {
9953	if page.sl.IsEmpty() {
9954		return nil
9955	}
9956	return *page.sl.Value
9957}
9958
9959// Creates a new instance of the SnapshotListPage type.
9960func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
9961	return SnapshotListPage{
9962		fn: getNextPage,
9963		sl: cur,
9964	}
9965}
9966
9967// SnapshotProperties snapshot resource properties.
9968type SnapshotProperties struct {
9969	// TimeCreated - READ-ONLY; The time when the snapshot was created.
9970	TimeCreated *date.Time `json:"timeCreated,omitempty"`
9971	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
9972	OsType OperatingSystemTypes `json:"osType,omitempty"`
9973	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
9974	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
9975	// PurchasePlan - Purchase plan information for the image from which the source disk for the snapshot was originally created.
9976	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
9977	// CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
9978	CreationData *CreationData `json:"creationData,omitempty"`
9979	// 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.
9980	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
9981	// DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
9982	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
9983	// DiskState - The state of the snapshot. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
9984	DiskState DiskState `json:"diskState,omitempty"`
9985	// UniqueID - READ-ONLY; Unique Guid identifying the resource.
9986	UniqueID *string `json:"uniqueId,omitempty"`
9987	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
9988	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
9989	// ProvisioningState - READ-ONLY; The disk provisioning state.
9990	ProvisioningState *string `json:"provisioningState,omitempty"`
9991	// Incremental - Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.
9992	Incremental *bool `json:"incremental,omitempty"`
9993	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
9994	Encryption *Encryption `json:"encryption,omitempty"`
9995	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
9996	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
9997	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
9998	DiskAccessID *string `json:"diskAccessId,omitempty"`
9999	// SupportsHibernation - Indicates the OS on a snapshot supports hibernation.
10000	SupportsHibernation *bool `json:"supportsHibernation,omitempty"`
10001}
10002
10003// MarshalJSON is the custom marshaler for SnapshotProperties.
10004func (sp SnapshotProperties) MarshalJSON() ([]byte, error) {
10005	objectMap := make(map[string]interface{})
10006	if sp.OsType != "" {
10007		objectMap["osType"] = sp.OsType
10008	}
10009	if sp.HyperVGeneration != "" {
10010		objectMap["hyperVGeneration"] = sp.HyperVGeneration
10011	}
10012	if sp.PurchasePlan != nil {
10013		objectMap["purchasePlan"] = sp.PurchasePlan
10014	}
10015	if sp.CreationData != nil {
10016		objectMap["creationData"] = sp.CreationData
10017	}
10018	if sp.DiskSizeGB != nil {
10019		objectMap["diskSizeGB"] = sp.DiskSizeGB
10020	}
10021	if sp.DiskState != "" {
10022		objectMap["diskState"] = sp.DiskState
10023	}
10024	if sp.EncryptionSettingsCollection != nil {
10025		objectMap["encryptionSettingsCollection"] = sp.EncryptionSettingsCollection
10026	}
10027	if sp.Incremental != nil {
10028		objectMap["incremental"] = sp.Incremental
10029	}
10030	if sp.Encryption != nil {
10031		objectMap["encryption"] = sp.Encryption
10032	}
10033	if sp.NetworkAccessPolicy != "" {
10034		objectMap["networkAccessPolicy"] = sp.NetworkAccessPolicy
10035	}
10036	if sp.DiskAccessID != nil {
10037		objectMap["diskAccessId"] = sp.DiskAccessID
10038	}
10039	if sp.SupportsHibernation != nil {
10040		objectMap["supportsHibernation"] = sp.SupportsHibernation
10041	}
10042	return json.Marshal(objectMap)
10043}
10044
10045// SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
10046// operation.
10047type SnapshotsCreateOrUpdateFuture struct {
10048	azure.FutureAPI
10049	// Result returns the result of the asynchronous operation.
10050	// If the operation has not completed it will return an error.
10051	Result func(SnapshotsClient) (Snapshot, error)
10052}
10053
10054// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10055func (future *SnapshotsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10056	var azFuture azure.Future
10057	if err := json.Unmarshal(body, &azFuture); err != nil {
10058		return err
10059	}
10060	future.FutureAPI = &azFuture
10061	future.Result = future.result
10062	return nil
10063}
10064
10065// result is the default implementation for SnapshotsCreateOrUpdateFuture.Result.
10066func (future *SnapshotsCreateOrUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
10067	var done bool
10068	done, err = future.DoneWithContext(context.Background(), client)
10069	if err != nil {
10070		err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10071		return
10072	}
10073	if !done {
10074		s.Response.Response = future.Response()
10075		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
10076		return
10077	}
10078	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10079	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
10080		s, err = client.CreateOrUpdateResponder(s.Response.Response)
10081		if err != nil {
10082			err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
10083		}
10084	}
10085	return
10086}
10087
10088// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10089// operation.
10090type SnapshotsDeleteFuture struct {
10091	azure.FutureAPI
10092	// Result returns the result of the asynchronous operation.
10093	// If the operation has not completed it will return an error.
10094	Result func(SnapshotsClient) (autorest.Response, error)
10095}
10096
10097// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10098func (future *SnapshotsDeleteFuture) UnmarshalJSON(body []byte) error {
10099	var azFuture azure.Future
10100	if err := json.Unmarshal(body, &azFuture); err != nil {
10101		return err
10102	}
10103	future.FutureAPI = &azFuture
10104	future.Result = future.result
10105	return nil
10106}
10107
10108// result is the default implementation for SnapshotsDeleteFuture.Result.
10109func (future *SnapshotsDeleteFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
10110	var done bool
10111	done, err = future.DoneWithContext(context.Background(), client)
10112	if err != nil {
10113		err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Polling failure")
10114		return
10115	}
10116	if !done {
10117		ar.Response = future.Response()
10118		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
10119		return
10120	}
10121	ar.Response = future.Response()
10122	return
10123}
10124
10125// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
10126// operation.
10127type SnapshotsGrantAccessFuture struct {
10128	azure.FutureAPI
10129	// Result returns the result of the asynchronous operation.
10130	// If the operation has not completed it will return an error.
10131	Result func(SnapshotsClient) (AccessURI, error)
10132}
10133
10134// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10135func (future *SnapshotsGrantAccessFuture) UnmarshalJSON(body []byte) error {
10136	var azFuture azure.Future
10137	if err := json.Unmarshal(body, &azFuture); err != nil {
10138		return err
10139	}
10140	future.FutureAPI = &azFuture
10141	future.Result = future.result
10142	return nil
10143}
10144
10145// result is the default implementation for SnapshotsGrantAccessFuture.Result.
10146func (future *SnapshotsGrantAccessFuture) result(client SnapshotsClient) (au AccessURI, err error) {
10147	var done bool
10148	done, err = future.DoneWithContext(context.Background(), client)
10149	if err != nil {
10150		err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Polling failure")
10151		return
10152	}
10153	if !done {
10154		au.Response.Response = future.Response()
10155		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
10156		return
10157	}
10158	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10159	if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
10160		au, err = client.GrantAccessResponder(au.Response.Response)
10161		if err != nil {
10162			err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
10163		}
10164	}
10165	return
10166}
10167
10168// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an
10169// optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same
10170// sku as the previous snapshot
10171type SnapshotSku struct {
10172	// Name - The sku name. Possible values include: 'SnapshotStorageAccountTypesStandardLRS', 'SnapshotStorageAccountTypesPremiumLRS', 'SnapshotStorageAccountTypesStandardZRS'
10173	Name SnapshotStorageAccountTypes `json:"name,omitempty"`
10174	// Tier - READ-ONLY; The sku tier.
10175	Tier *string `json:"tier,omitempty"`
10176}
10177
10178// MarshalJSON is the custom marshaler for SnapshotSku.
10179func (ss SnapshotSku) MarshalJSON() ([]byte, error) {
10180	objectMap := make(map[string]interface{})
10181	if ss.Name != "" {
10182		objectMap["name"] = ss.Name
10183	}
10184	return json.Marshal(objectMap)
10185}
10186
10187// SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
10188// operation.
10189type SnapshotsRevokeAccessFuture struct {
10190	azure.FutureAPI
10191	// Result returns the result of the asynchronous operation.
10192	// If the operation has not completed it will return an error.
10193	Result func(SnapshotsClient) (autorest.Response, error)
10194}
10195
10196// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10197func (future *SnapshotsRevokeAccessFuture) UnmarshalJSON(body []byte) error {
10198	var azFuture azure.Future
10199	if err := json.Unmarshal(body, &azFuture); err != nil {
10200		return err
10201	}
10202	future.FutureAPI = &azFuture
10203	future.Result = future.result
10204	return nil
10205}
10206
10207// result is the default implementation for SnapshotsRevokeAccessFuture.Result.
10208func (future *SnapshotsRevokeAccessFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
10209	var done bool
10210	done, err = future.DoneWithContext(context.Background(), client)
10211	if err != nil {
10212		err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Polling failure")
10213		return
10214	}
10215	if !done {
10216		ar.Response = future.Response()
10217		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
10218		return
10219	}
10220	ar.Response = future.Response()
10221	return
10222}
10223
10224// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
10225// operation.
10226type SnapshotsUpdateFuture struct {
10227	azure.FutureAPI
10228	// Result returns the result of the asynchronous operation.
10229	// If the operation has not completed it will return an error.
10230	Result func(SnapshotsClient) (Snapshot, error)
10231}
10232
10233// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10234func (future *SnapshotsUpdateFuture) UnmarshalJSON(body []byte) error {
10235	var azFuture azure.Future
10236	if err := json.Unmarshal(body, &azFuture); err != nil {
10237		return err
10238	}
10239	future.FutureAPI = &azFuture
10240	future.Result = future.result
10241	return nil
10242}
10243
10244// result is the default implementation for SnapshotsUpdateFuture.Result.
10245func (future *SnapshotsUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
10246	var done bool
10247	done, err = future.DoneWithContext(context.Background(), client)
10248	if err != nil {
10249		err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Polling failure")
10250		return
10251	}
10252	if !done {
10253		s.Response.Response = future.Response()
10254		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
10255		return
10256	}
10257	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10258	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
10259		s, err = client.UpdateResponder(s.Response.Response)
10260		if err != nil {
10261			err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
10262		}
10263	}
10264	return
10265}
10266
10267// SnapshotUpdate snapshot update resource.
10268type SnapshotUpdate struct {
10269	*SnapshotUpdateProperties `json:"properties,omitempty"`
10270	// Tags - Resource tags
10271	Tags map[string]*string `json:"tags"`
10272	Sku  *SnapshotSku       `json:"sku,omitempty"`
10273}
10274
10275// MarshalJSON is the custom marshaler for SnapshotUpdate.
10276func (su SnapshotUpdate) MarshalJSON() ([]byte, error) {
10277	objectMap := make(map[string]interface{})
10278	if su.SnapshotUpdateProperties != nil {
10279		objectMap["properties"] = su.SnapshotUpdateProperties
10280	}
10281	if su.Tags != nil {
10282		objectMap["tags"] = su.Tags
10283	}
10284	if su.Sku != nil {
10285		objectMap["sku"] = su.Sku
10286	}
10287	return json.Marshal(objectMap)
10288}
10289
10290// UnmarshalJSON is the custom unmarshaler for SnapshotUpdate struct.
10291func (su *SnapshotUpdate) UnmarshalJSON(body []byte) error {
10292	var m map[string]*json.RawMessage
10293	err := json.Unmarshal(body, &m)
10294	if err != nil {
10295		return err
10296	}
10297	for k, v := range m {
10298		switch k {
10299		case "properties":
10300			if v != nil {
10301				var snapshotUpdateProperties SnapshotUpdateProperties
10302				err = json.Unmarshal(*v, &snapshotUpdateProperties)
10303				if err != nil {
10304					return err
10305				}
10306				su.SnapshotUpdateProperties = &snapshotUpdateProperties
10307			}
10308		case "tags":
10309			if v != nil {
10310				var tags map[string]*string
10311				err = json.Unmarshal(*v, &tags)
10312				if err != nil {
10313					return err
10314				}
10315				su.Tags = tags
10316			}
10317		case "sku":
10318			if v != nil {
10319				var sku SnapshotSku
10320				err = json.Unmarshal(*v, &sku)
10321				if err != nil {
10322					return err
10323				}
10324				su.Sku = &sku
10325			}
10326		}
10327	}
10328
10329	return nil
10330}
10331
10332// SnapshotUpdateProperties snapshot resource update properties.
10333type SnapshotUpdateProperties struct {
10334	// OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
10335	OsType OperatingSystemTypes `json:"osType,omitempty"`
10336	// 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.
10337	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
10338	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
10339	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
10340	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
10341	Encryption *Encryption `json:"encryption,omitempty"`
10342	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
10343	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
10344	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
10345	DiskAccessID *string `json:"diskAccessId,omitempty"`
10346	// SupportsHibernation - Indicates the OS on a snapshot supports hibernation.
10347	SupportsHibernation *bool `json:"supportsHibernation,omitempty"`
10348}
10349
10350// SourceVault the vault id is an Azure Resource Manager Resource id in the form
10351// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
10352type SourceVault struct {
10353	// ID - Resource Id
10354	ID *string `json:"id,omitempty"`
10355}
10356
10357// SSHConfiguration SSH configuration for Linux based VMs running on Azure
10358type SSHConfiguration struct {
10359	// PublicKeys - The list of SSH public keys used to authenticate with linux based VMs.
10360	PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
10361}
10362
10363// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where
10364// the public key is placed.
10365type SSHPublicKey struct {
10366	// 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
10367	Path *string `json:"path,omitempty"`
10368	// 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/en-us/azure/virtual-machines/linux/mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
10369	KeyData *string `json:"keyData,omitempty"`
10370}
10371
10372// SSHPublicKeyGenerateKeyPairResult response from generation of an SSH key pair.
10373type SSHPublicKeyGenerateKeyPairResult struct {
10374	autorest.Response `json:"-"`
10375	// PrivateKey - Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret.
10376	PrivateKey *string `json:"privateKey,omitempty"`
10377	// PublicKey - Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format.
10378	PublicKey *string `json:"publicKey,omitempty"`
10379	// ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}
10380	ID *string `json:"id,omitempty"`
10381}
10382
10383// SSHPublicKeyResource specifies information about the SSH public key.
10384type SSHPublicKeyResource struct {
10385	autorest.Response `json:"-"`
10386	// SSHPublicKeyResourceProperties - Properties of the SSH public key.
10387	*SSHPublicKeyResourceProperties `json:"properties,omitempty"`
10388	// ID - READ-ONLY; Resource Id
10389	ID *string `json:"id,omitempty"`
10390	// Name - READ-ONLY; Resource name
10391	Name *string `json:"name,omitempty"`
10392	// Type - READ-ONLY; Resource type
10393	Type *string `json:"type,omitempty"`
10394	// Location - Resource location
10395	Location *string `json:"location,omitempty"`
10396	// Tags - Resource tags
10397	Tags map[string]*string `json:"tags"`
10398}
10399
10400// MarshalJSON is the custom marshaler for SSHPublicKeyResource.
10401func (spkr SSHPublicKeyResource) MarshalJSON() ([]byte, error) {
10402	objectMap := make(map[string]interface{})
10403	if spkr.SSHPublicKeyResourceProperties != nil {
10404		objectMap["properties"] = spkr.SSHPublicKeyResourceProperties
10405	}
10406	if spkr.Location != nil {
10407		objectMap["location"] = spkr.Location
10408	}
10409	if spkr.Tags != nil {
10410		objectMap["tags"] = spkr.Tags
10411	}
10412	return json.Marshal(objectMap)
10413}
10414
10415// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyResource struct.
10416func (spkr *SSHPublicKeyResource) UnmarshalJSON(body []byte) error {
10417	var m map[string]*json.RawMessage
10418	err := json.Unmarshal(body, &m)
10419	if err != nil {
10420		return err
10421	}
10422	for k, v := range m {
10423		switch k {
10424		case "properties":
10425			if v != nil {
10426				var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
10427				err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
10428				if err != nil {
10429					return err
10430				}
10431				spkr.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
10432			}
10433		case "id":
10434			if v != nil {
10435				var ID string
10436				err = json.Unmarshal(*v, &ID)
10437				if err != nil {
10438					return err
10439				}
10440				spkr.ID = &ID
10441			}
10442		case "name":
10443			if v != nil {
10444				var name string
10445				err = json.Unmarshal(*v, &name)
10446				if err != nil {
10447					return err
10448				}
10449				spkr.Name = &name
10450			}
10451		case "type":
10452			if v != nil {
10453				var typeVar string
10454				err = json.Unmarshal(*v, &typeVar)
10455				if err != nil {
10456					return err
10457				}
10458				spkr.Type = &typeVar
10459			}
10460		case "location":
10461			if v != nil {
10462				var location string
10463				err = json.Unmarshal(*v, &location)
10464				if err != nil {
10465					return err
10466				}
10467				spkr.Location = &location
10468			}
10469		case "tags":
10470			if v != nil {
10471				var tags map[string]*string
10472				err = json.Unmarshal(*v, &tags)
10473				if err != nil {
10474					return err
10475				}
10476				spkr.Tags = tags
10477			}
10478		}
10479	}
10480
10481	return nil
10482}
10483
10484// SSHPublicKeyResourceProperties properties of the SSH public key.
10485type SSHPublicKeyResourceProperties struct {
10486	// PublicKey - SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
10487	PublicKey *string `json:"publicKey,omitempty"`
10488}
10489
10490// SSHPublicKeysGroupListResult the list SSH public keys operation response.
10491type SSHPublicKeysGroupListResult struct {
10492	autorest.Response `json:"-"`
10493	// Value - The list of SSH public keys
10494	Value *[]SSHPublicKeyResource `json:"value,omitempty"`
10495	// NextLink - The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys.
10496	NextLink *string `json:"nextLink,omitempty"`
10497}
10498
10499// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource
10500// values.
10501type SSHPublicKeysGroupListResultIterator struct {
10502	i    int
10503	page SSHPublicKeysGroupListResultPage
10504}
10505
10506// NextWithContext advances to the next value.  If there was an error making
10507// the request the iterator does not advance and the error is returned.
10508func (iter *SSHPublicKeysGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
10509	if tracing.IsEnabled() {
10510		ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultIterator.NextWithContext")
10511		defer func() {
10512			sc := -1
10513			if iter.Response().Response.Response != nil {
10514				sc = iter.Response().Response.Response.StatusCode
10515			}
10516			tracing.EndSpan(ctx, sc, err)
10517		}()
10518	}
10519	iter.i++
10520	if iter.i < len(iter.page.Values()) {
10521		return nil
10522	}
10523	err = iter.page.NextWithContext(ctx)
10524	if err != nil {
10525		iter.i--
10526		return err
10527	}
10528	iter.i = 0
10529	return nil
10530}
10531
10532// Next advances to the next value.  If there was an error making
10533// the request the iterator does not advance and the error is returned.
10534// Deprecated: Use NextWithContext() instead.
10535func (iter *SSHPublicKeysGroupListResultIterator) Next() error {
10536	return iter.NextWithContext(context.Background())
10537}
10538
10539// NotDone returns true if the enumeration should be started or is not yet complete.
10540func (iter SSHPublicKeysGroupListResultIterator) NotDone() bool {
10541	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10542}
10543
10544// Response returns the raw server response from the last page request.
10545func (iter SSHPublicKeysGroupListResultIterator) Response() SSHPublicKeysGroupListResult {
10546	return iter.page.Response()
10547}
10548
10549// Value returns the current value or a zero-initialized value if the
10550// iterator has advanced beyond the end of the collection.
10551func (iter SSHPublicKeysGroupListResultIterator) Value() SSHPublicKeyResource {
10552	if !iter.page.NotDone() {
10553		return SSHPublicKeyResource{}
10554	}
10555	return iter.page.Values()[iter.i]
10556}
10557
10558// Creates a new instance of the SSHPublicKeysGroupListResultIterator type.
10559func NewSSHPublicKeysGroupListResultIterator(page SSHPublicKeysGroupListResultPage) SSHPublicKeysGroupListResultIterator {
10560	return SSHPublicKeysGroupListResultIterator{page: page}
10561}
10562
10563// IsEmpty returns true if the ListResult contains no values.
10564func (spkglr SSHPublicKeysGroupListResult) IsEmpty() bool {
10565	return spkglr.Value == nil || len(*spkglr.Value) == 0
10566}
10567
10568// hasNextLink returns true if the NextLink is not empty.
10569func (spkglr SSHPublicKeysGroupListResult) hasNextLink() bool {
10570	return spkglr.NextLink != nil && len(*spkglr.NextLink) != 0
10571}
10572
10573// sSHPublicKeysGroupListResultPreparer prepares a request to retrieve the next set of results.
10574// It returns nil if no more results exist.
10575func (spkglr SSHPublicKeysGroupListResult) sSHPublicKeysGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
10576	if !spkglr.hasNextLink() {
10577		return nil, nil
10578	}
10579	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10580		autorest.AsJSON(),
10581		autorest.AsGet(),
10582		autorest.WithBaseURL(to.String(spkglr.NextLink)))
10583}
10584
10585// SSHPublicKeysGroupListResultPage contains a page of SSHPublicKeyResource values.
10586type SSHPublicKeysGroupListResultPage struct {
10587	fn     func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)
10588	spkglr SSHPublicKeysGroupListResult
10589}
10590
10591// NextWithContext advances to the next page of values.  If there was an error making
10592// the request the page does not advance and the error is returned.
10593func (page *SSHPublicKeysGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
10594	if tracing.IsEnabled() {
10595		ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultPage.NextWithContext")
10596		defer func() {
10597			sc := -1
10598			if page.Response().Response.Response != nil {
10599				sc = page.Response().Response.Response.StatusCode
10600			}
10601			tracing.EndSpan(ctx, sc, err)
10602		}()
10603	}
10604	for {
10605		next, err := page.fn(ctx, page.spkglr)
10606		if err != nil {
10607			return err
10608		}
10609		page.spkglr = next
10610		if !next.hasNextLink() || !next.IsEmpty() {
10611			break
10612		}
10613	}
10614	return nil
10615}
10616
10617// Next advances to the next page of values.  If there was an error making
10618// the request the page does not advance and the error is returned.
10619// Deprecated: Use NextWithContext() instead.
10620func (page *SSHPublicKeysGroupListResultPage) Next() error {
10621	return page.NextWithContext(context.Background())
10622}
10623
10624// NotDone returns true if the page enumeration should be started or is not yet complete.
10625func (page SSHPublicKeysGroupListResultPage) NotDone() bool {
10626	return !page.spkglr.IsEmpty()
10627}
10628
10629// Response returns the raw server response from the last page request.
10630func (page SSHPublicKeysGroupListResultPage) Response() SSHPublicKeysGroupListResult {
10631	return page.spkglr
10632}
10633
10634// Values returns the slice of values for the current page or nil if there are no values.
10635func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource {
10636	if page.spkglr.IsEmpty() {
10637		return nil
10638	}
10639	return *page.spkglr.Value
10640}
10641
10642// Creates a new instance of the SSHPublicKeysGroupListResultPage type.
10643func NewSSHPublicKeysGroupListResultPage(cur SSHPublicKeysGroupListResult, getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage {
10644	return SSHPublicKeysGroupListResultPage{
10645		fn:     getNextPage,
10646		spkglr: cur,
10647	}
10648}
10649
10650// SSHPublicKeyUpdateResource specifies information about the SSH public key.
10651type SSHPublicKeyUpdateResource struct {
10652	// SSHPublicKeyResourceProperties - Properties of the SSH public key.
10653	*SSHPublicKeyResourceProperties `json:"properties,omitempty"`
10654	// Tags - Resource tags
10655	Tags map[string]*string `json:"tags"`
10656}
10657
10658// MarshalJSON is the custom marshaler for SSHPublicKeyUpdateResource.
10659func (spkur SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) {
10660	objectMap := make(map[string]interface{})
10661	if spkur.SSHPublicKeyResourceProperties != nil {
10662		objectMap["properties"] = spkur.SSHPublicKeyResourceProperties
10663	}
10664	if spkur.Tags != nil {
10665		objectMap["tags"] = spkur.Tags
10666	}
10667	return json.Marshal(objectMap)
10668}
10669
10670// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyUpdateResource struct.
10671func (spkur *SSHPublicKeyUpdateResource) UnmarshalJSON(body []byte) error {
10672	var m map[string]*json.RawMessage
10673	err := json.Unmarshal(body, &m)
10674	if err != nil {
10675		return err
10676	}
10677	for k, v := range m {
10678		switch k {
10679		case "properties":
10680			if v != nil {
10681				var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
10682				err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
10683				if err != nil {
10684					return err
10685				}
10686				spkur.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
10687			}
10688		case "tags":
10689			if v != nil {
10690				var tags map[string]*string
10691				err = json.Unmarshal(*v, &tags)
10692				if err != nil {
10693					return err
10694				}
10695				spkur.Tags = tags
10696			}
10697		}
10698	}
10699
10700	return nil
10701}
10702
10703// StorageProfile specifies the storage settings for the virtual machine disks.
10704type StorageProfile struct {
10705	// 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.
10706	ImageReference *ImageReference `json:"imageReference,omitempty"`
10707	// 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).
10708	OsDisk *OSDisk `json:"osDisk,omitempty"`
10709	// 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).
10710	DataDisks *[]DataDisk `json:"dataDisks,omitempty"`
10711}
10712
10713// SubResource ...
10714type SubResource struct {
10715	// ID - Resource Id
10716	ID *string `json:"id,omitempty"`
10717}
10718
10719// SubResourceReadOnly ...
10720type SubResourceReadOnly struct {
10721	// ID - READ-ONLY; Resource Id
10722	ID *string `json:"id,omitempty"`
10723}
10724
10725// MarshalJSON is the custom marshaler for SubResourceReadOnly.
10726func (srro SubResourceReadOnly) MarshalJSON() ([]byte, error) {
10727	objectMap := make(map[string]interface{})
10728	return json.Marshal(objectMap)
10729}
10730
10731// SubResourceWithColocationStatus ...
10732type SubResourceWithColocationStatus struct {
10733	// ColocationStatus - Describes colocation status of a resource in the Proximity Placement Group.
10734	ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
10735	// ID - Resource Id
10736	ID *string `json:"id,omitempty"`
10737}
10738
10739// TargetRegion describes the target region information.
10740type TargetRegion struct {
10741	// Name - The name of the region.
10742	Name *string `json:"name,omitempty"`
10743	// RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable.
10744	RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"`
10745	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
10746	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
10747	Encryption         *EncryptionImages  `json:"encryption,omitempty"`
10748}
10749
10750// TerminateNotificationProfile ...
10751type TerminateNotificationProfile struct {
10752	// 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)
10753	NotBeforeTimeout *string `json:"notBeforeTimeout,omitempty"`
10754	// Enable - Specifies whether the Terminate Scheduled event is enabled or disabled.
10755	Enable *bool `json:"enable,omitempty"`
10756}
10757
10758// ThrottledRequestsInput api request input for LogAnalytics getThrottledRequests Api.
10759type ThrottledRequestsInput struct {
10760	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
10761	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
10762	// FromTime - From time of the query
10763	FromTime *date.Time `json:"fromTime,omitempty"`
10764	// ToTime - To time of the query
10765	ToTime *date.Time `json:"toTime,omitempty"`
10766	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
10767	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
10768	// GroupByOperationName - Group query result by Operation Name.
10769	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
10770	// GroupByResourceName - Group query result by Resource Name.
10771	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
10772	// GroupByClientApplicationID - Group query result by Client Application ID.
10773	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
10774	// GroupByUserAgent - Group query result by User Agent.
10775	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
10776}
10777
10778// UefiSettings specifies the security settings like secure boot and vTPM used while creating the virtual
10779// machine. <br><br>Minimum api-version: 2020-12-01
10780type UefiSettings struct {
10781	// SecureBootEnabled - Specifies whether secure boot should be enabled on the virtual machine. <br><br>Minimum api-version: 2020-12-01
10782	SecureBootEnabled *bool `json:"secureBootEnabled,omitempty"`
10783	// VTpmEnabled - Specifies whether vTPM should be enabled on the virtual machine. <br><br>Minimum api-version: 2020-12-01
10784	VTpmEnabled *bool `json:"vTpmEnabled,omitempty"`
10785}
10786
10787// UpdateResource the Update Resource model definition.
10788type UpdateResource struct {
10789	// Tags - Resource tags
10790	Tags map[string]*string `json:"tags"`
10791}
10792
10793// MarshalJSON is the custom marshaler for UpdateResource.
10794func (ur UpdateResource) MarshalJSON() ([]byte, error) {
10795	objectMap := make(map[string]interface{})
10796	if ur.Tags != nil {
10797		objectMap["tags"] = ur.Tags
10798	}
10799	return json.Marshal(objectMap)
10800}
10801
10802// UpdateResourceDefinition the Update Resource model definition.
10803type UpdateResourceDefinition struct {
10804	// ID - READ-ONLY; Resource Id
10805	ID *string `json:"id,omitempty"`
10806	// Name - READ-ONLY; Resource name
10807	Name *string `json:"name,omitempty"`
10808	// Type - READ-ONLY; Resource type
10809	Type *string `json:"type,omitempty"`
10810	// Tags - Resource tags
10811	Tags map[string]*string `json:"tags"`
10812}
10813
10814// MarshalJSON is the custom marshaler for UpdateResourceDefinition.
10815func (urd UpdateResourceDefinition) MarshalJSON() ([]byte, error) {
10816	objectMap := make(map[string]interface{})
10817	if urd.Tags != nil {
10818		objectMap["tags"] = urd.Tags
10819	}
10820	return json.Marshal(objectMap)
10821}
10822
10823// UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response.
10824type UpgradeOperationHistoricalStatusInfo struct {
10825	// Properties - READ-ONLY; Information about the properties of the upgrade operation.
10826	Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty"`
10827	// Type - READ-ONLY; Resource type
10828	Type *string `json:"type,omitempty"`
10829	// Location - READ-ONLY; Resource location
10830	Location *string `json:"location,omitempty"`
10831}
10832
10833// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfo.
10834func (uohsi UpgradeOperationHistoricalStatusInfo) MarshalJSON() ([]byte, error) {
10835	objectMap := make(map[string]interface{})
10836	return json.Marshal(objectMap)
10837}
10838
10839// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale
10840// Set.
10841type UpgradeOperationHistoricalStatusInfoProperties struct {
10842	// RunningStatus - READ-ONLY; Information about the overall status of the upgrade operation.
10843	RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"`
10844	// Progress - READ-ONLY; Counts of the VMs in each state.
10845	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
10846	// Error - READ-ONLY; Error Details for this upgrade if there are any.
10847	Error *APIError `json:"error,omitempty"`
10848	// StartedBy - READ-ONLY; Invoker of the Upgrade Operation. Possible values include: 'UpgradeOperationInvokerUnknown', 'UpgradeOperationInvokerUser', 'UpgradeOperationInvokerPlatform'
10849	StartedBy UpgradeOperationInvoker `json:"startedBy,omitempty"`
10850	// TargetImageReference - READ-ONLY; Image Reference details
10851	TargetImageReference *ImageReference `json:"targetImageReference,omitempty"`
10852	// RollbackInfo - READ-ONLY; Information about OS rollback if performed
10853	RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"`
10854}
10855
10856// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfoProperties.
10857func (uohsip UpgradeOperationHistoricalStatusInfoProperties) MarshalJSON() ([]byte, error) {
10858	objectMap := make(map[string]interface{})
10859	return json.Marshal(objectMap)
10860}
10861
10862// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade.
10863type UpgradeOperationHistoryStatus struct {
10864	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted'
10865	Code UpgradeState `json:"code,omitempty"`
10866	// StartTime - READ-ONLY; Start time of the upgrade.
10867	StartTime *date.Time `json:"startTime,omitempty"`
10868	// EndTime - READ-ONLY; End time of the upgrade.
10869	EndTime *date.Time `json:"endTime,omitempty"`
10870}
10871
10872// MarshalJSON is the custom marshaler for UpgradeOperationHistoryStatus.
10873func (uohs UpgradeOperationHistoryStatus) MarshalJSON() ([]byte, error) {
10874	objectMap := make(map[string]interface{})
10875	return json.Marshal(objectMap)
10876}
10877
10878// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling.
10879type UpgradePolicy struct {
10880	// 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'
10881	Mode UpgradeMode `json:"mode,omitempty"`
10882	// RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.
10883	RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"`
10884	// AutomaticOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade.
10885	AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"`
10886}
10887
10888// Usage describes Compute Resource Usage.
10889type Usage struct {
10890	// Unit - An enum describing the unit of usage measurement.
10891	Unit *string `json:"unit,omitempty"`
10892	// CurrentValue - The current usage of the resource.
10893	CurrentValue *int32 `json:"currentValue,omitempty"`
10894	// Limit - The maximum permitted usage of the resource.
10895	Limit *int64 `json:"limit,omitempty"`
10896	// Name - The name of the type of usage.
10897	Name *UsageName `json:"name,omitempty"`
10898}
10899
10900// UsageName the Usage Names.
10901type UsageName struct {
10902	// Value - The name of the resource.
10903	Value *string `json:"value,omitempty"`
10904	// LocalizedValue - The localized name of the resource.
10905	LocalizedValue *string `json:"localizedValue,omitempty"`
10906}
10907
10908// UserArtifactManage ...
10909type UserArtifactManage struct {
10910	// Install - Required. The path and arguments to install the gallery application. This is limited to 4096 characters.
10911	Install *string `json:"install,omitempty"`
10912	// Remove - Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.
10913	Remove *string `json:"remove,omitempty"`
10914	// Update - Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters.
10915	Update *string `json:"update,omitempty"`
10916}
10917
10918// UserArtifactSource the source image from which the Image Version is going to be created.
10919type UserArtifactSource struct {
10920	// MediaLink - Required. The mediaLink of the artifact, must be a readable storage page blob.
10921	MediaLink *string `json:"mediaLink,omitempty"`
10922	// DefaultConfigurationLink - Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.
10923	DefaultConfigurationLink *string `json:"defaultConfigurationLink,omitempty"`
10924}
10925
10926// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate
10927// should reside on the VM.
10928type VaultCertificate struct {
10929	// 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>}
10930	CertificateURL *string `json:"certificateUrl,omitempty"`
10931	// 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.
10932	CertificateStore *string `json:"certificateStore,omitempty"`
10933}
10934
10935// VaultSecretGroup describes a set of certificates which are all in the same Key Vault.
10936type VaultSecretGroup struct {
10937	// SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
10938	SourceVault *SubResource `json:"sourceVault,omitempty"`
10939	// VaultCertificates - The list of key vault references in SourceVault which contain certificates.
10940	VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"`
10941}
10942
10943// VirtualHardDisk describes the uri of a disk.
10944type VirtualHardDisk struct {
10945	// URI - Specifies the virtual hard disk's uri.
10946	URI *string `json:"uri,omitempty"`
10947}
10948
10949// VirtualMachine describes a Virtual Machine.
10950type VirtualMachine struct {
10951	autorest.Response `json:"-"`
10952	// 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**.
10953	Plan                      *Plan `json:"plan,omitempty"`
10954	*VirtualMachineProperties `json:"properties,omitempty"`
10955	// Resources - READ-ONLY; The virtual machine child extension resources.
10956	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
10957	// Identity - The identity of the virtual machine, if configured.
10958	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
10959	// Zones - The virtual machine zones.
10960	Zones *[]string `json:"zones,omitempty"`
10961	// ExtendedLocation - The extended location of the Virtual Machine.
10962	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
10963	// ID - READ-ONLY; Resource Id
10964	ID *string `json:"id,omitempty"`
10965	// Name - READ-ONLY; Resource name
10966	Name *string `json:"name,omitempty"`
10967	// Type - READ-ONLY; Resource type
10968	Type *string `json:"type,omitempty"`
10969	// Location - Resource location
10970	Location *string `json:"location,omitempty"`
10971	// Tags - Resource tags
10972	Tags map[string]*string `json:"tags"`
10973}
10974
10975// MarshalJSON is the custom marshaler for VirtualMachine.
10976func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
10977	objectMap := make(map[string]interface{})
10978	if VM.Plan != nil {
10979		objectMap["plan"] = VM.Plan
10980	}
10981	if VM.VirtualMachineProperties != nil {
10982		objectMap["properties"] = VM.VirtualMachineProperties
10983	}
10984	if VM.Identity != nil {
10985		objectMap["identity"] = VM.Identity
10986	}
10987	if VM.Zones != nil {
10988		objectMap["zones"] = VM.Zones
10989	}
10990	if VM.ExtendedLocation != nil {
10991		objectMap["extendedLocation"] = VM.ExtendedLocation
10992	}
10993	if VM.Location != nil {
10994		objectMap["location"] = VM.Location
10995	}
10996	if VM.Tags != nil {
10997		objectMap["tags"] = VM.Tags
10998	}
10999	return json.Marshal(objectMap)
11000}
11001
11002// UnmarshalJSON is the custom unmarshaler for VirtualMachine struct.
11003func (VM *VirtualMachine) UnmarshalJSON(body []byte) error {
11004	var m map[string]*json.RawMessage
11005	err := json.Unmarshal(body, &m)
11006	if err != nil {
11007		return err
11008	}
11009	for k, v := range m {
11010		switch k {
11011		case "plan":
11012			if v != nil {
11013				var plan Plan
11014				err = json.Unmarshal(*v, &plan)
11015				if err != nil {
11016					return err
11017				}
11018				VM.Plan = &plan
11019			}
11020		case "properties":
11021			if v != nil {
11022				var virtualMachineProperties VirtualMachineProperties
11023				err = json.Unmarshal(*v, &virtualMachineProperties)
11024				if err != nil {
11025					return err
11026				}
11027				VM.VirtualMachineProperties = &virtualMachineProperties
11028			}
11029		case "resources":
11030			if v != nil {
11031				var resources []VirtualMachineExtension
11032				err = json.Unmarshal(*v, &resources)
11033				if err != nil {
11034					return err
11035				}
11036				VM.Resources = &resources
11037			}
11038		case "identity":
11039			if v != nil {
11040				var identity VirtualMachineIdentity
11041				err = json.Unmarshal(*v, &identity)
11042				if err != nil {
11043					return err
11044				}
11045				VM.Identity = &identity
11046			}
11047		case "zones":
11048			if v != nil {
11049				var zones []string
11050				err = json.Unmarshal(*v, &zones)
11051				if err != nil {
11052					return err
11053				}
11054				VM.Zones = &zones
11055			}
11056		case "extendedLocation":
11057			if v != nil {
11058				var extendedLocation ExtendedLocation
11059				err = json.Unmarshal(*v, &extendedLocation)
11060				if err != nil {
11061					return err
11062				}
11063				VM.ExtendedLocation = &extendedLocation
11064			}
11065		case "id":
11066			if v != nil {
11067				var ID string
11068				err = json.Unmarshal(*v, &ID)
11069				if err != nil {
11070					return err
11071				}
11072				VM.ID = &ID
11073			}
11074		case "name":
11075			if v != nil {
11076				var name string
11077				err = json.Unmarshal(*v, &name)
11078				if err != nil {
11079					return err
11080				}
11081				VM.Name = &name
11082			}
11083		case "type":
11084			if v != nil {
11085				var typeVar string
11086				err = json.Unmarshal(*v, &typeVar)
11087				if err != nil {
11088					return err
11089				}
11090				VM.Type = &typeVar
11091			}
11092		case "location":
11093			if v != nil {
11094				var location string
11095				err = json.Unmarshal(*v, &location)
11096				if err != nil {
11097					return err
11098				}
11099				VM.Location = &location
11100			}
11101		case "tags":
11102			if v != nil {
11103				var tags map[string]*string
11104				err = json.Unmarshal(*v, &tags)
11105				if err != nil {
11106					return err
11107				}
11108				VM.Tags = tags
11109			}
11110		}
11111	}
11112
11113	return nil
11114}
11115
11116// VirtualMachineAgentInstanceView the instance view of the VM Agent running on the virtual machine.
11117type VirtualMachineAgentInstanceView struct {
11118	// VMAgentVersion - The VM Agent full version.
11119	VMAgentVersion *string `json:"vmAgentVersion,omitempty"`
11120	// ExtensionHandlers - The virtual machine extension handler instance view.
11121	ExtensionHandlers *[]VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"`
11122	// Statuses - The resource status information.
11123	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
11124}
11125
11126// VirtualMachineAssessPatchesResult describes the properties of an AssessPatches result.
11127type VirtualMachineAssessPatchesResult struct {
11128	autorest.Response `json:"-"`
11129	// Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
11130	Status PatchOperationStatus `json:"status,omitempty"`
11131	// AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
11132	AssessmentActivityID *string `json:"assessmentActivityId,omitempty"`
11133	// RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.
11134	RebootPending *bool `json:"rebootPending,omitempty"`
11135	// CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
11136	CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"`
11137	// OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security.
11138	OtherPatchCount *int32 `json:"otherPatchCount,omitempty"`
11139	// StartDateTime - READ-ONLY; The UTC timestamp when the operation began.
11140	StartDateTime *date.Time `json:"startDateTime,omitempty"`
11141	// AvailablePatches - READ-ONLY; The list of patches that have been detected as available for installation.
11142	AvailablePatches *[]VirtualMachineSoftwarePatchProperties `json:"availablePatches,omitempty"`
11143	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
11144	Error *APIError `json:"error,omitempty"`
11145}
11146
11147// MarshalJSON is the custom marshaler for VirtualMachineAssessPatchesResult.
11148func (vmapr VirtualMachineAssessPatchesResult) MarshalJSON() ([]byte, error) {
11149	objectMap := make(map[string]interface{})
11150	return json.Marshal(objectMap)
11151}
11152
11153// VirtualMachineCaptureParameters capture Virtual Machine parameters.
11154type VirtualMachineCaptureParameters struct {
11155	// VhdPrefix - The captured virtual hard disk's name prefix.
11156	VhdPrefix *string `json:"vhdPrefix,omitempty"`
11157	// DestinationContainerName - The destination container name.
11158	DestinationContainerName *string `json:"destinationContainerName,omitempty"`
11159	// OverwriteVhds - Specifies whether to overwrite the destination virtual hard disk, in case of conflict.
11160	OverwriteVhds *bool `json:"overwriteVhds,omitempty"`
11161}
11162
11163// VirtualMachineCaptureResult output of virtual machine capture operation.
11164type VirtualMachineCaptureResult struct {
11165	autorest.Response `json:"-"`
11166	// Schema - READ-ONLY; the schema of the captured virtual machine
11167	Schema *string `json:"$schema,omitempty"`
11168	// ContentVersion - READ-ONLY; the version of the content
11169	ContentVersion *string `json:"contentVersion,omitempty"`
11170	// Parameters - READ-ONLY; parameters of the captured virtual machine
11171	Parameters interface{} `json:"parameters,omitempty"`
11172	// Resources - READ-ONLY; a list of resource items of the captured virtual machine
11173	Resources *[]interface{} `json:"resources,omitempty"`
11174	// ID - Resource Id
11175	ID *string `json:"id,omitempty"`
11176}
11177
11178// MarshalJSON is the custom marshaler for VirtualMachineCaptureResult.
11179func (vmcr VirtualMachineCaptureResult) MarshalJSON() ([]byte, error) {
11180	objectMap := make(map[string]interface{})
11181	if vmcr.ID != nil {
11182		objectMap["id"] = vmcr.ID
11183	}
11184	return json.Marshal(objectMap)
11185}
11186
11187// VirtualMachineExtension describes a Virtual Machine Extension.
11188type VirtualMachineExtension struct {
11189	autorest.Response                  `json:"-"`
11190	*VirtualMachineExtensionProperties `json:"properties,omitempty"`
11191	// ID - READ-ONLY; Resource Id
11192	ID *string `json:"id,omitempty"`
11193	// Name - READ-ONLY; Resource name
11194	Name *string `json:"name,omitempty"`
11195	// Type - READ-ONLY; Resource type
11196	Type *string `json:"type,omitempty"`
11197	// Location - Resource location
11198	Location *string `json:"location,omitempty"`
11199	// Tags - Resource tags
11200	Tags map[string]*string `json:"tags"`
11201}
11202
11203// MarshalJSON is the custom marshaler for VirtualMachineExtension.
11204func (vme VirtualMachineExtension) MarshalJSON() ([]byte, error) {
11205	objectMap := make(map[string]interface{})
11206	if vme.VirtualMachineExtensionProperties != nil {
11207		objectMap["properties"] = vme.VirtualMachineExtensionProperties
11208	}
11209	if vme.Location != nil {
11210		objectMap["location"] = vme.Location
11211	}
11212	if vme.Tags != nil {
11213		objectMap["tags"] = vme.Tags
11214	}
11215	return json.Marshal(objectMap)
11216}
11217
11218// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtension struct.
11219func (vme *VirtualMachineExtension) UnmarshalJSON(body []byte) error {
11220	var m map[string]*json.RawMessage
11221	err := json.Unmarshal(body, &m)
11222	if err != nil {
11223		return err
11224	}
11225	for k, v := range m {
11226		switch k {
11227		case "properties":
11228			if v != nil {
11229				var virtualMachineExtensionProperties VirtualMachineExtensionProperties
11230				err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
11231				if err != nil {
11232					return err
11233				}
11234				vme.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
11235			}
11236		case "id":
11237			if v != nil {
11238				var ID string
11239				err = json.Unmarshal(*v, &ID)
11240				if err != nil {
11241					return err
11242				}
11243				vme.ID = &ID
11244			}
11245		case "name":
11246			if v != nil {
11247				var name string
11248				err = json.Unmarshal(*v, &name)
11249				if err != nil {
11250					return err
11251				}
11252				vme.Name = &name
11253			}
11254		case "type":
11255			if v != nil {
11256				var typeVar string
11257				err = json.Unmarshal(*v, &typeVar)
11258				if err != nil {
11259					return err
11260				}
11261				vme.Type = &typeVar
11262			}
11263		case "location":
11264			if v != nil {
11265				var location string
11266				err = json.Unmarshal(*v, &location)
11267				if err != nil {
11268					return err
11269				}
11270				vme.Location = &location
11271			}
11272		case "tags":
11273			if v != nil {
11274				var tags map[string]*string
11275				err = json.Unmarshal(*v, &tags)
11276				if err != nil {
11277					return err
11278				}
11279				vme.Tags = tags
11280			}
11281		}
11282	}
11283
11284	return nil
11285}
11286
11287// VirtualMachineExtensionHandlerInstanceView the instance view of a virtual machine extension handler.
11288type VirtualMachineExtensionHandlerInstanceView struct {
11289	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
11290	Type *string `json:"type,omitempty"`
11291	// TypeHandlerVersion - Specifies the version of the script handler.
11292	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
11293	// Status - The extension handler status.
11294	Status *InstanceViewStatus `json:"status,omitempty"`
11295}
11296
11297// VirtualMachineExtensionImage describes a Virtual Machine Extension Image.
11298type VirtualMachineExtensionImage struct {
11299	autorest.Response                       `json:"-"`
11300	*VirtualMachineExtensionImageProperties `json:"properties,omitempty"`
11301	// ID - READ-ONLY; Resource Id
11302	ID *string `json:"id,omitempty"`
11303	// Name - READ-ONLY; Resource name
11304	Name *string `json:"name,omitempty"`
11305	// Type - READ-ONLY; Resource type
11306	Type *string `json:"type,omitempty"`
11307	// Location - Resource location
11308	Location *string `json:"location,omitempty"`
11309	// Tags - Resource tags
11310	Tags map[string]*string `json:"tags"`
11311}
11312
11313// MarshalJSON is the custom marshaler for VirtualMachineExtensionImage.
11314func (vmei VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) {
11315	objectMap := make(map[string]interface{})
11316	if vmei.VirtualMachineExtensionImageProperties != nil {
11317		objectMap["properties"] = vmei.VirtualMachineExtensionImageProperties
11318	}
11319	if vmei.Location != nil {
11320		objectMap["location"] = vmei.Location
11321	}
11322	if vmei.Tags != nil {
11323		objectMap["tags"] = vmei.Tags
11324	}
11325	return json.Marshal(objectMap)
11326}
11327
11328// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionImage struct.
11329func (vmei *VirtualMachineExtensionImage) UnmarshalJSON(body []byte) error {
11330	var m map[string]*json.RawMessage
11331	err := json.Unmarshal(body, &m)
11332	if err != nil {
11333		return err
11334	}
11335	for k, v := range m {
11336		switch k {
11337		case "properties":
11338			if v != nil {
11339				var virtualMachineExtensionImageProperties VirtualMachineExtensionImageProperties
11340				err = json.Unmarshal(*v, &virtualMachineExtensionImageProperties)
11341				if err != nil {
11342					return err
11343				}
11344				vmei.VirtualMachineExtensionImageProperties = &virtualMachineExtensionImageProperties
11345			}
11346		case "id":
11347			if v != nil {
11348				var ID string
11349				err = json.Unmarshal(*v, &ID)
11350				if err != nil {
11351					return err
11352				}
11353				vmei.ID = &ID
11354			}
11355		case "name":
11356			if v != nil {
11357				var name string
11358				err = json.Unmarshal(*v, &name)
11359				if err != nil {
11360					return err
11361				}
11362				vmei.Name = &name
11363			}
11364		case "type":
11365			if v != nil {
11366				var typeVar string
11367				err = json.Unmarshal(*v, &typeVar)
11368				if err != nil {
11369					return err
11370				}
11371				vmei.Type = &typeVar
11372			}
11373		case "location":
11374			if v != nil {
11375				var location string
11376				err = json.Unmarshal(*v, &location)
11377				if err != nil {
11378					return err
11379				}
11380				vmei.Location = &location
11381			}
11382		case "tags":
11383			if v != nil {
11384				var tags map[string]*string
11385				err = json.Unmarshal(*v, &tags)
11386				if err != nil {
11387					return err
11388				}
11389				vmei.Tags = tags
11390			}
11391		}
11392	}
11393
11394	return nil
11395}
11396
11397// VirtualMachineExtensionImageProperties describes the properties of a Virtual Machine Extension Image.
11398type VirtualMachineExtensionImageProperties struct {
11399	// OperatingSystem - The operating system this extension supports.
11400	OperatingSystem *string `json:"operatingSystem,omitempty"`
11401	// ComputeRole - The type of role (IaaS or PaaS) this extension supports.
11402	ComputeRole *string `json:"computeRole,omitempty"`
11403	// HandlerSchema - The schema defined by publisher, where extension consumers should provide settings in a matching schema.
11404	HandlerSchema *string `json:"handlerSchema,omitempty"`
11405	// 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.
11406	VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"`
11407	// SupportsMultipleExtensions - Whether the handler can support multiple extensions.
11408	SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"`
11409}
11410
11411// VirtualMachineExtensionInstanceView the instance view of a virtual machine extension.
11412type VirtualMachineExtensionInstanceView struct {
11413	// Name - The virtual machine extension name.
11414	Name *string `json:"name,omitempty"`
11415	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
11416	Type *string `json:"type,omitempty"`
11417	// TypeHandlerVersion - Specifies the version of the script handler.
11418	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
11419	// Substatuses - The resource status information.
11420	Substatuses *[]InstanceViewStatus `json:"substatuses,omitempty"`
11421	// Statuses - The resource status information.
11422	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
11423}
11424
11425// VirtualMachineExtensionProperties describes the properties of a Virtual Machine Extension.
11426type VirtualMachineExtensionProperties struct {
11427	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
11428	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
11429	// Publisher - The name of the extension handler publisher.
11430	Publisher *string `json:"publisher,omitempty"`
11431	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
11432	Type *string `json:"type,omitempty"`
11433	// TypeHandlerVersion - Specifies the version of the script handler.
11434	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
11435	// 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.
11436	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
11437	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
11438	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
11439	// Settings - Json formatted public settings for the extension.
11440	Settings interface{} `json:"settings,omitempty"`
11441	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
11442	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
11443	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
11444	ProvisioningState *string `json:"provisioningState,omitempty"`
11445	// InstanceView - The virtual machine extension instance view.
11446	InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`
11447}
11448
11449// MarshalJSON is the custom marshaler for VirtualMachineExtensionProperties.
11450func (vmep VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) {
11451	objectMap := make(map[string]interface{})
11452	if vmep.ForceUpdateTag != nil {
11453		objectMap["forceUpdateTag"] = vmep.ForceUpdateTag
11454	}
11455	if vmep.Publisher != nil {
11456		objectMap["publisher"] = vmep.Publisher
11457	}
11458	if vmep.Type != nil {
11459		objectMap["type"] = vmep.Type
11460	}
11461	if vmep.TypeHandlerVersion != nil {
11462		objectMap["typeHandlerVersion"] = vmep.TypeHandlerVersion
11463	}
11464	if vmep.AutoUpgradeMinorVersion != nil {
11465		objectMap["autoUpgradeMinorVersion"] = vmep.AutoUpgradeMinorVersion
11466	}
11467	if vmep.EnableAutomaticUpgrade != nil {
11468		objectMap["enableAutomaticUpgrade"] = vmep.EnableAutomaticUpgrade
11469	}
11470	if vmep.Settings != nil {
11471		objectMap["settings"] = vmep.Settings
11472	}
11473	if vmep.ProtectedSettings != nil {
11474		objectMap["protectedSettings"] = vmep.ProtectedSettings
11475	}
11476	if vmep.InstanceView != nil {
11477		objectMap["instanceView"] = vmep.InstanceView
11478	}
11479	return json.Marshal(objectMap)
11480}
11481
11482// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
11483// a long-running operation.
11484type VirtualMachineExtensionsCreateOrUpdateFuture struct {
11485	azure.FutureAPI
11486	// Result returns the result of the asynchronous operation.
11487	// If the operation has not completed it will return an error.
11488	Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
11489}
11490
11491// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11492func (future *VirtualMachineExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11493	var azFuture azure.Future
11494	if err := json.Unmarshal(body, &azFuture); err != nil {
11495		return err
11496	}
11497	future.FutureAPI = &azFuture
11498	future.Result = future.result
11499	return nil
11500}
11501
11502// result is the default implementation for VirtualMachineExtensionsCreateOrUpdateFuture.Result.
11503func (future *VirtualMachineExtensionsCreateOrUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
11504	var done bool
11505	done, err = future.DoneWithContext(context.Background(), client)
11506	if err != nil {
11507		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11508		return
11509	}
11510	if !done {
11511		vme.Response.Response = future.Response()
11512		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
11513		return
11514	}
11515	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11516	if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
11517		vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
11518		if err != nil {
11519			err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
11520		}
11521	}
11522	return
11523}
11524
11525// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
11526// long-running operation.
11527type VirtualMachineExtensionsDeleteFuture struct {
11528	azure.FutureAPI
11529	// Result returns the result of the asynchronous operation.
11530	// If the operation has not completed it will return an error.
11531	Result func(VirtualMachineExtensionsClient) (autorest.Response, error)
11532}
11533
11534// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11535func (future *VirtualMachineExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
11536	var azFuture azure.Future
11537	if err := json.Unmarshal(body, &azFuture); err != nil {
11538		return err
11539	}
11540	future.FutureAPI = &azFuture
11541	future.Result = future.result
11542	return nil
11543}
11544
11545// result is the default implementation for VirtualMachineExtensionsDeleteFuture.Result.
11546func (future *VirtualMachineExtensionsDeleteFuture) result(client VirtualMachineExtensionsClient) (ar autorest.Response, err error) {
11547	var done bool
11548	done, err = future.DoneWithContext(context.Background(), client)
11549	if err != nil {
11550		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
11551		return
11552	}
11553	if !done {
11554		ar.Response = future.Response()
11555		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
11556		return
11557	}
11558	ar.Response = future.Response()
11559	return
11560}
11561
11562// VirtualMachineExtensionsListResult the List Extension operation response
11563type VirtualMachineExtensionsListResult struct {
11564	autorest.Response `json:"-"`
11565	// Value - The list of extensions
11566	Value *[]VirtualMachineExtension `json:"value,omitempty"`
11567}
11568
11569// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
11570// long-running operation.
11571type VirtualMachineExtensionsUpdateFuture struct {
11572	azure.FutureAPI
11573	// Result returns the result of the asynchronous operation.
11574	// If the operation has not completed it will return an error.
11575	Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
11576}
11577
11578// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11579func (future *VirtualMachineExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
11580	var azFuture azure.Future
11581	if err := json.Unmarshal(body, &azFuture); err != nil {
11582		return err
11583	}
11584	future.FutureAPI = &azFuture
11585	future.Result = future.result
11586	return nil
11587}
11588
11589// result is the default implementation for VirtualMachineExtensionsUpdateFuture.Result.
11590func (future *VirtualMachineExtensionsUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
11591	var done bool
11592	done, err = future.DoneWithContext(context.Background(), client)
11593	if err != nil {
11594		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
11595		return
11596	}
11597	if !done {
11598		vme.Response.Response = future.Response()
11599		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
11600		return
11601	}
11602	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11603	if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
11604		vme, err = client.UpdateResponder(vme.Response.Response)
11605		if err != nil {
11606			err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
11607		}
11608	}
11609	return
11610}
11611
11612// VirtualMachineExtensionUpdate describes a Virtual Machine Extension.
11613type VirtualMachineExtensionUpdate struct {
11614	*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
11615	// Tags - Resource tags
11616	Tags map[string]*string `json:"tags"`
11617}
11618
11619// MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate.
11620func (vmeu VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) {
11621	objectMap := make(map[string]interface{})
11622	if vmeu.VirtualMachineExtensionUpdateProperties != nil {
11623		objectMap["properties"] = vmeu.VirtualMachineExtensionUpdateProperties
11624	}
11625	if vmeu.Tags != nil {
11626		objectMap["tags"] = vmeu.Tags
11627	}
11628	return json.Marshal(objectMap)
11629}
11630
11631// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionUpdate struct.
11632func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error {
11633	var m map[string]*json.RawMessage
11634	err := json.Unmarshal(body, &m)
11635	if err != nil {
11636		return err
11637	}
11638	for k, v := range m {
11639		switch k {
11640		case "properties":
11641			if v != nil {
11642				var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
11643				err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
11644				if err != nil {
11645					return err
11646				}
11647				vmeu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
11648			}
11649		case "tags":
11650			if v != nil {
11651				var tags map[string]*string
11652				err = json.Unmarshal(*v, &tags)
11653				if err != nil {
11654					return err
11655				}
11656				vmeu.Tags = tags
11657			}
11658		}
11659	}
11660
11661	return nil
11662}
11663
11664// VirtualMachineExtensionUpdateProperties describes the properties of a Virtual Machine Extension.
11665type VirtualMachineExtensionUpdateProperties struct {
11666	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
11667	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
11668	// Publisher - The name of the extension handler publisher.
11669	Publisher *string `json:"publisher,omitempty"`
11670	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
11671	Type *string `json:"type,omitempty"`
11672	// TypeHandlerVersion - Specifies the version of the script handler.
11673	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
11674	// 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.
11675	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
11676	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
11677	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
11678	// Settings - Json formatted public settings for the extension.
11679	Settings interface{} `json:"settings,omitempty"`
11680	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
11681	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
11682}
11683
11684// VirtualMachineHealthStatus the health status of the VM.
11685type VirtualMachineHealthStatus struct {
11686	// Status - READ-ONLY; The health status information for the VM.
11687	Status *InstanceViewStatus `json:"status,omitempty"`
11688}
11689
11690// MarshalJSON is the custom marshaler for VirtualMachineHealthStatus.
11691func (vmhs VirtualMachineHealthStatus) MarshalJSON() ([]byte, error) {
11692	objectMap := make(map[string]interface{})
11693	return json.Marshal(objectMap)
11694}
11695
11696// VirtualMachineIdentity identity for the virtual machine.
11697type VirtualMachineIdentity struct {
11698	// PrincipalID - READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity.
11699	PrincipalID *string `json:"principalId,omitempty"`
11700	// TenantID - READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity.
11701	TenantID *string `json:"tenantId,omitempty"`
11702	// 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'
11703	Type ResourceIdentityType `json:"type,omitempty"`
11704	// 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}'.
11705	UserAssignedIdentities map[string]*VirtualMachineIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
11706}
11707
11708// MarshalJSON is the custom marshaler for VirtualMachineIdentity.
11709func (vmi VirtualMachineIdentity) MarshalJSON() ([]byte, error) {
11710	objectMap := make(map[string]interface{})
11711	if vmi.Type != "" {
11712		objectMap["type"] = vmi.Type
11713	}
11714	if vmi.UserAssignedIdentities != nil {
11715		objectMap["userAssignedIdentities"] = vmi.UserAssignedIdentities
11716	}
11717	return json.Marshal(objectMap)
11718}
11719
11720// VirtualMachineIdentityUserAssignedIdentitiesValue ...
11721type VirtualMachineIdentityUserAssignedIdentitiesValue struct {
11722	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
11723	PrincipalID *string `json:"principalId,omitempty"`
11724	// ClientID - READ-ONLY; The client id of user assigned identity.
11725	ClientID *string `json:"clientId,omitempty"`
11726}
11727
11728// MarshalJSON is the custom marshaler for VirtualMachineIdentityUserAssignedIdentitiesValue.
11729func (vmiAiv VirtualMachineIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
11730	objectMap := make(map[string]interface{})
11731	return json.Marshal(objectMap)
11732}
11733
11734// VirtualMachineImage describes a Virtual Machine Image.
11735type VirtualMachineImage struct {
11736	autorest.Response              `json:"-"`
11737	*VirtualMachineImageProperties `json:"properties,omitempty"`
11738	// Name - The name of the resource.
11739	Name *string `json:"name,omitempty"`
11740	// Location - The supported Azure location of the resource.
11741	Location *string `json:"location,omitempty"`
11742	// 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).
11743	Tags map[string]*string `json:"tags"`
11744	// ExtendedLocation - The extended location of the Virtual Machine.
11745	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
11746	// ID - Resource Id
11747	ID *string `json:"id,omitempty"`
11748}
11749
11750// MarshalJSON is the custom marshaler for VirtualMachineImage.
11751func (vmi VirtualMachineImage) MarshalJSON() ([]byte, error) {
11752	objectMap := make(map[string]interface{})
11753	if vmi.VirtualMachineImageProperties != nil {
11754		objectMap["properties"] = vmi.VirtualMachineImageProperties
11755	}
11756	if vmi.Name != nil {
11757		objectMap["name"] = vmi.Name
11758	}
11759	if vmi.Location != nil {
11760		objectMap["location"] = vmi.Location
11761	}
11762	if vmi.Tags != nil {
11763		objectMap["tags"] = vmi.Tags
11764	}
11765	if vmi.ExtendedLocation != nil {
11766		objectMap["extendedLocation"] = vmi.ExtendedLocation
11767	}
11768	if vmi.ID != nil {
11769		objectMap["id"] = vmi.ID
11770	}
11771	return json.Marshal(objectMap)
11772}
11773
11774// UnmarshalJSON is the custom unmarshaler for VirtualMachineImage struct.
11775func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error {
11776	var m map[string]*json.RawMessage
11777	err := json.Unmarshal(body, &m)
11778	if err != nil {
11779		return err
11780	}
11781	for k, v := range m {
11782		switch k {
11783		case "properties":
11784			if v != nil {
11785				var virtualMachineImageProperties VirtualMachineImageProperties
11786				err = json.Unmarshal(*v, &virtualMachineImageProperties)
11787				if err != nil {
11788					return err
11789				}
11790				vmi.VirtualMachineImageProperties = &virtualMachineImageProperties
11791			}
11792		case "name":
11793			if v != nil {
11794				var name string
11795				err = json.Unmarshal(*v, &name)
11796				if err != nil {
11797					return err
11798				}
11799				vmi.Name = &name
11800			}
11801		case "location":
11802			if v != nil {
11803				var location string
11804				err = json.Unmarshal(*v, &location)
11805				if err != nil {
11806					return err
11807				}
11808				vmi.Location = &location
11809			}
11810		case "tags":
11811			if v != nil {
11812				var tags map[string]*string
11813				err = json.Unmarshal(*v, &tags)
11814				if err != nil {
11815					return err
11816				}
11817				vmi.Tags = tags
11818			}
11819		case "extendedLocation":
11820			if v != nil {
11821				var extendedLocation ExtendedLocation
11822				err = json.Unmarshal(*v, &extendedLocation)
11823				if err != nil {
11824					return err
11825				}
11826				vmi.ExtendedLocation = &extendedLocation
11827			}
11828		case "id":
11829			if v != nil {
11830				var ID string
11831				err = json.Unmarshal(*v, &ID)
11832				if err != nil {
11833					return err
11834				}
11835				vmi.ID = &ID
11836			}
11837		}
11838	}
11839
11840	return nil
11841}
11842
11843// VirtualMachineImageFeature specifies additional capabilities supported by the image
11844type VirtualMachineImageFeature struct {
11845	// Name - The name of the feature.
11846	Name *string `json:"name,omitempty"`
11847	// Value - The corresponding value for the feature.
11848	Value *string `json:"value,omitempty"`
11849}
11850
11851// VirtualMachineImageProperties describes the properties of a Virtual Machine Image.
11852type VirtualMachineImageProperties struct {
11853	Plan                         *PurchasePlan                 `json:"plan,omitempty"`
11854	OsDiskImage                  *OSDiskImage                  `json:"osDiskImage,omitempty"`
11855	DataDiskImages               *[]DataDiskImage              `json:"dataDiskImages,omitempty"`
11856	AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"`
11857	// HyperVGeneration - Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
11858	HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
11859	// Disallowed - Specifies disallowed configuration for the VirtualMachine created from the image
11860	Disallowed *DisallowedConfiguration      `json:"disallowed,omitempty"`
11861	Features   *[]VirtualMachineImageFeature `json:"features,omitempty"`
11862}
11863
11864// VirtualMachineImageResource virtual machine image resource information.
11865type VirtualMachineImageResource struct {
11866	// Name - The name of the resource.
11867	Name *string `json:"name,omitempty"`
11868	// Location - The supported Azure location of the resource.
11869	Location *string `json:"location,omitempty"`
11870	// 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).
11871	Tags map[string]*string `json:"tags"`
11872	// ExtendedLocation - The extended location of the Virtual Machine.
11873	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
11874	// ID - Resource Id
11875	ID *string `json:"id,omitempty"`
11876}
11877
11878// MarshalJSON is the custom marshaler for VirtualMachineImageResource.
11879func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) {
11880	objectMap := make(map[string]interface{})
11881	if vmir.Name != nil {
11882		objectMap["name"] = vmir.Name
11883	}
11884	if vmir.Location != nil {
11885		objectMap["location"] = vmir.Location
11886	}
11887	if vmir.Tags != nil {
11888		objectMap["tags"] = vmir.Tags
11889	}
11890	if vmir.ExtendedLocation != nil {
11891		objectMap["extendedLocation"] = vmir.ExtendedLocation
11892	}
11893	if vmir.ID != nil {
11894		objectMap["id"] = vmir.ID
11895	}
11896	return json.Marshal(objectMap)
11897}
11898
11899// VirtualMachineInstallPatchesParameters input for InstallPatches as directly received by the API
11900type VirtualMachineInstallPatchesParameters struct {
11901	// MaximumDuration - Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours)
11902	MaximumDuration *string `json:"maximumDuration,omitempty"`
11903	// RebootSetting - Defines when it is acceptable to reboot a VM during a software update operation. Possible values include: 'IfRequired', 'Never', 'Always'
11904	RebootSetting VMGuestPatchRebootSetting `json:"rebootSetting,omitempty"`
11905	// WindowsParameters - Input for InstallPatches on a Windows VM, as directly received by the API
11906	WindowsParameters *WindowsParameters `json:"windowsParameters,omitempty"`
11907	// LinuxParameters - Input for InstallPatches on a Linux VM, as directly received by the API
11908	LinuxParameters *LinuxParameters `json:"linuxParameters,omitempty"`
11909}
11910
11911// VirtualMachineInstallPatchesResult the result summary of an installation operation.
11912type VirtualMachineInstallPatchesResult struct {
11913	autorest.Response `json:"-"`
11914	// Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
11915	Status PatchOperationStatus `json:"status,omitempty"`
11916	// InstallationActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
11917	InstallationActivityID *string `json:"installationActivityId,omitempty"`
11918	// RebootStatus - READ-ONLY; The reboot state of the VM following completion of the operation. Possible values include: 'VMGuestPatchRebootStatusUnknown', 'VMGuestPatchRebootStatusNotNeeded', 'VMGuestPatchRebootStatusRequired', 'VMGuestPatchRebootStatusStarted', 'VMGuestPatchRebootStatusFailed', 'VMGuestPatchRebootStatusCompleted'
11919	RebootStatus VMGuestPatchRebootStatus `json:"rebootStatus,omitempty"`
11920	// MaintenanceWindowExceeded - READ-ONLY; Whether the operation ran out of time before it completed all its intended actions.
11921	MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"`
11922	// ExcludedPatchCount - READ-ONLY; The number of patches that were not installed due to the user blocking their installation.
11923	ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty"`
11924	// NotSelectedPatchCount - READ-ONLY; The number of patches that were detected as available for install, but did not meet the operation's criteria.
11925	NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty"`
11926	// PendingPatchCount - READ-ONLY; The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true.
11927	PendingPatchCount *int32 `json:"pendingPatchCount,omitempty"`
11928	// InstalledPatchCount - READ-ONLY; The number of patches successfully installed.
11929	InstalledPatchCount *int32 `json:"installedPatchCount,omitempty"`
11930	// FailedPatchCount - READ-ONLY; The number of patches that could not be installed due to some issue. See errors for details.
11931	FailedPatchCount *int32 `json:"failedPatchCount,omitempty"`
11932	// Patches - READ-ONLY; The patches that were installed during the operation.
11933	Patches *[]PatchInstallationDetail `json:"patches,omitempty"`
11934	// StartDateTime - READ-ONLY; The UTC timestamp when the operation began.
11935	StartDateTime *date.Time `json:"startDateTime,omitempty"`
11936	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
11937	Error *APIError `json:"error,omitempty"`
11938}
11939
11940// MarshalJSON is the custom marshaler for VirtualMachineInstallPatchesResult.
11941func (vmipr VirtualMachineInstallPatchesResult) MarshalJSON() ([]byte, error) {
11942	objectMap := make(map[string]interface{})
11943	return json.Marshal(objectMap)
11944}
11945
11946// VirtualMachineInstanceView the instance view of a virtual machine.
11947type VirtualMachineInstanceView struct {
11948	autorest.Response `json:"-"`
11949	// PlatformUpdateDomain - Specifies the update domain of the virtual machine.
11950	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
11951	// PlatformFaultDomain - Specifies the fault domain of the virtual machine.
11952	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
11953	// ComputerName - The computer name assigned to the virtual machine.
11954	ComputerName *string `json:"computerName,omitempty"`
11955	// OsName - The Operating System running on the virtual machine.
11956	OsName *string `json:"osName,omitempty"`
11957	// OsVersion - The version of Operating System running on the virtual machine.
11958	OsVersion *string `json:"osVersion,omitempty"`
11959	// HyperVGeneration - Specifies the HyperVGeneration Type associated with a resource. Possible values include: 'HyperVGenerationTypeV1', 'HyperVGenerationTypeV2'
11960	HyperVGeneration HyperVGenerationType `json:"hyperVGeneration,omitempty"`
11961	// RdpThumbPrint - The Remote desktop certificate thumbprint.
11962	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
11963	// VMAgent - The VM Agent running on the virtual machine.
11964	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
11965	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
11966	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
11967	// Disks - The virtual machine disk information.
11968	Disks *[]DiskInstanceView `json:"disks,omitempty"`
11969	// Extensions - The extensions information.
11970	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
11971	// VMHealth - READ-ONLY; The health status for the VM.
11972	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
11973	// 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.
11974	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
11975	// AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. <br><br>Minimum api-version: 2020-06-01.
11976	AssignedHost *string `json:"assignedHost,omitempty"`
11977	// Statuses - The resource status information.
11978	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
11979	// PatchStatus - [Preview Feature] The status of virtual machine patch operations.
11980	PatchStatus *VirtualMachinePatchStatus `json:"patchStatus,omitempty"`
11981}
11982
11983// MarshalJSON is the custom marshaler for VirtualMachineInstanceView.
11984func (vmiv VirtualMachineInstanceView) MarshalJSON() ([]byte, error) {
11985	objectMap := make(map[string]interface{})
11986	if vmiv.PlatformUpdateDomain != nil {
11987		objectMap["platformUpdateDomain"] = vmiv.PlatformUpdateDomain
11988	}
11989	if vmiv.PlatformFaultDomain != nil {
11990		objectMap["platformFaultDomain"] = vmiv.PlatformFaultDomain
11991	}
11992	if vmiv.ComputerName != nil {
11993		objectMap["computerName"] = vmiv.ComputerName
11994	}
11995	if vmiv.OsName != nil {
11996		objectMap["osName"] = vmiv.OsName
11997	}
11998	if vmiv.OsVersion != nil {
11999		objectMap["osVersion"] = vmiv.OsVersion
12000	}
12001	if vmiv.HyperVGeneration != "" {
12002		objectMap["hyperVGeneration"] = vmiv.HyperVGeneration
12003	}
12004	if vmiv.RdpThumbPrint != nil {
12005		objectMap["rdpThumbPrint"] = vmiv.RdpThumbPrint
12006	}
12007	if vmiv.VMAgent != nil {
12008		objectMap["vmAgent"] = vmiv.VMAgent
12009	}
12010	if vmiv.MaintenanceRedeployStatus != nil {
12011		objectMap["maintenanceRedeployStatus"] = vmiv.MaintenanceRedeployStatus
12012	}
12013	if vmiv.Disks != nil {
12014		objectMap["disks"] = vmiv.Disks
12015	}
12016	if vmiv.Extensions != nil {
12017		objectMap["extensions"] = vmiv.Extensions
12018	}
12019	if vmiv.BootDiagnostics != nil {
12020		objectMap["bootDiagnostics"] = vmiv.BootDiagnostics
12021	}
12022	if vmiv.Statuses != nil {
12023		objectMap["statuses"] = vmiv.Statuses
12024	}
12025	if vmiv.PatchStatus != nil {
12026		objectMap["patchStatus"] = vmiv.PatchStatus
12027	}
12028	return json.Marshal(objectMap)
12029}
12030
12031// VirtualMachineListResult the List Virtual Machine operation response.
12032type VirtualMachineListResult struct {
12033	autorest.Response `json:"-"`
12034	// Value - The list of virtual machines.
12035	Value *[]VirtualMachine `json:"value,omitempty"`
12036	// NextLink - The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines.
12037	NextLink *string `json:"nextLink,omitempty"`
12038}
12039
12040// VirtualMachineListResultIterator provides access to a complete listing of VirtualMachine values.
12041type VirtualMachineListResultIterator struct {
12042	i    int
12043	page VirtualMachineListResultPage
12044}
12045
12046// NextWithContext advances to the next value.  If there was an error making
12047// the request the iterator does not advance and the error is returned.
12048func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) {
12049	if tracing.IsEnabled() {
12050		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.NextWithContext")
12051		defer func() {
12052			sc := -1
12053			if iter.Response().Response.Response != nil {
12054				sc = iter.Response().Response.Response.StatusCode
12055			}
12056			tracing.EndSpan(ctx, sc, err)
12057		}()
12058	}
12059	iter.i++
12060	if iter.i < len(iter.page.Values()) {
12061		return nil
12062	}
12063	err = iter.page.NextWithContext(ctx)
12064	if err != nil {
12065		iter.i--
12066		return err
12067	}
12068	iter.i = 0
12069	return nil
12070}
12071
12072// Next advances to the next value.  If there was an error making
12073// the request the iterator does not advance and the error is returned.
12074// Deprecated: Use NextWithContext() instead.
12075func (iter *VirtualMachineListResultIterator) Next() error {
12076	return iter.NextWithContext(context.Background())
12077}
12078
12079// NotDone returns true if the enumeration should be started or is not yet complete.
12080func (iter VirtualMachineListResultIterator) NotDone() bool {
12081	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12082}
12083
12084// Response returns the raw server response from the last page request.
12085func (iter VirtualMachineListResultIterator) Response() VirtualMachineListResult {
12086	return iter.page.Response()
12087}
12088
12089// Value returns the current value or a zero-initialized value if the
12090// iterator has advanced beyond the end of the collection.
12091func (iter VirtualMachineListResultIterator) Value() VirtualMachine {
12092	if !iter.page.NotDone() {
12093		return VirtualMachine{}
12094	}
12095	return iter.page.Values()[iter.i]
12096}
12097
12098// Creates a new instance of the VirtualMachineListResultIterator type.
12099func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator {
12100	return VirtualMachineListResultIterator{page: page}
12101}
12102
12103// IsEmpty returns true if the ListResult contains no values.
12104func (vmlr VirtualMachineListResult) IsEmpty() bool {
12105	return vmlr.Value == nil || len(*vmlr.Value) == 0
12106}
12107
12108// hasNextLink returns true if the NextLink is not empty.
12109func (vmlr VirtualMachineListResult) hasNextLink() bool {
12110	return vmlr.NextLink != nil && len(*vmlr.NextLink) != 0
12111}
12112
12113// virtualMachineListResultPreparer prepares a request to retrieve the next set of results.
12114// It returns nil if no more results exist.
12115func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) {
12116	if !vmlr.hasNextLink() {
12117		return nil, nil
12118	}
12119	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12120		autorest.AsJSON(),
12121		autorest.AsGet(),
12122		autorest.WithBaseURL(to.String(vmlr.NextLink)))
12123}
12124
12125// VirtualMachineListResultPage contains a page of VirtualMachine values.
12126type VirtualMachineListResultPage struct {
12127	fn   func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)
12128	vmlr VirtualMachineListResult
12129}
12130
12131// NextWithContext advances to the next page of values.  If there was an error making
12132// the request the page does not advance and the error is returned.
12133func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) {
12134	if tracing.IsEnabled() {
12135		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext")
12136		defer func() {
12137			sc := -1
12138			if page.Response().Response.Response != nil {
12139				sc = page.Response().Response.Response.StatusCode
12140			}
12141			tracing.EndSpan(ctx, sc, err)
12142		}()
12143	}
12144	for {
12145		next, err := page.fn(ctx, page.vmlr)
12146		if err != nil {
12147			return err
12148		}
12149		page.vmlr = next
12150		if !next.hasNextLink() || !next.IsEmpty() {
12151			break
12152		}
12153	}
12154	return nil
12155}
12156
12157// Next advances to the next page of values.  If there was an error making
12158// the request the page does not advance and the error is returned.
12159// Deprecated: Use NextWithContext() instead.
12160func (page *VirtualMachineListResultPage) Next() error {
12161	return page.NextWithContext(context.Background())
12162}
12163
12164// NotDone returns true if the page enumeration should be started or is not yet complete.
12165func (page VirtualMachineListResultPage) NotDone() bool {
12166	return !page.vmlr.IsEmpty()
12167}
12168
12169// Response returns the raw server response from the last page request.
12170func (page VirtualMachineListResultPage) Response() VirtualMachineListResult {
12171	return page.vmlr
12172}
12173
12174// Values returns the slice of values for the current page or nil if there are no values.
12175func (page VirtualMachineListResultPage) Values() []VirtualMachine {
12176	if page.vmlr.IsEmpty() {
12177		return nil
12178	}
12179	return *page.vmlr.Value
12180}
12181
12182// Creates a new instance of the VirtualMachineListResultPage type.
12183func NewVirtualMachineListResultPage(cur VirtualMachineListResult, getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
12184	return VirtualMachineListResultPage{
12185		fn:   getNextPage,
12186		vmlr: cur,
12187	}
12188}
12189
12190// VirtualMachinePatchStatus the status of virtual machine patch operations.
12191type VirtualMachinePatchStatus struct {
12192	// AvailablePatchSummary - The available patch summary of the latest assessment operation for the virtual machine.
12193	AvailablePatchSummary *AvailablePatchSummary `json:"availablePatchSummary,omitempty"`
12194	// LastPatchInstallationSummary - The installation summary of the latest installation operation for the virtual machine.
12195	LastPatchInstallationSummary *LastPatchInstallationSummary `json:"lastPatchInstallationSummary,omitempty"`
12196	// ConfigurationStatuses - READ-ONLY; The enablement status of the specified patchMode
12197	ConfigurationStatuses *[]InstanceViewStatus `json:"configurationStatuses,omitempty"`
12198}
12199
12200// MarshalJSON is the custom marshaler for VirtualMachinePatchStatus.
12201func (vmps VirtualMachinePatchStatus) MarshalJSON() ([]byte, error) {
12202	objectMap := make(map[string]interface{})
12203	if vmps.AvailablePatchSummary != nil {
12204		objectMap["availablePatchSummary"] = vmps.AvailablePatchSummary
12205	}
12206	if vmps.LastPatchInstallationSummary != nil {
12207		objectMap["lastPatchInstallationSummary"] = vmps.LastPatchInstallationSummary
12208	}
12209	return json.Marshal(objectMap)
12210}
12211
12212// VirtualMachineProperties describes the properties of a Virtual Machine.
12213type VirtualMachineProperties struct {
12214	// HardwareProfile - Specifies the hardware settings for the virtual machine.
12215	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
12216	// StorageProfile - Specifies the storage settings for the virtual machine disks.
12217	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
12218	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine.
12219	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
12220	// OsProfile - Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
12221	OsProfile *OSProfile `json:"osProfile,omitempty"`
12222	// NetworkProfile - Specifies the network interfaces of the virtual machine.
12223	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
12224	// SecurityProfile - Specifies the Security related profile settings for the virtual machine.
12225	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
12226	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
12227	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
12228	// 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. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
12229	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
12230	// 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
12231	VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"`
12232	// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.
12233	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
12234	// Priority - Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot'
12235	Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
12236	// EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
12237	EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
12238	// BillingProfile - Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
12239	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
12240	// Host - Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
12241	Host *SubResource `json:"host,omitempty"`
12242	// HostGroup - Specifies information about the dedicated host group that the virtual machine resides in. <br><br>Minimum api-version: 2020-06-01. <br><br>NOTE: User cannot specify both host and hostGroup properties.
12243	HostGroup *SubResource `json:"hostGroup,omitempty"`
12244	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
12245	ProvisioningState *string `json:"provisioningState,omitempty"`
12246	// InstanceView - READ-ONLY; The virtual machine instance view.
12247	InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"`
12248	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15
12249	LicenseType *string `json:"licenseType,omitempty"`
12250	// 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.
12251	VMID *string `json:"vmId,omitempty"`
12252	// ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01
12253	ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`
12254	// PlatformFaultDomain - Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.<br><li>This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.<li>The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' &gt; 1.<li>This property cannot be updated once the Virtual Machine is created.<li>Fault domain assignment can be viewed in the Virtual Machine Instance View.<br><br>Minimum api‐version: 2020‐12‐01
12255	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
12256}
12257
12258// MarshalJSON is the custom marshaler for VirtualMachineProperties.
12259func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) {
12260	objectMap := make(map[string]interface{})
12261	if vmp.HardwareProfile != nil {
12262		objectMap["hardwareProfile"] = vmp.HardwareProfile
12263	}
12264	if vmp.StorageProfile != nil {
12265		objectMap["storageProfile"] = vmp.StorageProfile
12266	}
12267	if vmp.AdditionalCapabilities != nil {
12268		objectMap["additionalCapabilities"] = vmp.AdditionalCapabilities
12269	}
12270	if vmp.OsProfile != nil {
12271		objectMap["osProfile"] = vmp.OsProfile
12272	}
12273	if vmp.NetworkProfile != nil {
12274		objectMap["networkProfile"] = vmp.NetworkProfile
12275	}
12276	if vmp.SecurityProfile != nil {
12277		objectMap["securityProfile"] = vmp.SecurityProfile
12278	}
12279	if vmp.DiagnosticsProfile != nil {
12280		objectMap["diagnosticsProfile"] = vmp.DiagnosticsProfile
12281	}
12282	if vmp.AvailabilitySet != nil {
12283		objectMap["availabilitySet"] = vmp.AvailabilitySet
12284	}
12285	if vmp.VirtualMachineScaleSet != nil {
12286		objectMap["virtualMachineScaleSet"] = vmp.VirtualMachineScaleSet
12287	}
12288	if vmp.ProximityPlacementGroup != nil {
12289		objectMap["proximityPlacementGroup"] = vmp.ProximityPlacementGroup
12290	}
12291	if vmp.Priority != "" {
12292		objectMap["priority"] = vmp.Priority
12293	}
12294	if vmp.EvictionPolicy != "" {
12295		objectMap["evictionPolicy"] = vmp.EvictionPolicy
12296	}
12297	if vmp.BillingProfile != nil {
12298		objectMap["billingProfile"] = vmp.BillingProfile
12299	}
12300	if vmp.Host != nil {
12301		objectMap["host"] = vmp.Host
12302	}
12303	if vmp.HostGroup != nil {
12304		objectMap["hostGroup"] = vmp.HostGroup
12305	}
12306	if vmp.LicenseType != nil {
12307		objectMap["licenseType"] = vmp.LicenseType
12308	}
12309	if vmp.ExtensionsTimeBudget != nil {
12310		objectMap["extensionsTimeBudget"] = vmp.ExtensionsTimeBudget
12311	}
12312	if vmp.PlatformFaultDomain != nil {
12313		objectMap["platformFaultDomain"] = vmp.PlatformFaultDomain
12314	}
12315	return json.Marshal(objectMap)
12316}
12317
12318// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk
12319// will always be reimaged
12320type VirtualMachineReimageParameters struct {
12321	// 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.
12322	TempDisk *bool `json:"tempDisk,omitempty"`
12323}
12324
12325// VirtualMachineRunCommand describes a Virtual Machine run command.
12326type VirtualMachineRunCommand struct {
12327	autorest.Response                   `json:"-"`
12328	*VirtualMachineRunCommandProperties `json:"properties,omitempty"`
12329	// ID - READ-ONLY; Resource Id
12330	ID *string `json:"id,omitempty"`
12331	// Name - READ-ONLY; Resource name
12332	Name *string `json:"name,omitempty"`
12333	// Type - READ-ONLY; Resource type
12334	Type *string `json:"type,omitempty"`
12335	// Location - Resource location
12336	Location *string `json:"location,omitempty"`
12337	// Tags - Resource tags
12338	Tags map[string]*string `json:"tags"`
12339}
12340
12341// MarshalJSON is the custom marshaler for VirtualMachineRunCommand.
12342func (vmrc VirtualMachineRunCommand) MarshalJSON() ([]byte, error) {
12343	objectMap := make(map[string]interface{})
12344	if vmrc.VirtualMachineRunCommandProperties != nil {
12345		objectMap["properties"] = vmrc.VirtualMachineRunCommandProperties
12346	}
12347	if vmrc.Location != nil {
12348		objectMap["location"] = vmrc.Location
12349	}
12350	if vmrc.Tags != nil {
12351		objectMap["tags"] = vmrc.Tags
12352	}
12353	return json.Marshal(objectMap)
12354}
12355
12356// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommand struct.
12357func (vmrc *VirtualMachineRunCommand) UnmarshalJSON(body []byte) error {
12358	var m map[string]*json.RawMessage
12359	err := json.Unmarshal(body, &m)
12360	if err != nil {
12361		return err
12362	}
12363	for k, v := range m {
12364		switch k {
12365		case "properties":
12366			if v != nil {
12367				var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties
12368				err = json.Unmarshal(*v, &virtualMachineRunCommandProperties)
12369				if err != nil {
12370					return err
12371				}
12372				vmrc.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties
12373			}
12374		case "id":
12375			if v != nil {
12376				var ID string
12377				err = json.Unmarshal(*v, &ID)
12378				if err != nil {
12379					return err
12380				}
12381				vmrc.ID = &ID
12382			}
12383		case "name":
12384			if v != nil {
12385				var name string
12386				err = json.Unmarshal(*v, &name)
12387				if err != nil {
12388					return err
12389				}
12390				vmrc.Name = &name
12391			}
12392		case "type":
12393			if v != nil {
12394				var typeVar string
12395				err = json.Unmarshal(*v, &typeVar)
12396				if err != nil {
12397					return err
12398				}
12399				vmrc.Type = &typeVar
12400			}
12401		case "location":
12402			if v != nil {
12403				var location string
12404				err = json.Unmarshal(*v, &location)
12405				if err != nil {
12406					return err
12407				}
12408				vmrc.Location = &location
12409			}
12410		case "tags":
12411			if v != nil {
12412				var tags map[string]*string
12413				err = json.Unmarshal(*v, &tags)
12414				if err != nil {
12415					return err
12416				}
12417				vmrc.Tags = tags
12418			}
12419		}
12420	}
12421
12422	return nil
12423}
12424
12425// VirtualMachineRunCommandInstanceView the instance view of a virtual machine run command.
12426type VirtualMachineRunCommandInstanceView struct {
12427	// ExecutionState - Script execution status. Possible values include: 'ExecutionStateUnknown', 'ExecutionStatePending', 'ExecutionStateRunning', 'ExecutionStateFailed', 'ExecutionStateSucceeded', 'ExecutionStateTimedOut', 'ExecutionStateCanceled'
12428	ExecutionState ExecutionState `json:"executionState,omitempty"`
12429	// ExecutionMessage - Communicate script configuration errors or execution messages.
12430	ExecutionMessage *string `json:"executionMessage,omitempty"`
12431	// ExitCode - Exit code returned from script execution.
12432	ExitCode *int32 `json:"exitCode,omitempty"`
12433	// Output - Script output stream.
12434	Output *string `json:"output,omitempty"`
12435	// Error - Script error stream.
12436	Error *string `json:"error,omitempty"`
12437	// StartTime - Script start time.
12438	StartTime *date.Time `json:"startTime,omitempty"`
12439	// EndTime - Script end time.
12440	EndTime *date.Time `json:"endTime,omitempty"`
12441	// Statuses - The resource status information.
12442	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
12443}
12444
12445// VirtualMachineRunCommandProperties describes the properties of a Virtual Machine run command.
12446type VirtualMachineRunCommandProperties struct {
12447	// Source - The source of the run command script.
12448	Source *VirtualMachineRunCommandScriptSource `json:"source,omitempty"`
12449	// Parameters - The parameters used by the script.
12450	Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
12451	// ProtectedParameters - The parameters used by the script.
12452	ProtectedParameters *[]RunCommandInputParameter `json:"protectedParameters,omitempty"`
12453	// AsyncExecution - Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
12454	AsyncExecution *bool `json:"asyncExecution,omitempty"`
12455	// RunAsUser - Specifies the user account on the VM when executing the run command.
12456	RunAsUser *string `json:"runAsUser,omitempty"`
12457	// RunAsPassword - Specifies the user account password on the VM when executing the run command.
12458	RunAsPassword *string `json:"runAsPassword,omitempty"`
12459	// TimeoutInSeconds - The timeout in seconds to execute the run command.
12460	TimeoutInSeconds *int32 `json:"timeoutInSeconds,omitempty"`
12461	// OutputBlobURI - Specifies the Azure storage blob where script output stream will be uploaded.
12462	OutputBlobURI *string `json:"outputBlobUri,omitempty"`
12463	// ErrorBlobURI - Specifies the Azure storage blob where script error stream will be uploaded.
12464	ErrorBlobURI *string `json:"errorBlobUri,omitempty"`
12465	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
12466	ProvisioningState *string `json:"provisioningState,omitempty"`
12467	// InstanceView - READ-ONLY; The virtual machine run command instance view.
12468	InstanceView *VirtualMachineRunCommandInstanceView `json:"instanceView,omitempty"`
12469}
12470
12471// MarshalJSON is the custom marshaler for VirtualMachineRunCommandProperties.
12472func (vmrcp VirtualMachineRunCommandProperties) MarshalJSON() ([]byte, error) {
12473	objectMap := make(map[string]interface{})
12474	if vmrcp.Source != nil {
12475		objectMap["source"] = vmrcp.Source
12476	}
12477	if vmrcp.Parameters != nil {
12478		objectMap["parameters"] = vmrcp.Parameters
12479	}
12480	if vmrcp.ProtectedParameters != nil {
12481		objectMap["protectedParameters"] = vmrcp.ProtectedParameters
12482	}
12483	if vmrcp.AsyncExecution != nil {
12484		objectMap["asyncExecution"] = vmrcp.AsyncExecution
12485	}
12486	if vmrcp.RunAsUser != nil {
12487		objectMap["runAsUser"] = vmrcp.RunAsUser
12488	}
12489	if vmrcp.RunAsPassword != nil {
12490		objectMap["runAsPassword"] = vmrcp.RunAsPassword
12491	}
12492	if vmrcp.TimeoutInSeconds != nil {
12493		objectMap["timeoutInSeconds"] = vmrcp.TimeoutInSeconds
12494	}
12495	if vmrcp.OutputBlobURI != nil {
12496		objectMap["outputBlobUri"] = vmrcp.OutputBlobURI
12497	}
12498	if vmrcp.ErrorBlobURI != nil {
12499		objectMap["errorBlobUri"] = vmrcp.ErrorBlobURI
12500	}
12501	return json.Marshal(objectMap)
12502}
12503
12504// VirtualMachineRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
12505// of a long-running operation.
12506type VirtualMachineRunCommandsCreateOrUpdateFuture struct {
12507	azure.FutureAPI
12508	// Result returns the result of the asynchronous operation.
12509	// If the operation has not completed it will return an error.
12510	Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error)
12511}
12512
12513// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12514func (future *VirtualMachineRunCommandsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12515	var azFuture azure.Future
12516	if err := json.Unmarshal(body, &azFuture); err != nil {
12517		return err
12518	}
12519	future.FutureAPI = &azFuture
12520	future.Result = future.result
12521	return nil
12522}
12523
12524// result is the default implementation for VirtualMachineRunCommandsCreateOrUpdateFuture.Result.
12525func (future *VirtualMachineRunCommandsCreateOrUpdateFuture) result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
12526	var done bool
12527	done, err = future.DoneWithContext(context.Background(), client)
12528	if err != nil {
12529		err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12530		return
12531	}
12532	if !done {
12533		vmrc.Response.Response = future.Response()
12534		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsCreateOrUpdateFuture")
12535		return
12536	}
12537	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12538	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
12539		vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response)
12540		if err != nil {
12541			err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
12542		}
12543	}
12544	return
12545}
12546
12547// VirtualMachineRunCommandScriptSource describes the script sources for run command.
12548type VirtualMachineRunCommandScriptSource struct {
12549	// Script - Specifies the script content to be executed on the VM.
12550	Script *string `json:"script,omitempty"`
12551	// ScriptURI - Specifies the script download location.
12552	ScriptURI *string `json:"scriptUri,omitempty"`
12553	// CommandID - Specifies a commandId of predefined built-in script.
12554	CommandID *string `json:"commandId,omitempty"`
12555}
12556
12557// VirtualMachineRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results of a
12558// long-running operation.
12559type VirtualMachineRunCommandsDeleteFuture struct {
12560	azure.FutureAPI
12561	// Result returns the result of the asynchronous operation.
12562	// If the operation has not completed it will return an error.
12563	Result func(VirtualMachineRunCommandsClient) (autorest.Response, error)
12564}
12565
12566// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12567func (future *VirtualMachineRunCommandsDeleteFuture) UnmarshalJSON(body []byte) error {
12568	var azFuture azure.Future
12569	if err := json.Unmarshal(body, &azFuture); err != nil {
12570		return err
12571	}
12572	future.FutureAPI = &azFuture
12573	future.Result = future.result
12574	return nil
12575}
12576
12577// result is the default implementation for VirtualMachineRunCommandsDeleteFuture.Result.
12578func (future *VirtualMachineRunCommandsDeleteFuture) result(client VirtualMachineRunCommandsClient) (ar autorest.Response, err error) {
12579	var done bool
12580	done, err = future.DoneWithContext(context.Background(), client)
12581	if err != nil {
12582		err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure")
12583		return
12584	}
12585	if !done {
12586		ar.Response = future.Response()
12587		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsDeleteFuture")
12588		return
12589	}
12590	ar.Response = future.Response()
12591	return
12592}
12593
12594// VirtualMachineRunCommandsListResult the List run command operation response
12595type VirtualMachineRunCommandsListResult struct {
12596	autorest.Response `json:"-"`
12597	// Value - The list of run commands
12598	Value *[]VirtualMachineRunCommand `json:"value,omitempty"`
12599	// NextLink - The uri to fetch the next page of run commands.
12600	NextLink *string `json:"nextLink,omitempty"`
12601}
12602
12603// VirtualMachineRunCommandsListResultIterator provides access to a complete listing of
12604// VirtualMachineRunCommand values.
12605type VirtualMachineRunCommandsListResultIterator struct {
12606	i    int
12607	page VirtualMachineRunCommandsListResultPage
12608}
12609
12610// NextWithContext advances to the next value.  If there was an error making
12611// the request the iterator does not advance and the error is returned.
12612func (iter *VirtualMachineRunCommandsListResultIterator) NextWithContext(ctx context.Context) (err error) {
12613	if tracing.IsEnabled() {
12614		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultIterator.NextWithContext")
12615		defer func() {
12616			sc := -1
12617			if iter.Response().Response.Response != nil {
12618				sc = iter.Response().Response.Response.StatusCode
12619			}
12620			tracing.EndSpan(ctx, sc, err)
12621		}()
12622	}
12623	iter.i++
12624	if iter.i < len(iter.page.Values()) {
12625		return nil
12626	}
12627	err = iter.page.NextWithContext(ctx)
12628	if err != nil {
12629		iter.i--
12630		return err
12631	}
12632	iter.i = 0
12633	return nil
12634}
12635
12636// Next advances to the next value.  If there was an error making
12637// the request the iterator does not advance and the error is returned.
12638// Deprecated: Use NextWithContext() instead.
12639func (iter *VirtualMachineRunCommandsListResultIterator) Next() error {
12640	return iter.NextWithContext(context.Background())
12641}
12642
12643// NotDone returns true if the enumeration should be started or is not yet complete.
12644func (iter VirtualMachineRunCommandsListResultIterator) NotDone() bool {
12645	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12646}
12647
12648// Response returns the raw server response from the last page request.
12649func (iter VirtualMachineRunCommandsListResultIterator) Response() VirtualMachineRunCommandsListResult {
12650	return iter.page.Response()
12651}
12652
12653// Value returns the current value or a zero-initialized value if the
12654// iterator has advanced beyond the end of the collection.
12655func (iter VirtualMachineRunCommandsListResultIterator) Value() VirtualMachineRunCommand {
12656	if !iter.page.NotDone() {
12657		return VirtualMachineRunCommand{}
12658	}
12659	return iter.page.Values()[iter.i]
12660}
12661
12662// Creates a new instance of the VirtualMachineRunCommandsListResultIterator type.
12663func NewVirtualMachineRunCommandsListResultIterator(page VirtualMachineRunCommandsListResultPage) VirtualMachineRunCommandsListResultIterator {
12664	return VirtualMachineRunCommandsListResultIterator{page: page}
12665}
12666
12667// IsEmpty returns true if the ListResult contains no values.
12668func (vmrclr VirtualMachineRunCommandsListResult) IsEmpty() bool {
12669	return vmrclr.Value == nil || len(*vmrclr.Value) == 0
12670}
12671
12672// hasNextLink returns true if the NextLink is not empty.
12673func (vmrclr VirtualMachineRunCommandsListResult) hasNextLink() bool {
12674	return vmrclr.NextLink != nil && len(*vmrclr.NextLink) != 0
12675}
12676
12677// virtualMachineRunCommandsListResultPreparer prepares a request to retrieve the next set of results.
12678// It returns nil if no more results exist.
12679func (vmrclr VirtualMachineRunCommandsListResult) virtualMachineRunCommandsListResultPreparer(ctx context.Context) (*http.Request, error) {
12680	if !vmrclr.hasNextLink() {
12681		return nil, nil
12682	}
12683	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12684		autorest.AsJSON(),
12685		autorest.AsGet(),
12686		autorest.WithBaseURL(to.String(vmrclr.NextLink)))
12687}
12688
12689// VirtualMachineRunCommandsListResultPage contains a page of VirtualMachineRunCommand values.
12690type VirtualMachineRunCommandsListResultPage struct {
12691	fn     func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)
12692	vmrclr VirtualMachineRunCommandsListResult
12693}
12694
12695// NextWithContext advances to the next page of values.  If there was an error making
12696// the request the page does not advance and the error is returned.
12697func (page *VirtualMachineRunCommandsListResultPage) NextWithContext(ctx context.Context) (err error) {
12698	if tracing.IsEnabled() {
12699		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultPage.NextWithContext")
12700		defer func() {
12701			sc := -1
12702			if page.Response().Response.Response != nil {
12703				sc = page.Response().Response.Response.StatusCode
12704			}
12705			tracing.EndSpan(ctx, sc, err)
12706		}()
12707	}
12708	for {
12709		next, err := page.fn(ctx, page.vmrclr)
12710		if err != nil {
12711			return err
12712		}
12713		page.vmrclr = next
12714		if !next.hasNextLink() || !next.IsEmpty() {
12715			break
12716		}
12717	}
12718	return nil
12719}
12720
12721// Next advances to the next page of values.  If there was an error making
12722// the request the page does not advance and the error is returned.
12723// Deprecated: Use NextWithContext() instead.
12724func (page *VirtualMachineRunCommandsListResultPage) Next() error {
12725	return page.NextWithContext(context.Background())
12726}
12727
12728// NotDone returns true if the page enumeration should be started or is not yet complete.
12729func (page VirtualMachineRunCommandsListResultPage) NotDone() bool {
12730	return !page.vmrclr.IsEmpty()
12731}
12732
12733// Response returns the raw server response from the last page request.
12734func (page VirtualMachineRunCommandsListResultPage) Response() VirtualMachineRunCommandsListResult {
12735	return page.vmrclr
12736}
12737
12738// Values returns the slice of values for the current page or nil if there are no values.
12739func (page VirtualMachineRunCommandsListResultPage) Values() []VirtualMachineRunCommand {
12740	if page.vmrclr.IsEmpty() {
12741		return nil
12742	}
12743	return *page.vmrclr.Value
12744}
12745
12746// Creates a new instance of the VirtualMachineRunCommandsListResultPage type.
12747func NewVirtualMachineRunCommandsListResultPage(cur VirtualMachineRunCommandsListResult, getNextPage func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)) VirtualMachineRunCommandsListResultPage {
12748	return VirtualMachineRunCommandsListResultPage{
12749		fn:     getNextPage,
12750		vmrclr: cur,
12751	}
12752}
12753
12754// VirtualMachineRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results of a
12755// long-running operation.
12756type VirtualMachineRunCommandsUpdateFuture struct {
12757	azure.FutureAPI
12758	// Result returns the result of the asynchronous operation.
12759	// If the operation has not completed it will return an error.
12760	Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error)
12761}
12762
12763// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12764func (future *VirtualMachineRunCommandsUpdateFuture) UnmarshalJSON(body []byte) error {
12765	var azFuture azure.Future
12766	if err := json.Unmarshal(body, &azFuture); err != nil {
12767		return err
12768	}
12769	future.FutureAPI = &azFuture
12770	future.Result = future.result
12771	return nil
12772}
12773
12774// result is the default implementation for VirtualMachineRunCommandsUpdateFuture.Result.
12775func (future *VirtualMachineRunCommandsUpdateFuture) result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
12776	var done bool
12777	done, err = future.DoneWithContext(context.Background(), client)
12778	if err != nil {
12779		err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure")
12780		return
12781	}
12782	if !done {
12783		vmrc.Response.Response = future.Response()
12784		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsUpdateFuture")
12785		return
12786	}
12787	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12788	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
12789		vmrc, err = client.UpdateResponder(vmrc.Response.Response)
12790		if err != nil {
12791			err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
12792		}
12793	}
12794	return
12795}
12796
12797// VirtualMachineRunCommandUpdate describes a Virtual Machine run command.
12798type VirtualMachineRunCommandUpdate struct {
12799	*VirtualMachineRunCommandProperties `json:"properties,omitempty"`
12800	// Tags - Resource tags
12801	Tags map[string]*string `json:"tags"`
12802}
12803
12804// MarshalJSON is the custom marshaler for VirtualMachineRunCommandUpdate.
12805func (vmrcu VirtualMachineRunCommandUpdate) MarshalJSON() ([]byte, error) {
12806	objectMap := make(map[string]interface{})
12807	if vmrcu.VirtualMachineRunCommandProperties != nil {
12808		objectMap["properties"] = vmrcu.VirtualMachineRunCommandProperties
12809	}
12810	if vmrcu.Tags != nil {
12811		objectMap["tags"] = vmrcu.Tags
12812	}
12813	return json.Marshal(objectMap)
12814}
12815
12816// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommandUpdate struct.
12817func (vmrcu *VirtualMachineRunCommandUpdate) UnmarshalJSON(body []byte) error {
12818	var m map[string]*json.RawMessage
12819	err := json.Unmarshal(body, &m)
12820	if err != nil {
12821		return err
12822	}
12823	for k, v := range m {
12824		switch k {
12825		case "properties":
12826			if v != nil {
12827				var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties
12828				err = json.Unmarshal(*v, &virtualMachineRunCommandProperties)
12829				if err != nil {
12830					return err
12831				}
12832				vmrcu.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties
12833			}
12834		case "tags":
12835			if v != nil {
12836				var tags map[string]*string
12837				err = json.Unmarshal(*v, &tags)
12838				if err != nil {
12839					return err
12840				}
12841				vmrcu.Tags = tags
12842			}
12843		}
12844	}
12845
12846	return nil
12847}
12848
12849// VirtualMachinesAssessPatchesFuture an abstraction for monitoring and retrieving the results of a
12850// long-running operation.
12851type VirtualMachinesAssessPatchesFuture struct {
12852	azure.FutureAPI
12853	// Result returns the result of the asynchronous operation.
12854	// If the operation has not completed it will return an error.
12855	Result func(VirtualMachinesClient) (VirtualMachineAssessPatchesResult, error)
12856}
12857
12858// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12859func (future *VirtualMachinesAssessPatchesFuture) UnmarshalJSON(body []byte) error {
12860	var azFuture azure.Future
12861	if err := json.Unmarshal(body, &azFuture); err != nil {
12862		return err
12863	}
12864	future.FutureAPI = &azFuture
12865	future.Result = future.result
12866	return nil
12867}
12868
12869// result is the default implementation for VirtualMachinesAssessPatchesFuture.Result.
12870func (future *VirtualMachinesAssessPatchesFuture) result(client VirtualMachinesClient) (vmapr VirtualMachineAssessPatchesResult, err error) {
12871	var done bool
12872	done, err = future.DoneWithContext(context.Background(), client)
12873	if err != nil {
12874		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesAssessPatchesFuture", "Result", future.Response(), "Polling failure")
12875		return
12876	}
12877	if !done {
12878		vmapr.Response.Response = future.Response()
12879		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesAssessPatchesFuture")
12880		return
12881	}
12882	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12883	if vmapr.Response.Response, err = future.GetResult(sender); err == nil && vmapr.Response.Response.StatusCode != http.StatusNoContent {
12884		vmapr, err = client.AssessPatchesResponder(vmapr.Response.Response)
12885		if err != nil {
12886			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesAssessPatchesFuture", "Result", vmapr.Response.Response, "Failure responding to request")
12887		}
12888	}
12889	return
12890}
12891
12892// VirtualMachineScaleSet describes a Virtual Machine Scale Set.
12893type VirtualMachineScaleSet struct {
12894	autorest.Response `json:"-"`
12895	// Sku - The virtual machine scale set sku.
12896	Sku *Sku `json:"sku,omitempty"`
12897	// 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**.
12898	Plan                              *Plan `json:"plan,omitempty"`
12899	*VirtualMachineScaleSetProperties `json:"properties,omitempty"`
12900	// Identity - The identity of the virtual machine scale set, if configured.
12901	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
12902	// Zones - The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set
12903	Zones *[]string `json:"zones,omitempty"`
12904	// ExtendedLocation - The extended location of the Virtual Machine Scale Set.
12905	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
12906	// ID - READ-ONLY; Resource Id
12907	ID *string `json:"id,omitempty"`
12908	// Name - READ-ONLY; Resource name
12909	Name *string `json:"name,omitempty"`
12910	// Type - READ-ONLY; Resource type
12911	Type *string `json:"type,omitempty"`
12912	// Location - Resource location
12913	Location *string `json:"location,omitempty"`
12914	// Tags - Resource tags
12915	Tags map[string]*string `json:"tags"`
12916}
12917
12918// MarshalJSON is the custom marshaler for VirtualMachineScaleSet.
12919func (vmss VirtualMachineScaleSet) MarshalJSON() ([]byte, error) {
12920	objectMap := make(map[string]interface{})
12921	if vmss.Sku != nil {
12922		objectMap["sku"] = vmss.Sku
12923	}
12924	if vmss.Plan != nil {
12925		objectMap["plan"] = vmss.Plan
12926	}
12927	if vmss.VirtualMachineScaleSetProperties != nil {
12928		objectMap["properties"] = vmss.VirtualMachineScaleSetProperties
12929	}
12930	if vmss.Identity != nil {
12931		objectMap["identity"] = vmss.Identity
12932	}
12933	if vmss.Zones != nil {
12934		objectMap["zones"] = vmss.Zones
12935	}
12936	if vmss.ExtendedLocation != nil {
12937		objectMap["extendedLocation"] = vmss.ExtendedLocation
12938	}
12939	if vmss.Location != nil {
12940		objectMap["location"] = vmss.Location
12941	}
12942	if vmss.Tags != nil {
12943		objectMap["tags"] = vmss.Tags
12944	}
12945	return json.Marshal(objectMap)
12946}
12947
12948// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSet struct.
12949func (vmss *VirtualMachineScaleSet) UnmarshalJSON(body []byte) error {
12950	var m map[string]*json.RawMessage
12951	err := json.Unmarshal(body, &m)
12952	if err != nil {
12953		return err
12954	}
12955	for k, v := range m {
12956		switch k {
12957		case "sku":
12958			if v != nil {
12959				var sku Sku
12960				err = json.Unmarshal(*v, &sku)
12961				if err != nil {
12962					return err
12963				}
12964				vmss.Sku = &sku
12965			}
12966		case "plan":
12967			if v != nil {
12968				var plan Plan
12969				err = json.Unmarshal(*v, &plan)
12970				if err != nil {
12971					return err
12972				}
12973				vmss.Plan = &plan
12974			}
12975		case "properties":
12976			if v != nil {
12977				var virtualMachineScaleSetProperties VirtualMachineScaleSetProperties
12978				err = json.Unmarshal(*v, &virtualMachineScaleSetProperties)
12979				if err != nil {
12980					return err
12981				}
12982				vmss.VirtualMachineScaleSetProperties = &virtualMachineScaleSetProperties
12983			}
12984		case "identity":
12985			if v != nil {
12986				var identity VirtualMachineScaleSetIdentity
12987				err = json.Unmarshal(*v, &identity)
12988				if err != nil {
12989					return err
12990				}
12991				vmss.Identity = &identity
12992			}
12993		case "zones":
12994			if v != nil {
12995				var zones []string
12996				err = json.Unmarshal(*v, &zones)
12997				if err != nil {
12998					return err
12999				}
13000				vmss.Zones = &zones
13001			}
13002		case "extendedLocation":
13003			if v != nil {
13004				var extendedLocation ExtendedLocation
13005				err = json.Unmarshal(*v, &extendedLocation)
13006				if err != nil {
13007					return err
13008				}
13009				vmss.ExtendedLocation = &extendedLocation
13010			}
13011		case "id":
13012			if v != nil {
13013				var ID string
13014				err = json.Unmarshal(*v, &ID)
13015				if err != nil {
13016					return err
13017				}
13018				vmss.ID = &ID
13019			}
13020		case "name":
13021			if v != nil {
13022				var name string
13023				err = json.Unmarshal(*v, &name)
13024				if err != nil {
13025					return err
13026				}
13027				vmss.Name = &name
13028			}
13029		case "type":
13030			if v != nil {
13031				var typeVar string
13032				err = json.Unmarshal(*v, &typeVar)
13033				if err != nil {
13034					return err
13035				}
13036				vmss.Type = &typeVar
13037			}
13038		case "location":
13039			if v != nil {
13040				var location string
13041				err = json.Unmarshal(*v, &location)
13042				if err != nil {
13043					return err
13044				}
13045				vmss.Location = &location
13046			}
13047		case "tags":
13048			if v != nil {
13049				var tags map[string]*string
13050				err = json.Unmarshal(*v, &tags)
13051				if err != nil {
13052					return err
13053				}
13054				vmss.Tags = tags
13055			}
13056		}
13057	}
13058
13059	return nil
13060}
13061
13062// VirtualMachineScaleSetDataDisk describes a virtual machine scale set data disk.
13063type VirtualMachineScaleSetDataDisk struct {
13064	// Name - The disk name.
13065	Name *string `json:"name,omitempty"`
13066	// 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.
13067	Lun *int32 `json:"lun,omitempty"`
13068	// 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'
13069	Caching CachingTypes `json:"caching,omitempty"`
13070	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
13071	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
13072	// CreateOption - The create option. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
13073	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
13074	// 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
13075	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
13076	// ManagedDisk - The managed disk parameters.
13077	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
13078	// DiskIOPSReadWrite - Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
13079	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
13080	// DiskMBpsReadWrite - Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
13081	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
13082}
13083
13084// VirtualMachineScaleSetExtension describes a Virtual Machine Scale Set Extension.
13085type VirtualMachineScaleSetExtension struct {
13086	autorest.Response `json:"-"`
13087	// Name - The name of the extension.
13088	Name *string `json:"name,omitempty"`
13089	// Type - READ-ONLY; Resource type
13090	Type                                       *string `json:"type,omitempty"`
13091	*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
13092	// ID - READ-ONLY; Resource Id
13093	ID *string `json:"id,omitempty"`
13094}
13095
13096// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtension.
13097func (vmsse VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) {
13098	objectMap := make(map[string]interface{})
13099	if vmsse.Name != nil {
13100		objectMap["name"] = vmsse.Name
13101	}
13102	if vmsse.VirtualMachineScaleSetExtensionProperties != nil {
13103		objectMap["properties"] = vmsse.VirtualMachineScaleSetExtensionProperties
13104	}
13105	return json.Marshal(objectMap)
13106}
13107
13108// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtension struct.
13109func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error {
13110	var m map[string]*json.RawMessage
13111	err := json.Unmarshal(body, &m)
13112	if err != nil {
13113		return err
13114	}
13115	for k, v := range m {
13116		switch k {
13117		case "name":
13118			if v != nil {
13119				var name string
13120				err = json.Unmarshal(*v, &name)
13121				if err != nil {
13122					return err
13123				}
13124				vmsse.Name = &name
13125			}
13126		case "type":
13127			if v != nil {
13128				var typeVar string
13129				err = json.Unmarshal(*v, &typeVar)
13130				if err != nil {
13131					return err
13132				}
13133				vmsse.Type = &typeVar
13134			}
13135		case "properties":
13136			if v != nil {
13137				var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
13138				err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
13139				if err != nil {
13140					return err
13141				}
13142				vmsse.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
13143			}
13144		case "id":
13145			if v != nil {
13146				var ID string
13147				err = json.Unmarshal(*v, &ID)
13148				if err != nil {
13149					return err
13150				}
13151				vmsse.ID = &ID
13152			}
13153		}
13154	}
13155
13156	return nil
13157}
13158
13159// VirtualMachineScaleSetExtensionListResult the List VM scale set extension operation response.
13160type VirtualMachineScaleSetExtensionListResult struct {
13161	autorest.Response `json:"-"`
13162	// Value - The list of VM scale set extensions.
13163	Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"`
13164	// 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.
13165	NextLink *string `json:"nextLink,omitempty"`
13166}
13167
13168// VirtualMachineScaleSetExtensionListResultIterator provides access to a complete listing of
13169// VirtualMachineScaleSetExtension values.
13170type VirtualMachineScaleSetExtensionListResultIterator struct {
13171	i    int
13172	page VirtualMachineScaleSetExtensionListResultPage
13173}
13174
13175// NextWithContext advances to the next value.  If there was an error making
13176// the request the iterator does not advance and the error is returned.
13177func (iter *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) {
13178	if tracing.IsEnabled() {
13179		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.NextWithContext")
13180		defer func() {
13181			sc := -1
13182			if iter.Response().Response.Response != nil {
13183				sc = iter.Response().Response.Response.StatusCode
13184			}
13185			tracing.EndSpan(ctx, sc, err)
13186		}()
13187	}
13188	iter.i++
13189	if iter.i < len(iter.page.Values()) {
13190		return nil
13191	}
13192	err = iter.page.NextWithContext(ctx)
13193	if err != nil {
13194		iter.i--
13195		return err
13196	}
13197	iter.i = 0
13198	return nil
13199}
13200
13201// Next advances to the next value.  If there was an error making
13202// the request the iterator does not advance and the error is returned.
13203// Deprecated: Use NextWithContext() instead.
13204func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error {
13205	return iter.NextWithContext(context.Background())
13206}
13207
13208// NotDone returns true if the enumeration should be started or is not yet complete.
13209func (iter VirtualMachineScaleSetExtensionListResultIterator) NotDone() bool {
13210	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13211}
13212
13213// Response returns the raw server response from the last page request.
13214func (iter VirtualMachineScaleSetExtensionListResultIterator) Response() VirtualMachineScaleSetExtensionListResult {
13215	return iter.page.Response()
13216}
13217
13218// Value returns the current value or a zero-initialized value if the
13219// iterator has advanced beyond the end of the collection.
13220func (iter VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMachineScaleSetExtension {
13221	if !iter.page.NotDone() {
13222		return VirtualMachineScaleSetExtension{}
13223	}
13224	return iter.page.Values()[iter.i]
13225}
13226
13227// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type.
13228func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator {
13229	return VirtualMachineScaleSetExtensionListResultIterator{page: page}
13230}
13231
13232// IsEmpty returns true if the ListResult contains no values.
13233func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool {
13234	return vmsselr.Value == nil || len(*vmsselr.Value) == 0
13235}
13236
13237// hasNextLink returns true if the NextLink is not empty.
13238func (vmsselr VirtualMachineScaleSetExtensionListResult) hasNextLink() bool {
13239	return vmsselr.NextLink != nil && len(*vmsselr.NextLink) != 0
13240}
13241
13242// virtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results.
13243// It returns nil if no more results exist.
13244func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer(ctx context.Context) (*http.Request, error) {
13245	if !vmsselr.hasNextLink() {
13246		return nil, nil
13247	}
13248	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13249		autorest.AsJSON(),
13250		autorest.AsGet(),
13251		autorest.WithBaseURL(to.String(vmsselr.NextLink)))
13252}
13253
13254// VirtualMachineScaleSetExtensionListResultPage contains a page of VirtualMachineScaleSetExtension values.
13255type VirtualMachineScaleSetExtensionListResultPage struct {
13256	fn      func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)
13257	vmsselr VirtualMachineScaleSetExtensionListResult
13258}
13259
13260// NextWithContext advances to the next page of values.  If there was an error making
13261// the request the page does not advance and the error is returned.
13262func (page *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx context.Context) (err error) {
13263	if tracing.IsEnabled() {
13264		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultPage.NextWithContext")
13265		defer func() {
13266			sc := -1
13267			if page.Response().Response.Response != nil {
13268				sc = page.Response().Response.Response.StatusCode
13269			}
13270			tracing.EndSpan(ctx, sc, err)
13271		}()
13272	}
13273	for {
13274		next, err := page.fn(ctx, page.vmsselr)
13275		if err != nil {
13276			return err
13277		}
13278		page.vmsselr = next
13279		if !next.hasNextLink() || !next.IsEmpty() {
13280			break
13281		}
13282	}
13283	return nil
13284}
13285
13286// Next advances to the next page of values.  If there was an error making
13287// the request the page does not advance and the error is returned.
13288// Deprecated: Use NextWithContext() instead.
13289func (page *VirtualMachineScaleSetExtensionListResultPage) Next() error {
13290	return page.NextWithContext(context.Background())
13291}
13292
13293// NotDone returns true if the page enumeration should be started or is not yet complete.
13294func (page VirtualMachineScaleSetExtensionListResultPage) NotDone() bool {
13295	return !page.vmsselr.IsEmpty()
13296}
13297
13298// Response returns the raw server response from the last page request.
13299func (page VirtualMachineScaleSetExtensionListResultPage) Response() VirtualMachineScaleSetExtensionListResult {
13300	return page.vmsselr
13301}
13302
13303// Values returns the slice of values for the current page or nil if there are no values.
13304func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMachineScaleSetExtension {
13305	if page.vmsselr.IsEmpty() {
13306		return nil
13307	}
13308	return *page.vmsselr.Value
13309}
13310
13311// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type.
13312func NewVirtualMachineScaleSetExtensionListResultPage(cur VirtualMachineScaleSetExtensionListResult, getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
13313	return VirtualMachineScaleSetExtensionListResultPage{
13314		fn:      getNextPage,
13315		vmsselr: cur,
13316	}
13317}
13318
13319// VirtualMachineScaleSetExtensionProfile describes a virtual machine scale set extension profile.
13320type VirtualMachineScaleSetExtensionProfile struct {
13321	// Extensions - The virtual machine scale set child extension resources.
13322	Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"`
13323	// ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01
13324	ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`
13325}
13326
13327// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set
13328// Extension.
13329type VirtualMachineScaleSetExtensionProperties struct {
13330	// 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.
13331	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
13332	// Publisher - The name of the extension handler publisher.
13333	Publisher *string `json:"publisher,omitempty"`
13334	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
13335	Type *string `json:"type,omitempty"`
13336	// TypeHandlerVersion - Specifies the version of the script handler.
13337	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
13338	// 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.
13339	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
13340	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
13341	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
13342	// Settings - Json formatted public settings for the extension.
13343	Settings interface{} `json:"settings,omitempty"`
13344	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
13345	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
13346	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
13347	ProvisioningState *string `json:"provisioningState,omitempty"`
13348	// ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
13349	ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
13350}
13351
13352// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionProperties.
13353func (vmssep VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, error) {
13354	objectMap := make(map[string]interface{})
13355	if vmssep.ForceUpdateTag != nil {
13356		objectMap["forceUpdateTag"] = vmssep.ForceUpdateTag
13357	}
13358	if vmssep.Publisher != nil {
13359		objectMap["publisher"] = vmssep.Publisher
13360	}
13361	if vmssep.Type != nil {
13362		objectMap["type"] = vmssep.Type
13363	}
13364	if vmssep.TypeHandlerVersion != nil {
13365		objectMap["typeHandlerVersion"] = vmssep.TypeHandlerVersion
13366	}
13367	if vmssep.AutoUpgradeMinorVersion != nil {
13368		objectMap["autoUpgradeMinorVersion"] = vmssep.AutoUpgradeMinorVersion
13369	}
13370	if vmssep.EnableAutomaticUpgrade != nil {
13371		objectMap["enableAutomaticUpgrade"] = vmssep.EnableAutomaticUpgrade
13372	}
13373	if vmssep.Settings != nil {
13374		objectMap["settings"] = vmssep.Settings
13375	}
13376	if vmssep.ProtectedSettings != nil {
13377		objectMap["protectedSettings"] = vmssep.ProtectedSettings
13378	}
13379	if vmssep.ProvisionAfterExtensions != nil {
13380		objectMap["provisionAfterExtensions"] = vmssep.ProvisionAfterExtensions
13381	}
13382	return json.Marshal(objectMap)
13383}
13384
13385// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
13386// results of a long-running operation.
13387type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
13388	azure.FutureAPI
13389	// Result returns the result of the asynchronous operation.
13390	// If the operation has not completed it will return an error.
13391	Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
13392}
13393
13394// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13395func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13396	var azFuture azure.Future
13397	if err := json.Unmarshal(body, &azFuture); err != nil {
13398		return err
13399	}
13400	future.FutureAPI = &azFuture
13401	future.Result = future.result
13402	return nil
13403}
13404
13405// result is the default implementation for VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.Result.
13406func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
13407	var done bool
13408	done, err = future.DoneWithContext(context.Background(), client)
13409	if err != nil {
13410		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13411		return
13412	}
13413	if !done {
13414		vmsse.Response.Response = future.Response()
13415		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
13416		return
13417	}
13418	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13419	if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
13420		vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response)
13421		if err != nil {
13422			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
13423		}
13424	}
13425	return
13426}
13427
13428// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of
13429// a long-running operation.
13430type VirtualMachineScaleSetExtensionsDeleteFuture struct {
13431	azure.FutureAPI
13432	// Result returns the result of the asynchronous operation.
13433	// If the operation has not completed it will return an error.
13434	Result func(VirtualMachineScaleSetExtensionsClient) (autorest.Response, error)
13435}
13436
13437// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13438func (future *VirtualMachineScaleSetExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
13439	var azFuture azure.Future
13440	if err := json.Unmarshal(body, &azFuture); err != nil {
13441		return err
13442	}
13443	future.FutureAPI = &azFuture
13444	future.Result = future.result
13445	return nil
13446}
13447
13448// result is the default implementation for VirtualMachineScaleSetExtensionsDeleteFuture.Result.
13449func (future *VirtualMachineScaleSetExtensionsDeleteFuture) result(client VirtualMachineScaleSetExtensionsClient) (ar autorest.Response, err error) {
13450	var done bool
13451	done, err = future.DoneWithContext(context.Background(), client)
13452	if err != nil {
13453		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
13454		return
13455	}
13456	if !done {
13457		ar.Response = future.Response()
13458		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
13459		return
13460	}
13461	ar.Response = future.Response()
13462	return
13463}
13464
13465// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of
13466// a long-running operation.
13467type VirtualMachineScaleSetExtensionsUpdateFuture struct {
13468	azure.FutureAPI
13469	// Result returns the result of the asynchronous operation.
13470	// If the operation has not completed it will return an error.
13471	Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
13472}
13473
13474// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13475func (future *VirtualMachineScaleSetExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
13476	var azFuture azure.Future
13477	if err := json.Unmarshal(body, &azFuture); err != nil {
13478		return err
13479	}
13480	future.FutureAPI = &azFuture
13481	future.Result = future.result
13482	return nil
13483}
13484
13485// result is the default implementation for VirtualMachineScaleSetExtensionsUpdateFuture.Result.
13486func (future *VirtualMachineScaleSetExtensionsUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
13487	var done bool
13488	done, err = future.DoneWithContext(context.Background(), client)
13489	if err != nil {
13490		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
13491		return
13492	}
13493	if !done {
13494		vmsse.Response.Response = future.Response()
13495		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsUpdateFuture")
13496		return
13497	}
13498	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13499	if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
13500		vmsse, err = client.UpdateResponder(vmsse.Response.Response)
13501		if err != nil {
13502			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
13503		}
13504	}
13505	return
13506}
13507
13508// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension.
13509type VirtualMachineScaleSetExtensionUpdate struct {
13510	// Name - READ-ONLY; The name of the extension.
13511	Name *string `json:"name,omitempty"`
13512	// Type - READ-ONLY; Resource type
13513	Type                                       *string `json:"type,omitempty"`
13514	*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
13515	// ID - READ-ONLY; Resource Id
13516	ID *string `json:"id,omitempty"`
13517}
13518
13519// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionUpdate.
13520func (vmsseu VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) {
13521	objectMap := make(map[string]interface{})
13522	if vmsseu.VirtualMachineScaleSetExtensionProperties != nil {
13523		objectMap["properties"] = vmsseu.VirtualMachineScaleSetExtensionProperties
13524	}
13525	return json.Marshal(objectMap)
13526}
13527
13528// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtensionUpdate struct.
13529func (vmsseu *VirtualMachineScaleSetExtensionUpdate) UnmarshalJSON(body []byte) error {
13530	var m map[string]*json.RawMessage
13531	err := json.Unmarshal(body, &m)
13532	if err != nil {
13533		return err
13534	}
13535	for k, v := range m {
13536		switch k {
13537		case "name":
13538			if v != nil {
13539				var name string
13540				err = json.Unmarshal(*v, &name)
13541				if err != nil {
13542					return err
13543				}
13544				vmsseu.Name = &name
13545			}
13546		case "type":
13547			if v != nil {
13548				var typeVar string
13549				err = json.Unmarshal(*v, &typeVar)
13550				if err != nil {
13551					return err
13552				}
13553				vmsseu.Type = &typeVar
13554			}
13555		case "properties":
13556			if v != nil {
13557				var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
13558				err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
13559				if err != nil {
13560					return err
13561				}
13562				vmsseu.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
13563			}
13564		case "id":
13565			if v != nil {
13566				var ID string
13567				err = json.Unmarshal(*v, &ID)
13568				if err != nil {
13569					return err
13570				}
13571				vmsseu.ID = &ID
13572			}
13573		}
13574	}
13575
13576	return nil
13577}
13578
13579// VirtualMachineScaleSetIdentity identity for the virtual machine scale set.
13580type VirtualMachineScaleSetIdentity struct {
13581	// PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity.
13582	PrincipalID *string `json:"principalId,omitempty"`
13583	// TenantID - READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity.
13584	TenantID *string `json:"tenantId,omitempty"`
13585	// 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'
13586	Type ResourceIdentityType `json:"type,omitempty"`
13587	// 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}'.
13588	UserAssignedIdentities map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
13589}
13590
13591// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentity.
13592func (vmssi VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) {
13593	objectMap := make(map[string]interface{})
13594	if vmssi.Type != "" {
13595		objectMap["type"] = vmssi.Type
13596	}
13597	if vmssi.UserAssignedIdentities != nil {
13598		objectMap["userAssignedIdentities"] = vmssi.UserAssignedIdentities
13599	}
13600	return json.Marshal(objectMap)
13601}
13602
13603// VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue ...
13604type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct {
13605	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
13606	PrincipalID *string `json:"principalId,omitempty"`
13607	// ClientID - READ-ONLY; The client id of user assigned identity.
13608	ClientID *string `json:"clientId,omitempty"`
13609}
13610
13611// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue.
13612func (vmssiAiv VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
13613	objectMap := make(map[string]interface{})
13614	return json.Marshal(objectMap)
13615}
13616
13617// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set.
13618type VirtualMachineScaleSetInstanceView struct {
13619	autorest.Response `json:"-"`
13620	// VirtualMachine - READ-ONLY; The instance view status summary for the virtual machine scale set.
13621	VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"`
13622	// Extensions - READ-ONLY; The extensions information.
13623	Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"`
13624	// Statuses - The resource status information.
13625	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
13626	// OrchestrationServices - READ-ONLY; The orchestration services information.
13627	OrchestrationServices *[]OrchestrationServiceSummary `json:"orchestrationServices,omitempty"`
13628}
13629
13630// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceView.
13631func (vmssiv VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) {
13632	objectMap := make(map[string]interface{})
13633	if vmssiv.Statuses != nil {
13634		objectMap["statuses"] = vmssiv.Statuses
13635	}
13636	return json.Marshal(objectMap)
13637}
13638
13639// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of
13640// a virtual machine scale set.
13641type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
13642	// StatusesSummary - READ-ONLY; The extensions information.
13643	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
13644}
13645
13646// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceViewStatusesSummary.
13647func (vmssivss VirtualMachineScaleSetInstanceViewStatusesSummary) MarshalJSON() ([]byte, error) {
13648	objectMap := make(map[string]interface{})
13649	return json.Marshal(objectMap)
13650}
13651
13652// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP
13653// configuration.
13654type VirtualMachineScaleSetIPConfiguration struct {
13655	// Name - The IP configuration name.
13656	Name                                             *string `json:"name,omitempty"`
13657	*VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"`
13658	// ID - Resource Id
13659	ID *string `json:"id,omitempty"`
13660}
13661
13662// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIPConfiguration.
13663func (vmssic VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) {
13664	objectMap := make(map[string]interface{})
13665	if vmssic.Name != nil {
13666		objectMap["name"] = vmssic.Name
13667	}
13668	if vmssic.VirtualMachineScaleSetIPConfigurationProperties != nil {
13669		objectMap["properties"] = vmssic.VirtualMachineScaleSetIPConfigurationProperties
13670	}
13671	if vmssic.ID != nil {
13672		objectMap["id"] = vmssic.ID
13673	}
13674	return json.Marshal(objectMap)
13675}
13676
13677// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetIPConfiguration struct.
13678func (vmssic *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(body []byte) error {
13679	var m map[string]*json.RawMessage
13680	err := json.Unmarshal(body, &m)
13681	if err != nil {
13682		return err
13683	}
13684	for k, v := range m {
13685		switch k {
13686		case "name":
13687			if v != nil {
13688				var name string
13689				err = json.Unmarshal(*v, &name)
13690				if err != nil {
13691					return err
13692				}
13693				vmssic.Name = &name
13694			}
13695		case "properties":
13696			if v != nil {
13697				var virtualMachineScaleSetIPConfigurationProperties VirtualMachineScaleSetIPConfigurationProperties
13698				err = json.Unmarshal(*v, &virtualMachineScaleSetIPConfigurationProperties)
13699				if err != nil {
13700					return err
13701				}
13702				vmssic.VirtualMachineScaleSetIPConfigurationProperties = &virtualMachineScaleSetIPConfigurationProperties
13703			}
13704		case "id":
13705			if v != nil {
13706				var ID string
13707				err = json.Unmarshal(*v, &ID)
13708				if err != nil {
13709					return err
13710				}
13711				vmssic.ID = &ID
13712			}
13713		}
13714	}
13715
13716	return nil
13717}
13718
13719// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's
13720// IP configuration properties.
13721type VirtualMachineScaleSetIPConfigurationProperties struct {
13722	// Subnet - Specifies the identifier of the subnet.
13723	Subnet *APIEntityReference `json:"subnet,omitempty"`
13724	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
13725	Primary *bool `json:"primary,omitempty"`
13726	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
13727	PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
13728	// 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'
13729	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
13730	// 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.
13731	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
13732	// ApplicationSecurityGroups - Specifies an array of references to application security group.
13733	ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
13734	// 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 basic sku load balancer.
13735	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
13736	// 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 basic sku load balancer.
13737	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
13738}
13739
13740// VirtualMachineScaleSetIPTag contains the IP tag associated with the public IP address.
13741type VirtualMachineScaleSetIPTag struct {
13742	// IPTagType - IP tag type. Example: FirstPartyUsage.
13743	IPTagType *string `json:"ipTagType,omitempty"`
13744	// Tag - IP tag associated with the public IP. Example: SQL, Storage etc.
13745	Tag *string `json:"tag,omitempty"`
13746}
13747
13748// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History
13749// operation response.
13750type VirtualMachineScaleSetListOSUpgradeHistory struct {
13751	autorest.Response `json:"-"`
13752	// Value - The list of OS upgrades performed on the virtual machine scale set.
13753	Value *[]UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"`
13754	// 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.
13755	NextLink *string `json:"nextLink,omitempty"`
13756}
13757
13758// VirtualMachineScaleSetListOSUpgradeHistoryIterator provides access to a complete listing of
13759// UpgradeOperationHistoricalStatusInfo values.
13760type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct {
13761	i    int
13762	page VirtualMachineScaleSetListOSUpgradeHistoryPage
13763}
13764
13765// NextWithContext advances to the next value.  If there was an error making
13766// the request the iterator does not advance and the error is returned.
13767func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) {
13768	if tracing.IsEnabled() {
13769		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.NextWithContext")
13770		defer func() {
13771			sc := -1
13772			if iter.Response().Response.Response != nil {
13773				sc = iter.Response().Response.Response.StatusCode
13774			}
13775			tracing.EndSpan(ctx, sc, err)
13776		}()
13777	}
13778	iter.i++
13779	if iter.i < len(iter.page.Values()) {
13780		return nil
13781	}
13782	err = iter.page.NextWithContext(ctx)
13783	if err != nil {
13784		iter.i--
13785		return err
13786	}
13787	iter.i = 0
13788	return nil
13789}
13790
13791// Next advances to the next value.  If there was an error making
13792// the request the iterator does not advance and the error is returned.
13793// Deprecated: Use NextWithContext() instead.
13794func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error {
13795	return iter.NextWithContext(context.Background())
13796}
13797
13798// NotDone returns true if the enumeration should be started or is not yet complete.
13799func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) NotDone() bool {
13800	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13801}
13802
13803// Response returns the raw server response from the last page request.
13804func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Response() VirtualMachineScaleSetListOSUpgradeHistory {
13805	return iter.page.Response()
13806}
13807
13808// Value returns the current value or a zero-initialized value if the
13809// iterator has advanced beyond the end of the collection.
13810func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOperationHistoricalStatusInfo {
13811	if !iter.page.NotDone() {
13812		return UpgradeOperationHistoricalStatusInfo{}
13813	}
13814	return iter.page.Values()[iter.i]
13815}
13816
13817// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type.
13818func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator {
13819	return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page}
13820}
13821
13822// IsEmpty returns true if the ListResult contains no values.
13823func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool {
13824	return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0
13825}
13826
13827// hasNextLink returns true if the NextLink is not empty.
13828func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) hasNextLink() bool {
13829	return vmsslouh.NextLink != nil && len(*vmsslouh.NextLink) != 0
13830}
13831
13832// virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results.
13833// It returns nil if no more results exist.
13834func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) {
13835	if !vmsslouh.hasNextLink() {
13836		return nil, nil
13837	}
13838	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13839		autorest.AsJSON(),
13840		autorest.AsGet(),
13841		autorest.WithBaseURL(to.String(vmsslouh.NextLink)))
13842}
13843
13844// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo
13845// values.
13846type VirtualMachineScaleSetListOSUpgradeHistoryPage struct {
13847	fn       func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)
13848	vmsslouh VirtualMachineScaleSetListOSUpgradeHistory
13849}
13850
13851// NextWithContext advances to the next page of values.  If there was an error making
13852// the request the page does not advance and the error is returned.
13853func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) {
13854	if tracing.IsEnabled() {
13855		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.NextWithContext")
13856		defer func() {
13857			sc := -1
13858			if page.Response().Response.Response != nil {
13859				sc = page.Response().Response.Response.StatusCode
13860			}
13861			tracing.EndSpan(ctx, sc, err)
13862		}()
13863	}
13864	for {
13865		next, err := page.fn(ctx, page.vmsslouh)
13866		if err != nil {
13867			return err
13868		}
13869		page.vmsslouh = next
13870		if !next.hasNextLink() || !next.IsEmpty() {
13871			break
13872		}
13873	}
13874	return nil
13875}
13876
13877// Next advances to the next page of values.  If there was an error making
13878// the request the page does not advance and the error is returned.
13879// Deprecated: Use NextWithContext() instead.
13880func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error {
13881	return page.NextWithContext(context.Background())
13882}
13883
13884// NotDone returns true if the page enumeration should be started or is not yet complete.
13885func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool {
13886	return !page.vmsslouh.IsEmpty()
13887}
13888
13889// Response returns the raw server response from the last page request.
13890func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Response() VirtualMachineScaleSetListOSUpgradeHistory {
13891	return page.vmsslouh
13892}
13893
13894// Values returns the slice of values for the current page or nil if there are no values.
13895func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOperationHistoricalStatusInfo {
13896	if page.vmsslouh.IsEmpty() {
13897		return nil
13898	}
13899	return *page.vmsslouh.Value
13900}
13901
13902// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type.
13903func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(cur VirtualMachineScaleSetListOSUpgradeHistory, getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage {
13904	return VirtualMachineScaleSetListOSUpgradeHistoryPage{
13905		fn:       getNextPage,
13906		vmsslouh: cur,
13907	}
13908}
13909
13910// VirtualMachineScaleSetListResult the List Virtual Machine operation response.
13911type VirtualMachineScaleSetListResult struct {
13912	autorest.Response `json:"-"`
13913	// Value - The list of virtual machine scale sets.
13914	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
13915	// NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS.
13916	NextLink *string `json:"nextLink,omitempty"`
13917}
13918
13919// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet
13920// values.
13921type VirtualMachineScaleSetListResultIterator struct {
13922	i    int
13923	page VirtualMachineScaleSetListResultPage
13924}
13925
13926// NextWithContext advances to the next value.  If there was an error making
13927// the request the iterator does not advance and the error is returned.
13928func (iter *VirtualMachineScaleSetListResultIterator) NextWithContext(ctx context.Context) (err error) {
13929	if tracing.IsEnabled() {
13930		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultIterator.NextWithContext")
13931		defer func() {
13932			sc := -1
13933			if iter.Response().Response.Response != nil {
13934				sc = iter.Response().Response.Response.StatusCode
13935			}
13936			tracing.EndSpan(ctx, sc, err)
13937		}()
13938	}
13939	iter.i++
13940	if iter.i < len(iter.page.Values()) {
13941		return nil
13942	}
13943	err = iter.page.NextWithContext(ctx)
13944	if err != nil {
13945		iter.i--
13946		return err
13947	}
13948	iter.i = 0
13949	return nil
13950}
13951
13952// Next advances to the next value.  If there was an error making
13953// the request the iterator does not advance and the error is returned.
13954// Deprecated: Use NextWithContext() instead.
13955func (iter *VirtualMachineScaleSetListResultIterator) Next() error {
13956	return iter.NextWithContext(context.Background())
13957}
13958
13959// NotDone returns true if the enumeration should be started or is not yet complete.
13960func (iter VirtualMachineScaleSetListResultIterator) NotDone() bool {
13961	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13962}
13963
13964// Response returns the raw server response from the last page request.
13965func (iter VirtualMachineScaleSetListResultIterator) Response() VirtualMachineScaleSetListResult {
13966	return iter.page.Response()
13967}
13968
13969// Value returns the current value or a zero-initialized value if the
13970// iterator has advanced beyond the end of the collection.
13971func (iter VirtualMachineScaleSetListResultIterator) Value() VirtualMachineScaleSet {
13972	if !iter.page.NotDone() {
13973		return VirtualMachineScaleSet{}
13974	}
13975	return iter.page.Values()[iter.i]
13976}
13977
13978// Creates a new instance of the VirtualMachineScaleSetListResultIterator type.
13979func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator {
13980	return VirtualMachineScaleSetListResultIterator{page: page}
13981}
13982
13983// IsEmpty returns true if the ListResult contains no values.
13984func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool {
13985	return vmsslr.Value == nil || len(*vmsslr.Value) == 0
13986}
13987
13988// hasNextLink returns true if the NextLink is not empty.
13989func (vmsslr VirtualMachineScaleSetListResult) hasNextLink() bool {
13990	return vmsslr.NextLink != nil && len(*vmsslr.NextLink) != 0
13991}
13992
13993// virtualMachineScaleSetListResultPreparer prepares a request to retrieve the next set of results.
13994// It returns nil if no more results exist.
13995func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer(ctx context.Context) (*http.Request, error) {
13996	if !vmsslr.hasNextLink() {
13997		return nil, nil
13998	}
13999	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14000		autorest.AsJSON(),
14001		autorest.AsGet(),
14002		autorest.WithBaseURL(to.String(vmsslr.NextLink)))
14003}
14004
14005// VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values.
14006type VirtualMachineScaleSetListResultPage struct {
14007	fn     func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)
14008	vmsslr VirtualMachineScaleSetListResult
14009}
14010
14011// NextWithContext advances to the next page of values.  If there was an error making
14012// the request the page does not advance and the error is returned.
14013func (page *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error) {
14014	if tracing.IsEnabled() {
14015		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultPage.NextWithContext")
14016		defer func() {
14017			sc := -1
14018			if page.Response().Response.Response != nil {
14019				sc = page.Response().Response.Response.StatusCode
14020			}
14021			tracing.EndSpan(ctx, sc, err)
14022		}()
14023	}
14024	for {
14025		next, err := page.fn(ctx, page.vmsslr)
14026		if err != nil {
14027			return err
14028		}
14029		page.vmsslr = next
14030		if !next.hasNextLink() || !next.IsEmpty() {
14031			break
14032		}
14033	}
14034	return nil
14035}
14036
14037// Next advances to the next page of values.  If there was an error making
14038// the request the page does not advance and the error is returned.
14039// Deprecated: Use NextWithContext() instead.
14040func (page *VirtualMachineScaleSetListResultPage) Next() error {
14041	return page.NextWithContext(context.Background())
14042}
14043
14044// NotDone returns true if the page enumeration should be started or is not yet complete.
14045func (page VirtualMachineScaleSetListResultPage) NotDone() bool {
14046	return !page.vmsslr.IsEmpty()
14047}
14048
14049// Response returns the raw server response from the last page request.
14050func (page VirtualMachineScaleSetListResultPage) Response() VirtualMachineScaleSetListResult {
14051	return page.vmsslr
14052}
14053
14054// Values returns the slice of values for the current page or nil if there are no values.
14055func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleSet {
14056	if page.vmsslr.IsEmpty() {
14057		return nil
14058	}
14059	return *page.vmsslr.Value
14060}
14061
14062// Creates a new instance of the VirtualMachineScaleSetListResultPage type.
14063func NewVirtualMachineScaleSetListResultPage(cur VirtualMachineScaleSetListResult, getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
14064	return VirtualMachineScaleSetListResultPage{
14065		fn:     getNextPage,
14066		vmsslr: cur,
14067	}
14068}
14069
14070// VirtualMachineScaleSetListSkusResult the Virtual Machine Scale Set List Skus operation response.
14071type VirtualMachineScaleSetListSkusResult struct {
14072	autorest.Response `json:"-"`
14073	// Value - The list of skus available for the virtual machine scale set.
14074	Value *[]VirtualMachineScaleSetSku `json:"value,omitempty"`
14075	// 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.
14076	NextLink *string `json:"nextLink,omitempty"`
14077}
14078
14079// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of
14080// VirtualMachineScaleSetSku values.
14081type VirtualMachineScaleSetListSkusResultIterator struct {
14082	i    int
14083	page VirtualMachineScaleSetListSkusResultPage
14084}
14085
14086// NextWithContext advances to the next value.  If there was an error making
14087// the request the iterator does not advance and the error is returned.
14088func (iter *VirtualMachineScaleSetListSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
14089	if tracing.IsEnabled() {
14090		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultIterator.NextWithContext")
14091		defer func() {
14092			sc := -1
14093			if iter.Response().Response.Response != nil {
14094				sc = iter.Response().Response.Response.StatusCode
14095			}
14096			tracing.EndSpan(ctx, sc, err)
14097		}()
14098	}
14099	iter.i++
14100	if iter.i < len(iter.page.Values()) {
14101		return nil
14102	}
14103	err = iter.page.NextWithContext(ctx)
14104	if err != nil {
14105		iter.i--
14106		return err
14107	}
14108	iter.i = 0
14109	return nil
14110}
14111
14112// Next advances to the next value.  If there was an error making
14113// the request the iterator does not advance and the error is returned.
14114// Deprecated: Use NextWithContext() instead.
14115func (iter *VirtualMachineScaleSetListSkusResultIterator) Next() error {
14116	return iter.NextWithContext(context.Background())
14117}
14118
14119// NotDone returns true if the enumeration should be started or is not yet complete.
14120func (iter VirtualMachineScaleSetListSkusResultIterator) NotDone() bool {
14121	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14122}
14123
14124// Response returns the raw server response from the last page request.
14125func (iter VirtualMachineScaleSetListSkusResultIterator) Response() VirtualMachineScaleSetListSkusResult {
14126	return iter.page.Response()
14127}
14128
14129// Value returns the current value or a zero-initialized value if the
14130// iterator has advanced beyond the end of the collection.
14131func (iter VirtualMachineScaleSetListSkusResultIterator) Value() VirtualMachineScaleSetSku {
14132	if !iter.page.NotDone() {
14133		return VirtualMachineScaleSetSku{}
14134	}
14135	return iter.page.Values()[iter.i]
14136}
14137
14138// Creates a new instance of the VirtualMachineScaleSetListSkusResultIterator type.
14139func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator {
14140	return VirtualMachineScaleSetListSkusResultIterator{page: page}
14141}
14142
14143// IsEmpty returns true if the ListResult contains no values.
14144func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool {
14145	return vmsslsr.Value == nil || len(*vmsslsr.Value) == 0
14146}
14147
14148// hasNextLink returns true if the NextLink is not empty.
14149func (vmsslsr VirtualMachineScaleSetListSkusResult) hasNextLink() bool {
14150	return vmsslsr.NextLink != nil && len(*vmsslsr.NextLink) != 0
14151}
14152
14153// virtualMachineScaleSetListSkusResultPreparer prepares a request to retrieve the next set of results.
14154// It returns nil if no more results exist.
14155func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer(ctx context.Context) (*http.Request, error) {
14156	if !vmsslsr.hasNextLink() {
14157		return nil, nil
14158	}
14159	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14160		autorest.AsJSON(),
14161		autorest.AsGet(),
14162		autorest.WithBaseURL(to.String(vmsslsr.NextLink)))
14163}
14164
14165// VirtualMachineScaleSetListSkusResultPage contains a page of VirtualMachineScaleSetSku values.
14166type VirtualMachineScaleSetListSkusResultPage struct {
14167	fn      func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)
14168	vmsslsr VirtualMachineScaleSetListSkusResult
14169}
14170
14171// NextWithContext advances to the next page of values.  If there was an error making
14172// the request the page does not advance and the error is returned.
14173func (page *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx context.Context) (err error) {
14174	if tracing.IsEnabled() {
14175		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultPage.NextWithContext")
14176		defer func() {
14177			sc := -1
14178			if page.Response().Response.Response != nil {
14179				sc = page.Response().Response.Response.StatusCode
14180			}
14181			tracing.EndSpan(ctx, sc, err)
14182		}()
14183	}
14184	for {
14185		next, err := page.fn(ctx, page.vmsslsr)
14186		if err != nil {
14187			return err
14188		}
14189		page.vmsslsr = next
14190		if !next.hasNextLink() || !next.IsEmpty() {
14191			break
14192		}
14193	}
14194	return nil
14195}
14196
14197// Next advances to the next page of values.  If there was an error making
14198// the request the page does not advance and the error is returned.
14199// Deprecated: Use NextWithContext() instead.
14200func (page *VirtualMachineScaleSetListSkusResultPage) Next() error {
14201	return page.NextWithContext(context.Background())
14202}
14203
14204// NotDone returns true if the page enumeration should be started or is not yet complete.
14205func (page VirtualMachineScaleSetListSkusResultPage) NotDone() bool {
14206	return !page.vmsslsr.IsEmpty()
14207}
14208
14209// Response returns the raw server response from the last page request.
14210func (page VirtualMachineScaleSetListSkusResultPage) Response() VirtualMachineScaleSetListSkusResult {
14211	return page.vmsslsr
14212}
14213
14214// Values returns the slice of values for the current page or nil if there are no values.
14215func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineScaleSetSku {
14216	if page.vmsslsr.IsEmpty() {
14217		return nil
14218	}
14219	return *page.vmsslsr.Value
14220}
14221
14222// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type.
14223func NewVirtualMachineScaleSetListSkusResultPage(cur VirtualMachineScaleSetListSkusResult, getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
14224	return VirtualMachineScaleSetListSkusResultPage{
14225		fn:      getNextPage,
14226		vmsslsr: cur,
14227	}
14228}
14229
14230// VirtualMachineScaleSetListWithLinkResult the List Virtual Machine operation response.
14231type VirtualMachineScaleSetListWithLinkResult struct {
14232	autorest.Response `json:"-"`
14233	// Value - The list of virtual machine scale sets.
14234	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
14235	// 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.
14236	NextLink *string `json:"nextLink,omitempty"`
14237}
14238
14239// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of
14240// VirtualMachineScaleSet values.
14241type VirtualMachineScaleSetListWithLinkResultIterator struct {
14242	i    int
14243	page VirtualMachineScaleSetListWithLinkResultPage
14244}
14245
14246// NextWithContext advances to the next value.  If there was an error making
14247// the request the iterator does not advance and the error is returned.
14248func (iter *VirtualMachineScaleSetListWithLinkResultIterator) NextWithContext(ctx context.Context) (err error) {
14249	if tracing.IsEnabled() {
14250		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultIterator.NextWithContext")
14251		defer func() {
14252			sc := -1
14253			if iter.Response().Response.Response != nil {
14254				sc = iter.Response().Response.Response.StatusCode
14255			}
14256			tracing.EndSpan(ctx, sc, err)
14257		}()
14258	}
14259	iter.i++
14260	if iter.i < len(iter.page.Values()) {
14261		return nil
14262	}
14263	err = iter.page.NextWithContext(ctx)
14264	if err != nil {
14265		iter.i--
14266		return err
14267	}
14268	iter.i = 0
14269	return nil
14270}
14271
14272// Next advances to the next value.  If there was an error making
14273// the request the iterator does not advance and the error is returned.
14274// Deprecated: Use NextWithContext() instead.
14275func (iter *VirtualMachineScaleSetListWithLinkResultIterator) Next() error {
14276	return iter.NextWithContext(context.Background())
14277}
14278
14279// NotDone returns true if the enumeration should be started or is not yet complete.
14280func (iter VirtualMachineScaleSetListWithLinkResultIterator) NotDone() bool {
14281	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14282}
14283
14284// Response returns the raw server response from the last page request.
14285func (iter VirtualMachineScaleSetListWithLinkResultIterator) Response() VirtualMachineScaleSetListWithLinkResult {
14286	return iter.page.Response()
14287}
14288
14289// Value returns the current value or a zero-initialized value if the
14290// iterator has advanced beyond the end of the collection.
14291func (iter VirtualMachineScaleSetListWithLinkResultIterator) Value() VirtualMachineScaleSet {
14292	if !iter.page.NotDone() {
14293		return VirtualMachineScaleSet{}
14294	}
14295	return iter.page.Values()[iter.i]
14296}
14297
14298// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultIterator type.
14299func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator {
14300	return VirtualMachineScaleSetListWithLinkResultIterator{page: page}
14301}
14302
14303// IsEmpty returns true if the ListResult contains no values.
14304func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool {
14305	return vmsslwlr.Value == nil || len(*vmsslwlr.Value) == 0
14306}
14307
14308// hasNextLink returns true if the NextLink is not empty.
14309func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) hasNextLink() bool {
14310	return vmsslwlr.NextLink != nil && len(*vmsslwlr.NextLink) != 0
14311}
14312
14313// virtualMachineScaleSetListWithLinkResultPreparer prepares a request to retrieve the next set of results.
14314// It returns nil if no more results exist.
14315func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer(ctx context.Context) (*http.Request, error) {
14316	if !vmsslwlr.hasNextLink() {
14317		return nil, nil
14318	}
14319	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14320		autorest.AsJSON(),
14321		autorest.AsGet(),
14322		autorest.WithBaseURL(to.String(vmsslwlr.NextLink)))
14323}
14324
14325// VirtualMachineScaleSetListWithLinkResultPage contains a page of VirtualMachineScaleSet values.
14326type VirtualMachineScaleSetListWithLinkResultPage struct {
14327	fn       func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)
14328	vmsslwlr VirtualMachineScaleSetListWithLinkResult
14329}
14330
14331// NextWithContext advances to the next page of values.  If there was an error making
14332// the request the page does not advance and the error is returned.
14333func (page *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx context.Context) (err error) {
14334	if tracing.IsEnabled() {
14335		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultPage.NextWithContext")
14336		defer func() {
14337			sc := -1
14338			if page.Response().Response.Response != nil {
14339				sc = page.Response().Response.Response.StatusCode
14340			}
14341			tracing.EndSpan(ctx, sc, err)
14342		}()
14343	}
14344	for {
14345		next, err := page.fn(ctx, page.vmsslwlr)
14346		if err != nil {
14347			return err
14348		}
14349		page.vmsslwlr = next
14350		if !next.hasNextLink() || !next.IsEmpty() {
14351			break
14352		}
14353	}
14354	return nil
14355}
14356
14357// Next advances to the next page of values.  If there was an error making
14358// the request the page does not advance and the error is returned.
14359// Deprecated: Use NextWithContext() instead.
14360func (page *VirtualMachineScaleSetListWithLinkResultPage) Next() error {
14361	return page.NextWithContext(context.Background())
14362}
14363
14364// NotDone returns true if the page enumeration should be started or is not yet complete.
14365func (page VirtualMachineScaleSetListWithLinkResultPage) NotDone() bool {
14366	return !page.vmsslwlr.IsEmpty()
14367}
14368
14369// Response returns the raw server response from the last page request.
14370func (page VirtualMachineScaleSetListWithLinkResultPage) Response() VirtualMachineScaleSetListWithLinkResult {
14371	return page.vmsslwlr
14372}
14373
14374// Values returns the slice of values for the current page or nil if there are no values.
14375func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachineScaleSet {
14376	if page.vmsslwlr.IsEmpty() {
14377		return nil
14378	}
14379	return *page.vmsslwlr.Value
14380}
14381
14382// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type.
14383func NewVirtualMachineScaleSetListWithLinkResultPage(cur VirtualMachineScaleSetListWithLinkResult, getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
14384	return VirtualMachineScaleSetListWithLinkResultPage{
14385		fn:       getNextPage,
14386		vmsslwlr: cur,
14387	}
14388}
14389
14390// VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk.
14391type VirtualMachineScaleSetManagedDiskParameters struct {
14392	// 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', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
14393	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
14394	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
14395	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
14396}
14397
14398// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's
14399// network configurations.
14400type VirtualMachineScaleSetNetworkConfiguration struct {
14401	// Name - The network configuration name.
14402	Name                                                  *string `json:"name,omitempty"`
14403	*VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"`
14404	// ID - Resource Id
14405	ID *string `json:"id,omitempty"`
14406}
14407
14408// MarshalJSON is the custom marshaler for VirtualMachineScaleSetNetworkConfiguration.
14409func (vmssnc VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) {
14410	objectMap := make(map[string]interface{})
14411	if vmssnc.Name != nil {
14412		objectMap["name"] = vmssnc.Name
14413	}
14414	if vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties != nil {
14415		objectMap["properties"] = vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties
14416	}
14417	if vmssnc.ID != nil {
14418		objectMap["id"] = vmssnc.ID
14419	}
14420	return json.Marshal(objectMap)
14421}
14422
14423// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetNetworkConfiguration struct.
14424func (vmssnc *VirtualMachineScaleSetNetworkConfiguration) UnmarshalJSON(body []byte) error {
14425	var m map[string]*json.RawMessage
14426	err := json.Unmarshal(body, &m)
14427	if err != nil {
14428		return err
14429	}
14430	for k, v := range m {
14431		switch k {
14432		case "name":
14433			if v != nil {
14434				var name string
14435				err = json.Unmarshal(*v, &name)
14436				if err != nil {
14437					return err
14438				}
14439				vmssnc.Name = &name
14440			}
14441		case "properties":
14442			if v != nil {
14443				var virtualMachineScaleSetNetworkConfigurationProperties VirtualMachineScaleSetNetworkConfigurationProperties
14444				err = json.Unmarshal(*v, &virtualMachineScaleSetNetworkConfigurationProperties)
14445				if err != nil {
14446					return err
14447				}
14448				vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties = &virtualMachineScaleSetNetworkConfigurationProperties
14449			}
14450		case "id":
14451			if v != nil {
14452				var ID string
14453				err = json.Unmarshal(*v, &ID)
14454				if err != nil {
14455					return err
14456				}
14457				vmssnc.ID = &ID
14458			}
14459		}
14460	}
14461
14462	return nil
14463}
14464
14465// VirtualMachineScaleSetNetworkConfigurationDNSSettings describes a virtual machines scale sets network
14466// configuration's DNS settings.
14467type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
14468	// DNSServers - List of DNS servers IP addresses
14469	DNSServers *[]string `json:"dnsServers,omitempty"`
14470}
14471
14472// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network
14473// profile's IP configuration.
14474type VirtualMachineScaleSetNetworkConfigurationProperties struct {
14475	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
14476	Primary *bool `json:"primary,omitempty"`
14477	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
14478	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
14479	// EnableFpga - Specifies whether the network interface is FPGA networking-enabled.
14480	EnableFpga *bool `json:"enableFpga,omitempty"`
14481	// NetworkSecurityGroup - The network security group.
14482	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
14483	// DNSSettings - The dns settings to be applied on the network interfaces.
14484	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
14485	// IPConfigurations - Specifies the IP configurations of the network interface.
14486	IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"`
14487	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
14488	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
14489}
14490
14491// VirtualMachineScaleSetNetworkProfile describes a virtual machine scale set network profile.
14492type VirtualMachineScaleSetNetworkProfile struct {
14493	// 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}'.
14494	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
14495	// NetworkInterfaceConfigurations - The list of network configurations.
14496	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
14497}
14498
14499// VirtualMachineScaleSetOSDisk describes a virtual machine scale set operating system disk.
14500type VirtualMachineScaleSetOSDisk struct {
14501	// Name - The disk name.
14502	Name *string `json:"name,omitempty"`
14503	// 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'
14504	Caching CachingTypes `json:"caching,omitempty"`
14505	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
14506	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
14507	// 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'
14508	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
14509	// DiffDiskSettings - Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
14510	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
14511	// 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
14512	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
14513	// 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'
14514	OsType OperatingSystemTypes `json:"osType,omitempty"`
14515	// Image - Specifies information about the unmanaged user image to base the scale set on.
14516	Image *VirtualHardDisk `json:"image,omitempty"`
14517	// VhdContainers - Specifies the container urls that are used to store operating system disks for the scale set.
14518	VhdContainers *[]string `json:"vhdContainers,omitempty"`
14519	// ManagedDisk - The managed disk parameters.
14520	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
14521}
14522
14523// VirtualMachineScaleSetOSProfile describes a virtual machine scale set OS profile.
14524type VirtualMachineScaleSetOSProfile struct {
14525	// 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.
14526	ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"`
14527	// 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)
14528	AdminUsername *string `json:"adminUsername,omitempty"`
14529	// 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)
14530	AdminPassword *string `json:"adminPassword,omitempty"`
14531	// 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)
14532	CustomData *string `json:"customData,omitempty"`
14533	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
14534	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
14535	// 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).
14536	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
14537	// Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set.
14538	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
14539}
14540
14541// VirtualMachineScaleSetProperties describes the properties of a Virtual Machine Scale Set.
14542type VirtualMachineScaleSetProperties struct {
14543	// UpgradePolicy - The upgrade policy.
14544	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
14545	// AutomaticRepairsPolicy - Policy for automatic repairs.
14546	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
14547	// VirtualMachineProfile - The virtual machine profile.
14548	VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"`
14549	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
14550	ProvisioningState *string `json:"provisioningState,omitempty"`
14551	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
14552	Overprovision *bool `json:"overprovision,omitempty"`
14553	// 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.
14554	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
14555	// UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
14556	UniqueID *string `json:"uniqueId,omitempty"`
14557	// 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.
14558	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
14559	// ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.
14560	ZoneBalance *bool `json:"zoneBalance,omitempty"`
14561	// PlatformFaultDomainCount - Fault Domain count for each placement group.
14562	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
14563	// 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.
14564	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
14565	// HostGroup - Specifies information about the dedicated host group that the virtual machine scale set resides in. <br><br>Minimum api-version: 2020-06-01.
14566	HostGroup *SubResource `json:"hostGroup,omitempty"`
14567	// 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.
14568	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
14569	// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
14570	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
14571	// OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set. Possible values include: 'Uniform', 'Flexible'
14572	OrchestrationMode OrchestrationMode `json:"orchestrationMode,omitempty"`
14573}
14574
14575// MarshalJSON is the custom marshaler for VirtualMachineScaleSetProperties.
14576func (vmssp VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) {
14577	objectMap := make(map[string]interface{})
14578	if vmssp.UpgradePolicy != nil {
14579		objectMap["upgradePolicy"] = vmssp.UpgradePolicy
14580	}
14581	if vmssp.AutomaticRepairsPolicy != nil {
14582		objectMap["automaticRepairsPolicy"] = vmssp.AutomaticRepairsPolicy
14583	}
14584	if vmssp.VirtualMachineProfile != nil {
14585		objectMap["virtualMachineProfile"] = vmssp.VirtualMachineProfile
14586	}
14587	if vmssp.Overprovision != nil {
14588		objectMap["overprovision"] = vmssp.Overprovision
14589	}
14590	if vmssp.DoNotRunExtensionsOnOverprovisionedVMs != nil {
14591		objectMap["doNotRunExtensionsOnOverprovisionedVMs"] = vmssp.DoNotRunExtensionsOnOverprovisionedVMs
14592	}
14593	if vmssp.SinglePlacementGroup != nil {
14594		objectMap["singlePlacementGroup"] = vmssp.SinglePlacementGroup
14595	}
14596	if vmssp.ZoneBalance != nil {
14597		objectMap["zoneBalance"] = vmssp.ZoneBalance
14598	}
14599	if vmssp.PlatformFaultDomainCount != nil {
14600		objectMap["platformFaultDomainCount"] = vmssp.PlatformFaultDomainCount
14601	}
14602	if vmssp.ProximityPlacementGroup != nil {
14603		objectMap["proximityPlacementGroup"] = vmssp.ProximityPlacementGroup
14604	}
14605	if vmssp.HostGroup != nil {
14606		objectMap["hostGroup"] = vmssp.HostGroup
14607	}
14608	if vmssp.AdditionalCapabilities != nil {
14609		objectMap["additionalCapabilities"] = vmssp.AdditionalCapabilities
14610	}
14611	if vmssp.ScaleInPolicy != nil {
14612		objectMap["scaleInPolicy"] = vmssp.ScaleInPolicy
14613	}
14614	if vmssp.OrchestrationMode != "" {
14615		objectMap["orchestrationMode"] = vmssp.OrchestrationMode
14616	}
14617	return json.Marshal(objectMap)
14618}
14619
14620// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP
14621// Configuration's PublicIPAddress configuration
14622type VirtualMachineScaleSetPublicIPAddressConfiguration struct {
14623	// Name - The publicIP address configuration name.
14624	Name                                                          *string `json:"name,omitempty"`
14625	*VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"`
14626}
14627
14628// MarshalJSON is the custom marshaler for VirtualMachineScaleSetPublicIPAddressConfiguration.
14629func (vmsspiac VirtualMachineScaleSetPublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
14630	objectMap := make(map[string]interface{})
14631	if vmsspiac.Name != nil {
14632		objectMap["name"] = vmsspiac.Name
14633	}
14634	if vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties != nil {
14635		objectMap["properties"] = vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties
14636	}
14637	return json.Marshal(objectMap)
14638}
14639
14640// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetPublicIPAddressConfiguration struct.
14641func (vmsspiac *VirtualMachineScaleSetPublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
14642	var m map[string]*json.RawMessage
14643	err := json.Unmarshal(body, &m)
14644	if err != nil {
14645		return err
14646	}
14647	for k, v := range m {
14648		switch k {
14649		case "name":
14650			if v != nil {
14651				var name string
14652				err = json.Unmarshal(*v, &name)
14653				if err != nil {
14654					return err
14655				}
14656				vmsspiac.Name = &name
14657			}
14658		case "properties":
14659			if v != nil {
14660				var virtualMachineScaleSetPublicIPAddressConfigurationProperties VirtualMachineScaleSetPublicIPAddressConfigurationProperties
14661				err = json.Unmarshal(*v, &virtualMachineScaleSetPublicIPAddressConfigurationProperties)
14662				if err != nil {
14663					return err
14664				}
14665				vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties = &virtualMachineScaleSetPublicIPAddressConfigurationProperties
14666			}
14667		}
14668	}
14669
14670	return nil
14671}
14672
14673// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets
14674// network configuration's DNS settings.
14675type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct {
14676	// 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
14677	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
14678}
14679
14680// VirtualMachineScaleSetPublicIPAddressConfigurationProperties describes a virtual machines scale set IP
14681// Configuration's PublicIPAddress configuration
14682type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
14683	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
14684	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
14685	// DNSSettings - The dns settings to be applied on the publicIP addresses .
14686	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
14687	// IPTags - The list of IP tags associated with the public IP address.
14688	IPTags *[]VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"`
14689	// PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses.
14690	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
14691	// PublicIPAddressVersion - Available from Api-Version 2019-07-01 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'
14692	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
14693}
14694
14695// VirtualMachineScaleSetReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
14696type VirtualMachineScaleSetReimageParameters struct {
14697	// 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.
14698	InstanceIds *[]string `json:"instanceIds,omitempty"`
14699	// 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.
14700	TempDisk *bool `json:"tempDisk,omitempty"`
14701}
14702
14703// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the
14704// results of a long-running operation.
14705type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
14706	azure.FutureAPI
14707	// Result returns the result of the asynchronous operation.
14708	// If the operation has not completed it will return an error.
14709	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
14710}
14711
14712// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14713func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) UnmarshalJSON(body []byte) error {
14714	var azFuture azure.Future
14715	if err := json.Unmarshal(body, &azFuture); err != nil {
14716		return err
14717	}
14718	future.FutureAPI = &azFuture
14719	future.Result = future.result
14720	return nil
14721}
14722
14723// result is the default implementation for VirtualMachineScaleSetRollingUpgradesCancelFuture.Result.
14724func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
14725	var done bool
14726	done, err = future.DoneWithContext(context.Background(), client)
14727	if err != nil {
14728		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Polling failure")
14729		return
14730	}
14731	if !done {
14732		ar.Response = future.Response()
14733		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
14734		return
14735	}
14736	ar.Response = future.Response()
14737	return
14738}
14739
14740// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and
14741// retrieving the results of a long-running operation.
14742type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct {
14743	azure.FutureAPI
14744	// Result returns the result of the asynchronous operation.
14745	// If the operation has not completed it will return an error.
14746	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
14747}
14748
14749// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14750func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) UnmarshalJSON(body []byte) error {
14751	var azFuture azure.Future
14752	if err := json.Unmarshal(body, &azFuture); err != nil {
14753		return err
14754	}
14755	future.FutureAPI = &azFuture
14756	future.Result = future.result
14757	return nil
14758}
14759
14760// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.Result.
14761func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
14762	var done bool
14763	done, err = future.DoneWithContext(context.Background(), client)
14764	if err != nil {
14765		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture", "Result", future.Response(), "Polling failure")
14766		return
14767	}
14768	if !done {
14769		ar.Response = future.Response()
14770		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture")
14771		return
14772	}
14773	ar.Response = future.Response()
14774	return
14775}
14776
14777// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving
14778// the results of a long-running operation.
14779type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
14780	azure.FutureAPI
14781	// Result returns the result of the asynchronous operation.
14782	// If the operation has not completed it will return an error.
14783	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
14784}
14785
14786// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14787func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) UnmarshalJSON(body []byte) error {
14788	var azFuture azure.Future
14789	if err := json.Unmarshal(body, &azFuture); err != nil {
14790		return err
14791	}
14792	future.FutureAPI = &azFuture
14793	future.Result = future.result
14794	return nil
14795}
14796
14797// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.Result.
14798func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
14799	var done bool
14800	done, err = future.DoneWithContext(context.Background(), client)
14801	if err != nil {
14802		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Polling failure")
14803		return
14804	}
14805	if !done {
14806		ar.Response = future.Response()
14807		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
14808		return
14809	}
14810	ar.Response = future.Response()
14811	return
14812}
14813
14814// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
14815// a long-running operation.
14816type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
14817	azure.FutureAPI
14818	// Result returns the result of the asynchronous operation.
14819	// If the operation has not completed it will return an error.
14820	Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
14821}
14822
14823// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14824func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14825	var azFuture azure.Future
14826	if err := json.Unmarshal(body, &azFuture); err != nil {
14827		return err
14828	}
14829	future.FutureAPI = &azFuture
14830	future.Result = future.result
14831	return nil
14832}
14833
14834// result is the default implementation for VirtualMachineScaleSetsCreateOrUpdateFuture.Result.
14835func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
14836	var done bool
14837	done, err = future.DoneWithContext(context.Background(), client)
14838	if err != nil {
14839		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14840		return
14841	}
14842	if !done {
14843		vmss.Response.Response = future.Response()
14844		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
14845		return
14846	}
14847	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14848	if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
14849		vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
14850		if err != nil {
14851			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
14852		}
14853	}
14854	return
14855}
14856
14857// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a
14858// long-running operation.
14859type VirtualMachineScaleSetsDeallocateFuture struct {
14860	azure.FutureAPI
14861	// Result returns the result of the asynchronous operation.
14862	// If the operation has not completed it will return an error.
14863	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14864}
14865
14866// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14867func (future *VirtualMachineScaleSetsDeallocateFuture) UnmarshalJSON(body []byte) error {
14868	var azFuture azure.Future
14869	if err := json.Unmarshal(body, &azFuture); err != nil {
14870		return err
14871	}
14872	future.FutureAPI = &azFuture
14873	future.Result = future.result
14874	return nil
14875}
14876
14877// result is the default implementation for VirtualMachineScaleSetsDeallocateFuture.Result.
14878func (future *VirtualMachineScaleSetsDeallocateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14879	var done bool
14880	done, err = future.DoneWithContext(context.Background(), client)
14881	if err != nil {
14882		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Polling failure")
14883		return
14884	}
14885	if !done {
14886		ar.Response = future.Response()
14887		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
14888		return
14889	}
14890	ar.Response = future.Response()
14891	return
14892}
14893
14894// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
14895// long-running operation.
14896type VirtualMachineScaleSetsDeleteFuture struct {
14897	azure.FutureAPI
14898	// Result returns the result of the asynchronous operation.
14899	// If the operation has not completed it will return an error.
14900	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14901}
14902
14903// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14904func (future *VirtualMachineScaleSetsDeleteFuture) UnmarshalJSON(body []byte) error {
14905	var azFuture azure.Future
14906	if err := json.Unmarshal(body, &azFuture); err != nil {
14907		return err
14908	}
14909	future.FutureAPI = &azFuture
14910	future.Result = future.result
14911	return nil
14912}
14913
14914// result is the default implementation for VirtualMachineScaleSetsDeleteFuture.Result.
14915func (future *VirtualMachineScaleSetsDeleteFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14916	var done bool
14917	done, err = future.DoneWithContext(context.Background(), client)
14918	if err != nil {
14919		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Polling failure")
14920		return
14921	}
14922	if !done {
14923		ar.Response = future.Response()
14924		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
14925		return
14926	}
14927	ar.Response = future.Response()
14928	return
14929}
14930
14931// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of
14932// a long-running operation.
14933type VirtualMachineScaleSetsDeleteInstancesFuture struct {
14934	azure.FutureAPI
14935	// Result returns the result of the asynchronous operation.
14936	// If the operation has not completed it will return an error.
14937	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14938}
14939
14940// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14941func (future *VirtualMachineScaleSetsDeleteInstancesFuture) UnmarshalJSON(body []byte) error {
14942	var azFuture azure.Future
14943	if err := json.Unmarshal(body, &azFuture); err != nil {
14944		return err
14945	}
14946	future.FutureAPI = &azFuture
14947	future.Result = future.result
14948	return nil
14949}
14950
14951// result is the default implementation for VirtualMachineScaleSetsDeleteInstancesFuture.Result.
14952func (future *VirtualMachineScaleSetsDeleteInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14953	var done bool
14954	done, err = future.DoneWithContext(context.Background(), client)
14955	if err != nil {
14956		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Polling failure")
14957		return
14958	}
14959	if !done {
14960		ar.Response = future.Response()
14961		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
14962		return
14963	}
14964	ar.Response = future.Response()
14965	return
14966}
14967
14968// VirtualMachineScaleSetSku describes an available virtual machine scale set sku.
14969type VirtualMachineScaleSetSku struct {
14970	// ResourceType - READ-ONLY; The type of resource the sku applies to.
14971	ResourceType *string `json:"resourceType,omitempty"`
14972	// Sku - READ-ONLY; The Sku.
14973	Sku *Sku `json:"sku,omitempty"`
14974	// Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
14975	Capacity *VirtualMachineScaleSetSkuCapacity `json:"capacity,omitempty"`
14976}
14977
14978// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSku.
14979func (vmsss VirtualMachineScaleSetSku) MarshalJSON() ([]byte, error) {
14980	objectMap := make(map[string]interface{})
14981	return json.Marshal(objectMap)
14982}
14983
14984// VirtualMachineScaleSetSkuCapacity describes scaling information of a sku.
14985type VirtualMachineScaleSetSkuCapacity struct {
14986	// Minimum - READ-ONLY; The minimum capacity.
14987	Minimum *int64 `json:"minimum,omitempty"`
14988	// Maximum - READ-ONLY; The maximum capacity that can be set.
14989	Maximum *int64 `json:"maximum,omitempty"`
14990	// DefaultCapacity - READ-ONLY; The default capacity.
14991	DefaultCapacity *int64 `json:"defaultCapacity,omitempty"`
14992	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'VirtualMachineScaleSetSkuScaleTypeAutomatic', 'VirtualMachineScaleSetSkuScaleTypeNone'
14993	ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"`
14994}
14995
14996// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSkuCapacity.
14997func (vmsssc VirtualMachineScaleSetSkuCapacity) MarshalJSON() ([]byte, error) {
14998	objectMap := make(map[string]interface{})
14999	return json.Marshal(objectMap)
15000}
15001
15002// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results
15003// of a long-running operation.
15004type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
15005	azure.FutureAPI
15006	// Result returns the result of the asynchronous operation.
15007	// If the operation has not completed it will return an error.
15008	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
15009}
15010
15011// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15012func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
15013	var azFuture azure.Future
15014	if err := json.Unmarshal(body, &azFuture); err != nil {
15015		return err
15016	}
15017	future.FutureAPI = &azFuture
15018	future.Result = future.result
15019	return nil
15020}
15021
15022// result is the default implementation for VirtualMachineScaleSetsPerformMaintenanceFuture.Result.
15023func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
15024	var done bool
15025	done, err = future.DoneWithContext(context.Background(), client)
15026	if err != nil {
15027		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
15028		return
15029	}
15030	if !done {
15031		ar.Response = future.Response()
15032		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
15033		return
15034	}
15035	ar.Response = future.Response()
15036	return
15037}
15038
15039// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a
15040// long-running operation.
15041type VirtualMachineScaleSetsPowerOffFuture struct {
15042	azure.FutureAPI
15043	// Result returns the result of the asynchronous operation.
15044	// If the operation has not completed it will return an error.
15045	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
15046}
15047
15048// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15049func (future *VirtualMachineScaleSetsPowerOffFuture) UnmarshalJSON(body []byte) error {
15050	var azFuture azure.Future
15051	if err := json.Unmarshal(body, &azFuture); err != nil {
15052		return err
15053	}
15054	future.FutureAPI = &azFuture
15055	future.Result = future.result
15056	return nil
15057}
15058
15059// result is the default implementation for VirtualMachineScaleSetsPowerOffFuture.Result.
15060func (future *VirtualMachineScaleSetsPowerOffFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
15061	var done bool
15062	done, err = future.DoneWithContext(context.Background(), client)
15063	if err != nil {
15064		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Polling failure")
15065		return
15066	}
15067	if !done {
15068		ar.Response = future.Response()
15069		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
15070		return
15071	}
15072	ar.Response = future.Response()
15073	return
15074}
15075
15076// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a
15077// long-running operation.
15078type VirtualMachineScaleSetsRedeployFuture struct {
15079	azure.FutureAPI
15080	// Result returns the result of the asynchronous operation.
15081	// If the operation has not completed it will return an error.
15082	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
15083}
15084
15085// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15086func (future *VirtualMachineScaleSetsRedeployFuture) UnmarshalJSON(body []byte) error {
15087	var azFuture azure.Future
15088	if err := json.Unmarshal(body, &azFuture); err != nil {
15089		return err
15090	}
15091	future.FutureAPI = &azFuture
15092	future.Result = future.result
15093	return nil
15094}
15095
15096// result is the default implementation for VirtualMachineScaleSetsRedeployFuture.Result.
15097func (future *VirtualMachineScaleSetsRedeployFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
15098	var done bool
15099	done, err = future.DoneWithContext(context.Background(), client)
15100	if err != nil {
15101		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Polling failure")
15102		return
15103	}
15104	if !done {
15105		ar.Response = future.Response()
15106		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
15107		return
15108	}
15109	ar.Response = future.Response()
15110	return
15111}
15112
15113// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a
15114// long-running operation.
15115type VirtualMachineScaleSetsReimageAllFuture struct {
15116	azure.FutureAPI
15117	// Result returns the result of the asynchronous operation.
15118	// If the operation has not completed it will return an error.
15119	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
15120}
15121
15122// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15123func (future *VirtualMachineScaleSetsReimageAllFuture) UnmarshalJSON(body []byte) error {
15124	var azFuture azure.Future
15125	if err := json.Unmarshal(body, &azFuture); err != nil {
15126		return err
15127	}
15128	future.FutureAPI = &azFuture
15129	future.Result = future.result
15130	return nil
15131}
15132
15133// result is the default implementation for VirtualMachineScaleSetsReimageAllFuture.Result.
15134func (future *VirtualMachineScaleSetsReimageAllFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
15135	var done bool
15136	done, err = future.DoneWithContext(context.Background(), client)
15137	if err != nil {
15138		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Polling failure")
15139		return
15140	}
15141	if !done {
15142		ar.Response = future.Response()
15143		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
15144		return
15145	}
15146	ar.Response = future.Response()
15147	return
15148}
15149
15150// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a
15151// long-running operation.
15152type VirtualMachineScaleSetsReimageFuture struct {
15153	azure.FutureAPI
15154	// Result returns the result of the asynchronous operation.
15155	// If the operation has not completed it will return an error.
15156	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
15157}
15158
15159// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15160func (future *VirtualMachineScaleSetsReimageFuture) UnmarshalJSON(body []byte) error {
15161	var azFuture azure.Future
15162	if err := json.Unmarshal(body, &azFuture); err != nil {
15163		return err
15164	}
15165	future.FutureAPI = &azFuture
15166	future.Result = future.result
15167	return nil
15168}
15169
15170// result is the default implementation for VirtualMachineScaleSetsReimageFuture.Result.
15171func (future *VirtualMachineScaleSetsReimageFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
15172	var done bool
15173	done, err = future.DoneWithContext(context.Background(), client)
15174	if err != nil {
15175		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Polling failure")
15176		return
15177	}
15178	if !done {
15179		ar.Response = future.Response()
15180		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
15181		return
15182	}
15183	ar.Response = future.Response()
15184	return
15185}
15186
15187// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a
15188// long-running operation.
15189type VirtualMachineScaleSetsRestartFuture struct {
15190	azure.FutureAPI
15191	// Result returns the result of the asynchronous operation.
15192	// If the operation has not completed it will return an error.
15193	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
15194}
15195
15196// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15197func (future *VirtualMachineScaleSetsRestartFuture) UnmarshalJSON(body []byte) error {
15198	var azFuture azure.Future
15199	if err := json.Unmarshal(body, &azFuture); err != nil {
15200		return err
15201	}
15202	future.FutureAPI = &azFuture
15203	future.Result = future.result
15204	return nil
15205}
15206
15207// result is the default implementation for VirtualMachineScaleSetsRestartFuture.Result.
15208func (future *VirtualMachineScaleSetsRestartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
15209	var done bool
15210	done, err = future.DoneWithContext(context.Background(), client)
15211	if err != nil {
15212		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Polling failure")
15213		return
15214	}
15215	if !done {
15216		ar.Response = future.Response()
15217		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
15218		return
15219	}
15220	ar.Response = future.Response()
15221	return
15222}
15223
15224// VirtualMachineScaleSetsSetOrchestrationServiceStateFuture an abstraction for monitoring and retrieving
15225// the results of a long-running operation.
15226type VirtualMachineScaleSetsSetOrchestrationServiceStateFuture struct {
15227	azure.FutureAPI
15228	// Result returns the result of the asynchronous operation.
15229	// If the operation has not completed it will return an error.
15230	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
15231}
15232
15233// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15234func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) UnmarshalJSON(body []byte) error {
15235	var azFuture azure.Future
15236	if err := json.Unmarshal(body, &azFuture); err != nil {
15237		return err
15238	}
15239	future.FutureAPI = &azFuture
15240	future.Result = future.result
15241	return nil
15242}
15243
15244// result is the default implementation for VirtualMachineScaleSetsSetOrchestrationServiceStateFuture.Result.
15245func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
15246	var done bool
15247	done, err = future.DoneWithContext(context.Background(), client)
15248	if err != nil {
15249		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture", "Result", future.Response(), "Polling failure")
15250		return
15251	}
15252	if !done {
15253		ar.Response = future.Response()
15254		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture")
15255		return
15256	}
15257	ar.Response = future.Response()
15258	return
15259}
15260
15261// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a
15262// long-running operation.
15263type VirtualMachineScaleSetsStartFuture struct {
15264	azure.FutureAPI
15265	// Result returns the result of the asynchronous operation.
15266	// If the operation has not completed it will return an error.
15267	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
15268}
15269
15270// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15271func (future *VirtualMachineScaleSetsStartFuture) UnmarshalJSON(body []byte) error {
15272	var azFuture azure.Future
15273	if err := json.Unmarshal(body, &azFuture); err != nil {
15274		return err
15275	}
15276	future.FutureAPI = &azFuture
15277	future.Result = future.result
15278	return nil
15279}
15280
15281// result is the default implementation for VirtualMachineScaleSetsStartFuture.Result.
15282func (future *VirtualMachineScaleSetsStartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
15283	var done bool
15284	done, err = future.DoneWithContext(context.Background(), client)
15285	if err != nil {
15286		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Polling failure")
15287		return
15288	}
15289	if !done {
15290		ar.Response = future.Response()
15291		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
15292		return
15293	}
15294	ar.Response = future.Response()
15295	return
15296}
15297
15298// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile.
15299type VirtualMachineScaleSetStorageProfile struct {
15300	// 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.
15301	ImageReference *ImageReference `json:"imageReference,omitempty"`
15302	// 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).
15303	OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"`
15304	// 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).
15305	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
15306}
15307
15308// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
15309// long-running operation.
15310type VirtualMachineScaleSetsUpdateFuture struct {
15311	azure.FutureAPI
15312	// Result returns the result of the asynchronous operation.
15313	// If the operation has not completed it will return an error.
15314	Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
15315}
15316
15317// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15318func (future *VirtualMachineScaleSetsUpdateFuture) UnmarshalJSON(body []byte) error {
15319	var azFuture azure.Future
15320	if err := json.Unmarshal(body, &azFuture); err != nil {
15321		return err
15322	}
15323	future.FutureAPI = &azFuture
15324	future.Result = future.result
15325	return nil
15326}
15327
15328// result is the default implementation for VirtualMachineScaleSetsUpdateFuture.Result.
15329func (future *VirtualMachineScaleSetsUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
15330	var done bool
15331	done, err = future.DoneWithContext(context.Background(), client)
15332	if err != nil {
15333		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Polling failure")
15334		return
15335	}
15336	if !done {
15337		vmss.Response.Response = future.Response()
15338		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
15339		return
15340	}
15341	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15342	if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
15343		vmss, err = client.UpdateResponder(vmss.Response.Response)
15344		if err != nil {
15345			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
15346		}
15347	}
15348	return
15349}
15350
15351// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of
15352// a long-running operation.
15353type VirtualMachineScaleSetsUpdateInstancesFuture struct {
15354	azure.FutureAPI
15355	// Result returns the result of the asynchronous operation.
15356	// If the operation has not completed it will return an error.
15357	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
15358}
15359
15360// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15361func (future *VirtualMachineScaleSetsUpdateInstancesFuture) UnmarshalJSON(body []byte) error {
15362	var azFuture azure.Future
15363	if err := json.Unmarshal(body, &azFuture); err != nil {
15364		return err
15365	}
15366	future.FutureAPI = &azFuture
15367	future.Result = future.result
15368	return nil
15369}
15370
15371// result is the default implementation for VirtualMachineScaleSetsUpdateInstancesFuture.Result.
15372func (future *VirtualMachineScaleSetsUpdateInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
15373	var done bool
15374	done, err = future.DoneWithContext(context.Background(), client)
15375	if err != nil {
15376		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Polling failure")
15377		return
15378	}
15379	if !done {
15380		ar.Response = future.Response()
15381		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
15382		return
15383	}
15384	ar.Response = future.Response()
15385	return
15386}
15387
15388// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set.
15389type VirtualMachineScaleSetUpdate struct {
15390	// Sku - The virtual machine scale set sku.
15391	Sku *Sku `json:"sku,omitempty"`
15392	// Plan - The purchase plan when deploying a virtual machine scale set from VM Marketplace images.
15393	Plan                                    *Plan `json:"plan,omitempty"`
15394	*VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"`
15395	// Identity - The identity of the virtual machine scale set, if configured.
15396	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
15397	// Tags - Resource tags
15398	Tags map[string]*string `json:"tags"`
15399}
15400
15401// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate.
15402func (vmssu VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) {
15403	objectMap := make(map[string]interface{})
15404	if vmssu.Sku != nil {
15405		objectMap["sku"] = vmssu.Sku
15406	}
15407	if vmssu.Plan != nil {
15408		objectMap["plan"] = vmssu.Plan
15409	}
15410	if vmssu.VirtualMachineScaleSetUpdateProperties != nil {
15411		objectMap["properties"] = vmssu.VirtualMachineScaleSetUpdateProperties
15412	}
15413	if vmssu.Identity != nil {
15414		objectMap["identity"] = vmssu.Identity
15415	}
15416	if vmssu.Tags != nil {
15417		objectMap["tags"] = vmssu.Tags
15418	}
15419	return json.Marshal(objectMap)
15420}
15421
15422// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdate struct.
15423func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error {
15424	var m map[string]*json.RawMessage
15425	err := json.Unmarshal(body, &m)
15426	if err != nil {
15427		return err
15428	}
15429	for k, v := range m {
15430		switch k {
15431		case "sku":
15432			if v != nil {
15433				var sku Sku
15434				err = json.Unmarshal(*v, &sku)
15435				if err != nil {
15436					return err
15437				}
15438				vmssu.Sku = &sku
15439			}
15440		case "plan":
15441			if v != nil {
15442				var plan Plan
15443				err = json.Unmarshal(*v, &plan)
15444				if err != nil {
15445					return err
15446				}
15447				vmssu.Plan = &plan
15448			}
15449		case "properties":
15450			if v != nil {
15451				var virtualMachineScaleSetUpdateProperties VirtualMachineScaleSetUpdateProperties
15452				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateProperties)
15453				if err != nil {
15454					return err
15455				}
15456				vmssu.VirtualMachineScaleSetUpdateProperties = &virtualMachineScaleSetUpdateProperties
15457			}
15458		case "identity":
15459			if v != nil {
15460				var identity VirtualMachineScaleSetIdentity
15461				err = json.Unmarshal(*v, &identity)
15462				if err != nil {
15463					return err
15464				}
15465				vmssu.Identity = &identity
15466			}
15467		case "tags":
15468			if v != nil {
15469				var tags map[string]*string
15470				err = json.Unmarshal(*v, &tags)
15471				if err != nil {
15472					return err
15473				}
15474				vmssu.Tags = tags
15475			}
15476		}
15477	}
15478
15479	return nil
15480}
15481
15482// VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP
15483// configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the
15484// new subnet are in the same virtual network
15485type VirtualMachineScaleSetUpdateIPConfiguration struct {
15486	// Name - The IP configuration name.
15487	Name                                                   *string `json:"name,omitempty"`
15488	*VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"`
15489	// ID - Resource Id
15490	ID *string `json:"id,omitempty"`
15491}
15492
15493// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateIPConfiguration.
15494func (vmssuic VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) {
15495	objectMap := make(map[string]interface{})
15496	if vmssuic.Name != nil {
15497		objectMap["name"] = vmssuic.Name
15498	}
15499	if vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties != nil {
15500		objectMap["properties"] = vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties
15501	}
15502	if vmssuic.ID != nil {
15503		objectMap["id"] = vmssuic.ID
15504	}
15505	return json.Marshal(objectMap)
15506}
15507
15508// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateIPConfiguration struct.
15509func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body []byte) error {
15510	var m map[string]*json.RawMessage
15511	err := json.Unmarshal(body, &m)
15512	if err != nil {
15513		return err
15514	}
15515	for k, v := range m {
15516		switch k {
15517		case "name":
15518			if v != nil {
15519				var name string
15520				err = json.Unmarshal(*v, &name)
15521				if err != nil {
15522					return err
15523				}
15524				vmssuic.Name = &name
15525			}
15526		case "properties":
15527			if v != nil {
15528				var virtualMachineScaleSetUpdateIPConfigurationProperties VirtualMachineScaleSetUpdateIPConfigurationProperties
15529				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateIPConfigurationProperties)
15530				if err != nil {
15531					return err
15532				}
15533				vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties = &virtualMachineScaleSetUpdateIPConfigurationProperties
15534			}
15535		case "id":
15536			if v != nil {
15537				var ID string
15538				err = json.Unmarshal(*v, &ID)
15539				if err != nil {
15540					return err
15541				}
15542				vmssuic.ID = &ID
15543			}
15544		}
15545	}
15546
15547	return nil
15548}
15549
15550// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network
15551// profile's IP configuration properties.
15552type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
15553	// Subnet - The subnet.
15554	Subnet *APIEntityReference `json:"subnet,omitempty"`
15555	// Primary - Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.
15556	Primary *bool `json:"primary,omitempty"`
15557	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
15558	PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
15559	// 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'
15560	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
15561	// ApplicationGatewayBackendAddressPools - The application gateway backend address pools.
15562	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
15563	// ApplicationSecurityGroups - Specifies an array of references to application security group.
15564	ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
15565	// LoadBalancerBackendAddressPools - The load balancer backend address pools.
15566	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
15567	// LoadBalancerInboundNatPools - The load balancer inbound nat pools.
15568	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
15569}
15570
15571// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's
15572// network configurations.
15573type VirtualMachineScaleSetUpdateNetworkConfiguration struct {
15574	// Name - The network configuration name.
15575	Name                                                        *string `json:"name,omitempty"`
15576	*VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"`
15577	// ID - Resource Id
15578	ID *string `json:"id,omitempty"`
15579}
15580
15581// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateNetworkConfiguration.
15582func (vmssunc VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) {
15583	objectMap := make(map[string]interface{})
15584	if vmssunc.Name != nil {
15585		objectMap["name"] = vmssunc.Name
15586	}
15587	if vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties != nil {
15588		objectMap["properties"] = vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties
15589	}
15590	if vmssunc.ID != nil {
15591		objectMap["id"] = vmssunc.ID
15592	}
15593	return json.Marshal(objectMap)
15594}
15595
15596// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateNetworkConfiguration struct.
15597func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(body []byte) error {
15598	var m map[string]*json.RawMessage
15599	err := json.Unmarshal(body, &m)
15600	if err != nil {
15601		return err
15602	}
15603	for k, v := range m {
15604		switch k {
15605		case "name":
15606			if v != nil {
15607				var name string
15608				err = json.Unmarshal(*v, &name)
15609				if err != nil {
15610					return err
15611				}
15612				vmssunc.Name = &name
15613			}
15614		case "properties":
15615			if v != nil {
15616				var virtualMachineScaleSetUpdateNetworkConfigurationProperties VirtualMachineScaleSetUpdateNetworkConfigurationProperties
15617				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateNetworkConfigurationProperties)
15618				if err != nil {
15619					return err
15620				}
15621				vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties = &virtualMachineScaleSetUpdateNetworkConfigurationProperties
15622			}
15623		case "id":
15624			if v != nil {
15625				var ID string
15626				err = json.Unmarshal(*v, &ID)
15627				if err != nil {
15628					return err
15629				}
15630				vmssunc.ID = &ID
15631			}
15632		}
15633	}
15634
15635	return nil
15636}
15637
15638// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set
15639// updatable network profile's IP configuration.Use this object for updating network profile's IP
15640// Configuration.
15641type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct {
15642	// Primary - Whether this is a primary NIC on a virtual machine.
15643	Primary *bool `json:"primary,omitempty"`
15644	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
15645	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
15646	// EnableFpga - Specifies whether the network interface is FPGA networking-enabled.
15647	EnableFpga *bool `json:"enableFpga,omitempty"`
15648	// NetworkSecurityGroup - The network security group.
15649	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
15650	// DNSSettings - The dns settings to be applied on the network interfaces.
15651	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
15652	// IPConfigurations - The virtual machine scale set IP Configuration.
15653	IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"`
15654	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
15655	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
15656}
15657
15658// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile.
15659type VirtualMachineScaleSetUpdateNetworkProfile struct {
15660	// 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}'.
15661	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
15662	// NetworkInterfaceConfigurations - The list of network configurations.
15663	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
15664}
15665
15666// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update
15667// Object. This should be used for Updating VMSS OS Disk.
15668type VirtualMachineScaleSetUpdateOSDisk struct {
15669	// Caching - The caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
15670	Caching CachingTypes `json:"caching,omitempty"`
15671	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
15672	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
15673	// 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
15674	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
15675	// 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.
15676	Image *VirtualHardDisk `json:"image,omitempty"`
15677	// VhdContainers - The list of virtual hard disk container uris.
15678	VhdContainers *[]string `json:"vhdContainers,omitempty"`
15679	// ManagedDisk - The managed disk parameters.
15680	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
15681}
15682
15683// VirtualMachineScaleSetUpdateOSProfile describes a virtual machine scale set OS profile.
15684type VirtualMachineScaleSetUpdateOSProfile struct {
15685	// CustomData - A base-64 encoded string of custom data.
15686	CustomData *string `json:"customData,omitempty"`
15687	// WindowsConfiguration - The Windows Configuration of the OS profile.
15688	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
15689	// LinuxConfiguration - The Linux Configuration of the OS profile.
15690	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
15691	// Secrets - The List of certificates for addition to the VM.
15692	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
15693}
15694
15695// VirtualMachineScaleSetUpdateProperties describes the properties of a Virtual Machine Scale Set.
15696type VirtualMachineScaleSetUpdateProperties struct {
15697	// UpgradePolicy - The upgrade policy.
15698	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
15699	// AutomaticRepairsPolicy - Policy for automatic repairs.
15700	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
15701	// VirtualMachineProfile - The virtual machine profile.
15702	VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"`
15703	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
15704	Overprovision *bool `json:"overprovision,omitempty"`
15705	// 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.
15706	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
15707	// 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.
15708	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
15709	// 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.
15710	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
15711	// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
15712	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
15713	// 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.
15714	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
15715}
15716
15717// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP
15718// Configuration's PublicIPAddress configuration
15719type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct {
15720	// Name - The publicIP address configuration name.
15721	Name                                                                *string `json:"name,omitempty"`
15722	*VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"`
15723}
15724
15725// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.
15726func (vmssupiac VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
15727	objectMap := make(map[string]interface{})
15728	if vmssupiac.Name != nil {
15729		objectMap["name"] = vmssupiac.Name
15730	}
15731	if vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties != nil {
15732		objectMap["properties"] = vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
15733	}
15734	return json.Marshal(objectMap)
15735}
15736
15737// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct.
15738func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
15739	var m map[string]*json.RawMessage
15740	err := json.Unmarshal(body, &m)
15741	if err != nil {
15742		return err
15743	}
15744	for k, v := range m {
15745		switch k {
15746		case "name":
15747			if v != nil {
15748				var name string
15749				err = json.Unmarshal(*v, &name)
15750				if err != nil {
15751					return err
15752				}
15753				vmssupiac.Name = &name
15754			}
15755		case "properties":
15756			if v != nil {
15757				var virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
15758				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties)
15759				if err != nil {
15760					return err
15761				}
15762				vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
15763			}
15764		}
15765	}
15766
15767	return nil
15768}
15769
15770// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale
15771// set IP Configuration's PublicIPAddress configuration
15772type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct {
15773	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
15774	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
15775	// DNSSettings - The dns settings to be applied on the publicIP addresses .
15776	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
15777}
15778
15779// VirtualMachineScaleSetUpdateStorageProfile describes a virtual machine scale set storage profile.
15780type VirtualMachineScaleSetUpdateStorageProfile struct {
15781	// ImageReference - The image reference.
15782	ImageReference *ImageReference `json:"imageReference,omitempty"`
15783	// OsDisk - The OS disk.
15784	OsDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"`
15785	// DataDisks - The data disks.
15786	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
15787}
15788
15789// VirtualMachineScaleSetUpdateVMProfile describes a virtual machine scale set virtual machine profile.
15790type VirtualMachineScaleSetUpdateVMProfile struct {
15791	// OsProfile - The virtual machine scale set OS profile.
15792	OsProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"`
15793	// StorageProfile - The virtual machine scale set storage profile.
15794	StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"`
15795	// NetworkProfile - The virtual machine scale set network profile.
15796	NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"`
15797	// SecurityProfile - The virtual machine scale set Security profile
15798	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
15799	// DiagnosticsProfile - The virtual machine scale set diagnostics profile.
15800	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
15801	// ExtensionProfile - The virtual machine scale set extension profile.
15802	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
15803	// LicenseType - The license type, which is for bring your own license scenario.
15804	LicenseType *string `json:"licenseType,omitempty"`
15805	// BillingProfile - Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01.
15806	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
15807	// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
15808	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
15809}
15810
15811// VirtualMachineScaleSetVM describes a virtual machine scale set virtual machine.
15812type VirtualMachineScaleSetVM struct {
15813	autorest.Response `json:"-"`
15814	// InstanceID - READ-ONLY; The virtual machine instance ID.
15815	InstanceID *string `json:"instanceId,omitempty"`
15816	// Sku - READ-ONLY; The virtual machine SKU.
15817	Sku                                 *Sku `json:"sku,omitempty"`
15818	*VirtualMachineScaleSetVMProperties `json:"properties,omitempty"`
15819	// 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**.
15820	Plan *Plan `json:"plan,omitempty"`
15821	// Resources - READ-ONLY; The virtual machine child extension resources.
15822	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
15823	// Zones - READ-ONLY; The virtual machine zones.
15824	Zones *[]string `json:"zones,omitempty"`
15825	// ID - READ-ONLY; Resource Id
15826	ID *string `json:"id,omitempty"`
15827	// Name - READ-ONLY; Resource name
15828	Name *string `json:"name,omitempty"`
15829	// Type - READ-ONLY; Resource type
15830	Type *string `json:"type,omitempty"`
15831	// Location - Resource location
15832	Location *string `json:"location,omitempty"`
15833	// Tags - Resource tags
15834	Tags map[string]*string `json:"tags"`
15835}
15836
15837// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVM.
15838func (vmssv VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) {
15839	objectMap := make(map[string]interface{})
15840	if vmssv.VirtualMachineScaleSetVMProperties != nil {
15841		objectMap["properties"] = vmssv.VirtualMachineScaleSetVMProperties
15842	}
15843	if vmssv.Plan != nil {
15844		objectMap["plan"] = vmssv.Plan
15845	}
15846	if vmssv.Location != nil {
15847		objectMap["location"] = vmssv.Location
15848	}
15849	if vmssv.Tags != nil {
15850		objectMap["tags"] = vmssv.Tags
15851	}
15852	return json.Marshal(objectMap)
15853}
15854
15855// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVM struct.
15856func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error {
15857	var m map[string]*json.RawMessage
15858	err := json.Unmarshal(body, &m)
15859	if err != nil {
15860		return err
15861	}
15862	for k, v := range m {
15863		switch k {
15864		case "instanceId":
15865			if v != nil {
15866				var instanceID string
15867				err = json.Unmarshal(*v, &instanceID)
15868				if err != nil {
15869					return err
15870				}
15871				vmssv.InstanceID = &instanceID
15872			}
15873		case "sku":
15874			if v != nil {
15875				var sku Sku
15876				err = json.Unmarshal(*v, &sku)
15877				if err != nil {
15878					return err
15879				}
15880				vmssv.Sku = &sku
15881			}
15882		case "properties":
15883			if v != nil {
15884				var virtualMachineScaleSetVMProperties VirtualMachineScaleSetVMProperties
15885				err = json.Unmarshal(*v, &virtualMachineScaleSetVMProperties)
15886				if err != nil {
15887					return err
15888				}
15889				vmssv.VirtualMachineScaleSetVMProperties = &virtualMachineScaleSetVMProperties
15890			}
15891		case "plan":
15892			if v != nil {
15893				var plan Plan
15894				err = json.Unmarshal(*v, &plan)
15895				if err != nil {
15896					return err
15897				}
15898				vmssv.Plan = &plan
15899			}
15900		case "resources":
15901			if v != nil {
15902				var resources []VirtualMachineExtension
15903				err = json.Unmarshal(*v, &resources)
15904				if err != nil {
15905					return err
15906				}
15907				vmssv.Resources = &resources
15908			}
15909		case "zones":
15910			if v != nil {
15911				var zones []string
15912				err = json.Unmarshal(*v, &zones)
15913				if err != nil {
15914					return err
15915				}
15916				vmssv.Zones = &zones
15917			}
15918		case "id":
15919			if v != nil {
15920				var ID string
15921				err = json.Unmarshal(*v, &ID)
15922				if err != nil {
15923					return err
15924				}
15925				vmssv.ID = &ID
15926			}
15927		case "name":
15928			if v != nil {
15929				var name string
15930				err = json.Unmarshal(*v, &name)
15931				if err != nil {
15932					return err
15933				}
15934				vmssv.Name = &name
15935			}
15936		case "type":
15937			if v != nil {
15938				var typeVar string
15939				err = json.Unmarshal(*v, &typeVar)
15940				if err != nil {
15941					return err
15942				}
15943				vmssv.Type = &typeVar
15944			}
15945		case "location":
15946			if v != nil {
15947				var location string
15948				err = json.Unmarshal(*v, &location)
15949				if err != nil {
15950					return err
15951				}
15952				vmssv.Location = &location
15953			}
15954		case "tags":
15955			if v != nil {
15956				var tags map[string]*string
15957				err = json.Unmarshal(*v, &tags)
15958				if err != nil {
15959					return err
15960				}
15961				vmssv.Tags = tags
15962			}
15963		}
15964	}
15965
15966	return nil
15967}
15968
15969// VirtualMachineScaleSetVMExtension describes a VMSS VM Extension.
15970type VirtualMachineScaleSetVMExtension struct {
15971	autorest.Response `json:"-"`
15972	// Name - READ-ONLY; The name of the extension.
15973	Name *string `json:"name,omitempty"`
15974	// Type - READ-ONLY; Resource type
15975	Type                               *string `json:"type,omitempty"`
15976	*VirtualMachineExtensionProperties `json:"properties,omitempty"`
15977	// ID - READ-ONLY; Resource Id
15978	ID *string `json:"id,omitempty"`
15979}
15980
15981// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtension.
15982func (vmssve VirtualMachineScaleSetVMExtension) MarshalJSON() ([]byte, error) {
15983	objectMap := make(map[string]interface{})
15984	if vmssve.VirtualMachineExtensionProperties != nil {
15985		objectMap["properties"] = vmssve.VirtualMachineExtensionProperties
15986	}
15987	return json.Marshal(objectMap)
15988}
15989
15990// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtension struct.
15991func (vmssve *VirtualMachineScaleSetVMExtension) UnmarshalJSON(body []byte) error {
15992	var m map[string]*json.RawMessage
15993	err := json.Unmarshal(body, &m)
15994	if err != nil {
15995		return err
15996	}
15997	for k, v := range m {
15998		switch k {
15999		case "name":
16000			if v != nil {
16001				var name string
16002				err = json.Unmarshal(*v, &name)
16003				if err != nil {
16004					return err
16005				}
16006				vmssve.Name = &name
16007			}
16008		case "type":
16009			if v != nil {
16010				var typeVar string
16011				err = json.Unmarshal(*v, &typeVar)
16012				if err != nil {
16013					return err
16014				}
16015				vmssve.Type = &typeVar
16016			}
16017		case "properties":
16018			if v != nil {
16019				var virtualMachineExtensionProperties VirtualMachineExtensionProperties
16020				err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
16021				if err != nil {
16022					return err
16023				}
16024				vmssve.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
16025			}
16026		case "id":
16027			if v != nil {
16028				var ID string
16029				err = json.Unmarshal(*v, &ID)
16030				if err != nil {
16031					return err
16032				}
16033				vmssve.ID = &ID
16034			}
16035		}
16036	}
16037
16038	return nil
16039}
16040
16041// VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
16042// results of a long-running operation.
16043type VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture struct {
16044	azure.FutureAPI
16045	// Result returns the result of the asynchronous operation.
16046	// If the operation has not completed it will return an error.
16047	Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error)
16048}
16049
16050// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16051func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16052	var azFuture azure.Future
16053	if err := json.Unmarshal(body, &azFuture); err != nil {
16054		return err
16055	}
16056	future.FutureAPI = &azFuture
16057	future.Result = future.result
16058	return nil
16059}
16060
16061// result is the default implementation for VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.Result.
16062func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) {
16063	var done bool
16064	done, err = future.DoneWithContext(context.Background(), client)
16065	if err != nil {
16066		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16067		return
16068	}
16069	if !done {
16070		vmssve.Response.Response = future.Response()
16071		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture")
16072		return
16073	}
16074	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16075	if vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent {
16076		vmssve, err = client.CreateOrUpdateResponder(vmssve.Response.Response)
16077		if err != nil {
16078			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request")
16079		}
16080	}
16081	return
16082}
16083
16084// VirtualMachineScaleSetVMExtensionsDeleteFuture an abstraction for monitoring and retrieving the results
16085// of a long-running operation.
16086type VirtualMachineScaleSetVMExtensionsDeleteFuture struct {
16087	azure.FutureAPI
16088	// Result returns the result of the asynchronous operation.
16089	// If the operation has not completed it will return an error.
16090	Result func(VirtualMachineScaleSetVMExtensionsClient) (autorest.Response, error)
16091}
16092
16093// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16094func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
16095	var azFuture azure.Future
16096	if err := json.Unmarshal(body, &azFuture); err != nil {
16097		return err
16098	}
16099	future.FutureAPI = &azFuture
16100	future.Result = future.result
16101	return nil
16102}
16103
16104// result is the default implementation for VirtualMachineScaleSetVMExtensionsDeleteFuture.Result.
16105func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (ar autorest.Response, err error) {
16106	var done bool
16107	done, err = future.DoneWithContext(context.Background(), client)
16108	if err != nil {
16109		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
16110		return
16111	}
16112	if !done {
16113		ar.Response = future.Response()
16114		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsDeleteFuture")
16115		return
16116	}
16117	ar.Response = future.Response()
16118	return
16119}
16120
16121// VirtualMachineScaleSetVMExtensionsListResult the List VMSS VM Extension operation response
16122type VirtualMachineScaleSetVMExtensionsListResult struct {
16123	autorest.Response `json:"-"`
16124	// Value - The list of VMSS VM extensions
16125	Value *[]VirtualMachineScaleSetVMExtension `json:"value,omitempty"`
16126}
16127
16128// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine
16129// scale set.
16130type VirtualMachineScaleSetVMExtensionsSummary struct {
16131	// Name - READ-ONLY; The extension name.
16132	Name *string `json:"name,omitempty"`
16133	// StatusesSummary - READ-ONLY; The extensions information.
16134	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
16135}
16136
16137// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionsSummary.
16138func (vmssves VirtualMachineScaleSetVMExtensionsSummary) MarshalJSON() ([]byte, error) {
16139	objectMap := make(map[string]interface{})
16140	return json.Marshal(objectMap)
16141}
16142
16143// VirtualMachineScaleSetVMExtensionsUpdateFuture an abstraction for monitoring and retrieving the results
16144// of a long-running operation.
16145type VirtualMachineScaleSetVMExtensionsUpdateFuture struct {
16146	azure.FutureAPI
16147	// Result returns the result of the asynchronous operation.
16148	// If the operation has not completed it will return an error.
16149	Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error)
16150}
16151
16152// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16153func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
16154	var azFuture azure.Future
16155	if err := json.Unmarshal(body, &azFuture); err != nil {
16156		return err
16157	}
16158	future.FutureAPI = &azFuture
16159	future.Result = future.result
16160	return nil
16161}
16162
16163// result is the default implementation for VirtualMachineScaleSetVMExtensionsUpdateFuture.Result.
16164func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) {
16165	var done bool
16166	done, err = future.DoneWithContext(context.Background(), client)
16167	if err != nil {
16168		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
16169		return
16170	}
16171	if !done {
16172		vmssve.Response.Response = future.Response()
16173		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsUpdateFuture")
16174		return
16175	}
16176	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16177	if vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent {
16178		vmssve, err = client.UpdateResponder(vmssve.Response.Response)
16179		if err != nil {
16180			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request")
16181		}
16182	}
16183	return
16184}
16185
16186// VirtualMachineScaleSetVMExtensionUpdate describes a VMSS VM Extension.
16187type VirtualMachineScaleSetVMExtensionUpdate struct {
16188	// Name - READ-ONLY; The name of the extension.
16189	Name *string `json:"name,omitempty"`
16190	// Type - READ-ONLY; Resource type
16191	Type                                     *string `json:"type,omitempty"`
16192	*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
16193	// ID - READ-ONLY; Resource Id
16194	ID *string `json:"id,omitempty"`
16195}
16196
16197// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionUpdate.
16198func (vmssveu VirtualMachineScaleSetVMExtensionUpdate) MarshalJSON() ([]byte, error) {
16199	objectMap := make(map[string]interface{})
16200	if vmssveu.VirtualMachineExtensionUpdateProperties != nil {
16201		objectMap["properties"] = vmssveu.VirtualMachineExtensionUpdateProperties
16202	}
16203	return json.Marshal(objectMap)
16204}
16205
16206// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtensionUpdate struct.
16207func (vmssveu *VirtualMachineScaleSetVMExtensionUpdate) UnmarshalJSON(body []byte) error {
16208	var m map[string]*json.RawMessage
16209	err := json.Unmarshal(body, &m)
16210	if err != nil {
16211		return err
16212	}
16213	for k, v := range m {
16214		switch k {
16215		case "name":
16216			if v != nil {
16217				var name string
16218				err = json.Unmarshal(*v, &name)
16219				if err != nil {
16220					return err
16221				}
16222				vmssveu.Name = &name
16223			}
16224		case "type":
16225			if v != nil {
16226				var typeVar string
16227				err = json.Unmarshal(*v, &typeVar)
16228				if err != nil {
16229					return err
16230				}
16231				vmssveu.Type = &typeVar
16232			}
16233		case "properties":
16234			if v != nil {
16235				var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
16236				err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
16237				if err != nil {
16238					return err
16239				}
16240				vmssveu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
16241			}
16242		case "id":
16243			if v != nil {
16244				var ID string
16245				err = json.Unmarshal(*v, &ID)
16246				if err != nil {
16247					return err
16248				}
16249				vmssveu.ID = &ID
16250			}
16251		}
16252	}
16253
16254	return nil
16255}
16256
16257// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale
16258// set.
16259type VirtualMachineScaleSetVMInstanceIDs struct {
16260	// 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.
16261	InstanceIds *[]string `json:"instanceIds,omitempty"`
16262}
16263
16264// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM
16265// scale set.
16266type VirtualMachineScaleSetVMInstanceRequiredIDs struct {
16267	// InstanceIds - The virtual machine scale set instance ids.
16268	InstanceIds *[]string `json:"instanceIds,omitempty"`
16269}
16270
16271// VirtualMachineScaleSetVMInstanceView the instance view of a virtual machine scale set VM.
16272type VirtualMachineScaleSetVMInstanceView struct {
16273	autorest.Response `json:"-"`
16274	// PlatformUpdateDomain - The Update Domain count.
16275	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
16276	// PlatformFaultDomain - The Fault Domain count.
16277	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
16278	// RdpThumbPrint - The Remote desktop certificate thumbprint.
16279	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
16280	// VMAgent - The VM Agent running on the virtual machine.
16281	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
16282	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
16283	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
16284	// Disks - The disks information.
16285	Disks *[]DiskInstanceView `json:"disks,omitempty"`
16286	// Extensions - The extensions information.
16287	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
16288	// VMHealth - READ-ONLY; The health status for the VM.
16289	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
16290	// 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.
16291	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
16292	// Statuses - The resource status information.
16293	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
16294	// AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. <br><br>Minimum api-version: 2020-06-01.
16295	AssignedHost *string `json:"assignedHost,omitempty"`
16296	// PlacementGroupID - The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId.
16297	PlacementGroupID *string `json:"placementGroupId,omitempty"`
16298}
16299
16300// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMInstanceView.
16301func (vmssviv VirtualMachineScaleSetVMInstanceView) MarshalJSON() ([]byte, error) {
16302	objectMap := make(map[string]interface{})
16303	if vmssviv.PlatformUpdateDomain != nil {
16304		objectMap["platformUpdateDomain"] = vmssviv.PlatformUpdateDomain
16305	}
16306	if vmssviv.PlatformFaultDomain != nil {
16307		objectMap["platformFaultDomain"] = vmssviv.PlatformFaultDomain
16308	}
16309	if vmssviv.RdpThumbPrint != nil {
16310		objectMap["rdpThumbPrint"] = vmssviv.RdpThumbPrint
16311	}
16312	if vmssviv.VMAgent != nil {
16313		objectMap["vmAgent"] = vmssviv.VMAgent
16314	}
16315	if vmssviv.MaintenanceRedeployStatus != nil {
16316		objectMap["maintenanceRedeployStatus"] = vmssviv.MaintenanceRedeployStatus
16317	}
16318	if vmssviv.Disks != nil {
16319		objectMap["disks"] = vmssviv.Disks
16320	}
16321	if vmssviv.Extensions != nil {
16322		objectMap["extensions"] = vmssviv.Extensions
16323	}
16324	if vmssviv.BootDiagnostics != nil {
16325		objectMap["bootDiagnostics"] = vmssviv.BootDiagnostics
16326	}
16327	if vmssviv.Statuses != nil {
16328		objectMap["statuses"] = vmssviv.Statuses
16329	}
16330	if vmssviv.PlacementGroupID != nil {
16331		objectMap["placementGroupId"] = vmssviv.PlacementGroupID
16332	}
16333	return json.Marshal(objectMap)
16334}
16335
16336// VirtualMachineScaleSetVMListResult the List Virtual Machine Scale Set VMs operation response.
16337type VirtualMachineScaleSetVMListResult struct {
16338	autorest.Response `json:"-"`
16339	// Value - The list of virtual machine scale sets VMs.
16340	Value *[]VirtualMachineScaleSetVM `json:"value,omitempty"`
16341	// 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
16342	NextLink *string `json:"nextLink,omitempty"`
16343}
16344
16345// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of
16346// VirtualMachineScaleSetVM values.
16347type VirtualMachineScaleSetVMListResultIterator struct {
16348	i    int
16349	page VirtualMachineScaleSetVMListResultPage
16350}
16351
16352// NextWithContext advances to the next value.  If there was an error making
16353// the request the iterator does not advance and the error is returned.
16354func (iter *VirtualMachineScaleSetVMListResultIterator) NextWithContext(ctx context.Context) (err error) {
16355	if tracing.IsEnabled() {
16356		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultIterator.NextWithContext")
16357		defer func() {
16358			sc := -1
16359			if iter.Response().Response.Response != nil {
16360				sc = iter.Response().Response.Response.StatusCode
16361			}
16362			tracing.EndSpan(ctx, sc, err)
16363		}()
16364	}
16365	iter.i++
16366	if iter.i < len(iter.page.Values()) {
16367		return nil
16368	}
16369	err = iter.page.NextWithContext(ctx)
16370	if err != nil {
16371		iter.i--
16372		return err
16373	}
16374	iter.i = 0
16375	return nil
16376}
16377
16378// Next advances to the next value.  If there was an error making
16379// the request the iterator does not advance and the error is returned.
16380// Deprecated: Use NextWithContext() instead.
16381func (iter *VirtualMachineScaleSetVMListResultIterator) Next() error {
16382	return iter.NextWithContext(context.Background())
16383}
16384
16385// NotDone returns true if the enumeration should be started or is not yet complete.
16386func (iter VirtualMachineScaleSetVMListResultIterator) NotDone() bool {
16387	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16388}
16389
16390// Response returns the raw server response from the last page request.
16391func (iter VirtualMachineScaleSetVMListResultIterator) Response() VirtualMachineScaleSetVMListResult {
16392	return iter.page.Response()
16393}
16394
16395// Value returns the current value or a zero-initialized value if the
16396// iterator has advanced beyond the end of the collection.
16397func (iter VirtualMachineScaleSetVMListResultIterator) Value() VirtualMachineScaleSetVM {
16398	if !iter.page.NotDone() {
16399		return VirtualMachineScaleSetVM{}
16400	}
16401	return iter.page.Values()[iter.i]
16402}
16403
16404// Creates a new instance of the VirtualMachineScaleSetVMListResultIterator type.
16405func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator {
16406	return VirtualMachineScaleSetVMListResultIterator{page: page}
16407}
16408
16409// IsEmpty returns true if the ListResult contains no values.
16410func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool {
16411	return vmssvlr.Value == nil || len(*vmssvlr.Value) == 0
16412}
16413
16414// hasNextLink returns true if the NextLink is not empty.
16415func (vmssvlr VirtualMachineScaleSetVMListResult) hasNextLink() bool {
16416	return vmssvlr.NextLink != nil && len(*vmssvlr.NextLink) != 0
16417}
16418
16419// virtualMachineScaleSetVMListResultPreparer prepares a request to retrieve the next set of results.
16420// It returns nil if no more results exist.
16421func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer(ctx context.Context) (*http.Request, error) {
16422	if !vmssvlr.hasNextLink() {
16423		return nil, nil
16424	}
16425	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16426		autorest.AsJSON(),
16427		autorest.AsGet(),
16428		autorest.WithBaseURL(to.String(vmssvlr.NextLink)))
16429}
16430
16431// VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values.
16432type VirtualMachineScaleSetVMListResultPage struct {
16433	fn      func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)
16434	vmssvlr VirtualMachineScaleSetVMListResult
16435}
16436
16437// NextWithContext advances to the next page of values.  If there was an error making
16438// the request the page does not advance and the error is returned.
16439func (page *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context.Context) (err error) {
16440	if tracing.IsEnabled() {
16441		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultPage.NextWithContext")
16442		defer func() {
16443			sc := -1
16444			if page.Response().Response.Response != nil {
16445				sc = page.Response().Response.Response.StatusCode
16446			}
16447			tracing.EndSpan(ctx, sc, err)
16448		}()
16449	}
16450	for {
16451		next, err := page.fn(ctx, page.vmssvlr)
16452		if err != nil {
16453			return err
16454		}
16455		page.vmssvlr = next
16456		if !next.hasNextLink() || !next.IsEmpty() {
16457			break
16458		}
16459	}
16460	return nil
16461}
16462
16463// Next advances to the next page of values.  If there was an error making
16464// the request the page does not advance and the error is returned.
16465// Deprecated: Use NextWithContext() instead.
16466func (page *VirtualMachineScaleSetVMListResultPage) Next() error {
16467	return page.NextWithContext(context.Background())
16468}
16469
16470// NotDone returns true if the page enumeration should be started or is not yet complete.
16471func (page VirtualMachineScaleSetVMListResultPage) NotDone() bool {
16472	return !page.vmssvlr.IsEmpty()
16473}
16474
16475// Response returns the raw server response from the last page request.
16476func (page VirtualMachineScaleSetVMListResultPage) Response() VirtualMachineScaleSetVMListResult {
16477	return page.vmssvlr
16478}
16479
16480// Values returns the slice of values for the current page or nil if there are no values.
16481func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScaleSetVM {
16482	if page.vmssvlr.IsEmpty() {
16483		return nil
16484	}
16485	return *page.vmssvlr.Value
16486}
16487
16488// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type.
16489func NewVirtualMachineScaleSetVMListResultPage(cur VirtualMachineScaleSetVMListResult, getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
16490	return VirtualMachineScaleSetVMListResultPage{
16491		fn:      getNextPage,
16492		vmssvlr: cur,
16493	}
16494}
16495
16496// VirtualMachineScaleSetVMNetworkProfileConfiguration describes a virtual machine scale set VM network
16497// profile.
16498type VirtualMachineScaleSetVMNetworkProfileConfiguration struct {
16499	// NetworkInterfaceConfigurations - The list of network configurations.
16500	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
16501}
16502
16503// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile.
16504type VirtualMachineScaleSetVMProfile struct {
16505	// OsProfile - Specifies the operating system settings for the virtual machines in the scale set.
16506	OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"`
16507	// StorageProfile - Specifies the storage settings for the virtual machine disks.
16508	StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"`
16509	// NetworkProfile - Specifies properties of the network interfaces of the virtual machines in the scale set.
16510	NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"`
16511	// SecurityProfile - Specifies the Security related profile settings for the virtual machines in the scale set.
16512	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
16513	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
16514	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
16515	// ExtensionProfile - Specifies a collection of settings for extensions installed on virtual machines in the scale set.
16516	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
16517	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15
16518	LicenseType *string `json:"licenseType,omitempty"`
16519	// 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'
16520	Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
16521	// EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
16522	EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
16523	// BillingProfile - Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01.
16524	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
16525	// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
16526	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
16527}
16528
16529// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual
16530// machine.
16531type VirtualMachineScaleSetVMProperties struct {
16532	// LatestModelApplied - READ-ONLY; Specifies whether the latest model has been applied to the virtual machine.
16533	LatestModelApplied *bool `json:"latestModelApplied,omitempty"`
16534	// VMID - READ-ONLY; Azure VM unique ID.
16535	VMID *string `json:"vmId,omitempty"`
16536	// InstanceView - READ-ONLY; The virtual machine instance view.
16537	InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty"`
16538	// HardwareProfile - Specifies the hardware settings for the virtual machine.
16539	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
16540	// StorageProfile - Specifies the storage settings for the virtual machine disks.
16541	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
16542	// 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.
16543	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
16544	// OsProfile - Specifies the operating system settings for the virtual machine.
16545	OsProfile *OSProfile `json:"osProfile,omitempty"`
16546	// SecurityProfile - Specifies the Security related profile settings for the virtual machine.
16547	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
16548	// NetworkProfile - Specifies the network interfaces of the virtual machine.
16549	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
16550	// NetworkProfileConfiguration - Specifies the network profile configuration of the virtual machine.
16551	NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration `json:"networkProfileConfiguration,omitempty"`
16552	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
16553	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
16554	// 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.
16555	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
16556	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
16557	ProvisioningState *string `json:"provisioningState,omitempty"`
16558	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15
16559	LicenseType *string `json:"licenseType,omitempty"`
16560	// 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.
16561	ModelDefinitionApplied *string `json:"modelDefinitionApplied,omitempty"`
16562	// ProtectionPolicy - Specifies the protection policy of the virtual machine.
16563	ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy `json:"protectionPolicy,omitempty"`
16564}
16565
16566// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMProperties.
16567func (vmssvp VirtualMachineScaleSetVMProperties) MarshalJSON() ([]byte, error) {
16568	objectMap := make(map[string]interface{})
16569	if vmssvp.HardwareProfile != nil {
16570		objectMap["hardwareProfile"] = vmssvp.HardwareProfile
16571	}
16572	if vmssvp.StorageProfile != nil {
16573		objectMap["storageProfile"] = vmssvp.StorageProfile
16574	}
16575	if vmssvp.AdditionalCapabilities != nil {
16576		objectMap["additionalCapabilities"] = vmssvp.AdditionalCapabilities
16577	}
16578	if vmssvp.OsProfile != nil {
16579		objectMap["osProfile"] = vmssvp.OsProfile
16580	}
16581	if vmssvp.SecurityProfile != nil {
16582		objectMap["securityProfile"] = vmssvp.SecurityProfile
16583	}
16584	if vmssvp.NetworkProfile != nil {
16585		objectMap["networkProfile"] = vmssvp.NetworkProfile
16586	}
16587	if vmssvp.NetworkProfileConfiguration != nil {
16588		objectMap["networkProfileConfiguration"] = vmssvp.NetworkProfileConfiguration
16589	}
16590	if vmssvp.DiagnosticsProfile != nil {
16591		objectMap["diagnosticsProfile"] = vmssvp.DiagnosticsProfile
16592	}
16593	if vmssvp.AvailabilitySet != nil {
16594		objectMap["availabilitySet"] = vmssvp.AvailabilitySet
16595	}
16596	if vmssvp.LicenseType != nil {
16597		objectMap["licenseType"] = vmssvp.LicenseType
16598	}
16599	if vmssvp.ProtectionPolicy != nil {
16600		objectMap["protectionPolicy"] = vmssvp.ProtectionPolicy
16601	}
16602	return json.Marshal(objectMap)
16603}
16604
16605// VirtualMachineScaleSetVMProtectionPolicy the protection policy of a virtual machine scale set VM.
16606type VirtualMachineScaleSetVMProtectionPolicy struct {
16607	// ProtectFromScaleIn - Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.
16608	ProtectFromScaleIn *bool `json:"protectFromScaleIn,omitempty"`
16609	// 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.
16610	ProtectFromScaleSetActions *bool `json:"protectFromScaleSetActions,omitempty"`
16611}
16612
16613// VirtualMachineScaleSetVMReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
16614type VirtualMachineScaleSetVMReimageParameters struct {
16615	// 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.
16616	TempDisk *bool `json:"tempDisk,omitempty"`
16617}
16618
16619// VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
16620// results of a long-running operation.
16621type VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture struct {
16622	azure.FutureAPI
16623	// Result returns the result of the asynchronous operation.
16624	// If the operation has not completed it will return an error.
16625	Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error)
16626}
16627
16628// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16629func (future *VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16630	var azFuture azure.Future
16631	if err := json.Unmarshal(body, &azFuture); err != nil {
16632		return err
16633	}
16634	future.FutureAPI = &azFuture
16635	future.Result = future.result
16636	return nil
16637}
16638
16639// result is the default implementation for VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture.Result.
16640func (future *VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
16641	var done bool
16642	done, err = future.DoneWithContext(context.Background(), client)
16643	if err != nil {
16644		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16645		return
16646	}
16647	if !done {
16648		vmrc.Response.Response = future.Response()
16649		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture")
16650		return
16651	}
16652	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16653	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
16654		vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response)
16655		if err != nil {
16656			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
16657		}
16658	}
16659	return
16660}
16661
16662// VirtualMachineScaleSetVMRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results
16663// of a long-running operation.
16664type VirtualMachineScaleSetVMRunCommandsDeleteFuture struct {
16665	azure.FutureAPI
16666	// Result returns the result of the asynchronous operation.
16667	// If the operation has not completed it will return an error.
16668	Result func(VirtualMachineScaleSetVMRunCommandsClient) (autorest.Response, error)
16669}
16670
16671// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16672func (future *VirtualMachineScaleSetVMRunCommandsDeleteFuture) UnmarshalJSON(body []byte) error {
16673	var azFuture azure.Future
16674	if err := json.Unmarshal(body, &azFuture); err != nil {
16675		return err
16676	}
16677	future.FutureAPI = &azFuture
16678	future.Result = future.result
16679	return nil
16680}
16681
16682// result is the default implementation for VirtualMachineScaleSetVMRunCommandsDeleteFuture.Result.
16683func (future *VirtualMachineScaleSetVMRunCommandsDeleteFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (ar autorest.Response, err error) {
16684	var done bool
16685	done, err = future.DoneWithContext(context.Background(), client)
16686	if err != nil {
16687		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure")
16688		return
16689	}
16690	if !done {
16691		ar.Response = future.Response()
16692		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture")
16693		return
16694	}
16695	ar.Response = future.Response()
16696	return
16697}
16698
16699// VirtualMachineScaleSetVMRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results
16700// of a long-running operation.
16701type VirtualMachineScaleSetVMRunCommandsUpdateFuture struct {
16702	azure.FutureAPI
16703	// Result returns the result of the asynchronous operation.
16704	// If the operation has not completed it will return an error.
16705	Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error)
16706}
16707
16708// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16709func (future *VirtualMachineScaleSetVMRunCommandsUpdateFuture) UnmarshalJSON(body []byte) error {
16710	var azFuture azure.Future
16711	if err := json.Unmarshal(body, &azFuture); err != nil {
16712		return err
16713	}
16714	future.FutureAPI = &azFuture
16715	future.Result = future.result
16716	return nil
16717}
16718
16719// result is the default implementation for VirtualMachineScaleSetVMRunCommandsUpdateFuture.Result.
16720func (future *VirtualMachineScaleSetVMRunCommandsUpdateFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
16721	var done bool
16722	done, err = future.DoneWithContext(context.Background(), client)
16723	if err != nil {
16724		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure")
16725		return
16726	}
16727	if !done {
16728		vmrc.Response.Response = future.Response()
16729		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture")
16730		return
16731	}
16732	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16733	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
16734		vmrc, err = client.UpdateResponder(vmrc.Response.Response)
16735		if err != nil {
16736			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
16737		}
16738	}
16739	return
16740}
16741
16742// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a
16743// long-running operation.
16744type VirtualMachineScaleSetVMsDeallocateFuture struct {
16745	azure.FutureAPI
16746	// Result returns the result of the asynchronous operation.
16747	// If the operation has not completed it will return an error.
16748	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16749}
16750
16751// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16752func (future *VirtualMachineScaleSetVMsDeallocateFuture) UnmarshalJSON(body []byte) error {
16753	var azFuture azure.Future
16754	if err := json.Unmarshal(body, &azFuture); err != nil {
16755		return err
16756	}
16757	future.FutureAPI = &azFuture
16758	future.Result = future.result
16759	return nil
16760}
16761
16762// result is the default implementation for VirtualMachineScaleSetVMsDeallocateFuture.Result.
16763func (future *VirtualMachineScaleSetVMsDeallocateFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16764	var done bool
16765	done, err = future.DoneWithContext(context.Background(), client)
16766	if err != nil {
16767		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Polling failure")
16768		return
16769	}
16770	if !done {
16771		ar.Response = future.Response()
16772		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
16773		return
16774	}
16775	ar.Response = future.Response()
16776	return
16777}
16778
16779// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
16780// long-running operation.
16781type VirtualMachineScaleSetVMsDeleteFuture struct {
16782	azure.FutureAPI
16783	// Result returns the result of the asynchronous operation.
16784	// If the operation has not completed it will return an error.
16785	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16786}
16787
16788// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16789func (future *VirtualMachineScaleSetVMsDeleteFuture) UnmarshalJSON(body []byte) error {
16790	var azFuture azure.Future
16791	if err := json.Unmarshal(body, &azFuture); err != nil {
16792		return err
16793	}
16794	future.FutureAPI = &azFuture
16795	future.Result = future.result
16796	return nil
16797}
16798
16799// result is the default implementation for VirtualMachineScaleSetVMsDeleteFuture.Result.
16800func (future *VirtualMachineScaleSetVMsDeleteFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16801	var done bool
16802	done, err = future.DoneWithContext(context.Background(), client)
16803	if err != nil {
16804		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Polling failure")
16805		return
16806	}
16807	if !done {
16808		ar.Response = future.Response()
16809		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
16810		return
16811	}
16812	ar.Response = future.Response()
16813	return
16814}
16815
16816// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the
16817// results of a long-running operation.
16818type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
16819	azure.FutureAPI
16820	// Result returns the result of the asynchronous operation.
16821	// If the operation has not completed it will return an error.
16822	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16823}
16824
16825// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16826func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
16827	var azFuture azure.Future
16828	if err := json.Unmarshal(body, &azFuture); err != nil {
16829		return err
16830	}
16831	future.FutureAPI = &azFuture
16832	future.Result = future.result
16833	return nil
16834}
16835
16836// result is the default implementation for VirtualMachineScaleSetVMsPerformMaintenanceFuture.Result.
16837func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16838	var done bool
16839	done, err = future.DoneWithContext(context.Background(), client)
16840	if err != nil {
16841		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
16842		return
16843	}
16844	if !done {
16845		ar.Response = future.Response()
16846		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
16847		return
16848	}
16849	ar.Response = future.Response()
16850	return
16851}
16852
16853// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a
16854// long-running operation.
16855type VirtualMachineScaleSetVMsPowerOffFuture struct {
16856	azure.FutureAPI
16857	// Result returns the result of the asynchronous operation.
16858	// If the operation has not completed it will return an error.
16859	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16860}
16861
16862// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16863func (future *VirtualMachineScaleSetVMsPowerOffFuture) UnmarshalJSON(body []byte) error {
16864	var azFuture azure.Future
16865	if err := json.Unmarshal(body, &azFuture); err != nil {
16866		return err
16867	}
16868	future.FutureAPI = &azFuture
16869	future.Result = future.result
16870	return nil
16871}
16872
16873// result is the default implementation for VirtualMachineScaleSetVMsPowerOffFuture.Result.
16874func (future *VirtualMachineScaleSetVMsPowerOffFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16875	var done bool
16876	done, err = future.DoneWithContext(context.Background(), client)
16877	if err != nil {
16878		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Polling failure")
16879		return
16880	}
16881	if !done {
16882		ar.Response = future.Response()
16883		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
16884		return
16885	}
16886	ar.Response = future.Response()
16887	return
16888}
16889
16890// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a
16891// long-running operation.
16892type VirtualMachineScaleSetVMsRedeployFuture struct {
16893	azure.FutureAPI
16894	// Result returns the result of the asynchronous operation.
16895	// If the operation has not completed it will return an error.
16896	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16897}
16898
16899// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16900func (future *VirtualMachineScaleSetVMsRedeployFuture) UnmarshalJSON(body []byte) error {
16901	var azFuture azure.Future
16902	if err := json.Unmarshal(body, &azFuture); err != nil {
16903		return err
16904	}
16905	future.FutureAPI = &azFuture
16906	future.Result = future.result
16907	return nil
16908}
16909
16910// result is the default implementation for VirtualMachineScaleSetVMsRedeployFuture.Result.
16911func (future *VirtualMachineScaleSetVMsRedeployFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16912	var done bool
16913	done, err = future.DoneWithContext(context.Background(), client)
16914	if err != nil {
16915		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Polling failure")
16916		return
16917	}
16918	if !done {
16919		ar.Response = future.Response()
16920		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
16921		return
16922	}
16923	ar.Response = future.Response()
16924	return
16925}
16926
16927// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a
16928// long-running operation.
16929type VirtualMachineScaleSetVMsReimageAllFuture struct {
16930	azure.FutureAPI
16931	// Result returns the result of the asynchronous operation.
16932	// If the operation has not completed it will return an error.
16933	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16934}
16935
16936// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16937func (future *VirtualMachineScaleSetVMsReimageAllFuture) UnmarshalJSON(body []byte) error {
16938	var azFuture azure.Future
16939	if err := json.Unmarshal(body, &azFuture); err != nil {
16940		return err
16941	}
16942	future.FutureAPI = &azFuture
16943	future.Result = future.result
16944	return nil
16945}
16946
16947// result is the default implementation for VirtualMachineScaleSetVMsReimageAllFuture.Result.
16948func (future *VirtualMachineScaleSetVMsReimageAllFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16949	var done bool
16950	done, err = future.DoneWithContext(context.Background(), client)
16951	if err != nil {
16952		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Polling failure")
16953		return
16954	}
16955	if !done {
16956		ar.Response = future.Response()
16957		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
16958		return
16959	}
16960	ar.Response = future.Response()
16961	return
16962}
16963
16964// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a
16965// long-running operation.
16966type VirtualMachineScaleSetVMsReimageFuture struct {
16967	azure.FutureAPI
16968	// Result returns the result of the asynchronous operation.
16969	// If the operation has not completed it will return an error.
16970	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16971}
16972
16973// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16974func (future *VirtualMachineScaleSetVMsReimageFuture) UnmarshalJSON(body []byte) error {
16975	var azFuture azure.Future
16976	if err := json.Unmarshal(body, &azFuture); err != nil {
16977		return err
16978	}
16979	future.FutureAPI = &azFuture
16980	future.Result = future.result
16981	return nil
16982}
16983
16984// result is the default implementation for VirtualMachineScaleSetVMsReimageFuture.Result.
16985func (future *VirtualMachineScaleSetVMsReimageFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16986	var done bool
16987	done, err = future.DoneWithContext(context.Background(), client)
16988	if err != nil {
16989		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Polling failure")
16990		return
16991	}
16992	if !done {
16993		ar.Response = future.Response()
16994		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
16995		return
16996	}
16997	ar.Response = future.Response()
16998	return
16999}
17000
17001// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a
17002// long-running operation.
17003type VirtualMachineScaleSetVMsRestartFuture struct {
17004	azure.FutureAPI
17005	// Result returns the result of the asynchronous operation.
17006	// If the operation has not completed it will return an error.
17007	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
17008}
17009
17010// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17011func (future *VirtualMachineScaleSetVMsRestartFuture) UnmarshalJSON(body []byte) error {
17012	var azFuture azure.Future
17013	if err := json.Unmarshal(body, &azFuture); err != nil {
17014		return err
17015	}
17016	future.FutureAPI = &azFuture
17017	future.Result = future.result
17018	return nil
17019}
17020
17021// result is the default implementation for VirtualMachineScaleSetVMsRestartFuture.Result.
17022func (future *VirtualMachineScaleSetVMsRestartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
17023	var done bool
17024	done, err = future.DoneWithContext(context.Background(), client)
17025	if err != nil {
17026		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Polling failure")
17027		return
17028	}
17029	if !done {
17030		ar.Response = future.Response()
17031		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
17032		return
17033	}
17034	ar.Response = future.Response()
17035	return
17036}
17037
17038// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a
17039// long-running operation.
17040type VirtualMachineScaleSetVMsRunCommandFuture struct {
17041	azure.FutureAPI
17042	// Result returns the result of the asynchronous operation.
17043	// If the operation has not completed it will return an error.
17044	Result func(VirtualMachineScaleSetVMsClient) (RunCommandResult, error)
17045}
17046
17047// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17048func (future *VirtualMachineScaleSetVMsRunCommandFuture) UnmarshalJSON(body []byte) error {
17049	var azFuture azure.Future
17050	if err := json.Unmarshal(body, &azFuture); err != nil {
17051		return err
17052	}
17053	future.FutureAPI = &azFuture
17054	future.Result = future.result
17055	return nil
17056}
17057
17058// result is the default implementation for VirtualMachineScaleSetVMsRunCommandFuture.Result.
17059func (future *VirtualMachineScaleSetVMsRunCommandFuture) result(client VirtualMachineScaleSetVMsClient) (rcr RunCommandResult, err error) {
17060	var done bool
17061	done, err = future.DoneWithContext(context.Background(), client)
17062	if err != nil {
17063		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", future.Response(), "Polling failure")
17064		return
17065	}
17066	if !done {
17067		rcr.Response.Response = future.Response()
17068		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture")
17069		return
17070	}
17071	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17072	if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
17073		rcr, err = client.RunCommandResponder(rcr.Response.Response)
17074		if err != nil {
17075			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
17076		}
17077	}
17078	return
17079}
17080
17081// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a
17082// long-running operation.
17083type VirtualMachineScaleSetVMsStartFuture struct {
17084	azure.FutureAPI
17085	// Result returns the result of the asynchronous operation.
17086	// If the operation has not completed it will return an error.
17087	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
17088}
17089
17090// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17091func (future *VirtualMachineScaleSetVMsStartFuture) UnmarshalJSON(body []byte) error {
17092	var azFuture azure.Future
17093	if err := json.Unmarshal(body, &azFuture); err != nil {
17094		return err
17095	}
17096	future.FutureAPI = &azFuture
17097	future.Result = future.result
17098	return nil
17099}
17100
17101// result is the default implementation for VirtualMachineScaleSetVMsStartFuture.Result.
17102func (future *VirtualMachineScaleSetVMsStartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
17103	var done bool
17104	done, err = future.DoneWithContext(context.Background(), client)
17105	if err != nil {
17106		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Polling failure")
17107		return
17108	}
17109	if !done {
17110		ar.Response = future.Response()
17111		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
17112		return
17113	}
17114	ar.Response = future.Response()
17115	return
17116}
17117
17118// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a
17119// long-running operation.
17120type VirtualMachineScaleSetVMsUpdateFuture struct {
17121	azure.FutureAPI
17122	// Result returns the result of the asynchronous operation.
17123	// If the operation has not completed it will return an error.
17124	Result func(VirtualMachineScaleSetVMsClient) (VirtualMachineScaleSetVM, error)
17125}
17126
17127// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17128func (future *VirtualMachineScaleSetVMsUpdateFuture) UnmarshalJSON(body []byte) error {
17129	var azFuture azure.Future
17130	if err := json.Unmarshal(body, &azFuture); err != nil {
17131		return err
17132	}
17133	future.FutureAPI = &azFuture
17134	future.Result = future.result
17135	return nil
17136}
17137
17138// result is the default implementation for VirtualMachineScaleSetVMsUpdateFuture.Result.
17139func (future *VirtualMachineScaleSetVMsUpdateFuture) result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) {
17140	var done bool
17141	done, err = future.DoneWithContext(context.Background(), client)
17142	if err != nil {
17143		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Polling failure")
17144		return
17145	}
17146	if !done {
17147		vmssv.Response.Response = future.Response()
17148		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
17149		return
17150	}
17151	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17152	if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent {
17153		vmssv, err = client.UpdateResponder(vmssv.Response.Response)
17154		if err != nil {
17155			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request")
17156		}
17157	}
17158	return
17159}
17160
17161// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running
17162// operation.
17163type VirtualMachinesCaptureFuture struct {
17164	azure.FutureAPI
17165	// Result returns the result of the asynchronous operation.
17166	// If the operation has not completed it will return an error.
17167	Result func(VirtualMachinesClient) (VirtualMachineCaptureResult, error)
17168}
17169
17170// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17171func (future *VirtualMachinesCaptureFuture) UnmarshalJSON(body []byte) error {
17172	var azFuture azure.Future
17173	if err := json.Unmarshal(body, &azFuture); err != nil {
17174		return err
17175	}
17176	future.FutureAPI = &azFuture
17177	future.Result = future.result
17178	return nil
17179}
17180
17181// result is the default implementation for VirtualMachinesCaptureFuture.Result.
17182func (future *VirtualMachinesCaptureFuture) result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
17183	var done bool
17184	done, err = future.DoneWithContext(context.Background(), client)
17185	if err != nil {
17186		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Polling failure")
17187		return
17188	}
17189	if !done {
17190		vmcr.Response.Response = future.Response()
17191		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
17192		return
17193	}
17194	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17195	if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
17196		vmcr, err = client.CaptureResponder(vmcr.Response.Response)
17197		if err != nil {
17198			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
17199		}
17200	}
17201	return
17202}
17203
17204// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a
17205// long-running operation.
17206type VirtualMachinesConvertToManagedDisksFuture struct {
17207	azure.FutureAPI
17208	// Result returns the result of the asynchronous operation.
17209	// If the operation has not completed it will return an error.
17210	Result func(VirtualMachinesClient) (autorest.Response, error)
17211}
17212
17213// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17214func (future *VirtualMachinesConvertToManagedDisksFuture) UnmarshalJSON(body []byte) error {
17215	var azFuture azure.Future
17216	if err := json.Unmarshal(body, &azFuture); err != nil {
17217		return err
17218	}
17219	future.FutureAPI = &azFuture
17220	future.Result = future.result
17221	return nil
17222}
17223
17224// result is the default implementation for VirtualMachinesConvertToManagedDisksFuture.Result.
17225func (future *VirtualMachinesConvertToManagedDisksFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17226	var done bool
17227	done, err = future.DoneWithContext(context.Background(), client)
17228	if err != nil {
17229		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Polling failure")
17230		return
17231	}
17232	if !done {
17233		ar.Response = future.Response()
17234		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
17235		return
17236	}
17237	ar.Response = future.Response()
17238	return
17239}
17240
17241// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17242// long-running operation.
17243type VirtualMachinesCreateOrUpdateFuture struct {
17244	azure.FutureAPI
17245	// Result returns the result of the asynchronous operation.
17246	// If the operation has not completed it will return an error.
17247	Result func(VirtualMachinesClient) (VirtualMachine, error)
17248}
17249
17250// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17251func (future *VirtualMachinesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17252	var azFuture azure.Future
17253	if err := json.Unmarshal(body, &azFuture); err != nil {
17254		return err
17255	}
17256	future.FutureAPI = &azFuture
17257	future.Result = future.result
17258	return nil
17259}
17260
17261// result is the default implementation for VirtualMachinesCreateOrUpdateFuture.Result.
17262func (future *VirtualMachinesCreateOrUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
17263	var done bool
17264	done, err = future.DoneWithContext(context.Background(), client)
17265	if err != nil {
17266		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17267		return
17268	}
17269	if !done {
17270		VM.Response.Response = future.Response()
17271		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
17272		return
17273	}
17274	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17275	if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
17276		VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
17277		if err != nil {
17278			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
17279		}
17280	}
17281	return
17282}
17283
17284// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a
17285// long-running operation.
17286type VirtualMachinesDeallocateFuture struct {
17287	azure.FutureAPI
17288	// Result returns the result of the asynchronous operation.
17289	// If the operation has not completed it will return an error.
17290	Result func(VirtualMachinesClient) (autorest.Response, error)
17291}
17292
17293// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17294func (future *VirtualMachinesDeallocateFuture) UnmarshalJSON(body []byte) error {
17295	var azFuture azure.Future
17296	if err := json.Unmarshal(body, &azFuture); err != nil {
17297		return err
17298	}
17299	future.FutureAPI = &azFuture
17300	future.Result = future.result
17301	return nil
17302}
17303
17304// result is the default implementation for VirtualMachinesDeallocateFuture.Result.
17305func (future *VirtualMachinesDeallocateFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17306	var done bool
17307	done, err = future.DoneWithContext(context.Background(), client)
17308	if err != nil {
17309		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Polling failure")
17310		return
17311	}
17312	if !done {
17313		ar.Response = future.Response()
17314		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
17315		return
17316	}
17317	ar.Response = future.Response()
17318	return
17319}
17320
17321// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17322// operation.
17323type VirtualMachinesDeleteFuture struct {
17324	azure.FutureAPI
17325	// Result returns the result of the asynchronous operation.
17326	// If the operation has not completed it will return an error.
17327	Result func(VirtualMachinesClient) (autorest.Response, error)
17328}
17329
17330// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17331func (future *VirtualMachinesDeleteFuture) UnmarshalJSON(body []byte) error {
17332	var azFuture azure.Future
17333	if err := json.Unmarshal(body, &azFuture); err != nil {
17334		return err
17335	}
17336	future.FutureAPI = &azFuture
17337	future.Result = future.result
17338	return nil
17339}
17340
17341// result is the default implementation for VirtualMachinesDeleteFuture.Result.
17342func (future *VirtualMachinesDeleteFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17343	var done bool
17344	done, err = future.DoneWithContext(context.Background(), client)
17345	if err != nil {
17346		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure")
17347		return
17348	}
17349	if !done {
17350		ar.Response = future.Response()
17351		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
17352		return
17353	}
17354	ar.Response = future.Response()
17355	return
17356}
17357
17358// VirtualMachinesInstallPatchesFuture an abstraction for monitoring and retrieving the results of a
17359// long-running operation.
17360type VirtualMachinesInstallPatchesFuture struct {
17361	azure.FutureAPI
17362	// Result returns the result of the asynchronous operation.
17363	// If the operation has not completed it will return an error.
17364	Result func(VirtualMachinesClient) (VirtualMachineInstallPatchesResult, error)
17365}
17366
17367// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17368func (future *VirtualMachinesInstallPatchesFuture) UnmarshalJSON(body []byte) error {
17369	var azFuture azure.Future
17370	if err := json.Unmarshal(body, &azFuture); err != nil {
17371		return err
17372	}
17373	future.FutureAPI = &azFuture
17374	future.Result = future.result
17375	return nil
17376}
17377
17378// result is the default implementation for VirtualMachinesInstallPatchesFuture.Result.
17379func (future *VirtualMachinesInstallPatchesFuture) result(client VirtualMachinesClient) (vmipr VirtualMachineInstallPatchesResult, err error) {
17380	var done bool
17381	done, err = future.DoneWithContext(context.Background(), client)
17382	if err != nil {
17383		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesInstallPatchesFuture", "Result", future.Response(), "Polling failure")
17384		return
17385	}
17386	if !done {
17387		vmipr.Response.Response = future.Response()
17388		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesInstallPatchesFuture")
17389		return
17390	}
17391	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17392	if vmipr.Response.Response, err = future.GetResult(sender); err == nil && vmipr.Response.Response.StatusCode != http.StatusNoContent {
17393		vmipr, err = client.InstallPatchesResponder(vmipr.Response.Response)
17394		if err != nil {
17395			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesInstallPatchesFuture", "Result", vmipr.Response.Response, "Failure responding to request")
17396		}
17397	}
17398	return
17399}
17400
17401// VirtualMachineSize describes the properties of a VM size.
17402type VirtualMachineSize struct {
17403	// Name - The name of the virtual machine size.
17404	Name *string `json:"name,omitempty"`
17405	// NumberOfCores - The number of cores supported by the virtual machine size.
17406	NumberOfCores *int32 `json:"numberOfCores,omitempty"`
17407	// OsDiskSizeInMB - The OS disk size, in MB, allowed by the virtual machine size.
17408	OsDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"`
17409	// ResourceDiskSizeInMB - The resource disk size, in MB, allowed by the virtual machine size.
17410	ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"`
17411	// MemoryInMB - The amount of memory, in MB, supported by the virtual machine size.
17412	MemoryInMB *int32 `json:"memoryInMB,omitempty"`
17413	// MaxDataDiskCount - The maximum number of data disks that can be attached to the virtual machine size.
17414	MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"`
17415}
17416
17417// VirtualMachineSizeListResult the List Virtual Machine operation response.
17418type VirtualMachineSizeListResult struct {
17419	autorest.Response `json:"-"`
17420	// Value - The list of virtual machine sizes.
17421	Value *[]VirtualMachineSize `json:"value,omitempty"`
17422}
17423
17424// VirtualMachineSoftwarePatchProperties describes the properties of a Virtual Machine software patch.
17425type VirtualMachineSoftwarePatchProperties struct {
17426	// PatchID - READ-ONLY; A unique identifier for the patch.
17427	PatchID *string `json:"patchId,omitempty"`
17428	// Name - READ-ONLY; The friendly name of the patch.
17429	Name *string `json:"name,omitempty"`
17430	// Version - READ-ONLY; The version number of the patch. This property applies only to Linux patches.
17431	Version *string `json:"version,omitempty"`
17432	// KbID - READ-ONLY; The KBID of the patch. Only applies to Windows patches.
17433	KbID *string `json:"kbId,omitempty"`
17434	// Classifications - READ-ONLY; The classification(s) of the patch as provided by the patch publisher.
17435	Classifications *[]string `json:"classifications,omitempty"`
17436	// RebootBehavior - READ-ONLY; Describes the reboot requirements of the patch. Possible values include: 'VMGuestPatchRebootBehaviorUnknown', 'VMGuestPatchRebootBehaviorNeverReboots', 'VMGuestPatchRebootBehaviorAlwaysRequiresReboot', 'VMGuestPatchRebootBehaviorCanRequestReboot'
17437	RebootBehavior VMGuestPatchRebootBehavior `json:"rebootBehavior,omitempty"`
17438	// ActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
17439	ActivityID *string `json:"activityId,omitempty"`
17440	// PublishedDate - READ-ONLY; The UTC timestamp when the repository published this patch.
17441	PublishedDate *date.Time `json:"publishedDate,omitempty"`
17442	// LastModifiedDateTime - READ-ONLY; The UTC timestamp of the last update to this patch record.
17443	LastModifiedDateTime *date.Time `json:"lastModifiedDateTime,omitempty"`
17444	// AssessmentState - READ-ONLY; Describes the availability of a given patch. Possible values include: 'PatchAssessmentStateUnknown', 'PatchAssessmentStateAvailable'
17445	AssessmentState PatchAssessmentState `json:"assessmentState,omitempty"`
17446}
17447
17448// MarshalJSON is the custom marshaler for VirtualMachineSoftwarePatchProperties.
17449func (vmspp VirtualMachineSoftwarePatchProperties) MarshalJSON() ([]byte, error) {
17450	objectMap := make(map[string]interface{})
17451	return json.Marshal(objectMap)
17452}
17453
17454// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a
17455// long-running operation.
17456type VirtualMachinesPerformMaintenanceFuture struct {
17457	azure.FutureAPI
17458	// Result returns the result of the asynchronous operation.
17459	// If the operation has not completed it will return an error.
17460	Result func(VirtualMachinesClient) (autorest.Response, error)
17461}
17462
17463// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17464func (future *VirtualMachinesPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
17465	var azFuture azure.Future
17466	if err := json.Unmarshal(body, &azFuture); err != nil {
17467		return err
17468	}
17469	future.FutureAPI = &azFuture
17470	future.Result = future.result
17471	return nil
17472}
17473
17474// result is the default implementation for VirtualMachinesPerformMaintenanceFuture.Result.
17475func (future *VirtualMachinesPerformMaintenanceFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17476	var done bool
17477	done, err = future.DoneWithContext(context.Background(), client)
17478	if err != nil {
17479		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
17480		return
17481	}
17482	if !done {
17483		ar.Response = future.Response()
17484		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
17485		return
17486	}
17487	ar.Response = future.Response()
17488	return
17489}
17490
17491// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
17492// operation.
17493type VirtualMachinesPowerOffFuture struct {
17494	azure.FutureAPI
17495	// Result returns the result of the asynchronous operation.
17496	// If the operation has not completed it will return an error.
17497	Result func(VirtualMachinesClient) (autorest.Response, error)
17498}
17499
17500// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17501func (future *VirtualMachinesPowerOffFuture) UnmarshalJSON(body []byte) error {
17502	var azFuture azure.Future
17503	if err := json.Unmarshal(body, &azFuture); err != nil {
17504		return err
17505	}
17506	future.FutureAPI = &azFuture
17507	future.Result = future.result
17508	return nil
17509}
17510
17511// result is the default implementation for VirtualMachinesPowerOffFuture.Result.
17512func (future *VirtualMachinesPowerOffFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17513	var done bool
17514	done, err = future.DoneWithContext(context.Background(), client)
17515	if err != nil {
17516		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Polling failure")
17517		return
17518	}
17519	if !done {
17520		ar.Response = future.Response()
17521		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
17522		return
17523	}
17524	ar.Response = future.Response()
17525	return
17526}
17527
17528// VirtualMachinesReapplyFuture an abstraction for monitoring and retrieving the results of a long-running
17529// operation.
17530type VirtualMachinesReapplyFuture struct {
17531	azure.FutureAPI
17532	// Result returns the result of the asynchronous operation.
17533	// If the operation has not completed it will return an error.
17534	Result func(VirtualMachinesClient) (autorest.Response, error)
17535}
17536
17537// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17538func (future *VirtualMachinesReapplyFuture) UnmarshalJSON(body []byte) error {
17539	var azFuture azure.Future
17540	if err := json.Unmarshal(body, &azFuture); err != nil {
17541		return err
17542	}
17543	future.FutureAPI = &azFuture
17544	future.Result = future.result
17545	return nil
17546}
17547
17548// result is the default implementation for VirtualMachinesReapplyFuture.Result.
17549func (future *VirtualMachinesReapplyFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17550	var done bool
17551	done, err = future.DoneWithContext(context.Background(), client)
17552	if err != nil {
17553		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReapplyFuture", "Result", future.Response(), "Polling failure")
17554		return
17555	}
17556	if !done {
17557		ar.Response = future.Response()
17558		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReapplyFuture")
17559		return
17560	}
17561	ar.Response = future.Response()
17562	return
17563}
17564
17565// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running
17566// operation.
17567type VirtualMachinesRedeployFuture struct {
17568	azure.FutureAPI
17569	// Result returns the result of the asynchronous operation.
17570	// If the operation has not completed it will return an error.
17571	Result func(VirtualMachinesClient) (autorest.Response, error)
17572}
17573
17574// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17575func (future *VirtualMachinesRedeployFuture) UnmarshalJSON(body []byte) error {
17576	var azFuture azure.Future
17577	if err := json.Unmarshal(body, &azFuture); err != nil {
17578		return err
17579	}
17580	future.FutureAPI = &azFuture
17581	future.Result = future.result
17582	return nil
17583}
17584
17585// result is the default implementation for VirtualMachinesRedeployFuture.Result.
17586func (future *VirtualMachinesRedeployFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17587	var done bool
17588	done, err = future.DoneWithContext(context.Background(), client)
17589	if err != nil {
17590		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Polling failure")
17591		return
17592	}
17593	if !done {
17594		ar.Response = future.Response()
17595		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
17596		return
17597	}
17598	ar.Response = future.Response()
17599	return
17600}
17601
17602// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
17603// operation.
17604type VirtualMachinesReimageFuture struct {
17605	azure.FutureAPI
17606	// Result returns the result of the asynchronous operation.
17607	// If the operation has not completed it will return an error.
17608	Result func(VirtualMachinesClient) (autorest.Response, error)
17609}
17610
17611// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17612func (future *VirtualMachinesReimageFuture) UnmarshalJSON(body []byte) error {
17613	var azFuture azure.Future
17614	if err := json.Unmarshal(body, &azFuture); err != nil {
17615		return err
17616	}
17617	future.FutureAPI = &azFuture
17618	future.Result = future.result
17619	return nil
17620}
17621
17622// result is the default implementation for VirtualMachinesReimageFuture.Result.
17623func (future *VirtualMachinesReimageFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17624	var done bool
17625	done, err = future.DoneWithContext(context.Background(), client)
17626	if err != nil {
17627		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReimageFuture", "Result", future.Response(), "Polling failure")
17628		return
17629	}
17630	if !done {
17631		ar.Response = future.Response()
17632		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
17633		return
17634	}
17635	ar.Response = future.Response()
17636	return
17637}
17638
17639// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
17640// operation.
17641type VirtualMachinesRestartFuture struct {
17642	azure.FutureAPI
17643	// Result returns the result of the asynchronous operation.
17644	// If the operation has not completed it will return an error.
17645	Result func(VirtualMachinesClient) (autorest.Response, error)
17646}
17647
17648// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17649func (future *VirtualMachinesRestartFuture) UnmarshalJSON(body []byte) error {
17650	var azFuture azure.Future
17651	if err := json.Unmarshal(body, &azFuture); err != nil {
17652		return err
17653	}
17654	future.FutureAPI = &azFuture
17655	future.Result = future.result
17656	return nil
17657}
17658
17659// result is the default implementation for VirtualMachinesRestartFuture.Result.
17660func (future *VirtualMachinesRestartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17661	var done bool
17662	done, err = future.DoneWithContext(context.Background(), client)
17663	if err != nil {
17664		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Polling failure")
17665		return
17666	}
17667	if !done {
17668		ar.Response = future.Response()
17669		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
17670		return
17671	}
17672	ar.Response = future.Response()
17673	return
17674}
17675
17676// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a
17677// long-running operation.
17678type VirtualMachinesRunCommandFuture struct {
17679	azure.FutureAPI
17680	// Result returns the result of the asynchronous operation.
17681	// If the operation has not completed it will return an error.
17682	Result func(VirtualMachinesClient) (RunCommandResult, error)
17683}
17684
17685// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17686func (future *VirtualMachinesRunCommandFuture) UnmarshalJSON(body []byte) error {
17687	var azFuture azure.Future
17688	if err := json.Unmarshal(body, &azFuture); err != nil {
17689		return err
17690	}
17691	future.FutureAPI = &azFuture
17692	future.Result = future.result
17693	return nil
17694}
17695
17696// result is the default implementation for VirtualMachinesRunCommandFuture.Result.
17697func (future *VirtualMachinesRunCommandFuture) result(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
17698	var done bool
17699	done, err = future.DoneWithContext(context.Background(), client)
17700	if err != nil {
17701		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Polling failure")
17702		return
17703	}
17704	if !done {
17705		rcr.Response.Response = future.Response()
17706		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
17707		return
17708	}
17709	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17710	if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
17711		rcr, err = client.RunCommandResponder(rcr.Response.Response)
17712		if err != nil {
17713			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
17714		}
17715	}
17716	return
17717}
17718
17719// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
17720// operation.
17721type VirtualMachinesStartFuture struct {
17722	azure.FutureAPI
17723	// Result returns the result of the asynchronous operation.
17724	// If the operation has not completed it will return an error.
17725	Result func(VirtualMachinesClient) (autorest.Response, error)
17726}
17727
17728// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17729func (future *VirtualMachinesStartFuture) UnmarshalJSON(body []byte) error {
17730	var azFuture azure.Future
17731	if err := json.Unmarshal(body, &azFuture); err != nil {
17732		return err
17733	}
17734	future.FutureAPI = &azFuture
17735	future.Result = future.result
17736	return nil
17737}
17738
17739// result is the default implementation for VirtualMachinesStartFuture.Result.
17740func (future *VirtualMachinesStartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17741	var done bool
17742	done, err = future.DoneWithContext(context.Background(), client)
17743	if err != nil {
17744		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure")
17745		return
17746	}
17747	if !done {
17748		ar.Response = future.Response()
17749		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
17750		return
17751	}
17752	ar.Response = future.Response()
17753	return
17754}
17755
17756// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view
17757// status summary.
17758type VirtualMachineStatusCodeCount struct {
17759	// Code - READ-ONLY; The instance view status code.
17760	Code *string `json:"code,omitempty"`
17761	// Count - READ-ONLY; The number of instances having a particular status code.
17762	Count *int32 `json:"count,omitempty"`
17763}
17764
17765// MarshalJSON is the custom marshaler for VirtualMachineStatusCodeCount.
17766func (vmscc VirtualMachineStatusCodeCount) MarshalJSON() ([]byte, error) {
17767	objectMap := make(map[string]interface{})
17768	return json.Marshal(objectMap)
17769}
17770
17771// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
17772// operation.
17773type VirtualMachinesUpdateFuture struct {
17774	azure.FutureAPI
17775	// Result returns the result of the asynchronous operation.
17776	// If the operation has not completed it will return an error.
17777	Result func(VirtualMachinesClient) (VirtualMachine, error)
17778}
17779
17780// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17781func (future *VirtualMachinesUpdateFuture) UnmarshalJSON(body []byte) error {
17782	var azFuture azure.Future
17783	if err := json.Unmarshal(body, &azFuture); err != nil {
17784		return err
17785	}
17786	future.FutureAPI = &azFuture
17787	future.Result = future.result
17788	return nil
17789}
17790
17791// result is the default implementation for VirtualMachinesUpdateFuture.Result.
17792func (future *VirtualMachinesUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
17793	var done bool
17794	done, err = future.DoneWithContext(context.Background(), client)
17795	if err != nil {
17796		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Polling failure")
17797		return
17798	}
17799	if !done {
17800		VM.Response.Response = future.Response()
17801		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
17802		return
17803	}
17804	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17805	if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
17806		VM, err = client.UpdateResponder(VM.Response.Response)
17807		if err != nil {
17808			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
17809		}
17810	}
17811	return
17812}
17813
17814// VirtualMachineUpdate describes a Virtual Machine Update.
17815type VirtualMachineUpdate struct {
17816	// 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**.
17817	Plan                      *Plan `json:"plan,omitempty"`
17818	*VirtualMachineProperties `json:"properties,omitempty"`
17819	// Identity - The identity of the virtual machine, if configured.
17820	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
17821	// Zones - The virtual machine zones.
17822	Zones *[]string `json:"zones,omitempty"`
17823	// Tags - Resource tags
17824	Tags map[string]*string `json:"tags"`
17825}
17826
17827// MarshalJSON is the custom marshaler for VirtualMachineUpdate.
17828func (vmu VirtualMachineUpdate) MarshalJSON() ([]byte, error) {
17829	objectMap := make(map[string]interface{})
17830	if vmu.Plan != nil {
17831		objectMap["plan"] = vmu.Plan
17832	}
17833	if vmu.VirtualMachineProperties != nil {
17834		objectMap["properties"] = vmu.VirtualMachineProperties
17835	}
17836	if vmu.Identity != nil {
17837		objectMap["identity"] = vmu.Identity
17838	}
17839	if vmu.Zones != nil {
17840		objectMap["zones"] = vmu.Zones
17841	}
17842	if vmu.Tags != nil {
17843		objectMap["tags"] = vmu.Tags
17844	}
17845	return json.Marshal(objectMap)
17846}
17847
17848// UnmarshalJSON is the custom unmarshaler for VirtualMachineUpdate struct.
17849func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error {
17850	var m map[string]*json.RawMessage
17851	err := json.Unmarshal(body, &m)
17852	if err != nil {
17853		return err
17854	}
17855	for k, v := range m {
17856		switch k {
17857		case "plan":
17858			if v != nil {
17859				var plan Plan
17860				err = json.Unmarshal(*v, &plan)
17861				if err != nil {
17862					return err
17863				}
17864				vmu.Plan = &plan
17865			}
17866		case "properties":
17867			if v != nil {
17868				var virtualMachineProperties VirtualMachineProperties
17869				err = json.Unmarshal(*v, &virtualMachineProperties)
17870				if err != nil {
17871					return err
17872				}
17873				vmu.VirtualMachineProperties = &virtualMachineProperties
17874			}
17875		case "identity":
17876			if v != nil {
17877				var identity VirtualMachineIdentity
17878				err = json.Unmarshal(*v, &identity)
17879				if err != nil {
17880					return err
17881				}
17882				vmu.Identity = &identity
17883			}
17884		case "zones":
17885			if v != nil {
17886				var zones []string
17887				err = json.Unmarshal(*v, &zones)
17888				if err != nil {
17889					return err
17890				}
17891				vmu.Zones = &zones
17892			}
17893		case "tags":
17894			if v != nil {
17895				var tags map[string]*string
17896				err = json.Unmarshal(*v, &tags)
17897				if err != nil {
17898					return err
17899				}
17900				vmu.Tags = tags
17901			}
17902		}
17903	}
17904
17905	return nil
17906}
17907
17908// VMScaleSetConvertToSinglePlacementGroupInput ...
17909type VMScaleSetConvertToSinglePlacementGroupInput struct {
17910	// 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.
17911	ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"`
17912}
17913
17914// WindowsConfiguration specifies Windows operating system settings on the virtual machine.
17915type WindowsConfiguration struct {
17916	// 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.
17917	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
17918	// 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.
17919	EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
17920	// TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". <br><br> Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.getsystemtimezones).
17921	TimeZone *string `json:"timeZone,omitempty"`
17922	// AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.
17923	AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"`
17924	// PatchSettings - [Preview Feature] Specifies settings related to VM Guest Patching on Windows.
17925	PatchSettings *PatchSettings `json:"patchSettings,omitempty"`
17926	// WinRM - Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.
17927	WinRM *WinRMConfiguration `json:"winRM,omitempty"`
17928}
17929
17930// WindowsParameters input for InstallPatches on a Windows VM, as directly received by the API
17931type WindowsParameters struct {
17932	// ClassificationsToInclude - The update classifications to select when installing patches for Windows.
17933	ClassificationsToInclude *[]VMGuestPatchClassificationWindows `json:"classificationsToInclude,omitempty"`
17934	// KbNumbersToInclude - Kbs to include in the patch operation
17935	KbNumbersToInclude *[]string `json:"kbNumbersToInclude,omitempty"`
17936	// KbNumbersToExclude - Kbs to exclude in the patch operation
17937	KbNumbersToExclude *[]string `json:"kbNumbersToExclude,omitempty"`
17938	// ExcludeKbsRequiringReboot - Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true.
17939	ExcludeKbsRequiringReboot *bool `json:"excludeKbsRequiringReboot,omitempty"`
17940	// MaxPatchPublishDate - This is used to install patches that were published on or before this given max published date.
17941	MaxPatchPublishDate *date.Time `json:"maxPatchPublishDate,omitempty"`
17942}
17943
17944// WinRMConfiguration describes Windows Remote Management configuration of the VM
17945type WinRMConfiguration struct {
17946	// Listeners - The list of Windows Remote Management listeners
17947	Listeners *[]WinRMListener `json:"listeners,omitempty"`
17948}
17949
17950// WinRMListener describes Protocol and thumbprint of Windows Remote Management listener
17951type WinRMListener struct {
17952	// Protocol - Specifies the protocol of WinRM listener. <br><br> Possible values are: <br>**http** <br><br> **https**. Possible values include: 'HTTP', 'HTTPS'
17953	Protocol ProtocolTypes `json:"protocol,omitempty"`
17954	// 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>}
17955	CertificateURL *string `json:"certificateUrl,omitempty"`
17956}
17957