1package compute
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/azure"
25	"github.com/Azure/go-autorest/autorest/date"
26	"github.com/Azure/go-autorest/autorest/to"
27	"github.com/Azure/go-autorest/tracing"
28	"net/http"
29)
30
31// The package's fully qualified name.
32const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-12-01/compute"
33
34// CachingTypes enumerates the values for caching types.
35type CachingTypes string
36
37const (
38	// None ...
39	None CachingTypes = "None"
40	// ReadOnly ...
41	ReadOnly CachingTypes = "ReadOnly"
42	// ReadWrite ...
43	ReadWrite CachingTypes = "ReadWrite"
44)
45
46// PossibleCachingTypesValues returns an array of possible values for the CachingTypes const type.
47func PossibleCachingTypesValues() []CachingTypes {
48	return []CachingTypes{None, ReadOnly, ReadWrite}
49}
50
51// ComponentNames enumerates the values for component names.
52type ComponentNames string
53
54const (
55	// MicrosoftWindowsShellSetup ...
56	MicrosoftWindowsShellSetup ComponentNames = "Microsoft-Windows-Shell-Setup"
57)
58
59// PossibleComponentNamesValues returns an array of possible values for the ComponentNames const type.
60func PossibleComponentNamesValues() []ComponentNames {
61	return []ComponentNames{MicrosoftWindowsShellSetup}
62}
63
64// DiskCreateOptionTypes enumerates the values for disk create option types.
65type DiskCreateOptionTypes string
66
67const (
68	// Attach ...
69	Attach DiskCreateOptionTypes = "Attach"
70	// Empty ...
71	Empty DiskCreateOptionTypes = "Empty"
72	// FromImage ...
73	FromImage DiskCreateOptionTypes = "FromImage"
74)
75
76// PossibleDiskCreateOptionTypesValues returns an array of possible values for the DiskCreateOptionTypes const type.
77func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes {
78	return []DiskCreateOptionTypes{Attach, Empty, FromImage}
79}
80
81// InstanceViewTypes enumerates the values for instance view types.
82type InstanceViewTypes string
83
84const (
85	// InstanceView ...
86	InstanceView InstanceViewTypes = "instanceView"
87)
88
89// PossibleInstanceViewTypesValues returns an array of possible values for the InstanceViewTypes const type.
90func PossibleInstanceViewTypesValues() []InstanceViewTypes {
91	return []InstanceViewTypes{InstanceView}
92}
93
94// IntervalInMins enumerates the values for interval in mins.
95type IntervalInMins string
96
97const (
98	// FiveMins ...
99	FiveMins IntervalInMins = "FiveMins"
100	// SixtyMins ...
101	SixtyMins IntervalInMins = "SixtyMins"
102	// ThirtyMins ...
103	ThirtyMins IntervalInMins = "ThirtyMins"
104	// ThreeMins ...
105	ThreeMins IntervalInMins = "ThreeMins"
106)
107
108// PossibleIntervalInMinsValues returns an array of possible values for the IntervalInMins const type.
109func PossibleIntervalInMinsValues() []IntervalInMins {
110	return []IntervalInMins{FiveMins, SixtyMins, ThirtyMins, ThreeMins}
111}
112
113// IPVersion enumerates the values for ip version.
114type IPVersion string
115
116const (
117	// IPv4 ...
118	IPv4 IPVersion = "IPv4"
119	// IPv6 ...
120	IPv6 IPVersion = "IPv6"
121)
122
123// PossibleIPVersionValues returns an array of possible values for the IPVersion const type.
124func PossibleIPVersionValues() []IPVersion {
125	return []IPVersion{IPv4, IPv6}
126}
127
128// MaintenanceOperationResultCodeTypes enumerates the values for maintenance operation result code types.
129type MaintenanceOperationResultCodeTypes string
130
131const (
132	// MaintenanceOperationResultCodeTypesMaintenanceAborted ...
133	MaintenanceOperationResultCodeTypesMaintenanceAborted MaintenanceOperationResultCodeTypes = "MaintenanceAborted"
134	// MaintenanceOperationResultCodeTypesMaintenanceCompleted ...
135	MaintenanceOperationResultCodeTypesMaintenanceCompleted MaintenanceOperationResultCodeTypes = "MaintenanceCompleted"
136	// MaintenanceOperationResultCodeTypesNone ...
137	MaintenanceOperationResultCodeTypesNone MaintenanceOperationResultCodeTypes = "None"
138	// MaintenanceOperationResultCodeTypesRetryLater ...
139	MaintenanceOperationResultCodeTypesRetryLater MaintenanceOperationResultCodeTypes = "RetryLater"
140)
141
142// PossibleMaintenanceOperationResultCodeTypesValues returns an array of possible values for the MaintenanceOperationResultCodeTypes const type.
143func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationResultCodeTypes {
144	return []MaintenanceOperationResultCodeTypes{MaintenanceOperationResultCodeTypesMaintenanceAborted, MaintenanceOperationResultCodeTypesMaintenanceCompleted, MaintenanceOperationResultCodeTypesNone, MaintenanceOperationResultCodeTypesRetryLater}
145}
146
147// OperatingSystemStateTypes enumerates the values for operating system state types.
148type OperatingSystemStateTypes string
149
150const (
151	// Generalized ...
152	Generalized OperatingSystemStateTypes = "Generalized"
153	// Specialized ...
154	Specialized OperatingSystemStateTypes = "Specialized"
155)
156
157// PossibleOperatingSystemStateTypesValues returns an array of possible values for the OperatingSystemStateTypes const type.
158func PossibleOperatingSystemStateTypesValues() []OperatingSystemStateTypes {
159	return []OperatingSystemStateTypes{Generalized, Specialized}
160}
161
162// OperatingSystemTypes enumerates the values for operating system types.
163type OperatingSystemTypes string
164
165const (
166	// Linux ...
167	Linux OperatingSystemTypes = "Linux"
168	// Windows ...
169	Windows OperatingSystemTypes = "Windows"
170)
171
172// PossibleOperatingSystemTypesValues returns an array of possible values for the OperatingSystemTypes const type.
173func PossibleOperatingSystemTypesValues() []OperatingSystemTypes {
174	return []OperatingSystemTypes{Linux, Windows}
175}
176
177// PassNames enumerates the values for pass names.
178type PassNames string
179
180const (
181	// OobeSystem ...
182	OobeSystem PassNames = "OobeSystem"
183)
184
185// PossiblePassNamesValues returns an array of possible values for the PassNames const type.
186func PossiblePassNamesValues() []PassNames {
187	return []PassNames{OobeSystem}
188}
189
190// ProtocolTypes enumerates the values for protocol types.
191type ProtocolTypes string
192
193const (
194	// HTTP ...
195	HTTP ProtocolTypes = "Http"
196	// HTTPS ...
197	HTTPS ProtocolTypes = "Https"
198)
199
200// PossibleProtocolTypesValues returns an array of possible values for the ProtocolTypes const type.
201func PossibleProtocolTypesValues() []ProtocolTypes {
202	return []ProtocolTypes{HTTP, HTTPS}
203}
204
205// ResourceIdentityType enumerates the values for resource identity type.
206type ResourceIdentityType string
207
208const (
209	// ResourceIdentityTypeNone ...
210	ResourceIdentityTypeNone ResourceIdentityType = "None"
211	// ResourceIdentityTypeSystemAssigned ...
212	ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned"
213	// ResourceIdentityTypeSystemAssignedUserAssigned ...
214	ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned"
215	// ResourceIdentityTypeUserAssigned ...
216	ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned"
217)
218
219// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
220func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
221	return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned}
222}
223
224// RollingUpgradeActionType enumerates the values for rolling upgrade action type.
225type RollingUpgradeActionType string
226
227const (
228	// Cancel ...
229	Cancel RollingUpgradeActionType = "Cancel"
230	// Start ...
231	Start RollingUpgradeActionType = "Start"
232)
233
234// PossibleRollingUpgradeActionTypeValues returns an array of possible values for the RollingUpgradeActionType const type.
235func PossibleRollingUpgradeActionTypeValues() []RollingUpgradeActionType {
236	return []RollingUpgradeActionType{Cancel, Start}
237}
238
239// RollingUpgradeStatusCode enumerates the values for rolling upgrade status code.
240type RollingUpgradeStatusCode string
241
242const (
243	// Cancelled ...
244	Cancelled RollingUpgradeStatusCode = "Cancelled"
245	// Completed ...
246	Completed RollingUpgradeStatusCode = "Completed"
247	// Faulted ...
248	Faulted RollingUpgradeStatusCode = "Faulted"
249	// RollingForward ...
250	RollingForward RollingUpgradeStatusCode = "RollingForward"
251)
252
253// PossibleRollingUpgradeStatusCodeValues returns an array of possible values for the RollingUpgradeStatusCode const type.
254func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode {
255	return []RollingUpgradeStatusCode{Cancelled, Completed, Faulted, RollingForward}
256}
257
258// SettingNames enumerates the values for setting names.
259type SettingNames string
260
261const (
262	// AutoLogon ...
263	AutoLogon SettingNames = "AutoLogon"
264	// FirstLogonCommands ...
265	FirstLogonCommands SettingNames = "FirstLogonCommands"
266)
267
268// PossibleSettingNamesValues returns an array of possible values for the SettingNames const type.
269func PossibleSettingNamesValues() []SettingNames {
270	return []SettingNames{AutoLogon, FirstLogonCommands}
271}
272
273// StatusLevelTypes enumerates the values for status level types.
274type StatusLevelTypes string
275
276const (
277	// Error ...
278	Error StatusLevelTypes = "Error"
279	// Info ...
280	Info StatusLevelTypes = "Info"
281	// Warning ...
282	Warning StatusLevelTypes = "Warning"
283)
284
285// PossibleStatusLevelTypesValues returns an array of possible values for the StatusLevelTypes const type.
286func PossibleStatusLevelTypesValues() []StatusLevelTypes {
287	return []StatusLevelTypes{Error, Info, Warning}
288}
289
290// StorageAccountTypes enumerates the values for storage account types.
291type StorageAccountTypes string
292
293const (
294	// PremiumLRS ...
295	PremiumLRS StorageAccountTypes = "Premium_LRS"
296	// StandardLRS ...
297	StandardLRS StorageAccountTypes = "Standard_LRS"
298)
299
300// PossibleStorageAccountTypesValues returns an array of possible values for the StorageAccountTypes const type.
301func PossibleStorageAccountTypesValues() []StorageAccountTypes {
302	return []StorageAccountTypes{PremiumLRS, StandardLRS}
303}
304
305// UpgradeMode enumerates the values for upgrade mode.
306type UpgradeMode string
307
308const (
309	// Automatic ...
310	Automatic UpgradeMode = "Automatic"
311	// Manual ...
312	Manual UpgradeMode = "Manual"
313	// Rolling ...
314	Rolling UpgradeMode = "Rolling"
315)
316
317// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type.
318func PossibleUpgradeModeValues() []UpgradeMode {
319	return []UpgradeMode{Automatic, Manual, Rolling}
320}
321
322// UpgradeOperationInvoker enumerates the values for upgrade operation invoker.
323type UpgradeOperationInvoker string
324
325const (
326	// Platform ...
327	Platform UpgradeOperationInvoker = "Platform"
328	// Unknown ...
329	Unknown UpgradeOperationInvoker = "Unknown"
330	// User ...
331	User UpgradeOperationInvoker = "User"
332)
333
334// PossibleUpgradeOperationInvokerValues returns an array of possible values for the UpgradeOperationInvoker const type.
335func PossibleUpgradeOperationInvokerValues() []UpgradeOperationInvoker {
336	return []UpgradeOperationInvoker{Platform, Unknown, User}
337}
338
339// UpgradeState enumerates the values for upgrade state.
340type UpgradeState string
341
342const (
343	// UpgradeStateCancelled ...
344	UpgradeStateCancelled UpgradeState = "Cancelled"
345	// UpgradeStateCompleted ...
346	UpgradeStateCompleted UpgradeState = "Completed"
347	// UpgradeStateFaulted ...
348	UpgradeStateFaulted UpgradeState = "Faulted"
349	// UpgradeStateRollingForward ...
350	UpgradeStateRollingForward UpgradeState = "RollingForward"
351)
352
353// PossibleUpgradeStateValues returns an array of possible values for the UpgradeState const type.
354func PossibleUpgradeStateValues() []UpgradeState {
355	return []UpgradeState{UpgradeStateCancelled, UpgradeStateCompleted, UpgradeStateFaulted, UpgradeStateRollingForward}
356}
357
358// VirtualMachineEvictionPolicyTypes enumerates the values for virtual machine eviction policy types.
359type VirtualMachineEvictionPolicyTypes string
360
361const (
362	// Deallocate ...
363	Deallocate VirtualMachineEvictionPolicyTypes = "Deallocate"
364	// Delete ...
365	Delete VirtualMachineEvictionPolicyTypes = "Delete"
366)
367
368// PossibleVirtualMachineEvictionPolicyTypesValues returns an array of possible values for the VirtualMachineEvictionPolicyTypes const type.
369func PossibleVirtualMachineEvictionPolicyTypesValues() []VirtualMachineEvictionPolicyTypes {
370	return []VirtualMachineEvictionPolicyTypes{Deallocate, Delete}
371}
372
373// VirtualMachinePriorityTypes enumerates the values for virtual machine priority types.
374type VirtualMachinePriorityTypes string
375
376const (
377	// Low ...
378	Low VirtualMachinePriorityTypes = "Low"
379	// Regular ...
380	Regular VirtualMachinePriorityTypes = "Regular"
381)
382
383// PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type.
384func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes {
385	return []VirtualMachinePriorityTypes{Low, Regular}
386}
387
388// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine scale set sku scale type.
389type VirtualMachineScaleSetSkuScaleType string
390
391const (
392	// VirtualMachineScaleSetSkuScaleTypeAutomatic ...
393	VirtualMachineScaleSetSkuScaleTypeAutomatic VirtualMachineScaleSetSkuScaleType = "Automatic"
394	// VirtualMachineScaleSetSkuScaleTypeNone ...
395	VirtualMachineScaleSetSkuScaleTypeNone VirtualMachineScaleSetSkuScaleType = "None"
396)
397
398// PossibleVirtualMachineScaleSetSkuScaleTypeValues returns an array of possible values for the VirtualMachineScaleSetSkuScaleType const type.
399func PossibleVirtualMachineScaleSetSkuScaleTypeValues() []VirtualMachineScaleSetSkuScaleType {
400	return []VirtualMachineScaleSetSkuScaleType{VirtualMachineScaleSetSkuScaleTypeAutomatic, VirtualMachineScaleSetSkuScaleTypeNone}
401}
402
403// VirtualMachineSizeTypes enumerates the values for virtual machine size types.
404type VirtualMachineSizeTypes string
405
406const (
407	// BasicA0 ...
408	BasicA0 VirtualMachineSizeTypes = "Basic_A0"
409	// BasicA1 ...
410	BasicA1 VirtualMachineSizeTypes = "Basic_A1"
411	// BasicA2 ...
412	BasicA2 VirtualMachineSizeTypes = "Basic_A2"
413	// BasicA3 ...
414	BasicA3 VirtualMachineSizeTypes = "Basic_A3"
415	// BasicA4 ...
416	BasicA4 VirtualMachineSizeTypes = "Basic_A4"
417	// StandardA0 ...
418	StandardA0 VirtualMachineSizeTypes = "Standard_A0"
419	// StandardA1 ...
420	StandardA1 VirtualMachineSizeTypes = "Standard_A1"
421	// StandardA10 ...
422	StandardA10 VirtualMachineSizeTypes = "Standard_A10"
423	// StandardA11 ...
424	StandardA11 VirtualMachineSizeTypes = "Standard_A11"
425	// StandardA1V2 ...
426	StandardA1V2 VirtualMachineSizeTypes = "Standard_A1_v2"
427	// StandardA2 ...
428	StandardA2 VirtualMachineSizeTypes = "Standard_A2"
429	// StandardA2mV2 ...
430	StandardA2mV2 VirtualMachineSizeTypes = "Standard_A2m_v2"
431	// StandardA2V2 ...
432	StandardA2V2 VirtualMachineSizeTypes = "Standard_A2_v2"
433	// StandardA3 ...
434	StandardA3 VirtualMachineSizeTypes = "Standard_A3"
435	// StandardA4 ...
436	StandardA4 VirtualMachineSizeTypes = "Standard_A4"
437	// StandardA4mV2 ...
438	StandardA4mV2 VirtualMachineSizeTypes = "Standard_A4m_v2"
439	// StandardA4V2 ...
440	StandardA4V2 VirtualMachineSizeTypes = "Standard_A4_v2"
441	// StandardA5 ...
442	StandardA5 VirtualMachineSizeTypes = "Standard_A5"
443	// StandardA6 ...
444	StandardA6 VirtualMachineSizeTypes = "Standard_A6"
445	// StandardA7 ...
446	StandardA7 VirtualMachineSizeTypes = "Standard_A7"
447	// StandardA8 ...
448	StandardA8 VirtualMachineSizeTypes = "Standard_A8"
449	// StandardA8mV2 ...
450	StandardA8mV2 VirtualMachineSizeTypes = "Standard_A8m_v2"
451	// StandardA8V2 ...
452	StandardA8V2 VirtualMachineSizeTypes = "Standard_A8_v2"
453	// StandardA9 ...
454	StandardA9 VirtualMachineSizeTypes = "Standard_A9"
455	// StandardB1ms ...
456	StandardB1ms VirtualMachineSizeTypes = "Standard_B1ms"
457	// StandardB1s ...
458	StandardB1s VirtualMachineSizeTypes = "Standard_B1s"
459	// StandardB2ms ...
460	StandardB2ms VirtualMachineSizeTypes = "Standard_B2ms"
461	// StandardB2s ...
462	StandardB2s VirtualMachineSizeTypes = "Standard_B2s"
463	// StandardB4ms ...
464	StandardB4ms VirtualMachineSizeTypes = "Standard_B4ms"
465	// StandardB8ms ...
466	StandardB8ms VirtualMachineSizeTypes = "Standard_B8ms"
467	// StandardD1 ...
468	StandardD1 VirtualMachineSizeTypes = "Standard_D1"
469	// StandardD11 ...
470	StandardD11 VirtualMachineSizeTypes = "Standard_D11"
471	// StandardD11V2 ...
472	StandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2"
473	// StandardD12 ...
474	StandardD12 VirtualMachineSizeTypes = "Standard_D12"
475	// StandardD12V2 ...
476	StandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2"
477	// StandardD13 ...
478	StandardD13 VirtualMachineSizeTypes = "Standard_D13"
479	// StandardD13V2 ...
480	StandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2"
481	// StandardD14 ...
482	StandardD14 VirtualMachineSizeTypes = "Standard_D14"
483	// StandardD14V2 ...
484	StandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2"
485	// StandardD15V2 ...
486	StandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2"
487	// StandardD16sV3 ...
488	StandardD16sV3 VirtualMachineSizeTypes = "Standard_D16s_v3"
489	// StandardD16V3 ...
490	StandardD16V3 VirtualMachineSizeTypes = "Standard_D16_v3"
491	// StandardD1V2 ...
492	StandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2"
493	// StandardD2 ...
494	StandardD2 VirtualMachineSizeTypes = "Standard_D2"
495	// StandardD2sV3 ...
496	StandardD2sV3 VirtualMachineSizeTypes = "Standard_D2s_v3"
497	// StandardD2V2 ...
498	StandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2"
499	// StandardD2V3 ...
500	StandardD2V3 VirtualMachineSizeTypes = "Standard_D2_v3"
501	// StandardD3 ...
502	StandardD3 VirtualMachineSizeTypes = "Standard_D3"
503	// StandardD32sV3 ...
504	StandardD32sV3 VirtualMachineSizeTypes = "Standard_D32s_v3"
505	// StandardD32V3 ...
506	StandardD32V3 VirtualMachineSizeTypes = "Standard_D32_v3"
507	// StandardD3V2 ...
508	StandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2"
509	// StandardD4 ...
510	StandardD4 VirtualMachineSizeTypes = "Standard_D4"
511	// StandardD4sV3 ...
512	StandardD4sV3 VirtualMachineSizeTypes = "Standard_D4s_v3"
513	// StandardD4V2 ...
514	StandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2"
515	// StandardD4V3 ...
516	StandardD4V3 VirtualMachineSizeTypes = "Standard_D4_v3"
517	// StandardD5V2 ...
518	StandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2"
519	// StandardD64sV3 ...
520	StandardD64sV3 VirtualMachineSizeTypes = "Standard_D64s_v3"
521	// StandardD64V3 ...
522	StandardD64V3 VirtualMachineSizeTypes = "Standard_D64_v3"
523	// StandardD8sV3 ...
524	StandardD8sV3 VirtualMachineSizeTypes = "Standard_D8s_v3"
525	// StandardD8V3 ...
526	StandardD8V3 VirtualMachineSizeTypes = "Standard_D8_v3"
527	// StandardDS1 ...
528	StandardDS1 VirtualMachineSizeTypes = "Standard_DS1"
529	// StandardDS11 ...
530	StandardDS11 VirtualMachineSizeTypes = "Standard_DS11"
531	// StandardDS11V2 ...
532	StandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2"
533	// StandardDS12 ...
534	StandardDS12 VirtualMachineSizeTypes = "Standard_DS12"
535	// StandardDS12V2 ...
536	StandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2"
537	// StandardDS13 ...
538	StandardDS13 VirtualMachineSizeTypes = "Standard_DS13"
539	// StandardDS132V2 ...
540	StandardDS132V2 VirtualMachineSizeTypes = "Standard_DS13-2_v2"
541	// StandardDS134V2 ...
542	StandardDS134V2 VirtualMachineSizeTypes = "Standard_DS13-4_v2"
543	// StandardDS13V2 ...
544	StandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2"
545	// StandardDS14 ...
546	StandardDS14 VirtualMachineSizeTypes = "Standard_DS14"
547	// StandardDS144V2 ...
548	StandardDS144V2 VirtualMachineSizeTypes = "Standard_DS14-4_v2"
549	// StandardDS148V2 ...
550	StandardDS148V2 VirtualMachineSizeTypes = "Standard_DS14-8_v2"
551	// StandardDS14V2 ...
552	StandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2"
553	// StandardDS15V2 ...
554	StandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2"
555	// StandardDS1V2 ...
556	StandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2"
557	// StandardDS2 ...
558	StandardDS2 VirtualMachineSizeTypes = "Standard_DS2"
559	// StandardDS2V2 ...
560	StandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2"
561	// StandardDS3 ...
562	StandardDS3 VirtualMachineSizeTypes = "Standard_DS3"
563	// StandardDS3V2 ...
564	StandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2"
565	// StandardDS4 ...
566	StandardDS4 VirtualMachineSizeTypes = "Standard_DS4"
567	// StandardDS4V2 ...
568	StandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2"
569	// StandardDS5V2 ...
570	StandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2"
571	// StandardE16sV3 ...
572	StandardE16sV3 VirtualMachineSizeTypes = "Standard_E16s_v3"
573	// StandardE16V3 ...
574	StandardE16V3 VirtualMachineSizeTypes = "Standard_E16_v3"
575	// StandardE2sV3 ...
576	StandardE2sV3 VirtualMachineSizeTypes = "Standard_E2s_v3"
577	// StandardE2V3 ...
578	StandardE2V3 VirtualMachineSizeTypes = "Standard_E2_v3"
579	// StandardE3216V3 ...
580	StandardE3216V3 VirtualMachineSizeTypes = "Standard_E32-16_v3"
581	// StandardE328sV3 ...
582	StandardE328sV3 VirtualMachineSizeTypes = "Standard_E32-8s_v3"
583	// StandardE32sV3 ...
584	StandardE32sV3 VirtualMachineSizeTypes = "Standard_E32s_v3"
585	// StandardE32V3 ...
586	StandardE32V3 VirtualMachineSizeTypes = "Standard_E32_v3"
587	// StandardE4sV3 ...
588	StandardE4sV3 VirtualMachineSizeTypes = "Standard_E4s_v3"
589	// StandardE4V3 ...
590	StandardE4V3 VirtualMachineSizeTypes = "Standard_E4_v3"
591	// StandardE6416sV3 ...
592	StandardE6416sV3 VirtualMachineSizeTypes = "Standard_E64-16s_v3"
593	// StandardE6432sV3 ...
594	StandardE6432sV3 VirtualMachineSizeTypes = "Standard_E64-32s_v3"
595	// StandardE64sV3 ...
596	StandardE64sV3 VirtualMachineSizeTypes = "Standard_E64s_v3"
597	// StandardE64V3 ...
598	StandardE64V3 VirtualMachineSizeTypes = "Standard_E64_v3"
599	// StandardE8sV3 ...
600	StandardE8sV3 VirtualMachineSizeTypes = "Standard_E8s_v3"
601	// StandardE8V3 ...
602	StandardE8V3 VirtualMachineSizeTypes = "Standard_E8_v3"
603	// StandardF1 ...
604	StandardF1 VirtualMachineSizeTypes = "Standard_F1"
605	// StandardF16 ...
606	StandardF16 VirtualMachineSizeTypes = "Standard_F16"
607	// StandardF16s ...
608	StandardF16s VirtualMachineSizeTypes = "Standard_F16s"
609	// StandardF16sV2 ...
610	StandardF16sV2 VirtualMachineSizeTypes = "Standard_F16s_v2"
611	// StandardF1s ...
612	StandardF1s VirtualMachineSizeTypes = "Standard_F1s"
613	// StandardF2 ...
614	StandardF2 VirtualMachineSizeTypes = "Standard_F2"
615	// StandardF2s ...
616	StandardF2s VirtualMachineSizeTypes = "Standard_F2s"
617	// StandardF2sV2 ...
618	StandardF2sV2 VirtualMachineSizeTypes = "Standard_F2s_v2"
619	// StandardF32sV2 ...
620	StandardF32sV2 VirtualMachineSizeTypes = "Standard_F32s_v2"
621	// StandardF4 ...
622	StandardF4 VirtualMachineSizeTypes = "Standard_F4"
623	// StandardF4s ...
624	StandardF4s VirtualMachineSizeTypes = "Standard_F4s"
625	// StandardF4sV2 ...
626	StandardF4sV2 VirtualMachineSizeTypes = "Standard_F4s_v2"
627	// StandardF64sV2 ...
628	StandardF64sV2 VirtualMachineSizeTypes = "Standard_F64s_v2"
629	// StandardF72sV2 ...
630	StandardF72sV2 VirtualMachineSizeTypes = "Standard_F72s_v2"
631	// StandardF8 ...
632	StandardF8 VirtualMachineSizeTypes = "Standard_F8"
633	// StandardF8s ...
634	StandardF8s VirtualMachineSizeTypes = "Standard_F8s"
635	// StandardF8sV2 ...
636	StandardF8sV2 VirtualMachineSizeTypes = "Standard_F8s_v2"
637	// StandardG1 ...
638	StandardG1 VirtualMachineSizeTypes = "Standard_G1"
639	// StandardG2 ...
640	StandardG2 VirtualMachineSizeTypes = "Standard_G2"
641	// StandardG3 ...
642	StandardG3 VirtualMachineSizeTypes = "Standard_G3"
643	// StandardG4 ...
644	StandardG4 VirtualMachineSizeTypes = "Standard_G4"
645	// StandardG5 ...
646	StandardG5 VirtualMachineSizeTypes = "Standard_G5"
647	// StandardGS1 ...
648	StandardGS1 VirtualMachineSizeTypes = "Standard_GS1"
649	// StandardGS2 ...
650	StandardGS2 VirtualMachineSizeTypes = "Standard_GS2"
651	// StandardGS3 ...
652	StandardGS3 VirtualMachineSizeTypes = "Standard_GS3"
653	// StandardGS4 ...
654	StandardGS4 VirtualMachineSizeTypes = "Standard_GS4"
655	// StandardGS44 ...
656	StandardGS44 VirtualMachineSizeTypes = "Standard_GS4-4"
657	// StandardGS48 ...
658	StandardGS48 VirtualMachineSizeTypes = "Standard_GS4-8"
659	// StandardGS5 ...
660	StandardGS5 VirtualMachineSizeTypes = "Standard_GS5"
661	// StandardGS516 ...
662	StandardGS516 VirtualMachineSizeTypes = "Standard_GS5-16"
663	// StandardGS58 ...
664	StandardGS58 VirtualMachineSizeTypes = "Standard_GS5-8"
665	// StandardH16 ...
666	StandardH16 VirtualMachineSizeTypes = "Standard_H16"
667	// StandardH16m ...
668	StandardH16m VirtualMachineSizeTypes = "Standard_H16m"
669	// StandardH16mr ...
670	StandardH16mr VirtualMachineSizeTypes = "Standard_H16mr"
671	// StandardH16r ...
672	StandardH16r VirtualMachineSizeTypes = "Standard_H16r"
673	// StandardH8 ...
674	StandardH8 VirtualMachineSizeTypes = "Standard_H8"
675	// StandardH8m ...
676	StandardH8m VirtualMachineSizeTypes = "Standard_H8m"
677	// StandardL16s ...
678	StandardL16s VirtualMachineSizeTypes = "Standard_L16s"
679	// StandardL32s ...
680	StandardL32s VirtualMachineSizeTypes = "Standard_L32s"
681	// StandardL4s ...
682	StandardL4s VirtualMachineSizeTypes = "Standard_L4s"
683	// StandardL8s ...
684	StandardL8s VirtualMachineSizeTypes = "Standard_L8s"
685	// StandardM12832ms ...
686	StandardM12832ms VirtualMachineSizeTypes = "Standard_M128-32ms"
687	// StandardM12864ms ...
688	StandardM12864ms VirtualMachineSizeTypes = "Standard_M128-64ms"
689	// StandardM128ms ...
690	StandardM128ms VirtualMachineSizeTypes = "Standard_M128ms"
691	// StandardM128s ...
692	StandardM128s VirtualMachineSizeTypes = "Standard_M128s"
693	// StandardM6416ms ...
694	StandardM6416ms VirtualMachineSizeTypes = "Standard_M64-16ms"
695	// StandardM6432ms ...
696	StandardM6432ms VirtualMachineSizeTypes = "Standard_M64-32ms"
697	// StandardM64ms ...
698	StandardM64ms VirtualMachineSizeTypes = "Standard_M64ms"
699	// StandardM64s ...
700	StandardM64s VirtualMachineSizeTypes = "Standard_M64s"
701	// StandardNC12 ...
702	StandardNC12 VirtualMachineSizeTypes = "Standard_NC12"
703	// StandardNC12sV2 ...
704	StandardNC12sV2 VirtualMachineSizeTypes = "Standard_NC12s_v2"
705	// StandardNC12sV3 ...
706	StandardNC12sV3 VirtualMachineSizeTypes = "Standard_NC12s_v3"
707	// StandardNC24 ...
708	StandardNC24 VirtualMachineSizeTypes = "Standard_NC24"
709	// StandardNC24r ...
710	StandardNC24r VirtualMachineSizeTypes = "Standard_NC24r"
711	// StandardNC24rsV2 ...
712	StandardNC24rsV2 VirtualMachineSizeTypes = "Standard_NC24rs_v2"
713	// StandardNC24rsV3 ...
714	StandardNC24rsV3 VirtualMachineSizeTypes = "Standard_NC24rs_v3"
715	// StandardNC24sV2 ...
716	StandardNC24sV2 VirtualMachineSizeTypes = "Standard_NC24s_v2"
717	// StandardNC24sV3 ...
718	StandardNC24sV3 VirtualMachineSizeTypes = "Standard_NC24s_v3"
719	// StandardNC6 ...
720	StandardNC6 VirtualMachineSizeTypes = "Standard_NC6"
721	// StandardNC6sV2 ...
722	StandardNC6sV2 VirtualMachineSizeTypes = "Standard_NC6s_v2"
723	// StandardNC6sV3 ...
724	StandardNC6sV3 VirtualMachineSizeTypes = "Standard_NC6s_v3"
725	// StandardND12s ...
726	StandardND12s VirtualMachineSizeTypes = "Standard_ND12s"
727	// StandardND24rs ...
728	StandardND24rs VirtualMachineSizeTypes = "Standard_ND24rs"
729	// StandardND24s ...
730	StandardND24s VirtualMachineSizeTypes = "Standard_ND24s"
731	// StandardND6s ...
732	StandardND6s VirtualMachineSizeTypes = "Standard_ND6s"
733	// StandardNV12 ...
734	StandardNV12 VirtualMachineSizeTypes = "Standard_NV12"
735	// StandardNV24 ...
736	StandardNV24 VirtualMachineSizeTypes = "Standard_NV24"
737	// StandardNV6 ...
738	StandardNV6 VirtualMachineSizeTypes = "Standard_NV6"
739)
740
741// PossibleVirtualMachineSizeTypesValues returns an array of possible values for the VirtualMachineSizeTypes const type.
742func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes {
743	return []VirtualMachineSizeTypes{BasicA0, BasicA1, BasicA2, BasicA3, BasicA4, StandardA0, StandardA1, StandardA10, StandardA11, StandardA1V2, StandardA2, StandardA2mV2, StandardA2V2, StandardA3, StandardA4, StandardA4mV2, StandardA4V2, StandardA5, StandardA6, StandardA7, StandardA8, StandardA8mV2, StandardA8V2, StandardA9, StandardB1ms, StandardB1s, StandardB2ms, StandardB2s, StandardB4ms, StandardB8ms, StandardD1, StandardD11, StandardD11V2, StandardD12, StandardD12V2, StandardD13, StandardD13V2, StandardD14, StandardD14V2, StandardD15V2, StandardD16sV3, StandardD16V3, StandardD1V2, StandardD2, StandardD2sV3, StandardD2V2, StandardD2V3, StandardD3, StandardD32sV3, StandardD32V3, StandardD3V2, StandardD4, StandardD4sV3, StandardD4V2, StandardD4V3, StandardD5V2, StandardD64sV3, StandardD64V3, StandardD8sV3, StandardD8V3, StandardDS1, StandardDS11, StandardDS11V2, StandardDS12, StandardDS12V2, StandardDS13, StandardDS132V2, StandardDS134V2, StandardDS13V2, StandardDS14, StandardDS144V2, StandardDS148V2, StandardDS14V2, StandardDS15V2, StandardDS1V2, StandardDS2, StandardDS2V2, StandardDS3, StandardDS3V2, StandardDS4, StandardDS4V2, StandardDS5V2, StandardE16sV3, StandardE16V3, StandardE2sV3, StandardE2V3, StandardE3216V3, StandardE328sV3, StandardE32sV3, StandardE32V3, StandardE4sV3, StandardE4V3, StandardE6416sV3, StandardE6432sV3, StandardE64sV3, StandardE64V3, StandardE8sV3, StandardE8V3, StandardF1, StandardF16, StandardF16s, StandardF16sV2, StandardF1s, StandardF2, StandardF2s, StandardF2sV2, StandardF32sV2, StandardF4, StandardF4s, StandardF4sV2, StandardF64sV2, StandardF72sV2, StandardF8, StandardF8s, StandardF8sV2, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS44, StandardGS48, StandardGS5, StandardGS516, StandardGS58, StandardH16, StandardH16m, StandardH16mr, StandardH16r, StandardH8, StandardH8m, StandardL16s, StandardL32s, StandardL4s, StandardL8s, StandardM12832ms, StandardM12864ms, StandardM128ms, StandardM128s, StandardM6416ms, StandardM6432ms, StandardM64ms, StandardM64s, StandardNC12, StandardNC12sV2, StandardNC12sV3, StandardNC24, StandardNC24r, StandardNC24rsV2, StandardNC24rsV3, StandardNC24sV2, StandardNC24sV3, StandardNC6, StandardNC6sV2, StandardNC6sV3, StandardND12s, StandardND24rs, StandardND24s, StandardND6s, StandardNV12, StandardNV24, StandardNV6}
744}
745
746// AdditionalUnattendContent specifies additional XML formatted information that can be included in the
747// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name,
748// and the pass in which the content is applied.
749type AdditionalUnattendContent struct {
750	// PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem'
751	PassName PassNames `json:"passName,omitempty"`
752	// ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'MicrosoftWindowsShellSetup'
753	ComponentName ComponentNames `json:"componentName,omitempty"`
754	// SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands'
755	SettingName SettingNames `json:"settingName,omitempty"`
756	// 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.
757	Content *string `json:"content,omitempty"`
758}
759
760// APIEntityReference the API entity reference.
761type APIEntityReference struct {
762	// ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
763	ID *string `json:"id,omitempty"`
764}
765
766// APIError api error.
767type APIError struct {
768	// Details - The Api error details
769	Details *[]APIErrorBase `json:"details,omitempty"`
770	// Innererror - The Api inner error
771	Innererror *InnerError `json:"innererror,omitempty"`
772	// Code - The error code.
773	Code *string `json:"code,omitempty"`
774	// Target - The target of the particular error.
775	Target *string `json:"target,omitempty"`
776	// Message - The error message.
777	Message *string `json:"message,omitempty"`
778}
779
780// APIErrorBase api error base.
781type APIErrorBase struct {
782	// Code - The error code.
783	Code *string `json:"code,omitempty"`
784	// Target - The target of the particular error.
785	Target *string `json:"target,omitempty"`
786	// Message - The error message.
787	Message *string `json:"message,omitempty"`
788}
789
790// AutoOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade.
791type AutoOSUpgradePolicy struct {
792	// DisableAutoRollback - Whether OS image rollback feature should be disabled. Default value is false.
793	DisableAutoRollback *bool `json:"disableAutoRollback,omitempty"`
794}
795
796// AvailabilitySet specifies information about the availability set that the virtual machine should be
797// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to
798// maximize availability. For more information about availability sets, see [Manage the availability of
799// virtual
800// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
801// <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual
802// machines in
803// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
804// <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot
805// be added to an availability set.
806type AvailabilitySet struct {
807	autorest.Response          `json:"-"`
808	*AvailabilitySetProperties `json:"properties,omitempty"`
809	// Sku - Sku of the availability set
810	Sku *Sku `json:"sku,omitempty"`
811	// ID - READ-ONLY; Resource Id
812	ID *string `json:"id,omitempty"`
813	// Name - READ-ONLY; Resource name
814	Name *string `json:"name,omitempty"`
815	// Type - READ-ONLY; Resource type
816	Type *string `json:"type,omitempty"`
817	// Location - Resource location
818	Location *string `json:"location,omitempty"`
819	// Tags - Resource tags
820	Tags map[string]*string `json:"tags"`
821}
822
823// MarshalJSON is the custom marshaler for AvailabilitySet.
824func (as AvailabilitySet) MarshalJSON() ([]byte, error) {
825	objectMap := make(map[string]interface{})
826	if as.AvailabilitySetProperties != nil {
827		objectMap["properties"] = as.AvailabilitySetProperties
828	}
829	if as.Sku != nil {
830		objectMap["sku"] = as.Sku
831	}
832	if as.Location != nil {
833		objectMap["location"] = as.Location
834	}
835	if as.Tags != nil {
836		objectMap["tags"] = as.Tags
837	}
838	return json.Marshal(objectMap)
839}
840
841// UnmarshalJSON is the custom unmarshaler for AvailabilitySet struct.
842func (as *AvailabilitySet) UnmarshalJSON(body []byte) error {
843	var m map[string]*json.RawMessage
844	err := json.Unmarshal(body, &m)
845	if err != nil {
846		return err
847	}
848	for k, v := range m {
849		switch k {
850		case "properties":
851			if v != nil {
852				var availabilitySetProperties AvailabilitySetProperties
853				err = json.Unmarshal(*v, &availabilitySetProperties)
854				if err != nil {
855					return err
856				}
857				as.AvailabilitySetProperties = &availabilitySetProperties
858			}
859		case "sku":
860			if v != nil {
861				var sku Sku
862				err = json.Unmarshal(*v, &sku)
863				if err != nil {
864					return err
865				}
866				as.Sku = &sku
867			}
868		case "id":
869			if v != nil {
870				var ID string
871				err = json.Unmarshal(*v, &ID)
872				if err != nil {
873					return err
874				}
875				as.ID = &ID
876			}
877		case "name":
878			if v != nil {
879				var name string
880				err = json.Unmarshal(*v, &name)
881				if err != nil {
882					return err
883				}
884				as.Name = &name
885			}
886		case "type":
887			if v != nil {
888				var typeVar string
889				err = json.Unmarshal(*v, &typeVar)
890				if err != nil {
891					return err
892				}
893				as.Type = &typeVar
894			}
895		case "location":
896			if v != nil {
897				var location string
898				err = json.Unmarshal(*v, &location)
899				if err != nil {
900					return err
901				}
902				as.Location = &location
903			}
904		case "tags":
905			if v != nil {
906				var tags map[string]*string
907				err = json.Unmarshal(*v, &tags)
908				if err != nil {
909					return err
910				}
911				as.Tags = tags
912			}
913		}
914	}
915
916	return nil
917}
918
919// AvailabilitySetListResult the List Availability Set operation response.
920type AvailabilitySetListResult struct {
921	autorest.Response `json:"-"`
922	// Value - The list of availability sets
923	Value *[]AvailabilitySet `json:"value,omitempty"`
924	// NextLink - The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets.
925	NextLink *string `json:"nextLink,omitempty"`
926}
927
928// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values.
929type AvailabilitySetListResultIterator struct {
930	i    int
931	page AvailabilitySetListResultPage
932}
933
934// NextWithContext advances to the next value.  If there was an error making
935// the request the iterator does not advance and the error is returned.
936func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) {
937	if tracing.IsEnabled() {
938		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.NextWithContext")
939		defer func() {
940			sc := -1
941			if iter.Response().Response.Response != nil {
942				sc = iter.Response().Response.Response.StatusCode
943			}
944			tracing.EndSpan(ctx, sc, err)
945		}()
946	}
947	iter.i++
948	if iter.i < len(iter.page.Values()) {
949		return nil
950	}
951	err = iter.page.NextWithContext(ctx)
952	if err != nil {
953		iter.i--
954		return err
955	}
956	iter.i = 0
957	return nil
958}
959
960// Next advances to the next value.  If there was an error making
961// the request the iterator does not advance and the error is returned.
962// Deprecated: Use NextWithContext() instead.
963func (iter *AvailabilitySetListResultIterator) Next() error {
964	return iter.NextWithContext(context.Background())
965}
966
967// NotDone returns true if the enumeration should be started or is not yet complete.
968func (iter AvailabilitySetListResultIterator) NotDone() bool {
969	return iter.page.NotDone() && iter.i < len(iter.page.Values())
970}
971
972// Response returns the raw server response from the last page request.
973func (iter AvailabilitySetListResultIterator) Response() AvailabilitySetListResult {
974	return iter.page.Response()
975}
976
977// Value returns the current value or a zero-initialized value if the
978// iterator has advanced beyond the end of the collection.
979func (iter AvailabilitySetListResultIterator) Value() AvailabilitySet {
980	if !iter.page.NotDone() {
981		return AvailabilitySet{}
982	}
983	return iter.page.Values()[iter.i]
984}
985
986// Creates a new instance of the AvailabilitySetListResultIterator type.
987func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator {
988	return AvailabilitySetListResultIterator{page: page}
989}
990
991// IsEmpty returns true if the ListResult contains no values.
992func (aslr AvailabilitySetListResult) IsEmpty() bool {
993	return aslr.Value == nil || len(*aslr.Value) == 0
994}
995
996// availabilitySetListResultPreparer prepares a request to retrieve the next set of results.
997// It returns nil if no more results exist.
998func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer(ctx context.Context) (*http.Request, error) {
999	if aslr.NextLink == nil || len(to.String(aslr.NextLink)) < 1 {
1000		return nil, nil
1001	}
1002	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1003		autorest.AsJSON(),
1004		autorest.AsGet(),
1005		autorest.WithBaseURL(to.String(aslr.NextLink)))
1006}
1007
1008// AvailabilitySetListResultPage contains a page of AvailabilitySet values.
1009type AvailabilitySetListResultPage struct {
1010	fn   func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)
1011	aslr AvailabilitySetListResult
1012}
1013
1014// NextWithContext advances to the next page of values.  If there was an error making
1015// the request the page does not advance and the error is returned.
1016func (page *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) (err error) {
1017	if tracing.IsEnabled() {
1018		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultPage.NextWithContext")
1019		defer func() {
1020			sc := -1
1021			if page.Response().Response.Response != nil {
1022				sc = page.Response().Response.Response.StatusCode
1023			}
1024			tracing.EndSpan(ctx, sc, err)
1025		}()
1026	}
1027	next, err := page.fn(ctx, page.aslr)
1028	if err != nil {
1029		return err
1030	}
1031	page.aslr = next
1032	return nil
1033}
1034
1035// Next advances to the next page of values.  If there was an error making
1036// the request the page does not advance and the error is returned.
1037// Deprecated: Use NextWithContext() instead.
1038func (page *AvailabilitySetListResultPage) Next() error {
1039	return page.NextWithContext(context.Background())
1040}
1041
1042// NotDone returns true if the page enumeration should be started or is not yet complete.
1043func (page AvailabilitySetListResultPage) NotDone() bool {
1044	return !page.aslr.IsEmpty()
1045}
1046
1047// Response returns the raw server response from the last page request.
1048func (page AvailabilitySetListResultPage) Response() AvailabilitySetListResult {
1049	return page.aslr
1050}
1051
1052// Values returns the slice of values for the current page or nil if there are no values.
1053func (page AvailabilitySetListResultPage) Values() []AvailabilitySet {
1054	if page.aslr.IsEmpty() {
1055		return nil
1056	}
1057	return *page.aslr.Value
1058}
1059
1060// Creates a new instance of the AvailabilitySetListResultPage type.
1061func NewAvailabilitySetListResultPage(getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage {
1062	return AvailabilitySetListResultPage{fn: getNextPage}
1063}
1064
1065// AvailabilitySetProperties the instance view of a resource.
1066type AvailabilitySetProperties struct {
1067	// PlatformUpdateDomainCount - Update Domain count.
1068	PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"`
1069	// PlatformFaultDomainCount - Fault Domain count.
1070	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
1071	// VirtualMachines - A list of references to all virtual machines in the availability set.
1072	VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"`
1073	// Statuses - READ-ONLY; The resource status information.
1074	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
1075}
1076
1077// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should
1078// be assigned to. Only tags may be updated.
1079type AvailabilitySetUpdate struct {
1080	*AvailabilitySetProperties `json:"properties,omitempty"`
1081	// Sku - Sku of the availability set
1082	Sku *Sku `json:"sku,omitempty"`
1083	// Tags - Resource tags
1084	Tags map[string]*string `json:"tags"`
1085}
1086
1087// MarshalJSON is the custom marshaler for AvailabilitySetUpdate.
1088func (asu AvailabilitySetUpdate) MarshalJSON() ([]byte, error) {
1089	objectMap := make(map[string]interface{})
1090	if asu.AvailabilitySetProperties != nil {
1091		objectMap["properties"] = asu.AvailabilitySetProperties
1092	}
1093	if asu.Sku != nil {
1094		objectMap["sku"] = asu.Sku
1095	}
1096	if asu.Tags != nil {
1097		objectMap["tags"] = asu.Tags
1098	}
1099	return json.Marshal(objectMap)
1100}
1101
1102// UnmarshalJSON is the custom unmarshaler for AvailabilitySetUpdate struct.
1103func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
1104	var m map[string]*json.RawMessage
1105	err := json.Unmarshal(body, &m)
1106	if err != nil {
1107		return err
1108	}
1109	for k, v := range m {
1110		switch k {
1111		case "properties":
1112			if v != nil {
1113				var availabilitySetProperties AvailabilitySetProperties
1114				err = json.Unmarshal(*v, &availabilitySetProperties)
1115				if err != nil {
1116					return err
1117				}
1118				asu.AvailabilitySetProperties = &availabilitySetProperties
1119			}
1120		case "sku":
1121			if v != nil {
1122				var sku Sku
1123				err = json.Unmarshal(*v, &sku)
1124				if err != nil {
1125					return err
1126				}
1127				asu.Sku = &sku
1128			}
1129		case "tags":
1130			if v != nil {
1131				var tags map[string]*string
1132				err = json.Unmarshal(*v, &tags)
1133				if err != nil {
1134					return err
1135				}
1136				asu.Tags = tags
1137			}
1138		}
1139	}
1140
1141	return nil
1142}
1143
1144// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and
1145// Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br>
1146// Azure also enables you to see a screenshot of the VM from the hypervisor.
1147type BootDiagnostics struct {
1148	// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
1149	Enabled *bool `json:"enabled,omitempty"`
1150	// StorageURI - Uri of the storage account to use for placing the console output and screenshot.
1151	StorageURI *string `json:"storageUri,omitempty"`
1152}
1153
1154// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics.
1155type BootDiagnosticsInstanceView struct {
1156	// ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI.
1157	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
1158	// SerialConsoleLogBlobURI - READ-ONLY; The Linux serial console log blob Uri.
1159	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
1160}
1161
1162// DataDisk describes a data disk.
1163type DataDisk struct {
1164	// 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.
1165	Lun *int32 `json:"lun,omitempty"`
1166	// Name - The disk name.
1167	Name *string `json:"name,omitempty"`
1168	// Vhd - The virtual hard disk.
1169	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
1170	// 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.
1171	Image *VirtualHardDisk `json:"image,omitempty"`
1172	// 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: 'None', 'ReadOnly', 'ReadWrite'
1173	Caching CachingTypes `json:"caching,omitempty"`
1174	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
1175	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
1176	// 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: 'FromImage', 'Empty', 'Attach'
1177	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
1178	// 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
1179	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
1180	// ManagedDisk - The managed disk parameters.
1181	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
1182}
1183
1184// DataDiskImage contains the data disk images information.
1185type DataDiskImage struct {
1186	// 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.
1187	Lun *int32 `json:"lun,omitempty"`
1188}
1189
1190// DiagnosticsProfile specifies the boot diagnostic settings state. <br><br>Minimum api-version:
1191// 2015-06-15.
1192type DiagnosticsProfile struct {
1193	// 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.
1194	BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
1195}
1196
1197// DiskEncryptionSettings describes a Encryption Settings for a Disk
1198type DiskEncryptionSettings struct {
1199	// DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret.
1200	DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"`
1201	// KeyEncryptionKey - Specifies the location of the key encryption key in Key Vault.
1202	KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"`
1203	// Enabled - Specifies whether disk encryption should be enabled on the virtual machine.
1204	Enabled *bool `json:"enabled,omitempty"`
1205}
1206
1207// DiskInstanceView the instance view of the disk.
1208type DiskInstanceView struct {
1209	// Name - The disk name.
1210	Name *string `json:"name,omitempty"`
1211	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
1212	EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
1213	// Statuses - The resource status information.
1214	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
1215}
1216
1217// HardwareProfile specifies the hardware settings for the virtual machine.
1218type HardwareProfile struct {
1219	// VMSize - Specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:  <br><br> [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) <br><br> [List all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). Possible values include: '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'
1220	VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"`
1221}
1222
1223// Image the source user image virtual hard disk. The virtual hard disk will be copied before being
1224// attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not
1225// exist.
1226type Image struct {
1227	autorest.Response `json:"-"`
1228	*ImageProperties  `json:"properties,omitempty"`
1229	// ID - READ-ONLY; Resource Id
1230	ID *string `json:"id,omitempty"`
1231	// Name - READ-ONLY; Resource name
1232	Name *string `json:"name,omitempty"`
1233	// Type - READ-ONLY; Resource type
1234	Type *string `json:"type,omitempty"`
1235	// Location - Resource location
1236	Location *string `json:"location,omitempty"`
1237	// Tags - Resource tags
1238	Tags map[string]*string `json:"tags"`
1239}
1240
1241// MarshalJSON is the custom marshaler for Image.
1242func (i Image) MarshalJSON() ([]byte, error) {
1243	objectMap := make(map[string]interface{})
1244	if i.ImageProperties != nil {
1245		objectMap["properties"] = i.ImageProperties
1246	}
1247	if i.Location != nil {
1248		objectMap["location"] = i.Location
1249	}
1250	if i.Tags != nil {
1251		objectMap["tags"] = i.Tags
1252	}
1253	return json.Marshal(objectMap)
1254}
1255
1256// UnmarshalJSON is the custom unmarshaler for Image struct.
1257func (i *Image) UnmarshalJSON(body []byte) error {
1258	var m map[string]*json.RawMessage
1259	err := json.Unmarshal(body, &m)
1260	if err != nil {
1261		return err
1262	}
1263	for k, v := range m {
1264		switch k {
1265		case "properties":
1266			if v != nil {
1267				var imageProperties ImageProperties
1268				err = json.Unmarshal(*v, &imageProperties)
1269				if err != nil {
1270					return err
1271				}
1272				i.ImageProperties = &imageProperties
1273			}
1274		case "id":
1275			if v != nil {
1276				var ID string
1277				err = json.Unmarshal(*v, &ID)
1278				if err != nil {
1279					return err
1280				}
1281				i.ID = &ID
1282			}
1283		case "name":
1284			if v != nil {
1285				var name string
1286				err = json.Unmarshal(*v, &name)
1287				if err != nil {
1288					return err
1289				}
1290				i.Name = &name
1291			}
1292		case "type":
1293			if v != nil {
1294				var typeVar string
1295				err = json.Unmarshal(*v, &typeVar)
1296				if err != nil {
1297					return err
1298				}
1299				i.Type = &typeVar
1300			}
1301		case "location":
1302			if v != nil {
1303				var location string
1304				err = json.Unmarshal(*v, &location)
1305				if err != nil {
1306					return err
1307				}
1308				i.Location = &location
1309			}
1310		case "tags":
1311			if v != nil {
1312				var tags map[string]*string
1313				err = json.Unmarshal(*v, &tags)
1314				if err != nil {
1315					return err
1316				}
1317				i.Tags = tags
1318			}
1319		}
1320	}
1321
1322	return nil
1323}
1324
1325// ImageDataDisk describes a data disk.
1326type ImageDataDisk struct {
1327	// 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.
1328	Lun *int32 `json:"lun,omitempty"`
1329	// Snapshot - The snapshot.
1330	Snapshot *SubResource `json:"snapshot,omitempty"`
1331	// ManagedDisk - The managedDisk.
1332	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
1333	// BlobURI - The Virtual Hard Disk.
1334	BlobURI *string `json:"blobUri,omitempty"`
1335	// 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: 'None', 'ReadOnly', 'ReadWrite'
1336	Caching CachingTypes `json:"caching,omitempty"`
1337	// 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
1338	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
1339	// StorageAccountType - Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'StandardLRS', 'PremiumLRS'
1340	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
1341}
1342
1343// ImageListResult the List Image operation response.
1344type ImageListResult struct {
1345	autorest.Response `json:"-"`
1346	// Value - The list of Images.
1347	Value *[]Image `json:"value,omitempty"`
1348	// NextLink - The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images.
1349	NextLink *string `json:"nextLink,omitempty"`
1350}
1351
1352// ImageListResultIterator provides access to a complete listing of Image values.
1353type ImageListResultIterator struct {
1354	i    int
1355	page ImageListResultPage
1356}
1357
1358// NextWithContext advances to the next value.  If there was an error making
1359// the request the iterator does not advance and the error is returned.
1360func (iter *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) {
1361	if tracing.IsEnabled() {
1362		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.NextWithContext")
1363		defer func() {
1364			sc := -1
1365			if iter.Response().Response.Response != nil {
1366				sc = iter.Response().Response.Response.StatusCode
1367			}
1368			tracing.EndSpan(ctx, sc, err)
1369		}()
1370	}
1371	iter.i++
1372	if iter.i < len(iter.page.Values()) {
1373		return nil
1374	}
1375	err = iter.page.NextWithContext(ctx)
1376	if err != nil {
1377		iter.i--
1378		return err
1379	}
1380	iter.i = 0
1381	return nil
1382}
1383
1384// Next advances to the next value.  If there was an error making
1385// the request the iterator does not advance and the error is returned.
1386// Deprecated: Use NextWithContext() instead.
1387func (iter *ImageListResultIterator) Next() error {
1388	return iter.NextWithContext(context.Background())
1389}
1390
1391// NotDone returns true if the enumeration should be started or is not yet complete.
1392func (iter ImageListResultIterator) NotDone() bool {
1393	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1394}
1395
1396// Response returns the raw server response from the last page request.
1397func (iter ImageListResultIterator) Response() ImageListResult {
1398	return iter.page.Response()
1399}
1400
1401// Value returns the current value or a zero-initialized value if the
1402// iterator has advanced beyond the end of the collection.
1403func (iter ImageListResultIterator) Value() Image {
1404	if !iter.page.NotDone() {
1405		return Image{}
1406	}
1407	return iter.page.Values()[iter.i]
1408}
1409
1410// Creates a new instance of the ImageListResultIterator type.
1411func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator {
1412	return ImageListResultIterator{page: page}
1413}
1414
1415// IsEmpty returns true if the ListResult contains no values.
1416func (ilr ImageListResult) IsEmpty() bool {
1417	return ilr.Value == nil || len(*ilr.Value) == 0
1418}
1419
1420// imageListResultPreparer prepares a request to retrieve the next set of results.
1421// It returns nil if no more results exist.
1422func (ilr ImageListResult) imageListResultPreparer(ctx context.Context) (*http.Request, error) {
1423	if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 {
1424		return nil, nil
1425	}
1426	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1427		autorest.AsJSON(),
1428		autorest.AsGet(),
1429		autorest.WithBaseURL(to.String(ilr.NextLink)))
1430}
1431
1432// ImageListResultPage contains a page of Image values.
1433type ImageListResultPage struct {
1434	fn  func(context.Context, ImageListResult) (ImageListResult, error)
1435	ilr ImageListResult
1436}
1437
1438// NextWithContext advances to the next page of values.  If there was an error making
1439// the request the page does not advance and the error is returned.
1440func (page *ImageListResultPage) NextWithContext(ctx context.Context) (err error) {
1441	if tracing.IsEnabled() {
1442		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultPage.NextWithContext")
1443		defer func() {
1444			sc := -1
1445			if page.Response().Response.Response != nil {
1446				sc = page.Response().Response.Response.StatusCode
1447			}
1448			tracing.EndSpan(ctx, sc, err)
1449		}()
1450	}
1451	next, err := page.fn(ctx, page.ilr)
1452	if err != nil {
1453		return err
1454	}
1455	page.ilr = next
1456	return nil
1457}
1458
1459// Next advances to the next page of values.  If there was an error making
1460// the request the page does not advance and the error is returned.
1461// Deprecated: Use NextWithContext() instead.
1462func (page *ImageListResultPage) Next() error {
1463	return page.NextWithContext(context.Background())
1464}
1465
1466// NotDone returns true if the page enumeration should be started or is not yet complete.
1467func (page ImageListResultPage) NotDone() bool {
1468	return !page.ilr.IsEmpty()
1469}
1470
1471// Response returns the raw server response from the last page request.
1472func (page ImageListResultPage) Response() ImageListResult {
1473	return page.ilr
1474}
1475
1476// Values returns the slice of values for the current page or nil if there are no values.
1477func (page ImageListResultPage) Values() []Image {
1478	if page.ilr.IsEmpty() {
1479		return nil
1480	}
1481	return *page.ilr.Value
1482}
1483
1484// Creates a new instance of the ImageListResultPage type.
1485func NewImageListResultPage(getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
1486	return ImageListResultPage{fn: getNextPage}
1487}
1488
1489// ImageOSDisk describes an Operating System disk.
1490type ImageOSDisk struct {
1491	// 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'
1492	OsType OperatingSystemTypes `json:"osType,omitempty"`
1493	// OsState - The OS State. Possible values include: 'Generalized', 'Specialized'
1494	OsState OperatingSystemStateTypes `json:"osState,omitempty"`
1495	// Snapshot - The snapshot.
1496	Snapshot *SubResource `json:"snapshot,omitempty"`
1497	// ManagedDisk - The managedDisk.
1498	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
1499	// BlobURI - The Virtual Hard Disk.
1500	BlobURI *string `json:"blobUri,omitempty"`
1501	// 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: 'None', 'ReadOnly', 'ReadWrite'
1502	Caching CachingTypes `json:"caching,omitempty"`
1503	// 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
1504	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
1505	// StorageAccountType - Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'StandardLRS', 'PremiumLRS'
1506	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
1507}
1508
1509// ImageProperties describes the properties of an Image.
1510type ImageProperties struct {
1511	// SourceVirtualMachine - The source virtual machine from which Image is created.
1512	SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"`
1513	// StorageProfile - Specifies the storage settings for the virtual machine disks.
1514	StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"`
1515	// ProvisioningState - READ-ONLY; The provisioning state.
1516	ProvisioningState *string `json:"provisioningState,omitempty"`
1517}
1518
1519// ImageReference specifies information about the image to use. You can specify information about platform
1520// images, marketplace images, or virtual machine images. This element is required when you want to use a
1521// platform image, marketplace image, or virtual machine image, but is not used in other creation
1522// operations.
1523type ImageReference struct {
1524	// Publisher - The image publisher.
1525	Publisher *string `json:"publisher,omitempty"`
1526	// Offer - Specifies the offer of the platform image or marketplace image used to create the virtual machine.
1527	Offer *string `json:"offer,omitempty"`
1528	// Sku - The image SKU.
1529	Sku *string `json:"sku,omitempty"`
1530	// 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.
1531	Version *string `json:"version,omitempty"`
1532	// ID - Resource Id
1533	ID *string `json:"id,omitempty"`
1534}
1535
1536// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1537// operation.
1538type ImagesCreateOrUpdateFuture struct {
1539	azure.Future
1540}
1541
1542// Result returns the result of the asynchronous operation.
1543// If the operation has not completed it will return an error.
1544func (future *ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, err error) {
1545	var done bool
1546	done, err = future.DoneWithContext(context.Background(), client)
1547	if err != nil {
1548		err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1549		return
1550	}
1551	if !done {
1552		err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
1553		return
1554	}
1555	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1556	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
1557		i, err = client.CreateOrUpdateResponder(i.Response.Response)
1558		if err != nil {
1559			err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
1560		}
1561	}
1562	return
1563}
1564
1565// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
1566type ImagesDeleteFuture struct {
1567	azure.Future
1568}
1569
1570// Result returns the result of the asynchronous operation.
1571// If the operation has not completed it will return an error.
1572func (future *ImagesDeleteFuture) Result(client ImagesClient) (osr OperationStatusResponse, err error) {
1573	var done bool
1574	done, err = future.DoneWithContext(context.Background(), client)
1575	if err != nil {
1576		err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Polling failure")
1577		return
1578	}
1579	if !done {
1580		err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
1581		return
1582	}
1583	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1584	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
1585		osr, err = client.DeleteResponder(osr.Response.Response)
1586		if err != nil {
1587			err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
1588		}
1589	}
1590	return
1591}
1592
1593// ImageStorageProfile describes a storage profile.
1594type ImageStorageProfile struct {
1595	// 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).
1596	OsDisk *ImageOSDisk `json:"osDisk,omitempty"`
1597	// 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).
1598	DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"`
1599	// 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).
1600	ZoneResilient *bool `json:"zoneResilient,omitempty"`
1601}
1602
1603// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
1604type ImagesUpdateFuture struct {
1605	azure.Future
1606}
1607
1608// Result returns the result of the asynchronous operation.
1609// If the operation has not completed it will return an error.
1610func (future *ImagesUpdateFuture) Result(client ImagesClient) (i Image, err error) {
1611	var done bool
1612	done, err = future.DoneWithContext(context.Background(), client)
1613	if err != nil {
1614		err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Polling failure")
1615		return
1616	}
1617	if !done {
1618		err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
1619		return
1620	}
1621	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1622	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
1623		i, err = client.UpdateResponder(i.Response.Response)
1624		if err != nil {
1625			err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
1626		}
1627	}
1628	return
1629}
1630
1631// ImageUpdate the source user image virtual hard disk. Only tags may be updated.
1632type ImageUpdate struct {
1633	*ImageProperties `json:"properties,omitempty"`
1634	// Tags - Resource tags
1635	Tags map[string]*string `json:"tags"`
1636}
1637
1638// MarshalJSON is the custom marshaler for ImageUpdate.
1639func (iu ImageUpdate) MarshalJSON() ([]byte, error) {
1640	objectMap := make(map[string]interface{})
1641	if iu.ImageProperties != nil {
1642		objectMap["properties"] = iu.ImageProperties
1643	}
1644	if iu.Tags != nil {
1645		objectMap["tags"] = iu.Tags
1646	}
1647	return json.Marshal(objectMap)
1648}
1649
1650// UnmarshalJSON is the custom unmarshaler for ImageUpdate struct.
1651func (iu *ImageUpdate) UnmarshalJSON(body []byte) error {
1652	var m map[string]*json.RawMessage
1653	err := json.Unmarshal(body, &m)
1654	if err != nil {
1655		return err
1656	}
1657	for k, v := range m {
1658		switch k {
1659		case "properties":
1660			if v != nil {
1661				var imageProperties ImageProperties
1662				err = json.Unmarshal(*v, &imageProperties)
1663				if err != nil {
1664					return err
1665				}
1666				iu.ImageProperties = &imageProperties
1667			}
1668		case "tags":
1669			if v != nil {
1670				var tags map[string]*string
1671				err = json.Unmarshal(*v, &tags)
1672				if err != nil {
1673					return err
1674				}
1675				iu.Tags = tags
1676			}
1677		}
1678	}
1679
1680	return nil
1681}
1682
1683// InnerError inner error details.
1684type InnerError struct {
1685	// Exceptiontype - The exception type.
1686	Exceptiontype *string `json:"exceptiontype,omitempty"`
1687	// Errordetail - The internal error message or exception dump.
1688	Errordetail *string `json:"errordetail,omitempty"`
1689}
1690
1691// InstanceViewStatus instance view status.
1692type InstanceViewStatus struct {
1693	// Code - The status code.
1694	Code *string `json:"code,omitempty"`
1695	// Level - The level code. Possible values include: 'Info', 'Warning', 'Error'
1696	Level StatusLevelTypes `json:"level,omitempty"`
1697	// DisplayStatus - The short localizable label for the status.
1698	DisplayStatus *string `json:"displayStatus,omitempty"`
1699	// Message - The detailed status message, including for alerts and error messages.
1700	Message *string `json:"message,omitempty"`
1701	// Time - The time of the status.
1702	Time *date.Time `json:"time,omitempty"`
1703}
1704
1705// KeyVaultKeyReference describes a reference to Key Vault Key
1706type KeyVaultKeyReference struct {
1707	// KeyURL - The URL referencing a key encryption key in Key Vault.
1708	KeyURL *string `json:"keyUrl,omitempty"`
1709	// SourceVault - The relative URL of the Key Vault containing the key.
1710	SourceVault *SubResource `json:"sourceVault,omitempty"`
1711}
1712
1713// KeyVaultSecretReference describes a reference to Key Vault Secret
1714type KeyVaultSecretReference struct {
1715	// SecretURL - The URL referencing a secret in a Key Vault.
1716	SecretURL *string `json:"secretUrl,omitempty"`
1717	// SourceVault - The relative URL of the Key Vault containing the secret.
1718	SourceVault *SubResource `json:"sourceVault,omitempty"`
1719}
1720
1721// LinuxConfiguration specifies the Linux operating system settings on the virtual machine. <br><br>For a
1722// list of supported Linux distributions, see [Linux on Azure-Endorsed
1723// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
1724// <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed
1725// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
1726type LinuxConfiguration struct {
1727	// DisablePasswordAuthentication - Specifies whether password authentication should be disabled.
1728	DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"`
1729	// SSH - Specifies the ssh key configuration for a Linux OS.
1730	SSH *SSHConfiguration `json:"ssh,omitempty"`
1731}
1732
1733// ListUsagesResult the List Usages operation response.
1734type ListUsagesResult struct {
1735	autorest.Response `json:"-"`
1736	// Value - The list of compute resource usages.
1737	Value *[]Usage `json:"value,omitempty"`
1738	// 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.
1739	NextLink *string `json:"nextLink,omitempty"`
1740}
1741
1742// ListUsagesResultIterator provides access to a complete listing of Usage values.
1743type ListUsagesResultIterator struct {
1744	i    int
1745	page ListUsagesResultPage
1746}
1747
1748// NextWithContext advances to the next value.  If there was an error making
1749// the request the iterator does not advance and the error is returned.
1750func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
1751	if tracing.IsEnabled() {
1752		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
1753		defer func() {
1754			sc := -1
1755			if iter.Response().Response.Response != nil {
1756				sc = iter.Response().Response.Response.StatusCode
1757			}
1758			tracing.EndSpan(ctx, sc, err)
1759		}()
1760	}
1761	iter.i++
1762	if iter.i < len(iter.page.Values()) {
1763		return nil
1764	}
1765	err = iter.page.NextWithContext(ctx)
1766	if err != nil {
1767		iter.i--
1768		return err
1769	}
1770	iter.i = 0
1771	return nil
1772}
1773
1774// Next advances to the next value.  If there was an error making
1775// the request the iterator does not advance and the error is returned.
1776// Deprecated: Use NextWithContext() instead.
1777func (iter *ListUsagesResultIterator) Next() error {
1778	return iter.NextWithContext(context.Background())
1779}
1780
1781// NotDone returns true if the enumeration should be started or is not yet complete.
1782func (iter ListUsagesResultIterator) NotDone() bool {
1783	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1784}
1785
1786// Response returns the raw server response from the last page request.
1787func (iter ListUsagesResultIterator) Response() ListUsagesResult {
1788	return iter.page.Response()
1789}
1790
1791// Value returns the current value or a zero-initialized value if the
1792// iterator has advanced beyond the end of the collection.
1793func (iter ListUsagesResultIterator) Value() Usage {
1794	if !iter.page.NotDone() {
1795		return Usage{}
1796	}
1797	return iter.page.Values()[iter.i]
1798}
1799
1800// Creates a new instance of the ListUsagesResultIterator type.
1801func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
1802	return ListUsagesResultIterator{page: page}
1803}
1804
1805// IsEmpty returns true if the ListResult contains no values.
1806func (lur ListUsagesResult) IsEmpty() bool {
1807	return lur.Value == nil || len(*lur.Value) == 0
1808}
1809
1810// listUsagesResultPreparer prepares a request to retrieve the next set of results.
1811// It returns nil if no more results exist.
1812func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
1813	if lur.NextLink == nil || len(to.String(lur.NextLink)) < 1 {
1814		return nil, nil
1815	}
1816	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1817		autorest.AsJSON(),
1818		autorest.AsGet(),
1819		autorest.WithBaseURL(to.String(lur.NextLink)))
1820}
1821
1822// ListUsagesResultPage contains a page of Usage values.
1823type ListUsagesResultPage struct {
1824	fn  func(context.Context, ListUsagesResult) (ListUsagesResult, error)
1825	lur ListUsagesResult
1826}
1827
1828// NextWithContext advances to the next page of values.  If there was an error making
1829// the request the page does not advance and the error is returned.
1830func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
1831	if tracing.IsEnabled() {
1832		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
1833		defer func() {
1834			sc := -1
1835			if page.Response().Response.Response != nil {
1836				sc = page.Response().Response.Response.StatusCode
1837			}
1838			tracing.EndSpan(ctx, sc, err)
1839		}()
1840	}
1841	next, err := page.fn(ctx, page.lur)
1842	if err != nil {
1843		return err
1844	}
1845	page.lur = next
1846	return nil
1847}
1848
1849// Next advances to the next page of values.  If there was an error making
1850// the request the page does not advance and the error is returned.
1851// Deprecated: Use NextWithContext() instead.
1852func (page *ListUsagesResultPage) Next() error {
1853	return page.NextWithContext(context.Background())
1854}
1855
1856// NotDone returns true if the page enumeration should be started or is not yet complete.
1857func (page ListUsagesResultPage) NotDone() bool {
1858	return !page.lur.IsEmpty()
1859}
1860
1861// Response returns the raw server response from the last page request.
1862func (page ListUsagesResultPage) Response() ListUsagesResult {
1863	return page.lur
1864}
1865
1866// Values returns the slice of values for the current page or nil if there are no values.
1867func (page ListUsagesResultPage) Values() []Usage {
1868	if page.lur.IsEmpty() {
1869		return nil
1870	}
1871	return *page.lur.Value
1872}
1873
1874// Creates a new instance of the ListUsagesResultPage type.
1875func NewListUsagesResultPage(getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
1876	return ListUsagesResultPage{fn: getNextPage}
1877}
1878
1879// ListVirtualMachineExtensionImage ...
1880type ListVirtualMachineExtensionImage struct {
1881	autorest.Response `json:"-"`
1882	Value             *[]VirtualMachineExtensionImage `json:"value,omitempty"`
1883}
1884
1885// ListVirtualMachineImageResource ...
1886type ListVirtualMachineImageResource struct {
1887	autorest.Response `json:"-"`
1888	Value             *[]VirtualMachineImageResource `json:"value,omitempty"`
1889}
1890
1891// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results
1892// of a long-running operation.
1893type LogAnalyticsExportRequestRateByIntervalFuture struct {
1894	azure.Future
1895}
1896
1897// Result returns the result of the asynchronous operation.
1898// If the operation has not completed it will return an error.
1899func (future *LogAnalyticsExportRequestRateByIntervalFuture) Result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
1900	var done bool
1901	done, err = future.DoneWithContext(context.Background(), client)
1902	if err != nil {
1903		err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Polling failure")
1904		return
1905	}
1906	if !done {
1907		err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
1908		return
1909	}
1910	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1911	if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
1912		laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response)
1913		if err != nil {
1914			err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request")
1915		}
1916	}
1917	return
1918}
1919
1920// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a
1921// long-running operation.
1922type LogAnalyticsExportThrottledRequestsFuture struct {
1923	azure.Future
1924}
1925
1926// Result returns the result of the asynchronous operation.
1927// If the operation has not completed it will return an error.
1928func (future *LogAnalyticsExportThrottledRequestsFuture) Result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
1929	var done bool
1930	done, err = future.DoneWithContext(context.Background(), client)
1931	if err != nil {
1932		err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Polling failure")
1933		return
1934	}
1935	if !done {
1936		err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
1937		return
1938	}
1939	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1940	if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
1941		laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response)
1942		if err != nil {
1943			err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request")
1944		}
1945	}
1946	return
1947}
1948
1949// LogAnalyticsInputBase api input base class for LogAnalytics Api.
1950type LogAnalyticsInputBase struct {
1951	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
1952	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
1953	// FromTime - From time of the query
1954	FromTime *date.Time `json:"fromTime,omitempty"`
1955	// ToTime - To time of the query
1956	ToTime *date.Time `json:"toTime,omitempty"`
1957	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
1958	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
1959	// GroupByOperationName - Group query result by Operation Name.
1960	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
1961	// GroupByResourceName - Group query result by Resource Name.
1962	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
1963}
1964
1965// LogAnalyticsOperationResult logAnalytics operation status response
1966type LogAnalyticsOperationResult struct {
1967	autorest.Response `json:"-"`
1968	// Properties - READ-ONLY; LogAnalyticsOutput
1969	Properties *LogAnalyticsOutput `json:"properties,omitempty"`
1970	// Name - READ-ONLY; Operation ID
1971	Name *string `json:"name,omitempty"`
1972	// Status - READ-ONLY; Operation status
1973	Status *string `json:"status,omitempty"`
1974	// StartTime - READ-ONLY; Start time of the operation
1975	StartTime *date.Time `json:"startTime,omitempty"`
1976	// EndTime - READ-ONLY; End time of the operation
1977	EndTime *date.Time `json:"endTime,omitempty"`
1978	// Error - READ-ONLY; Api error
1979	Error *APIError `json:"error,omitempty"`
1980}
1981
1982// LogAnalyticsOutput logAnalytics output properties
1983type LogAnalyticsOutput struct {
1984	// Output - READ-ONLY; Output file Uri path to blob container.
1985	Output *string `json:"output,omitempty"`
1986}
1987
1988// LongRunningOperationProperties compute-specific operation properties, including output
1989type LongRunningOperationProperties struct {
1990	// Output - Operation output data (raw JSON)
1991	Output interface{} `json:"output,omitempty"`
1992}
1993
1994// MaintenanceRedeployStatus maintenance Operation Status.
1995type MaintenanceRedeployStatus struct {
1996	// IsCustomerInitiatedMaintenanceAllowed - True, if customer is allowed to perform Maintenance.
1997	IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"`
1998	// PreMaintenanceWindowStartTime - Start Time for the Pre Maintenance Window.
1999	PreMaintenanceWindowStartTime *date.Time `json:"preMaintenanceWindowStartTime,omitempty"`
2000	// PreMaintenanceWindowEndTime - End Time for the Pre Maintenance Window.
2001	PreMaintenanceWindowEndTime *date.Time `json:"preMaintenanceWindowEndTime,omitempty"`
2002	// MaintenanceWindowStartTime - Start Time for the Maintenance Window.
2003	MaintenanceWindowStartTime *date.Time `json:"maintenanceWindowStartTime,omitempty"`
2004	// MaintenanceWindowEndTime - End Time for the Maintenance Window.
2005	MaintenanceWindowEndTime *date.Time `json:"maintenanceWindowEndTime,omitempty"`
2006	// LastOperationResultCode - The Last Maintenance Operation Result Code. Possible values include: 'MaintenanceOperationResultCodeTypesNone', 'MaintenanceOperationResultCodeTypesRetryLater', 'MaintenanceOperationResultCodeTypesMaintenanceAborted', 'MaintenanceOperationResultCodeTypesMaintenanceCompleted'
2007	LastOperationResultCode MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"`
2008	// LastOperationMessage - Message returned for the last Maintenance Operation.
2009	LastOperationMessage *string `json:"lastOperationMessage,omitempty"`
2010}
2011
2012// ManagedDiskParameters the parameters of a managed disk.
2013type ManagedDiskParameters struct {
2014	// StorageAccountType - Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'StandardLRS', 'PremiumLRS'
2015	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
2016	// ID - Resource Id
2017	ID *string `json:"id,omitempty"`
2018}
2019
2020// NetworkInterfaceReference describes a network interface reference.
2021type NetworkInterfaceReference struct {
2022	*NetworkInterfaceReferenceProperties `json:"properties,omitempty"`
2023	// ID - Resource Id
2024	ID *string `json:"id,omitempty"`
2025}
2026
2027// MarshalJSON is the custom marshaler for NetworkInterfaceReference.
2028func (nir NetworkInterfaceReference) MarshalJSON() ([]byte, error) {
2029	objectMap := make(map[string]interface{})
2030	if nir.NetworkInterfaceReferenceProperties != nil {
2031		objectMap["properties"] = nir.NetworkInterfaceReferenceProperties
2032	}
2033	if nir.ID != nil {
2034		objectMap["id"] = nir.ID
2035	}
2036	return json.Marshal(objectMap)
2037}
2038
2039// UnmarshalJSON is the custom unmarshaler for NetworkInterfaceReference struct.
2040func (nir *NetworkInterfaceReference) UnmarshalJSON(body []byte) error {
2041	var m map[string]*json.RawMessage
2042	err := json.Unmarshal(body, &m)
2043	if err != nil {
2044		return err
2045	}
2046	for k, v := range m {
2047		switch k {
2048		case "properties":
2049			if v != nil {
2050				var networkInterfaceReferenceProperties NetworkInterfaceReferenceProperties
2051				err = json.Unmarshal(*v, &networkInterfaceReferenceProperties)
2052				if err != nil {
2053					return err
2054				}
2055				nir.NetworkInterfaceReferenceProperties = &networkInterfaceReferenceProperties
2056			}
2057		case "id":
2058			if v != nil {
2059				var ID string
2060				err = json.Unmarshal(*v, &ID)
2061				if err != nil {
2062					return err
2063				}
2064				nir.ID = &ID
2065			}
2066		}
2067	}
2068
2069	return nil
2070}
2071
2072// NetworkInterfaceReferenceProperties describes a network interface reference properties.
2073type NetworkInterfaceReferenceProperties struct {
2074	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
2075	Primary *bool `json:"primary,omitempty"`
2076}
2077
2078// NetworkProfile specifies the network interfaces of the virtual machine.
2079type NetworkProfile struct {
2080	// NetworkInterfaces - Specifies the list of resource Ids for the network interfaces associated with the virtual machine.
2081	NetworkInterfaces *[]NetworkInterfaceReference `json:"networkInterfaces,omitempty"`
2082}
2083
2084// OperationListResult the List Compute Operation operation response.
2085type OperationListResult struct {
2086	autorest.Response `json:"-"`
2087	// Value - READ-ONLY; The list of compute operations
2088	Value *[]OperationValue `json:"value,omitempty"`
2089}
2090
2091// OperationStatusResponse operation status response
2092type OperationStatusResponse struct {
2093	autorest.Response `json:"-"`
2094	// Name - READ-ONLY; Operation ID
2095	Name *string `json:"name,omitempty"`
2096	// Status - READ-ONLY; Operation status
2097	Status *string `json:"status,omitempty"`
2098	// StartTime - READ-ONLY; Start time of the operation
2099	StartTime *date.Time `json:"startTime,omitempty"`
2100	// EndTime - READ-ONLY; End time of the operation
2101	EndTime *date.Time `json:"endTime,omitempty"`
2102	// Error - READ-ONLY; Api error
2103	Error *APIError `json:"error,omitempty"`
2104}
2105
2106// OperationValue describes the properties of a Compute Operation value.
2107type OperationValue struct {
2108	// Origin - READ-ONLY; The origin of the compute operation.
2109	Origin *string `json:"origin,omitempty"`
2110	// Name - READ-ONLY; The name of the compute operation.
2111	Name                   *string `json:"name,omitempty"`
2112	*OperationValueDisplay `json:"display,omitempty"`
2113}
2114
2115// MarshalJSON is the custom marshaler for OperationValue.
2116func (ov OperationValue) MarshalJSON() ([]byte, error) {
2117	objectMap := make(map[string]interface{})
2118	if ov.OperationValueDisplay != nil {
2119		objectMap["display"] = ov.OperationValueDisplay
2120	}
2121	return json.Marshal(objectMap)
2122}
2123
2124// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
2125func (ov *OperationValue) UnmarshalJSON(body []byte) error {
2126	var m map[string]*json.RawMessage
2127	err := json.Unmarshal(body, &m)
2128	if err != nil {
2129		return err
2130	}
2131	for k, v := range m {
2132		switch k {
2133		case "origin":
2134			if v != nil {
2135				var origin string
2136				err = json.Unmarshal(*v, &origin)
2137				if err != nil {
2138					return err
2139				}
2140				ov.Origin = &origin
2141			}
2142		case "name":
2143			if v != nil {
2144				var name string
2145				err = json.Unmarshal(*v, &name)
2146				if err != nil {
2147					return err
2148				}
2149				ov.Name = &name
2150			}
2151		case "display":
2152			if v != nil {
2153				var operationValueDisplay OperationValueDisplay
2154				err = json.Unmarshal(*v, &operationValueDisplay)
2155				if err != nil {
2156					return err
2157				}
2158				ov.OperationValueDisplay = &operationValueDisplay
2159			}
2160		}
2161	}
2162
2163	return nil
2164}
2165
2166// OperationValueDisplay describes the properties of a Compute Operation Value Display.
2167type OperationValueDisplay struct {
2168	// Operation - READ-ONLY; The display name of the compute operation.
2169	Operation *string `json:"operation,omitempty"`
2170	// Resource - READ-ONLY; The display name of the resource the operation applies to.
2171	Resource *string `json:"resource,omitempty"`
2172	// Description - READ-ONLY; The description of the operation.
2173	Description *string `json:"description,omitempty"`
2174	// Provider - READ-ONLY; The resource provider for the operation.
2175	Provider *string `json:"provider,omitempty"`
2176}
2177
2178// OSDisk specifies information about the operating system disk used by the virtual machine. <br><br> For
2179// more information about disks, see [About disks and VHDs for Azure virtual
2180// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
2181type OSDisk struct {
2182	// 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'
2183	OsType OperatingSystemTypes `json:"osType,omitempty"`
2184	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
2185	EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
2186	// Name - The disk name.
2187	Name *string `json:"name,omitempty"`
2188	// Vhd - The virtual hard disk.
2189	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
2190	// 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.
2191	Image *VirtualHardDisk `json:"image,omitempty"`
2192	// 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: 'None', 'ReadOnly', 'ReadWrite'
2193	Caching CachingTypes `json:"caching,omitempty"`
2194	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
2195	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
2196	// 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: 'FromImage', 'Empty', 'Attach'
2197	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
2198	// 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
2199	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
2200	// ManagedDisk - The managed disk parameters.
2201	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
2202}
2203
2204// OSDiskImage contains the os disk image information.
2205type OSDiskImage struct {
2206	// OperatingSystem - The operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'
2207	OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"`
2208}
2209
2210// OSProfile specifies the operating system settings for the virtual machine.
2211type OSProfile struct {
2212	// 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).
2213	ComputerName *string `json:"computerName,omitempty"`
2214	// 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)
2215	AdminUsername *string `json:"adminUsername,omitempty"`
2216	// 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)
2217	AdminPassword *string `json:"adminPassword,omitempty"`
2218	// 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)
2219	CustomData *string `json:"customData,omitempty"`
2220	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
2221	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
2222	// 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).
2223	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
2224	// Secrets - Specifies set of certificates that should be installed onto the virtual machine.
2225	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
2226}
2227
2228// Plan specifies information about the marketplace image used to create the virtual machine. This element
2229// is only used for marketplace images. Before you can use a marketplace image from an API, you must enable
2230// the image for programmatic use.  In the Azure portal, find the marketplace image that you want to use
2231// and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and
2232// then click **Save**.
2233type Plan struct {
2234	// Name - The plan ID.
2235	Name *string `json:"name,omitempty"`
2236	// Publisher - The publisher ID.
2237	Publisher *string `json:"publisher,omitempty"`
2238	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
2239	Product *string `json:"product,omitempty"`
2240	// PromotionCode - The promotion code.
2241	PromotionCode *string `json:"promotionCode,omitempty"`
2242}
2243
2244// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
2245type PurchasePlan struct {
2246	// Publisher - The publisher ID.
2247	Publisher *string `json:"publisher,omitempty"`
2248	// Name - The plan ID.
2249	Name *string `json:"name,omitempty"`
2250	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
2251	Product *string `json:"product,omitempty"`
2252}
2253
2254// RecoveryWalkResponse response after calling a manual recovery walk
2255type RecoveryWalkResponse struct {
2256	autorest.Response `json:"-"`
2257	// WalkPerformed - READ-ONLY; Whether the recovery walk was performed
2258	WalkPerformed *bool `json:"walkPerformed,omitempty"`
2259	// NextPlatformUpdateDomain - READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed
2260	NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"`
2261}
2262
2263// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api.
2264type RequestRateByIntervalInput struct {
2265	// IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'
2266	IntervalLength IntervalInMins `json:"intervalLength,omitempty"`
2267	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
2268	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
2269	// FromTime - From time of the query
2270	FromTime *date.Time `json:"fromTime,omitempty"`
2271	// ToTime - To time of the query
2272	ToTime *date.Time `json:"toTime,omitempty"`
2273	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
2274	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
2275	// GroupByOperationName - Group query result by Operation Name.
2276	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
2277	// GroupByResourceName - Group query result by Resource Name.
2278	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
2279}
2280
2281// Resource the Resource model definition.
2282type Resource struct {
2283	// ID - READ-ONLY; Resource Id
2284	ID *string `json:"id,omitempty"`
2285	// Name - READ-ONLY; Resource name
2286	Name *string `json:"name,omitempty"`
2287	// Type - READ-ONLY; Resource type
2288	Type *string `json:"type,omitempty"`
2289	// Location - Resource location
2290	Location *string `json:"location,omitempty"`
2291	// Tags - Resource tags
2292	Tags map[string]*string `json:"tags"`
2293}
2294
2295// MarshalJSON is the custom marshaler for Resource.
2296func (r Resource) MarshalJSON() ([]byte, error) {
2297	objectMap := make(map[string]interface{})
2298	if r.Location != nil {
2299		objectMap["location"] = r.Location
2300	}
2301	if r.Tags != nil {
2302		objectMap["tags"] = r.Tags
2303	}
2304	return json.Marshal(objectMap)
2305}
2306
2307// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
2308type RollbackStatusInfo struct {
2309	// SuccessfullyRolledbackInstanceCount - READ-ONLY; The number of instances which have been successfully rolled back.
2310	SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"`
2311	// FailedRolledbackInstanceCount - READ-ONLY; The number of instances which failed to rollback.
2312	FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"`
2313	// RollbackError - READ-ONLY; Error details if OS rollback failed.
2314	RollbackError *APIError `json:"rollbackError,omitempty"`
2315}
2316
2317// RollingUpgradePolicy the configuration parameters used while performing a rolling upgrade.
2318type RollingUpgradePolicy struct {
2319	// 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%.
2320	MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"`
2321	// 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%.
2322	MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"`
2323	// 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%.
2324	MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"`
2325	// 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).
2326	PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"`
2327}
2328
2329// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade
2330// state.
2331type RollingUpgradeProgressInfo struct {
2332	// SuccessfulInstanceCount - READ-ONLY; The number of instances that have been successfully upgraded.
2333	SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"`
2334	// FailedInstanceCount - READ-ONLY; The number of instances that have failed to be upgraded successfully.
2335	FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty"`
2336	// InProgressInstanceCount - READ-ONLY; The number of instances that are currently being upgraded.
2337	InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty"`
2338	// PendingInstanceCount - READ-ONLY; The number of instances that have not yet begun to be upgraded.
2339	PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"`
2340}
2341
2342// RollingUpgradeRunningStatus information about the current running state of the overall upgrade.
2343type RollingUpgradeRunningStatus struct {
2344	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted'
2345	Code RollingUpgradeStatusCode `json:"code,omitempty"`
2346	// StartTime - READ-ONLY; Start time of the upgrade.
2347	StartTime *date.Time `json:"startTime,omitempty"`
2348	// LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel'
2349	LastAction RollingUpgradeActionType `json:"lastAction,omitempty"`
2350	// LastActionTime - READ-ONLY; Last action time of the upgrade.
2351	LastActionTime *date.Time `json:"lastActionTime,omitempty"`
2352}
2353
2354// RollingUpgradeStatusInfo the status of the latest virtual machine scale set rolling upgrade.
2355type RollingUpgradeStatusInfo struct {
2356	autorest.Response                   `json:"-"`
2357	*RollingUpgradeStatusInfoProperties `json:"properties,omitempty"`
2358	// ID - READ-ONLY; Resource Id
2359	ID *string `json:"id,omitempty"`
2360	// Name - READ-ONLY; Resource name
2361	Name *string `json:"name,omitempty"`
2362	// Type - READ-ONLY; Resource type
2363	Type *string `json:"type,omitempty"`
2364	// Location - Resource location
2365	Location *string `json:"location,omitempty"`
2366	// Tags - Resource tags
2367	Tags map[string]*string `json:"tags"`
2368}
2369
2370// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfo.
2371func (rusi RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) {
2372	objectMap := make(map[string]interface{})
2373	if rusi.RollingUpgradeStatusInfoProperties != nil {
2374		objectMap["properties"] = rusi.RollingUpgradeStatusInfoProperties
2375	}
2376	if rusi.Location != nil {
2377		objectMap["location"] = rusi.Location
2378	}
2379	if rusi.Tags != nil {
2380		objectMap["tags"] = rusi.Tags
2381	}
2382	return json.Marshal(objectMap)
2383}
2384
2385// UnmarshalJSON is the custom unmarshaler for RollingUpgradeStatusInfo struct.
2386func (rusi *RollingUpgradeStatusInfo) UnmarshalJSON(body []byte) error {
2387	var m map[string]*json.RawMessage
2388	err := json.Unmarshal(body, &m)
2389	if err != nil {
2390		return err
2391	}
2392	for k, v := range m {
2393		switch k {
2394		case "properties":
2395			if v != nil {
2396				var rollingUpgradeStatusInfoProperties RollingUpgradeStatusInfoProperties
2397				err = json.Unmarshal(*v, &rollingUpgradeStatusInfoProperties)
2398				if err != nil {
2399					return err
2400				}
2401				rusi.RollingUpgradeStatusInfoProperties = &rollingUpgradeStatusInfoProperties
2402			}
2403		case "id":
2404			if v != nil {
2405				var ID string
2406				err = json.Unmarshal(*v, &ID)
2407				if err != nil {
2408					return err
2409				}
2410				rusi.ID = &ID
2411			}
2412		case "name":
2413			if v != nil {
2414				var name string
2415				err = json.Unmarshal(*v, &name)
2416				if err != nil {
2417					return err
2418				}
2419				rusi.Name = &name
2420			}
2421		case "type":
2422			if v != nil {
2423				var typeVar string
2424				err = json.Unmarshal(*v, &typeVar)
2425				if err != nil {
2426					return err
2427				}
2428				rusi.Type = &typeVar
2429			}
2430		case "location":
2431			if v != nil {
2432				var location string
2433				err = json.Unmarshal(*v, &location)
2434				if err != nil {
2435					return err
2436				}
2437				rusi.Location = &location
2438			}
2439		case "tags":
2440			if v != nil {
2441				var tags map[string]*string
2442				err = json.Unmarshal(*v, &tags)
2443				if err != nil {
2444					return err
2445				}
2446				rusi.Tags = tags
2447			}
2448		}
2449	}
2450
2451	return nil
2452}
2453
2454// RollingUpgradeStatusInfoProperties the status of the latest virtual machine scale set rolling upgrade.
2455type RollingUpgradeStatusInfoProperties struct {
2456	// Policy - READ-ONLY; The rolling upgrade policies applied for this upgrade.
2457	Policy *RollingUpgradePolicy `json:"policy,omitempty"`
2458	// RunningStatus - READ-ONLY; Information about the current running state of the overall upgrade.
2459	RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"`
2460	// Progress - READ-ONLY; Information about the number of virtual machine instances in each upgrade state.
2461	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
2462	// Error - READ-ONLY; Error details for this upgrade, if there are any.
2463	Error *APIError `json:"error,omitempty"`
2464}
2465
2466// RunCommandDocument describes the properties of a Run Command.
2467type RunCommandDocument struct {
2468	autorest.Response `json:"-"`
2469	// Script - The script to be executed.
2470	Script *[]string `json:"script,omitempty"`
2471	// Parameters - The parameters used by the script.
2472	Parameters *[]RunCommandParameterDefinition `json:"parameters,omitempty"`
2473	// Schema - The VM run command schema.
2474	Schema *string `json:"$schema,omitempty"`
2475	// ID - The VM run command id.
2476	ID *string `json:"id,omitempty"`
2477	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
2478	OsType OperatingSystemTypes `json:"osType,omitempty"`
2479	// Label - The VM run command label.
2480	Label *string `json:"label,omitempty"`
2481	// Description - The VM run command description.
2482	Description *string `json:"description,omitempty"`
2483}
2484
2485// RunCommandDocumentBase describes the properties of a Run Command metadata.
2486type RunCommandDocumentBase struct {
2487	// Schema - The VM run command schema.
2488	Schema *string `json:"$schema,omitempty"`
2489	// ID - The VM run command id.
2490	ID *string `json:"id,omitempty"`
2491	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
2492	OsType OperatingSystemTypes `json:"osType,omitempty"`
2493	// Label - The VM run command label.
2494	Label *string `json:"label,omitempty"`
2495	// Description - The VM run command description.
2496	Description *string `json:"description,omitempty"`
2497}
2498
2499// RunCommandInput capture Virtual Machine parameters.
2500type RunCommandInput struct {
2501	// CommandID - The run command id.
2502	CommandID *string `json:"commandId,omitempty"`
2503	// Script - Optional. The script to be executed.  When this value is given, the given script will override the default script of the command.
2504	Script *[]string `json:"script,omitempty"`
2505	// Parameters - The run command parameters.
2506	Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
2507}
2508
2509// RunCommandInputParameter describes the properties of a run command parameter.
2510type RunCommandInputParameter struct {
2511	// Name - The run command parameter name.
2512	Name *string `json:"name,omitempty"`
2513	// Value - The run command parameter value.
2514	Value *string `json:"value,omitempty"`
2515}
2516
2517// RunCommandListResult the List Virtual Machine operation response.
2518type RunCommandListResult struct {
2519	autorest.Response `json:"-"`
2520	// Value - The list of virtual machine run commands.
2521	Value *[]RunCommandDocumentBase `json:"value,omitempty"`
2522	// NextLink - The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands.
2523	NextLink *string `json:"nextLink,omitempty"`
2524}
2525
2526// RunCommandListResultIterator provides access to a complete listing of RunCommandDocumentBase values.
2527type RunCommandListResultIterator struct {
2528	i    int
2529	page RunCommandListResultPage
2530}
2531
2532// NextWithContext advances to the next value.  If there was an error making
2533// the request the iterator does not advance and the error is returned.
2534func (iter *RunCommandListResultIterator) NextWithContext(ctx context.Context) (err error) {
2535	if tracing.IsEnabled() {
2536		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultIterator.NextWithContext")
2537		defer func() {
2538			sc := -1
2539			if iter.Response().Response.Response != nil {
2540				sc = iter.Response().Response.Response.StatusCode
2541			}
2542			tracing.EndSpan(ctx, sc, err)
2543		}()
2544	}
2545	iter.i++
2546	if iter.i < len(iter.page.Values()) {
2547		return nil
2548	}
2549	err = iter.page.NextWithContext(ctx)
2550	if err != nil {
2551		iter.i--
2552		return err
2553	}
2554	iter.i = 0
2555	return nil
2556}
2557
2558// Next advances to the next value.  If there was an error making
2559// the request the iterator does not advance and the error is returned.
2560// Deprecated: Use NextWithContext() instead.
2561func (iter *RunCommandListResultIterator) Next() error {
2562	return iter.NextWithContext(context.Background())
2563}
2564
2565// NotDone returns true if the enumeration should be started or is not yet complete.
2566func (iter RunCommandListResultIterator) NotDone() bool {
2567	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2568}
2569
2570// Response returns the raw server response from the last page request.
2571func (iter RunCommandListResultIterator) Response() RunCommandListResult {
2572	return iter.page.Response()
2573}
2574
2575// Value returns the current value or a zero-initialized value if the
2576// iterator has advanced beyond the end of the collection.
2577func (iter RunCommandListResultIterator) Value() RunCommandDocumentBase {
2578	if !iter.page.NotDone() {
2579		return RunCommandDocumentBase{}
2580	}
2581	return iter.page.Values()[iter.i]
2582}
2583
2584// Creates a new instance of the RunCommandListResultIterator type.
2585func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator {
2586	return RunCommandListResultIterator{page: page}
2587}
2588
2589// IsEmpty returns true if the ListResult contains no values.
2590func (rclr RunCommandListResult) IsEmpty() bool {
2591	return rclr.Value == nil || len(*rclr.Value) == 0
2592}
2593
2594// runCommandListResultPreparer prepares a request to retrieve the next set of results.
2595// It returns nil if no more results exist.
2596func (rclr RunCommandListResult) runCommandListResultPreparer(ctx context.Context) (*http.Request, error) {
2597	if rclr.NextLink == nil || len(to.String(rclr.NextLink)) < 1 {
2598		return nil, nil
2599	}
2600	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2601		autorest.AsJSON(),
2602		autorest.AsGet(),
2603		autorest.WithBaseURL(to.String(rclr.NextLink)))
2604}
2605
2606// RunCommandListResultPage contains a page of RunCommandDocumentBase values.
2607type RunCommandListResultPage struct {
2608	fn   func(context.Context, RunCommandListResult) (RunCommandListResult, error)
2609	rclr RunCommandListResult
2610}
2611
2612// NextWithContext advances to the next page of values.  If there was an error making
2613// the request the page does not advance and the error is returned.
2614func (page *RunCommandListResultPage) NextWithContext(ctx context.Context) (err error) {
2615	if tracing.IsEnabled() {
2616		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultPage.NextWithContext")
2617		defer func() {
2618			sc := -1
2619			if page.Response().Response.Response != nil {
2620				sc = page.Response().Response.Response.StatusCode
2621			}
2622			tracing.EndSpan(ctx, sc, err)
2623		}()
2624	}
2625	next, err := page.fn(ctx, page.rclr)
2626	if err != nil {
2627		return err
2628	}
2629	page.rclr = next
2630	return nil
2631}
2632
2633// Next advances to the next page of values.  If there was an error making
2634// the request the page does not advance and the error is returned.
2635// Deprecated: Use NextWithContext() instead.
2636func (page *RunCommandListResultPage) Next() error {
2637	return page.NextWithContext(context.Background())
2638}
2639
2640// NotDone returns true if the page enumeration should be started or is not yet complete.
2641func (page RunCommandListResultPage) NotDone() bool {
2642	return !page.rclr.IsEmpty()
2643}
2644
2645// Response returns the raw server response from the last page request.
2646func (page RunCommandListResultPage) Response() RunCommandListResult {
2647	return page.rclr
2648}
2649
2650// Values returns the slice of values for the current page or nil if there are no values.
2651func (page RunCommandListResultPage) Values() []RunCommandDocumentBase {
2652	if page.rclr.IsEmpty() {
2653		return nil
2654	}
2655	return *page.rclr.Value
2656}
2657
2658// Creates a new instance of the RunCommandListResultPage type.
2659func NewRunCommandListResultPage(getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
2660	return RunCommandListResultPage{fn: getNextPage}
2661}
2662
2663// RunCommandParameterDefinition describes the properties of a run command parameter.
2664type RunCommandParameterDefinition struct {
2665	// Name - The run command parameter name.
2666	Name *string `json:"name,omitempty"`
2667	// Type - The run command parameter type.
2668	Type *string `json:"type,omitempty"`
2669	// DefaultValue - The run command parameter default value.
2670	DefaultValue *string `json:"defaultValue,omitempty"`
2671	// Required - The run command parameter required.
2672	Required *bool `json:"required,omitempty"`
2673}
2674
2675// RunCommandResult run command operation response.
2676type RunCommandResult struct {
2677	autorest.Response           `json:"-"`
2678	*RunCommandResultProperties `json:"properties,omitempty"`
2679	// Name - READ-ONLY; Operation ID
2680	Name *string `json:"name,omitempty"`
2681	// Status - READ-ONLY; Operation status
2682	Status *string `json:"status,omitempty"`
2683	// StartTime - READ-ONLY; Start time of the operation
2684	StartTime *date.Time `json:"startTime,omitempty"`
2685	// EndTime - READ-ONLY; End time of the operation
2686	EndTime *date.Time `json:"endTime,omitempty"`
2687	// Error - READ-ONLY; Api error
2688	Error *APIError `json:"error,omitempty"`
2689}
2690
2691// MarshalJSON is the custom marshaler for RunCommandResult.
2692func (rcr RunCommandResult) MarshalJSON() ([]byte, error) {
2693	objectMap := make(map[string]interface{})
2694	if rcr.RunCommandResultProperties != nil {
2695		objectMap["properties"] = rcr.RunCommandResultProperties
2696	}
2697	return json.Marshal(objectMap)
2698}
2699
2700// UnmarshalJSON is the custom unmarshaler for RunCommandResult struct.
2701func (rcr *RunCommandResult) UnmarshalJSON(body []byte) error {
2702	var m map[string]*json.RawMessage
2703	err := json.Unmarshal(body, &m)
2704	if err != nil {
2705		return err
2706	}
2707	for k, v := range m {
2708		switch k {
2709		case "properties":
2710			if v != nil {
2711				var runCommandResultProperties RunCommandResultProperties
2712				err = json.Unmarshal(*v, &runCommandResultProperties)
2713				if err != nil {
2714					return err
2715				}
2716				rcr.RunCommandResultProperties = &runCommandResultProperties
2717			}
2718		case "name":
2719			if v != nil {
2720				var name string
2721				err = json.Unmarshal(*v, &name)
2722				if err != nil {
2723					return err
2724				}
2725				rcr.Name = &name
2726			}
2727		case "status":
2728			if v != nil {
2729				var status string
2730				err = json.Unmarshal(*v, &status)
2731				if err != nil {
2732					return err
2733				}
2734				rcr.Status = &status
2735			}
2736		case "startTime":
2737			if v != nil {
2738				var startTime date.Time
2739				err = json.Unmarshal(*v, &startTime)
2740				if err != nil {
2741					return err
2742				}
2743				rcr.StartTime = &startTime
2744			}
2745		case "endTime":
2746			if v != nil {
2747				var endTime date.Time
2748				err = json.Unmarshal(*v, &endTime)
2749				if err != nil {
2750					return err
2751				}
2752				rcr.EndTime = &endTime
2753			}
2754		case "error":
2755			if v != nil {
2756				var errorVar APIError
2757				err = json.Unmarshal(*v, &errorVar)
2758				if err != nil {
2759					return err
2760				}
2761				rcr.Error = &errorVar
2762			}
2763		}
2764	}
2765
2766	return nil
2767}
2768
2769// RunCommandResultProperties compute-specific operation properties, including output
2770type RunCommandResultProperties struct {
2771	// Output - Operation output data (raw JSON)
2772	Output interface{} `json:"output,omitempty"`
2773}
2774
2775// Sku describes a virtual machine scale set sku.
2776type Sku struct {
2777	// Name - The sku name.
2778	Name *string `json:"name,omitempty"`
2779	// Tier - Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
2780	Tier *string `json:"tier,omitempty"`
2781	// Capacity - Specifies the number of virtual machines in the scale set.
2782	Capacity *int64 `json:"capacity,omitempty"`
2783}
2784
2785// SSHConfiguration SSH configuration for Linux based VMs running on Azure
2786type SSHConfiguration struct {
2787	// PublicKeys - The list of SSH public keys used to authenticate with linux based VMs.
2788	PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
2789}
2790
2791// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where
2792// the public key is placed.
2793type SSHPublicKey struct {
2794	// 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
2795	Path *string `json:"path,omitempty"`
2796	// KeyData - SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
2797	KeyData *string `json:"keyData,omitempty"`
2798}
2799
2800// StorageProfile specifies the storage settings for the virtual machine disks.
2801type StorageProfile struct {
2802	// 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.
2803	ImageReference *ImageReference `json:"imageReference,omitempty"`
2804	// 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).
2805	OsDisk *OSDisk `json:"osDisk,omitempty"`
2806	// 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).
2807	DataDisks *[]DataDisk `json:"dataDisks,omitempty"`
2808}
2809
2810// SubResource ...
2811type SubResource struct {
2812	// ID - Resource Id
2813	ID *string `json:"id,omitempty"`
2814}
2815
2816// SubResourceReadOnly ...
2817type SubResourceReadOnly struct {
2818	// ID - READ-ONLY; Resource Id
2819	ID *string `json:"id,omitempty"`
2820}
2821
2822// ThrottledRequestsInput api request input for LogAnalytics getThrottledRequests Api.
2823type ThrottledRequestsInput struct {
2824	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
2825	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
2826	// FromTime - From time of the query
2827	FromTime *date.Time `json:"fromTime,omitempty"`
2828	// ToTime - To time of the query
2829	ToTime *date.Time `json:"toTime,omitempty"`
2830	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
2831	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
2832	// GroupByOperationName - Group query result by Operation Name.
2833	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
2834	// GroupByResourceName - Group query result by Resource Name.
2835	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
2836}
2837
2838// UpdateResource the Update Resource model definition.
2839type UpdateResource struct {
2840	// Tags - Resource tags
2841	Tags map[string]*string `json:"tags"`
2842}
2843
2844// MarshalJSON is the custom marshaler for UpdateResource.
2845func (ur UpdateResource) MarshalJSON() ([]byte, error) {
2846	objectMap := make(map[string]interface{})
2847	if ur.Tags != nil {
2848		objectMap["tags"] = ur.Tags
2849	}
2850	return json.Marshal(objectMap)
2851}
2852
2853// UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response.
2854type UpgradeOperationHistoricalStatusInfo struct {
2855	// Properties - READ-ONLY; Information about the properties of the upgrade operation.
2856	Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty"`
2857	// Type - READ-ONLY; Resource type
2858	Type *string `json:"type,omitempty"`
2859	// Location - READ-ONLY; Resource location
2860	Location *string `json:"location,omitempty"`
2861}
2862
2863// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale
2864// Set.
2865type UpgradeOperationHistoricalStatusInfoProperties struct {
2866	// RunningStatus - READ-ONLY; Information about the overall status of the upgrade operation.
2867	RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"`
2868	// Progress - READ-ONLY; Counts of the VMs in each state.
2869	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
2870	// Error - READ-ONLY; Error Details for this upgrade if there are any.
2871	Error *APIError `json:"error,omitempty"`
2872	// StartedBy - READ-ONLY; Invoker of the Upgrade Operation. Possible values include: 'Unknown', 'User', 'Platform'
2873	StartedBy UpgradeOperationInvoker `json:"startedBy,omitempty"`
2874	// TargetImageReference - READ-ONLY; Image Reference details
2875	TargetImageReference *ImageReference `json:"targetImageReference,omitempty"`
2876	// RollbackInfo - READ-ONLY; Information about OS rollback if performed
2877	RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"`
2878}
2879
2880// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade.
2881type UpgradeOperationHistoryStatus struct {
2882	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted'
2883	Code UpgradeState `json:"code,omitempty"`
2884	// StartTime - READ-ONLY; Start time of the upgrade.
2885	StartTime *date.Time `json:"startTime,omitempty"`
2886	// EndTime - READ-ONLY; End time of the upgrade.
2887	EndTime *date.Time `json:"endTime,omitempty"`
2888}
2889
2890// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling.
2891type UpgradePolicy struct {
2892	// 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'
2893	Mode UpgradeMode `json:"mode,omitempty"`
2894	// RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.
2895	RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"`
2896	// AutomaticOSUpgrade - Whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the image becomes available.
2897	AutomaticOSUpgrade *bool `json:"automaticOSUpgrade,omitempty"`
2898	// AutoOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade.
2899	AutoOSUpgradePolicy *AutoOSUpgradePolicy `json:"autoOSUpgradePolicy,omitempty"`
2900}
2901
2902// Usage describes Compute Resource Usage.
2903type Usage struct {
2904	// Unit - An enum describing the unit of usage measurement.
2905	Unit *string `json:"unit,omitempty"`
2906	// CurrentValue - The current usage of the resource.
2907	CurrentValue *int32 `json:"currentValue,omitempty"`
2908	// Limit - The maximum permitted usage of the resource.
2909	Limit *int64 `json:"limit,omitempty"`
2910	// Name - The name of the type of usage.
2911	Name *UsageName `json:"name,omitempty"`
2912}
2913
2914// UsageName the Usage Names.
2915type UsageName struct {
2916	// Value - The name of the resource.
2917	Value *string `json:"value,omitempty"`
2918	// LocalizedValue - The localized name of the resource.
2919	LocalizedValue *string `json:"localizedValue,omitempty"`
2920}
2921
2922// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate
2923// should reside on the VM.
2924type VaultCertificate struct {
2925	// 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>}
2926	CertificateURL *string `json:"certificateUrl,omitempty"`
2927	// 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.
2928	CertificateStore *string `json:"certificateStore,omitempty"`
2929}
2930
2931// VaultSecretGroup describes a set of certificates which are all in the same Key Vault.
2932type VaultSecretGroup struct {
2933	// SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
2934	SourceVault *SubResource `json:"sourceVault,omitempty"`
2935	// VaultCertificates - The list of key vault references in SourceVault which contain certificates.
2936	VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"`
2937}
2938
2939// VirtualHardDisk describes the uri of a disk.
2940type VirtualHardDisk struct {
2941	// URI - Specifies the virtual hard disk's uri.
2942	URI *string `json:"uri,omitempty"`
2943}
2944
2945// VirtualMachine describes a Virtual Machine.
2946type VirtualMachine struct {
2947	autorest.Response `json:"-"`
2948	// 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**.
2949	Plan                      *Plan `json:"plan,omitempty"`
2950	*VirtualMachineProperties `json:"properties,omitempty"`
2951	// Resources - READ-ONLY; The virtual machine child extension resources.
2952	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
2953	// Identity - The identity of the virtual machine, if configured.
2954	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
2955	// Zones - The virtual machine zones.
2956	Zones *[]string `json:"zones,omitempty"`
2957	// ID - READ-ONLY; Resource Id
2958	ID *string `json:"id,omitempty"`
2959	// Name - READ-ONLY; Resource name
2960	Name *string `json:"name,omitempty"`
2961	// Type - READ-ONLY; Resource type
2962	Type *string `json:"type,omitempty"`
2963	// Location - Resource location
2964	Location *string `json:"location,omitempty"`
2965	// Tags - Resource tags
2966	Tags map[string]*string `json:"tags"`
2967}
2968
2969// MarshalJSON is the custom marshaler for VirtualMachine.
2970func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
2971	objectMap := make(map[string]interface{})
2972	if VM.Plan != nil {
2973		objectMap["plan"] = VM.Plan
2974	}
2975	if VM.VirtualMachineProperties != nil {
2976		objectMap["properties"] = VM.VirtualMachineProperties
2977	}
2978	if VM.Identity != nil {
2979		objectMap["identity"] = VM.Identity
2980	}
2981	if VM.Zones != nil {
2982		objectMap["zones"] = VM.Zones
2983	}
2984	if VM.Location != nil {
2985		objectMap["location"] = VM.Location
2986	}
2987	if VM.Tags != nil {
2988		objectMap["tags"] = VM.Tags
2989	}
2990	return json.Marshal(objectMap)
2991}
2992
2993// UnmarshalJSON is the custom unmarshaler for VirtualMachine struct.
2994func (VM *VirtualMachine) UnmarshalJSON(body []byte) error {
2995	var m map[string]*json.RawMessage
2996	err := json.Unmarshal(body, &m)
2997	if err != nil {
2998		return err
2999	}
3000	for k, v := range m {
3001		switch k {
3002		case "plan":
3003			if v != nil {
3004				var plan Plan
3005				err = json.Unmarshal(*v, &plan)
3006				if err != nil {
3007					return err
3008				}
3009				VM.Plan = &plan
3010			}
3011		case "properties":
3012			if v != nil {
3013				var virtualMachineProperties VirtualMachineProperties
3014				err = json.Unmarshal(*v, &virtualMachineProperties)
3015				if err != nil {
3016					return err
3017				}
3018				VM.VirtualMachineProperties = &virtualMachineProperties
3019			}
3020		case "resources":
3021			if v != nil {
3022				var resources []VirtualMachineExtension
3023				err = json.Unmarshal(*v, &resources)
3024				if err != nil {
3025					return err
3026				}
3027				VM.Resources = &resources
3028			}
3029		case "identity":
3030			if v != nil {
3031				var identity VirtualMachineIdentity
3032				err = json.Unmarshal(*v, &identity)
3033				if err != nil {
3034					return err
3035				}
3036				VM.Identity = &identity
3037			}
3038		case "zones":
3039			if v != nil {
3040				var zones []string
3041				err = json.Unmarshal(*v, &zones)
3042				if err != nil {
3043					return err
3044				}
3045				VM.Zones = &zones
3046			}
3047		case "id":
3048			if v != nil {
3049				var ID string
3050				err = json.Unmarshal(*v, &ID)
3051				if err != nil {
3052					return err
3053				}
3054				VM.ID = &ID
3055			}
3056		case "name":
3057			if v != nil {
3058				var name string
3059				err = json.Unmarshal(*v, &name)
3060				if err != nil {
3061					return err
3062				}
3063				VM.Name = &name
3064			}
3065		case "type":
3066			if v != nil {
3067				var typeVar string
3068				err = json.Unmarshal(*v, &typeVar)
3069				if err != nil {
3070					return err
3071				}
3072				VM.Type = &typeVar
3073			}
3074		case "location":
3075			if v != nil {
3076				var location string
3077				err = json.Unmarshal(*v, &location)
3078				if err != nil {
3079					return err
3080				}
3081				VM.Location = &location
3082			}
3083		case "tags":
3084			if v != nil {
3085				var tags map[string]*string
3086				err = json.Unmarshal(*v, &tags)
3087				if err != nil {
3088					return err
3089				}
3090				VM.Tags = tags
3091			}
3092		}
3093	}
3094
3095	return nil
3096}
3097
3098// VirtualMachineAgentInstanceView the instance view of the VM Agent running on the virtual machine.
3099type VirtualMachineAgentInstanceView struct {
3100	// VMAgentVersion - The VM Agent full version.
3101	VMAgentVersion *string `json:"vmAgentVersion,omitempty"`
3102	// ExtensionHandlers - The virtual machine extension handler instance view.
3103	ExtensionHandlers *[]VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"`
3104	// Statuses - The resource status information.
3105	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
3106}
3107
3108// VirtualMachineCaptureParameters capture Virtual Machine parameters.
3109type VirtualMachineCaptureParameters struct {
3110	// VhdPrefix - The captured virtual hard disk's name prefix.
3111	VhdPrefix *string `json:"vhdPrefix,omitempty"`
3112	// DestinationContainerName - The destination container name.
3113	DestinationContainerName *string `json:"destinationContainerName,omitempty"`
3114	// OverwriteVhds - Specifies whether to overwrite the destination virtual hard disk, in case of conflict.
3115	OverwriteVhds *bool `json:"overwriteVhds,omitempty"`
3116}
3117
3118// VirtualMachineCaptureResult resource Id.
3119type VirtualMachineCaptureResult struct {
3120	autorest.Response                      `json:"-"`
3121	*VirtualMachineCaptureResultProperties `json:"properties,omitempty"`
3122	// ID - Resource Id
3123	ID *string `json:"id,omitempty"`
3124}
3125
3126// MarshalJSON is the custom marshaler for VirtualMachineCaptureResult.
3127func (vmcr VirtualMachineCaptureResult) MarshalJSON() ([]byte, error) {
3128	objectMap := make(map[string]interface{})
3129	if vmcr.VirtualMachineCaptureResultProperties != nil {
3130		objectMap["properties"] = vmcr.VirtualMachineCaptureResultProperties
3131	}
3132	if vmcr.ID != nil {
3133		objectMap["id"] = vmcr.ID
3134	}
3135	return json.Marshal(objectMap)
3136}
3137
3138// UnmarshalJSON is the custom unmarshaler for VirtualMachineCaptureResult struct.
3139func (vmcr *VirtualMachineCaptureResult) UnmarshalJSON(body []byte) error {
3140	var m map[string]*json.RawMessage
3141	err := json.Unmarshal(body, &m)
3142	if err != nil {
3143		return err
3144	}
3145	for k, v := range m {
3146		switch k {
3147		case "properties":
3148			if v != nil {
3149				var virtualMachineCaptureResultProperties VirtualMachineCaptureResultProperties
3150				err = json.Unmarshal(*v, &virtualMachineCaptureResultProperties)
3151				if err != nil {
3152					return err
3153				}
3154				vmcr.VirtualMachineCaptureResultProperties = &virtualMachineCaptureResultProperties
3155			}
3156		case "id":
3157			if v != nil {
3158				var ID string
3159				err = json.Unmarshal(*v, &ID)
3160				if err != nil {
3161					return err
3162				}
3163				vmcr.ID = &ID
3164			}
3165		}
3166	}
3167
3168	return nil
3169}
3170
3171// VirtualMachineCaptureResultProperties compute-specific operation properties, including output
3172type VirtualMachineCaptureResultProperties struct {
3173	// Output - Operation output data (raw JSON)
3174	Output interface{} `json:"output,omitempty"`
3175}
3176
3177// VirtualMachineExtension describes a Virtual Machine Extension.
3178type VirtualMachineExtension struct {
3179	autorest.Response                  `json:"-"`
3180	*VirtualMachineExtensionProperties `json:"properties,omitempty"`
3181	// ID - READ-ONLY; Resource Id
3182	ID *string `json:"id,omitempty"`
3183	// Name - READ-ONLY; Resource name
3184	Name *string `json:"name,omitempty"`
3185	// Type - READ-ONLY; Resource type
3186	Type *string `json:"type,omitempty"`
3187	// Location - Resource location
3188	Location *string `json:"location,omitempty"`
3189	// Tags - Resource tags
3190	Tags map[string]*string `json:"tags"`
3191}
3192
3193// MarshalJSON is the custom marshaler for VirtualMachineExtension.
3194func (vme VirtualMachineExtension) MarshalJSON() ([]byte, error) {
3195	objectMap := make(map[string]interface{})
3196	if vme.VirtualMachineExtensionProperties != nil {
3197		objectMap["properties"] = vme.VirtualMachineExtensionProperties
3198	}
3199	if vme.Location != nil {
3200		objectMap["location"] = vme.Location
3201	}
3202	if vme.Tags != nil {
3203		objectMap["tags"] = vme.Tags
3204	}
3205	return json.Marshal(objectMap)
3206}
3207
3208// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtension struct.
3209func (vme *VirtualMachineExtension) UnmarshalJSON(body []byte) error {
3210	var m map[string]*json.RawMessage
3211	err := json.Unmarshal(body, &m)
3212	if err != nil {
3213		return err
3214	}
3215	for k, v := range m {
3216		switch k {
3217		case "properties":
3218			if v != nil {
3219				var virtualMachineExtensionProperties VirtualMachineExtensionProperties
3220				err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
3221				if err != nil {
3222					return err
3223				}
3224				vme.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
3225			}
3226		case "id":
3227			if v != nil {
3228				var ID string
3229				err = json.Unmarshal(*v, &ID)
3230				if err != nil {
3231					return err
3232				}
3233				vme.ID = &ID
3234			}
3235		case "name":
3236			if v != nil {
3237				var name string
3238				err = json.Unmarshal(*v, &name)
3239				if err != nil {
3240					return err
3241				}
3242				vme.Name = &name
3243			}
3244		case "type":
3245			if v != nil {
3246				var typeVar string
3247				err = json.Unmarshal(*v, &typeVar)
3248				if err != nil {
3249					return err
3250				}
3251				vme.Type = &typeVar
3252			}
3253		case "location":
3254			if v != nil {
3255				var location string
3256				err = json.Unmarshal(*v, &location)
3257				if err != nil {
3258					return err
3259				}
3260				vme.Location = &location
3261			}
3262		case "tags":
3263			if v != nil {
3264				var tags map[string]*string
3265				err = json.Unmarshal(*v, &tags)
3266				if err != nil {
3267					return err
3268				}
3269				vme.Tags = tags
3270			}
3271		}
3272	}
3273
3274	return nil
3275}
3276
3277// VirtualMachineExtensionHandlerInstanceView the instance view of a virtual machine extension handler.
3278type VirtualMachineExtensionHandlerInstanceView struct {
3279	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
3280	Type *string `json:"type,omitempty"`
3281	// TypeHandlerVersion - Specifies the version of the script handler.
3282	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
3283	// Status - The extension handler status.
3284	Status *InstanceViewStatus `json:"status,omitempty"`
3285}
3286
3287// VirtualMachineExtensionImage describes a Virtual Machine Extension Image.
3288type VirtualMachineExtensionImage struct {
3289	autorest.Response                       `json:"-"`
3290	*VirtualMachineExtensionImageProperties `json:"properties,omitempty"`
3291	// ID - READ-ONLY; Resource Id
3292	ID *string `json:"id,omitempty"`
3293	// Name - READ-ONLY; Resource name
3294	Name *string `json:"name,omitempty"`
3295	// Type - READ-ONLY; Resource type
3296	Type *string `json:"type,omitempty"`
3297	// Location - Resource location
3298	Location *string `json:"location,omitempty"`
3299	// Tags - Resource tags
3300	Tags map[string]*string `json:"tags"`
3301}
3302
3303// MarshalJSON is the custom marshaler for VirtualMachineExtensionImage.
3304func (vmei VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) {
3305	objectMap := make(map[string]interface{})
3306	if vmei.VirtualMachineExtensionImageProperties != nil {
3307		objectMap["properties"] = vmei.VirtualMachineExtensionImageProperties
3308	}
3309	if vmei.Location != nil {
3310		objectMap["location"] = vmei.Location
3311	}
3312	if vmei.Tags != nil {
3313		objectMap["tags"] = vmei.Tags
3314	}
3315	return json.Marshal(objectMap)
3316}
3317
3318// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionImage struct.
3319func (vmei *VirtualMachineExtensionImage) UnmarshalJSON(body []byte) error {
3320	var m map[string]*json.RawMessage
3321	err := json.Unmarshal(body, &m)
3322	if err != nil {
3323		return err
3324	}
3325	for k, v := range m {
3326		switch k {
3327		case "properties":
3328			if v != nil {
3329				var virtualMachineExtensionImageProperties VirtualMachineExtensionImageProperties
3330				err = json.Unmarshal(*v, &virtualMachineExtensionImageProperties)
3331				if err != nil {
3332					return err
3333				}
3334				vmei.VirtualMachineExtensionImageProperties = &virtualMachineExtensionImageProperties
3335			}
3336		case "id":
3337			if v != nil {
3338				var ID string
3339				err = json.Unmarshal(*v, &ID)
3340				if err != nil {
3341					return err
3342				}
3343				vmei.ID = &ID
3344			}
3345		case "name":
3346			if v != nil {
3347				var name string
3348				err = json.Unmarshal(*v, &name)
3349				if err != nil {
3350					return err
3351				}
3352				vmei.Name = &name
3353			}
3354		case "type":
3355			if v != nil {
3356				var typeVar string
3357				err = json.Unmarshal(*v, &typeVar)
3358				if err != nil {
3359					return err
3360				}
3361				vmei.Type = &typeVar
3362			}
3363		case "location":
3364			if v != nil {
3365				var location string
3366				err = json.Unmarshal(*v, &location)
3367				if err != nil {
3368					return err
3369				}
3370				vmei.Location = &location
3371			}
3372		case "tags":
3373			if v != nil {
3374				var tags map[string]*string
3375				err = json.Unmarshal(*v, &tags)
3376				if err != nil {
3377					return err
3378				}
3379				vmei.Tags = tags
3380			}
3381		}
3382	}
3383
3384	return nil
3385}
3386
3387// VirtualMachineExtensionImageProperties describes the properties of a Virtual Machine Extension Image.
3388type VirtualMachineExtensionImageProperties struct {
3389	// OperatingSystem - The operating system this extension supports.
3390	OperatingSystem *string `json:"operatingSystem,omitempty"`
3391	// ComputeRole - The type of role (IaaS or PaaS) this extension supports.
3392	ComputeRole *string `json:"computeRole,omitempty"`
3393	// HandlerSchema - The schema defined by publisher, where extension consumers should provide settings in a matching schema.
3394	HandlerSchema *string `json:"handlerSchema,omitempty"`
3395	// 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.
3396	VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"`
3397	// SupportsMultipleExtensions - Whether the handler can support multiple extensions.
3398	SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"`
3399}
3400
3401// VirtualMachineExtensionInstanceView the instance view of a virtual machine extension.
3402type VirtualMachineExtensionInstanceView struct {
3403	// Name - The virtual machine extension name.
3404	Name *string `json:"name,omitempty"`
3405	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
3406	Type *string `json:"type,omitempty"`
3407	// TypeHandlerVersion - Specifies the version of the script handler.
3408	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
3409	// Substatuses - The resource status information.
3410	Substatuses *[]InstanceViewStatus `json:"substatuses,omitempty"`
3411	// Statuses - The resource status information.
3412	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
3413}
3414
3415// VirtualMachineExtensionProperties describes the properties of a Virtual Machine Extension.
3416type VirtualMachineExtensionProperties struct {
3417	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
3418	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
3419	// Publisher - The name of the extension handler publisher.
3420	Publisher *string `json:"publisher,omitempty"`
3421	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
3422	Type *string `json:"type,omitempty"`
3423	// TypeHandlerVersion - Specifies the version of the script handler.
3424	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
3425	// 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.
3426	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
3427	// Settings - Json formatted public settings for the extension.
3428	Settings interface{} `json:"settings,omitempty"`
3429	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
3430	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
3431	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
3432	ProvisioningState *string `json:"provisioningState,omitempty"`
3433	// InstanceView - The virtual machine extension instance view.
3434	InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`
3435}
3436
3437// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
3438// a long-running operation.
3439type VirtualMachineExtensionsCreateOrUpdateFuture struct {
3440	azure.Future
3441}
3442
3443// Result returns the result of the asynchronous operation.
3444// If the operation has not completed it will return an error.
3445func (future *VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
3446	var done bool
3447	done, err = future.DoneWithContext(context.Background(), client)
3448	if err != nil {
3449		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3450		return
3451	}
3452	if !done {
3453		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
3454		return
3455	}
3456	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3457	if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
3458		vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
3459		if err != nil {
3460			err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
3461		}
3462	}
3463	return
3464}
3465
3466// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
3467// long-running operation.
3468type VirtualMachineExtensionsDeleteFuture struct {
3469	azure.Future
3470}
3471
3472// Result returns the result of the asynchronous operation.
3473// If the operation has not completed it will return an error.
3474func (future *VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, err error) {
3475	var done bool
3476	done, err = future.DoneWithContext(context.Background(), client)
3477	if err != nil {
3478		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
3479		return
3480	}
3481	if !done {
3482		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
3483		return
3484	}
3485	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3486	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
3487		osr, err = client.DeleteResponder(osr.Response.Response)
3488		if err != nil {
3489			err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
3490		}
3491	}
3492	return
3493}
3494
3495// VirtualMachineExtensionsListResult the List Extension operation response
3496type VirtualMachineExtensionsListResult struct {
3497	autorest.Response `json:"-"`
3498	// Value - The list of extensions
3499	Value *[]VirtualMachineExtension `json:"value,omitempty"`
3500}
3501
3502// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
3503// long-running operation.
3504type VirtualMachineExtensionsUpdateFuture struct {
3505	azure.Future
3506}
3507
3508// Result returns the result of the asynchronous operation.
3509// If the operation has not completed it will return an error.
3510func (future *VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
3511	var done bool
3512	done, err = future.DoneWithContext(context.Background(), client)
3513	if err != nil {
3514		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
3515		return
3516	}
3517	if !done {
3518		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
3519		return
3520	}
3521	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3522	if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
3523		vme, err = client.UpdateResponder(vme.Response.Response)
3524		if err != nil {
3525			err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
3526		}
3527	}
3528	return
3529}
3530
3531// VirtualMachineExtensionUpdate describes a Virtual Machine Extension.
3532type VirtualMachineExtensionUpdate struct {
3533	*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
3534	// Tags - Resource tags
3535	Tags map[string]*string `json:"tags"`
3536}
3537
3538// MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate.
3539func (vmeu VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) {
3540	objectMap := make(map[string]interface{})
3541	if vmeu.VirtualMachineExtensionUpdateProperties != nil {
3542		objectMap["properties"] = vmeu.VirtualMachineExtensionUpdateProperties
3543	}
3544	if vmeu.Tags != nil {
3545		objectMap["tags"] = vmeu.Tags
3546	}
3547	return json.Marshal(objectMap)
3548}
3549
3550// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionUpdate struct.
3551func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error {
3552	var m map[string]*json.RawMessage
3553	err := json.Unmarshal(body, &m)
3554	if err != nil {
3555		return err
3556	}
3557	for k, v := range m {
3558		switch k {
3559		case "properties":
3560			if v != nil {
3561				var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
3562				err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
3563				if err != nil {
3564					return err
3565				}
3566				vmeu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
3567			}
3568		case "tags":
3569			if v != nil {
3570				var tags map[string]*string
3571				err = json.Unmarshal(*v, &tags)
3572				if err != nil {
3573					return err
3574				}
3575				vmeu.Tags = tags
3576			}
3577		}
3578	}
3579
3580	return nil
3581}
3582
3583// VirtualMachineExtensionUpdateProperties describes the properties of a Virtual Machine Extension.
3584type VirtualMachineExtensionUpdateProperties struct {
3585	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
3586	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
3587	// Publisher - The name of the extension handler publisher.
3588	Publisher *string `json:"publisher,omitempty"`
3589	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
3590	Type *string `json:"type,omitempty"`
3591	// TypeHandlerVersion - Specifies the version of the script handler.
3592	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
3593	// 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.
3594	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
3595	// Settings - Json formatted public settings for the extension.
3596	Settings interface{} `json:"settings,omitempty"`
3597	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
3598	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
3599}
3600
3601// VirtualMachineHealthStatus the health status of the VM.
3602type VirtualMachineHealthStatus struct {
3603	// Status - READ-ONLY; The health status information for the VM.
3604	Status *InstanceViewStatus `json:"status,omitempty"`
3605}
3606
3607// VirtualMachineIdentity identity for the virtual machine.
3608type VirtualMachineIdentity struct {
3609	// PrincipalID - READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity.
3610	PrincipalID *string `json:"principalId,omitempty"`
3611	// TenantID - READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity.
3612	TenantID *string `json:"tenantId,omitempty"`
3613	// 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'
3614	Type ResourceIdentityType `json:"type,omitempty"`
3615	// IdentityIds - The list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'.
3616	IdentityIds *[]string `json:"identityIds,omitempty"`
3617}
3618
3619// VirtualMachineImage describes a Virtual Machine Image.
3620type VirtualMachineImage struct {
3621	autorest.Response              `json:"-"`
3622	*VirtualMachineImageProperties `json:"properties,omitempty"`
3623	// Name - The name of the resource.
3624	Name *string `json:"name,omitempty"`
3625	// Location - The supported Azure location of the resource.
3626	Location *string `json:"location,omitempty"`
3627	// 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).
3628	Tags map[string]*string `json:"tags"`
3629	// ID - Resource Id
3630	ID *string `json:"id,omitempty"`
3631}
3632
3633// MarshalJSON is the custom marshaler for VirtualMachineImage.
3634func (vmi VirtualMachineImage) MarshalJSON() ([]byte, error) {
3635	objectMap := make(map[string]interface{})
3636	if vmi.VirtualMachineImageProperties != nil {
3637		objectMap["properties"] = vmi.VirtualMachineImageProperties
3638	}
3639	if vmi.Name != nil {
3640		objectMap["name"] = vmi.Name
3641	}
3642	if vmi.Location != nil {
3643		objectMap["location"] = vmi.Location
3644	}
3645	if vmi.Tags != nil {
3646		objectMap["tags"] = vmi.Tags
3647	}
3648	if vmi.ID != nil {
3649		objectMap["id"] = vmi.ID
3650	}
3651	return json.Marshal(objectMap)
3652}
3653
3654// UnmarshalJSON is the custom unmarshaler for VirtualMachineImage struct.
3655func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error {
3656	var m map[string]*json.RawMessage
3657	err := json.Unmarshal(body, &m)
3658	if err != nil {
3659		return err
3660	}
3661	for k, v := range m {
3662		switch k {
3663		case "properties":
3664			if v != nil {
3665				var virtualMachineImageProperties VirtualMachineImageProperties
3666				err = json.Unmarshal(*v, &virtualMachineImageProperties)
3667				if err != nil {
3668					return err
3669				}
3670				vmi.VirtualMachineImageProperties = &virtualMachineImageProperties
3671			}
3672		case "name":
3673			if v != nil {
3674				var name string
3675				err = json.Unmarshal(*v, &name)
3676				if err != nil {
3677					return err
3678				}
3679				vmi.Name = &name
3680			}
3681		case "location":
3682			if v != nil {
3683				var location string
3684				err = json.Unmarshal(*v, &location)
3685				if err != nil {
3686					return err
3687				}
3688				vmi.Location = &location
3689			}
3690		case "tags":
3691			if v != nil {
3692				var tags map[string]*string
3693				err = json.Unmarshal(*v, &tags)
3694				if err != nil {
3695					return err
3696				}
3697				vmi.Tags = tags
3698			}
3699		case "id":
3700			if v != nil {
3701				var ID string
3702				err = json.Unmarshal(*v, &ID)
3703				if err != nil {
3704					return err
3705				}
3706				vmi.ID = &ID
3707			}
3708		}
3709	}
3710
3711	return nil
3712}
3713
3714// VirtualMachineImageProperties describes the properties of a Virtual Machine Image.
3715type VirtualMachineImageProperties struct {
3716	Plan           *PurchasePlan    `json:"plan,omitempty"`
3717	OsDiskImage    *OSDiskImage     `json:"osDiskImage,omitempty"`
3718	DataDiskImages *[]DataDiskImage `json:"dataDiskImages,omitempty"`
3719}
3720
3721// VirtualMachineImageResource virtual machine image resource information.
3722type VirtualMachineImageResource struct {
3723	// Name - The name of the resource.
3724	Name *string `json:"name,omitempty"`
3725	// Location - The supported Azure location of the resource.
3726	Location *string `json:"location,omitempty"`
3727	// 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).
3728	Tags map[string]*string `json:"tags"`
3729	// ID - Resource Id
3730	ID *string `json:"id,omitempty"`
3731}
3732
3733// MarshalJSON is the custom marshaler for VirtualMachineImageResource.
3734func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) {
3735	objectMap := make(map[string]interface{})
3736	if vmir.Name != nil {
3737		objectMap["name"] = vmir.Name
3738	}
3739	if vmir.Location != nil {
3740		objectMap["location"] = vmir.Location
3741	}
3742	if vmir.Tags != nil {
3743		objectMap["tags"] = vmir.Tags
3744	}
3745	if vmir.ID != nil {
3746		objectMap["id"] = vmir.ID
3747	}
3748	return json.Marshal(objectMap)
3749}
3750
3751// VirtualMachineInstanceView the instance view of a virtual machine.
3752type VirtualMachineInstanceView struct {
3753	autorest.Response `json:"-"`
3754	// PlatformUpdateDomain - Specifies the update domain of the virtual machine.
3755	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
3756	// PlatformFaultDomain - Specifies the fault domain of the virtual machine.
3757	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
3758	// ComputerName - The computer name assigned to the virtual machine.
3759	ComputerName *string `json:"computerName,omitempty"`
3760	// OsName - The Operating System running on the virtual machine.
3761	OsName *string `json:"osName,omitempty"`
3762	// OsVersion - The version of Operating System running on the virtual machine.
3763	OsVersion *string `json:"osVersion,omitempty"`
3764	// RdpThumbPrint - The Remote desktop certificate thumbprint.
3765	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
3766	// VMAgent - The VM Agent running on the virtual machine.
3767	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
3768	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
3769	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
3770	// Disks - The virtual machine disk information.
3771	Disks *[]DiskInstanceView `json:"disks,omitempty"`
3772	// Extensions - The extensions information.
3773	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
3774	// 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.
3775	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
3776	// Statuses - The resource status information.
3777	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
3778}
3779
3780// VirtualMachineListResult the List Virtual Machine operation response.
3781type VirtualMachineListResult struct {
3782	autorest.Response `json:"-"`
3783	// Value - The list of virtual machines.
3784	Value *[]VirtualMachine `json:"value,omitempty"`
3785	// NextLink - The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines.
3786	NextLink *string `json:"nextLink,omitempty"`
3787}
3788
3789// VirtualMachineListResultIterator provides access to a complete listing of VirtualMachine values.
3790type VirtualMachineListResultIterator struct {
3791	i    int
3792	page VirtualMachineListResultPage
3793}
3794
3795// NextWithContext advances to the next value.  If there was an error making
3796// the request the iterator does not advance and the error is returned.
3797func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) {
3798	if tracing.IsEnabled() {
3799		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.NextWithContext")
3800		defer func() {
3801			sc := -1
3802			if iter.Response().Response.Response != nil {
3803				sc = iter.Response().Response.Response.StatusCode
3804			}
3805			tracing.EndSpan(ctx, sc, err)
3806		}()
3807	}
3808	iter.i++
3809	if iter.i < len(iter.page.Values()) {
3810		return nil
3811	}
3812	err = iter.page.NextWithContext(ctx)
3813	if err != nil {
3814		iter.i--
3815		return err
3816	}
3817	iter.i = 0
3818	return nil
3819}
3820
3821// Next advances to the next value.  If there was an error making
3822// the request the iterator does not advance and the error is returned.
3823// Deprecated: Use NextWithContext() instead.
3824func (iter *VirtualMachineListResultIterator) Next() error {
3825	return iter.NextWithContext(context.Background())
3826}
3827
3828// NotDone returns true if the enumeration should be started or is not yet complete.
3829func (iter VirtualMachineListResultIterator) NotDone() bool {
3830	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3831}
3832
3833// Response returns the raw server response from the last page request.
3834func (iter VirtualMachineListResultIterator) Response() VirtualMachineListResult {
3835	return iter.page.Response()
3836}
3837
3838// Value returns the current value or a zero-initialized value if the
3839// iterator has advanced beyond the end of the collection.
3840func (iter VirtualMachineListResultIterator) Value() VirtualMachine {
3841	if !iter.page.NotDone() {
3842		return VirtualMachine{}
3843	}
3844	return iter.page.Values()[iter.i]
3845}
3846
3847// Creates a new instance of the VirtualMachineListResultIterator type.
3848func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator {
3849	return VirtualMachineListResultIterator{page: page}
3850}
3851
3852// IsEmpty returns true if the ListResult contains no values.
3853func (vmlr VirtualMachineListResult) IsEmpty() bool {
3854	return vmlr.Value == nil || len(*vmlr.Value) == 0
3855}
3856
3857// virtualMachineListResultPreparer prepares a request to retrieve the next set of results.
3858// It returns nil if no more results exist.
3859func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) {
3860	if vmlr.NextLink == nil || len(to.String(vmlr.NextLink)) < 1 {
3861		return nil, nil
3862	}
3863	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3864		autorest.AsJSON(),
3865		autorest.AsGet(),
3866		autorest.WithBaseURL(to.String(vmlr.NextLink)))
3867}
3868
3869// VirtualMachineListResultPage contains a page of VirtualMachine values.
3870type VirtualMachineListResultPage struct {
3871	fn   func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)
3872	vmlr VirtualMachineListResult
3873}
3874
3875// NextWithContext advances to the next page of values.  If there was an error making
3876// the request the page does not advance and the error is returned.
3877func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) {
3878	if tracing.IsEnabled() {
3879		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext")
3880		defer func() {
3881			sc := -1
3882			if page.Response().Response.Response != nil {
3883				sc = page.Response().Response.Response.StatusCode
3884			}
3885			tracing.EndSpan(ctx, sc, err)
3886		}()
3887	}
3888	next, err := page.fn(ctx, page.vmlr)
3889	if err != nil {
3890		return err
3891	}
3892	page.vmlr = next
3893	return nil
3894}
3895
3896// Next advances to the next page of values.  If there was an error making
3897// the request the page does not advance and the error is returned.
3898// Deprecated: Use NextWithContext() instead.
3899func (page *VirtualMachineListResultPage) Next() error {
3900	return page.NextWithContext(context.Background())
3901}
3902
3903// NotDone returns true if the page enumeration should be started or is not yet complete.
3904func (page VirtualMachineListResultPage) NotDone() bool {
3905	return !page.vmlr.IsEmpty()
3906}
3907
3908// Response returns the raw server response from the last page request.
3909func (page VirtualMachineListResultPage) Response() VirtualMachineListResult {
3910	return page.vmlr
3911}
3912
3913// Values returns the slice of values for the current page or nil if there are no values.
3914func (page VirtualMachineListResultPage) Values() []VirtualMachine {
3915	if page.vmlr.IsEmpty() {
3916		return nil
3917	}
3918	return *page.vmlr.Value
3919}
3920
3921// Creates a new instance of the VirtualMachineListResultPage type.
3922func NewVirtualMachineListResultPage(getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
3923	return VirtualMachineListResultPage{fn: getNextPage}
3924}
3925
3926// VirtualMachineProperties describes the properties of a Virtual Machine.
3927type VirtualMachineProperties struct {
3928	// HardwareProfile - Specifies the hardware settings for the virtual machine.
3929	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
3930	// StorageProfile - Specifies the storage settings for the virtual machine disks.
3931	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
3932	// OsProfile - Specifies the operating system settings for the virtual machine.
3933	OsProfile *OSProfile `json:"osProfile,omitempty"`
3934	// NetworkProfile - Specifies the network interfaces of the virtual machine.
3935	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
3936	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
3937	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
3938	// 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.
3939	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
3940	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
3941	ProvisioningState *string `json:"provisioningState,omitempty"`
3942	// InstanceView - READ-ONLY; The virtual machine instance view.
3943	InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"`
3944	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15
3945	LicenseType *string `json:"licenseType,omitempty"`
3946	// 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.
3947	VMID *string `json:"vmId,omitempty"`
3948}
3949
3950// VirtualMachineScaleSet describes a Virtual Machine Scale Set.
3951type VirtualMachineScaleSet struct {
3952	autorest.Response `json:"-"`
3953	// Sku - The virtual machine scale set sku.
3954	Sku *Sku `json:"sku,omitempty"`
3955	// 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**.
3956	Plan                              *Plan `json:"plan,omitempty"`
3957	*VirtualMachineScaleSetProperties `json:"properties,omitempty"`
3958	// Identity - The identity of the virtual machine scale set, if configured.
3959	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
3960	// Zones - The virtual machine scale set zones.
3961	Zones *[]string `json:"zones,omitempty"`
3962	// ID - READ-ONLY; Resource Id
3963	ID *string `json:"id,omitempty"`
3964	// Name - READ-ONLY; Resource name
3965	Name *string `json:"name,omitempty"`
3966	// Type - READ-ONLY; Resource type
3967	Type *string `json:"type,omitempty"`
3968	// Location - Resource location
3969	Location *string `json:"location,omitempty"`
3970	// Tags - Resource tags
3971	Tags map[string]*string `json:"tags"`
3972}
3973
3974// MarshalJSON is the custom marshaler for VirtualMachineScaleSet.
3975func (vmss VirtualMachineScaleSet) MarshalJSON() ([]byte, error) {
3976	objectMap := make(map[string]interface{})
3977	if vmss.Sku != nil {
3978		objectMap["sku"] = vmss.Sku
3979	}
3980	if vmss.Plan != nil {
3981		objectMap["plan"] = vmss.Plan
3982	}
3983	if vmss.VirtualMachineScaleSetProperties != nil {
3984		objectMap["properties"] = vmss.VirtualMachineScaleSetProperties
3985	}
3986	if vmss.Identity != nil {
3987		objectMap["identity"] = vmss.Identity
3988	}
3989	if vmss.Zones != nil {
3990		objectMap["zones"] = vmss.Zones
3991	}
3992	if vmss.Location != nil {
3993		objectMap["location"] = vmss.Location
3994	}
3995	if vmss.Tags != nil {
3996		objectMap["tags"] = vmss.Tags
3997	}
3998	return json.Marshal(objectMap)
3999}
4000
4001// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSet struct.
4002func (vmss *VirtualMachineScaleSet) UnmarshalJSON(body []byte) error {
4003	var m map[string]*json.RawMessage
4004	err := json.Unmarshal(body, &m)
4005	if err != nil {
4006		return err
4007	}
4008	for k, v := range m {
4009		switch k {
4010		case "sku":
4011			if v != nil {
4012				var sku Sku
4013				err = json.Unmarshal(*v, &sku)
4014				if err != nil {
4015					return err
4016				}
4017				vmss.Sku = &sku
4018			}
4019		case "plan":
4020			if v != nil {
4021				var plan Plan
4022				err = json.Unmarshal(*v, &plan)
4023				if err != nil {
4024					return err
4025				}
4026				vmss.Plan = &plan
4027			}
4028		case "properties":
4029			if v != nil {
4030				var virtualMachineScaleSetProperties VirtualMachineScaleSetProperties
4031				err = json.Unmarshal(*v, &virtualMachineScaleSetProperties)
4032				if err != nil {
4033					return err
4034				}
4035				vmss.VirtualMachineScaleSetProperties = &virtualMachineScaleSetProperties
4036			}
4037		case "identity":
4038			if v != nil {
4039				var identity VirtualMachineScaleSetIdentity
4040				err = json.Unmarshal(*v, &identity)
4041				if err != nil {
4042					return err
4043				}
4044				vmss.Identity = &identity
4045			}
4046		case "zones":
4047			if v != nil {
4048				var zones []string
4049				err = json.Unmarshal(*v, &zones)
4050				if err != nil {
4051					return err
4052				}
4053				vmss.Zones = &zones
4054			}
4055		case "id":
4056			if v != nil {
4057				var ID string
4058				err = json.Unmarshal(*v, &ID)
4059				if err != nil {
4060					return err
4061				}
4062				vmss.ID = &ID
4063			}
4064		case "name":
4065			if v != nil {
4066				var name string
4067				err = json.Unmarshal(*v, &name)
4068				if err != nil {
4069					return err
4070				}
4071				vmss.Name = &name
4072			}
4073		case "type":
4074			if v != nil {
4075				var typeVar string
4076				err = json.Unmarshal(*v, &typeVar)
4077				if err != nil {
4078					return err
4079				}
4080				vmss.Type = &typeVar
4081			}
4082		case "location":
4083			if v != nil {
4084				var location string
4085				err = json.Unmarshal(*v, &location)
4086				if err != nil {
4087					return err
4088				}
4089				vmss.Location = &location
4090			}
4091		case "tags":
4092			if v != nil {
4093				var tags map[string]*string
4094				err = json.Unmarshal(*v, &tags)
4095				if err != nil {
4096					return err
4097				}
4098				vmss.Tags = tags
4099			}
4100		}
4101	}
4102
4103	return nil
4104}
4105
4106// VirtualMachineScaleSetDataDisk describes a virtual machine scale set data disk.
4107type VirtualMachineScaleSetDataDisk struct {
4108	// Name - The disk name.
4109	Name *string `json:"name,omitempty"`
4110	// 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.
4111	Lun *int32 `json:"lun,omitempty"`
4112	// 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: 'None', 'ReadOnly', 'ReadWrite'
4113	Caching CachingTypes `json:"caching,omitempty"`
4114	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
4115	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
4116	// CreateOption - The create option. Possible values include: 'FromImage', 'Empty', 'Attach'
4117	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
4118	// 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
4119	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
4120	// ManagedDisk - The managed disk parameters.
4121	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
4122}
4123
4124// VirtualMachineScaleSetExtension describes a Virtual Machine Scale Set Extension.
4125type VirtualMachineScaleSetExtension struct {
4126	autorest.Response `json:"-"`
4127	// Name - The name of the extension.
4128	Name                                       *string `json:"name,omitempty"`
4129	*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
4130	// ID - READ-ONLY; Resource Id
4131	ID *string `json:"id,omitempty"`
4132}
4133
4134// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtension.
4135func (vmsse VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) {
4136	objectMap := make(map[string]interface{})
4137	if vmsse.Name != nil {
4138		objectMap["name"] = vmsse.Name
4139	}
4140	if vmsse.VirtualMachineScaleSetExtensionProperties != nil {
4141		objectMap["properties"] = vmsse.VirtualMachineScaleSetExtensionProperties
4142	}
4143	return json.Marshal(objectMap)
4144}
4145
4146// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtension struct.
4147func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error {
4148	var m map[string]*json.RawMessage
4149	err := json.Unmarshal(body, &m)
4150	if err != nil {
4151		return err
4152	}
4153	for k, v := range m {
4154		switch k {
4155		case "name":
4156			if v != nil {
4157				var name string
4158				err = json.Unmarshal(*v, &name)
4159				if err != nil {
4160					return err
4161				}
4162				vmsse.Name = &name
4163			}
4164		case "properties":
4165			if v != nil {
4166				var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
4167				err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
4168				if err != nil {
4169					return err
4170				}
4171				vmsse.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
4172			}
4173		case "id":
4174			if v != nil {
4175				var ID string
4176				err = json.Unmarshal(*v, &ID)
4177				if err != nil {
4178					return err
4179				}
4180				vmsse.ID = &ID
4181			}
4182		}
4183	}
4184
4185	return nil
4186}
4187
4188// VirtualMachineScaleSetExtensionListResult the List VM scale set extension operation response.
4189type VirtualMachineScaleSetExtensionListResult struct {
4190	autorest.Response `json:"-"`
4191	// Value - The list of VM scale set extensions.
4192	Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"`
4193	// 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.
4194	NextLink *string `json:"nextLink,omitempty"`
4195}
4196
4197// VirtualMachineScaleSetExtensionListResultIterator provides access to a complete listing of
4198// VirtualMachineScaleSetExtension values.
4199type VirtualMachineScaleSetExtensionListResultIterator struct {
4200	i    int
4201	page VirtualMachineScaleSetExtensionListResultPage
4202}
4203
4204// NextWithContext advances to the next value.  If there was an error making
4205// the request the iterator does not advance and the error is returned.
4206func (iter *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) {
4207	if tracing.IsEnabled() {
4208		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.NextWithContext")
4209		defer func() {
4210			sc := -1
4211			if iter.Response().Response.Response != nil {
4212				sc = iter.Response().Response.Response.StatusCode
4213			}
4214			tracing.EndSpan(ctx, sc, err)
4215		}()
4216	}
4217	iter.i++
4218	if iter.i < len(iter.page.Values()) {
4219		return nil
4220	}
4221	err = iter.page.NextWithContext(ctx)
4222	if err != nil {
4223		iter.i--
4224		return err
4225	}
4226	iter.i = 0
4227	return nil
4228}
4229
4230// Next advances to the next value.  If there was an error making
4231// the request the iterator does not advance and the error is returned.
4232// Deprecated: Use NextWithContext() instead.
4233func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error {
4234	return iter.NextWithContext(context.Background())
4235}
4236
4237// NotDone returns true if the enumeration should be started or is not yet complete.
4238func (iter VirtualMachineScaleSetExtensionListResultIterator) NotDone() bool {
4239	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4240}
4241
4242// Response returns the raw server response from the last page request.
4243func (iter VirtualMachineScaleSetExtensionListResultIterator) Response() VirtualMachineScaleSetExtensionListResult {
4244	return iter.page.Response()
4245}
4246
4247// Value returns the current value or a zero-initialized value if the
4248// iterator has advanced beyond the end of the collection.
4249func (iter VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMachineScaleSetExtension {
4250	if !iter.page.NotDone() {
4251		return VirtualMachineScaleSetExtension{}
4252	}
4253	return iter.page.Values()[iter.i]
4254}
4255
4256// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type.
4257func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator {
4258	return VirtualMachineScaleSetExtensionListResultIterator{page: page}
4259}
4260
4261// IsEmpty returns true if the ListResult contains no values.
4262func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool {
4263	return vmsselr.Value == nil || len(*vmsselr.Value) == 0
4264}
4265
4266// virtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results.
4267// It returns nil if no more results exist.
4268func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer(ctx context.Context) (*http.Request, error) {
4269	if vmsselr.NextLink == nil || len(to.String(vmsselr.NextLink)) < 1 {
4270		return nil, nil
4271	}
4272	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4273		autorest.AsJSON(),
4274		autorest.AsGet(),
4275		autorest.WithBaseURL(to.String(vmsselr.NextLink)))
4276}
4277
4278// VirtualMachineScaleSetExtensionListResultPage contains a page of VirtualMachineScaleSetExtension values.
4279type VirtualMachineScaleSetExtensionListResultPage struct {
4280	fn      func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)
4281	vmsselr VirtualMachineScaleSetExtensionListResult
4282}
4283
4284// NextWithContext advances to the next page of values.  If there was an error making
4285// the request the page does not advance and the error is returned.
4286func (page *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx context.Context) (err error) {
4287	if tracing.IsEnabled() {
4288		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultPage.NextWithContext")
4289		defer func() {
4290			sc := -1
4291			if page.Response().Response.Response != nil {
4292				sc = page.Response().Response.Response.StatusCode
4293			}
4294			tracing.EndSpan(ctx, sc, err)
4295		}()
4296	}
4297	next, err := page.fn(ctx, page.vmsselr)
4298	if err != nil {
4299		return err
4300	}
4301	page.vmsselr = next
4302	return nil
4303}
4304
4305// Next advances to the next page of values.  If there was an error making
4306// the request the page does not advance and the error is returned.
4307// Deprecated: Use NextWithContext() instead.
4308func (page *VirtualMachineScaleSetExtensionListResultPage) Next() error {
4309	return page.NextWithContext(context.Background())
4310}
4311
4312// NotDone returns true if the page enumeration should be started or is not yet complete.
4313func (page VirtualMachineScaleSetExtensionListResultPage) NotDone() bool {
4314	return !page.vmsselr.IsEmpty()
4315}
4316
4317// Response returns the raw server response from the last page request.
4318func (page VirtualMachineScaleSetExtensionListResultPage) Response() VirtualMachineScaleSetExtensionListResult {
4319	return page.vmsselr
4320}
4321
4322// Values returns the slice of values for the current page or nil if there are no values.
4323func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMachineScaleSetExtension {
4324	if page.vmsselr.IsEmpty() {
4325		return nil
4326	}
4327	return *page.vmsselr.Value
4328}
4329
4330// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type.
4331func NewVirtualMachineScaleSetExtensionListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
4332	return VirtualMachineScaleSetExtensionListResultPage{fn: getNextPage}
4333}
4334
4335// VirtualMachineScaleSetExtensionProfile describes a virtual machine scale set extension profile.
4336type VirtualMachineScaleSetExtensionProfile struct {
4337	// Extensions - The virtual machine scale set child extension resources.
4338	Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"`
4339}
4340
4341// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set
4342// Extension.
4343type VirtualMachineScaleSetExtensionProperties struct {
4344	// 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.
4345	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
4346	// Publisher - The name of the extension handler publisher.
4347	Publisher *string `json:"publisher,omitempty"`
4348	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
4349	Type *string `json:"type,omitempty"`
4350	// TypeHandlerVersion - Specifies the version of the script handler.
4351	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
4352	// 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.
4353	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
4354	// Settings - Json formatted public settings for the extension.
4355	Settings interface{} `json:"settings,omitempty"`
4356	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
4357	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
4358	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
4359	ProvisioningState *string `json:"provisioningState,omitempty"`
4360}
4361
4362// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
4363// results of a long-running operation.
4364type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
4365	azure.Future
4366}
4367
4368// Result returns the result of the asynchronous operation.
4369// If the operation has not completed it will return an error.
4370func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
4371	var done bool
4372	done, err = future.DoneWithContext(context.Background(), client)
4373	if err != nil {
4374		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4375		return
4376	}
4377	if !done {
4378		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
4379		return
4380	}
4381	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4382	if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
4383		vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response)
4384		if err != nil {
4385			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
4386		}
4387	}
4388	return
4389}
4390
4391// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of
4392// a long-running operation.
4393type VirtualMachineScaleSetExtensionsDeleteFuture struct {
4394	azure.Future
4395}
4396
4397// Result returns the result of the asynchronous operation.
4398// If the operation has not completed it will return an error.
4399func (future *VirtualMachineScaleSetExtensionsDeleteFuture) Result(client VirtualMachineScaleSetExtensionsClient) (osr OperationStatusResponse, err error) {
4400	var done bool
4401	done, err = future.DoneWithContext(context.Background(), client)
4402	if err != nil {
4403		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
4404		return
4405	}
4406	if !done {
4407		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
4408		return
4409	}
4410	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4411	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
4412		osr, err = client.DeleteResponder(osr.Response.Response)
4413		if err != nil {
4414			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
4415		}
4416	}
4417	return
4418}
4419
4420// VirtualMachineScaleSetIdentity identity for the virtual machine scale set.
4421type VirtualMachineScaleSetIdentity struct {
4422	// PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity.
4423	PrincipalID *string `json:"principalId,omitempty"`
4424	// TenantID - READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity.
4425	TenantID *string `json:"tenantId,omitempty"`
4426	// 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'
4427	Type ResourceIdentityType `json:"type,omitempty"`
4428	// IdentityIds - The list of user identities associated with the virtual machine scale set. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'.
4429	IdentityIds *[]string `json:"identityIds,omitempty"`
4430}
4431
4432// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set.
4433type VirtualMachineScaleSetInstanceView struct {
4434	autorest.Response `json:"-"`
4435	// VirtualMachine - READ-ONLY; The instance view status summary for the virtual machine scale set.
4436	VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"`
4437	// Extensions - READ-ONLY; The extensions information.
4438	Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"`
4439	// Statuses - The resource status information.
4440	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
4441}
4442
4443// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of
4444// a virtual machine scale set.
4445type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
4446	// StatusesSummary - READ-ONLY; The extensions information.
4447	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
4448}
4449
4450// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP
4451// configuration.
4452type VirtualMachineScaleSetIPConfiguration struct {
4453	// Name - The IP configuration name.
4454	Name                                             *string `json:"name,omitempty"`
4455	*VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"`
4456	// ID - Resource Id
4457	ID *string `json:"id,omitempty"`
4458}
4459
4460// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIPConfiguration.
4461func (vmssic VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) {
4462	objectMap := make(map[string]interface{})
4463	if vmssic.Name != nil {
4464		objectMap["name"] = vmssic.Name
4465	}
4466	if vmssic.VirtualMachineScaleSetIPConfigurationProperties != nil {
4467		objectMap["properties"] = vmssic.VirtualMachineScaleSetIPConfigurationProperties
4468	}
4469	if vmssic.ID != nil {
4470		objectMap["id"] = vmssic.ID
4471	}
4472	return json.Marshal(objectMap)
4473}
4474
4475// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetIPConfiguration struct.
4476func (vmssic *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(body []byte) error {
4477	var m map[string]*json.RawMessage
4478	err := json.Unmarshal(body, &m)
4479	if err != nil {
4480		return err
4481	}
4482	for k, v := range m {
4483		switch k {
4484		case "name":
4485			if v != nil {
4486				var name string
4487				err = json.Unmarshal(*v, &name)
4488				if err != nil {
4489					return err
4490				}
4491				vmssic.Name = &name
4492			}
4493		case "properties":
4494			if v != nil {
4495				var virtualMachineScaleSetIPConfigurationProperties VirtualMachineScaleSetIPConfigurationProperties
4496				err = json.Unmarshal(*v, &virtualMachineScaleSetIPConfigurationProperties)
4497				if err != nil {
4498					return err
4499				}
4500				vmssic.VirtualMachineScaleSetIPConfigurationProperties = &virtualMachineScaleSetIPConfigurationProperties
4501			}
4502		case "id":
4503			if v != nil {
4504				var ID string
4505				err = json.Unmarshal(*v, &ID)
4506				if err != nil {
4507					return err
4508				}
4509				vmssic.ID = &ID
4510			}
4511		}
4512	}
4513
4514	return nil
4515}
4516
4517// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's
4518// IP configuration properties.
4519type VirtualMachineScaleSetIPConfigurationProperties struct {
4520	// Subnet - Specifies the identifier of the subnet.
4521	Subnet *APIEntityReference `json:"subnet,omitempty"`
4522	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
4523	Primary *bool `json:"primary,omitempty"`
4524	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
4525	PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
4526	// 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'
4527	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
4528	// 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.
4529	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
4530	// LoadBalancerBackendAddressPools - Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.
4531	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
4532	// LoadBalancerInboundNatPools - Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer
4533	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
4534}
4535
4536// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History
4537// operation response.
4538type VirtualMachineScaleSetListOSUpgradeHistory struct {
4539	autorest.Response `json:"-"`
4540	// Value - The list of OS upgrades performed on the virtual machine scale set.
4541	Value *[]UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"`
4542	// 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.
4543	NextLink *string `json:"nextLink,omitempty"`
4544}
4545
4546// VirtualMachineScaleSetListOSUpgradeHistoryIterator provides access to a complete listing of
4547// UpgradeOperationHistoricalStatusInfo values.
4548type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct {
4549	i    int
4550	page VirtualMachineScaleSetListOSUpgradeHistoryPage
4551}
4552
4553// NextWithContext advances to the next value.  If there was an error making
4554// the request the iterator does not advance and the error is returned.
4555func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) {
4556	if tracing.IsEnabled() {
4557		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.NextWithContext")
4558		defer func() {
4559			sc := -1
4560			if iter.Response().Response.Response != nil {
4561				sc = iter.Response().Response.Response.StatusCode
4562			}
4563			tracing.EndSpan(ctx, sc, err)
4564		}()
4565	}
4566	iter.i++
4567	if iter.i < len(iter.page.Values()) {
4568		return nil
4569	}
4570	err = iter.page.NextWithContext(ctx)
4571	if err != nil {
4572		iter.i--
4573		return err
4574	}
4575	iter.i = 0
4576	return nil
4577}
4578
4579// Next advances to the next value.  If there was an error making
4580// the request the iterator does not advance and the error is returned.
4581// Deprecated: Use NextWithContext() instead.
4582func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error {
4583	return iter.NextWithContext(context.Background())
4584}
4585
4586// NotDone returns true if the enumeration should be started or is not yet complete.
4587func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) NotDone() bool {
4588	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4589}
4590
4591// Response returns the raw server response from the last page request.
4592func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Response() VirtualMachineScaleSetListOSUpgradeHistory {
4593	return iter.page.Response()
4594}
4595
4596// Value returns the current value or a zero-initialized value if the
4597// iterator has advanced beyond the end of the collection.
4598func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOperationHistoricalStatusInfo {
4599	if !iter.page.NotDone() {
4600		return UpgradeOperationHistoricalStatusInfo{}
4601	}
4602	return iter.page.Values()[iter.i]
4603}
4604
4605// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type.
4606func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator {
4607	return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page}
4608}
4609
4610// IsEmpty returns true if the ListResult contains no values.
4611func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool {
4612	return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0
4613}
4614
4615// virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results.
4616// It returns nil if no more results exist.
4617func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) {
4618	if vmsslouh.NextLink == nil || len(to.String(vmsslouh.NextLink)) < 1 {
4619		return nil, nil
4620	}
4621	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4622		autorest.AsJSON(),
4623		autorest.AsGet(),
4624		autorest.WithBaseURL(to.String(vmsslouh.NextLink)))
4625}
4626
4627// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo
4628// values.
4629type VirtualMachineScaleSetListOSUpgradeHistoryPage struct {
4630	fn       func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)
4631	vmsslouh VirtualMachineScaleSetListOSUpgradeHistory
4632}
4633
4634// NextWithContext advances to the next page of values.  If there was an error making
4635// the request the page does not advance and the error is returned.
4636func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) {
4637	if tracing.IsEnabled() {
4638		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.NextWithContext")
4639		defer func() {
4640			sc := -1
4641			if page.Response().Response.Response != nil {
4642				sc = page.Response().Response.Response.StatusCode
4643			}
4644			tracing.EndSpan(ctx, sc, err)
4645		}()
4646	}
4647	next, err := page.fn(ctx, page.vmsslouh)
4648	if err != nil {
4649		return err
4650	}
4651	page.vmsslouh = next
4652	return nil
4653}
4654
4655// Next advances to the next page of values.  If there was an error making
4656// the request the page does not advance and the error is returned.
4657// Deprecated: Use NextWithContext() instead.
4658func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error {
4659	return page.NextWithContext(context.Background())
4660}
4661
4662// NotDone returns true if the page enumeration should be started or is not yet complete.
4663func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool {
4664	return !page.vmsslouh.IsEmpty()
4665}
4666
4667// Response returns the raw server response from the last page request.
4668func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Response() VirtualMachineScaleSetListOSUpgradeHistory {
4669	return page.vmsslouh
4670}
4671
4672// Values returns the slice of values for the current page or nil if there are no values.
4673func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOperationHistoricalStatusInfo {
4674	if page.vmsslouh.IsEmpty() {
4675		return nil
4676	}
4677	return *page.vmsslouh.Value
4678}
4679
4680// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type.
4681func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage {
4682	return VirtualMachineScaleSetListOSUpgradeHistoryPage{fn: getNextPage}
4683}
4684
4685// VirtualMachineScaleSetListResult the List Virtual Machine operation response.
4686type VirtualMachineScaleSetListResult struct {
4687	autorest.Response `json:"-"`
4688	// Value - The list of virtual machine scale sets.
4689	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
4690	// NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS.
4691	NextLink *string `json:"nextLink,omitempty"`
4692}
4693
4694// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet
4695// values.
4696type VirtualMachineScaleSetListResultIterator struct {
4697	i    int
4698	page VirtualMachineScaleSetListResultPage
4699}
4700
4701// NextWithContext advances to the next value.  If there was an error making
4702// the request the iterator does not advance and the error is returned.
4703func (iter *VirtualMachineScaleSetListResultIterator) NextWithContext(ctx context.Context) (err error) {
4704	if tracing.IsEnabled() {
4705		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultIterator.NextWithContext")
4706		defer func() {
4707			sc := -1
4708			if iter.Response().Response.Response != nil {
4709				sc = iter.Response().Response.Response.StatusCode
4710			}
4711			tracing.EndSpan(ctx, sc, err)
4712		}()
4713	}
4714	iter.i++
4715	if iter.i < len(iter.page.Values()) {
4716		return nil
4717	}
4718	err = iter.page.NextWithContext(ctx)
4719	if err != nil {
4720		iter.i--
4721		return err
4722	}
4723	iter.i = 0
4724	return nil
4725}
4726
4727// Next advances to the next value.  If there was an error making
4728// the request the iterator does not advance and the error is returned.
4729// Deprecated: Use NextWithContext() instead.
4730func (iter *VirtualMachineScaleSetListResultIterator) Next() error {
4731	return iter.NextWithContext(context.Background())
4732}
4733
4734// NotDone returns true if the enumeration should be started or is not yet complete.
4735func (iter VirtualMachineScaleSetListResultIterator) NotDone() bool {
4736	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4737}
4738
4739// Response returns the raw server response from the last page request.
4740func (iter VirtualMachineScaleSetListResultIterator) Response() VirtualMachineScaleSetListResult {
4741	return iter.page.Response()
4742}
4743
4744// Value returns the current value or a zero-initialized value if the
4745// iterator has advanced beyond the end of the collection.
4746func (iter VirtualMachineScaleSetListResultIterator) Value() VirtualMachineScaleSet {
4747	if !iter.page.NotDone() {
4748		return VirtualMachineScaleSet{}
4749	}
4750	return iter.page.Values()[iter.i]
4751}
4752
4753// Creates a new instance of the VirtualMachineScaleSetListResultIterator type.
4754func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator {
4755	return VirtualMachineScaleSetListResultIterator{page: page}
4756}
4757
4758// IsEmpty returns true if the ListResult contains no values.
4759func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool {
4760	return vmsslr.Value == nil || len(*vmsslr.Value) == 0
4761}
4762
4763// virtualMachineScaleSetListResultPreparer prepares a request to retrieve the next set of results.
4764// It returns nil if no more results exist.
4765func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer(ctx context.Context) (*http.Request, error) {
4766	if vmsslr.NextLink == nil || len(to.String(vmsslr.NextLink)) < 1 {
4767		return nil, nil
4768	}
4769	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4770		autorest.AsJSON(),
4771		autorest.AsGet(),
4772		autorest.WithBaseURL(to.String(vmsslr.NextLink)))
4773}
4774
4775// VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values.
4776type VirtualMachineScaleSetListResultPage struct {
4777	fn     func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)
4778	vmsslr VirtualMachineScaleSetListResult
4779}
4780
4781// NextWithContext advances to the next page of values.  If there was an error making
4782// the request the page does not advance and the error is returned.
4783func (page *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error) {
4784	if tracing.IsEnabled() {
4785		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultPage.NextWithContext")
4786		defer func() {
4787			sc := -1
4788			if page.Response().Response.Response != nil {
4789				sc = page.Response().Response.Response.StatusCode
4790			}
4791			tracing.EndSpan(ctx, sc, err)
4792		}()
4793	}
4794	next, err := page.fn(ctx, page.vmsslr)
4795	if err != nil {
4796		return err
4797	}
4798	page.vmsslr = next
4799	return nil
4800}
4801
4802// Next advances to the next page of values.  If there was an error making
4803// the request the page does not advance and the error is returned.
4804// Deprecated: Use NextWithContext() instead.
4805func (page *VirtualMachineScaleSetListResultPage) Next() error {
4806	return page.NextWithContext(context.Background())
4807}
4808
4809// NotDone returns true if the page enumeration should be started or is not yet complete.
4810func (page VirtualMachineScaleSetListResultPage) NotDone() bool {
4811	return !page.vmsslr.IsEmpty()
4812}
4813
4814// Response returns the raw server response from the last page request.
4815func (page VirtualMachineScaleSetListResultPage) Response() VirtualMachineScaleSetListResult {
4816	return page.vmsslr
4817}
4818
4819// Values returns the slice of values for the current page or nil if there are no values.
4820func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleSet {
4821	if page.vmsslr.IsEmpty() {
4822		return nil
4823	}
4824	return *page.vmsslr.Value
4825}
4826
4827// Creates a new instance of the VirtualMachineScaleSetListResultPage type.
4828func NewVirtualMachineScaleSetListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
4829	return VirtualMachineScaleSetListResultPage{fn: getNextPage}
4830}
4831
4832// VirtualMachineScaleSetListSkusResult the Virtual Machine Scale Set List Skus operation response.
4833type VirtualMachineScaleSetListSkusResult struct {
4834	autorest.Response `json:"-"`
4835	// Value - The list of skus available for the virtual machine scale set.
4836	Value *[]VirtualMachineScaleSetSku `json:"value,omitempty"`
4837	// 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.
4838	NextLink *string `json:"nextLink,omitempty"`
4839}
4840
4841// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of
4842// VirtualMachineScaleSetSku values.
4843type VirtualMachineScaleSetListSkusResultIterator struct {
4844	i    int
4845	page VirtualMachineScaleSetListSkusResultPage
4846}
4847
4848// NextWithContext advances to the next value.  If there was an error making
4849// the request the iterator does not advance and the error is returned.
4850func (iter *VirtualMachineScaleSetListSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
4851	if tracing.IsEnabled() {
4852		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultIterator.NextWithContext")
4853		defer func() {
4854			sc := -1
4855			if iter.Response().Response.Response != nil {
4856				sc = iter.Response().Response.Response.StatusCode
4857			}
4858			tracing.EndSpan(ctx, sc, err)
4859		}()
4860	}
4861	iter.i++
4862	if iter.i < len(iter.page.Values()) {
4863		return nil
4864	}
4865	err = iter.page.NextWithContext(ctx)
4866	if err != nil {
4867		iter.i--
4868		return err
4869	}
4870	iter.i = 0
4871	return nil
4872}
4873
4874// Next advances to the next value.  If there was an error making
4875// the request the iterator does not advance and the error is returned.
4876// Deprecated: Use NextWithContext() instead.
4877func (iter *VirtualMachineScaleSetListSkusResultIterator) Next() error {
4878	return iter.NextWithContext(context.Background())
4879}
4880
4881// NotDone returns true if the enumeration should be started or is not yet complete.
4882func (iter VirtualMachineScaleSetListSkusResultIterator) NotDone() bool {
4883	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4884}
4885
4886// Response returns the raw server response from the last page request.
4887func (iter VirtualMachineScaleSetListSkusResultIterator) Response() VirtualMachineScaleSetListSkusResult {
4888	return iter.page.Response()
4889}
4890
4891// Value returns the current value or a zero-initialized value if the
4892// iterator has advanced beyond the end of the collection.
4893func (iter VirtualMachineScaleSetListSkusResultIterator) Value() VirtualMachineScaleSetSku {
4894	if !iter.page.NotDone() {
4895		return VirtualMachineScaleSetSku{}
4896	}
4897	return iter.page.Values()[iter.i]
4898}
4899
4900// Creates a new instance of the VirtualMachineScaleSetListSkusResultIterator type.
4901func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator {
4902	return VirtualMachineScaleSetListSkusResultIterator{page: page}
4903}
4904
4905// IsEmpty returns true if the ListResult contains no values.
4906func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool {
4907	return vmsslsr.Value == nil || len(*vmsslsr.Value) == 0
4908}
4909
4910// virtualMachineScaleSetListSkusResultPreparer prepares a request to retrieve the next set of results.
4911// It returns nil if no more results exist.
4912func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer(ctx context.Context) (*http.Request, error) {
4913	if vmsslsr.NextLink == nil || len(to.String(vmsslsr.NextLink)) < 1 {
4914		return nil, nil
4915	}
4916	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4917		autorest.AsJSON(),
4918		autorest.AsGet(),
4919		autorest.WithBaseURL(to.String(vmsslsr.NextLink)))
4920}
4921
4922// VirtualMachineScaleSetListSkusResultPage contains a page of VirtualMachineScaleSetSku values.
4923type VirtualMachineScaleSetListSkusResultPage struct {
4924	fn      func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)
4925	vmsslsr VirtualMachineScaleSetListSkusResult
4926}
4927
4928// NextWithContext advances to the next page of values.  If there was an error making
4929// the request the page does not advance and the error is returned.
4930func (page *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx context.Context) (err error) {
4931	if tracing.IsEnabled() {
4932		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultPage.NextWithContext")
4933		defer func() {
4934			sc := -1
4935			if page.Response().Response.Response != nil {
4936				sc = page.Response().Response.Response.StatusCode
4937			}
4938			tracing.EndSpan(ctx, sc, err)
4939		}()
4940	}
4941	next, err := page.fn(ctx, page.vmsslsr)
4942	if err != nil {
4943		return err
4944	}
4945	page.vmsslsr = next
4946	return nil
4947}
4948
4949// Next advances to the next page of values.  If there was an error making
4950// the request the page does not advance and the error is returned.
4951// Deprecated: Use NextWithContext() instead.
4952func (page *VirtualMachineScaleSetListSkusResultPage) Next() error {
4953	return page.NextWithContext(context.Background())
4954}
4955
4956// NotDone returns true if the page enumeration should be started or is not yet complete.
4957func (page VirtualMachineScaleSetListSkusResultPage) NotDone() bool {
4958	return !page.vmsslsr.IsEmpty()
4959}
4960
4961// Response returns the raw server response from the last page request.
4962func (page VirtualMachineScaleSetListSkusResultPage) Response() VirtualMachineScaleSetListSkusResult {
4963	return page.vmsslsr
4964}
4965
4966// Values returns the slice of values for the current page or nil if there are no values.
4967func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineScaleSetSku {
4968	if page.vmsslsr.IsEmpty() {
4969		return nil
4970	}
4971	return *page.vmsslsr.Value
4972}
4973
4974// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type.
4975func NewVirtualMachineScaleSetListSkusResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
4976	return VirtualMachineScaleSetListSkusResultPage{fn: getNextPage}
4977}
4978
4979// VirtualMachineScaleSetListWithLinkResult the List Virtual Machine operation response.
4980type VirtualMachineScaleSetListWithLinkResult struct {
4981	autorest.Response `json:"-"`
4982	// Value - The list of virtual machine scale sets.
4983	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
4984	// 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.
4985	NextLink *string `json:"nextLink,omitempty"`
4986}
4987
4988// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of
4989// VirtualMachineScaleSet values.
4990type VirtualMachineScaleSetListWithLinkResultIterator struct {
4991	i    int
4992	page VirtualMachineScaleSetListWithLinkResultPage
4993}
4994
4995// NextWithContext advances to the next value.  If there was an error making
4996// the request the iterator does not advance and the error is returned.
4997func (iter *VirtualMachineScaleSetListWithLinkResultIterator) NextWithContext(ctx context.Context) (err error) {
4998	if tracing.IsEnabled() {
4999		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultIterator.NextWithContext")
5000		defer func() {
5001			sc := -1
5002			if iter.Response().Response.Response != nil {
5003				sc = iter.Response().Response.Response.StatusCode
5004			}
5005			tracing.EndSpan(ctx, sc, err)
5006		}()
5007	}
5008	iter.i++
5009	if iter.i < len(iter.page.Values()) {
5010		return nil
5011	}
5012	err = iter.page.NextWithContext(ctx)
5013	if err != nil {
5014		iter.i--
5015		return err
5016	}
5017	iter.i = 0
5018	return nil
5019}
5020
5021// Next advances to the next value.  If there was an error making
5022// the request the iterator does not advance and the error is returned.
5023// Deprecated: Use NextWithContext() instead.
5024func (iter *VirtualMachineScaleSetListWithLinkResultIterator) Next() error {
5025	return iter.NextWithContext(context.Background())
5026}
5027
5028// NotDone returns true if the enumeration should be started or is not yet complete.
5029func (iter VirtualMachineScaleSetListWithLinkResultIterator) NotDone() bool {
5030	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5031}
5032
5033// Response returns the raw server response from the last page request.
5034func (iter VirtualMachineScaleSetListWithLinkResultIterator) Response() VirtualMachineScaleSetListWithLinkResult {
5035	return iter.page.Response()
5036}
5037
5038// Value returns the current value or a zero-initialized value if the
5039// iterator has advanced beyond the end of the collection.
5040func (iter VirtualMachineScaleSetListWithLinkResultIterator) Value() VirtualMachineScaleSet {
5041	if !iter.page.NotDone() {
5042		return VirtualMachineScaleSet{}
5043	}
5044	return iter.page.Values()[iter.i]
5045}
5046
5047// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultIterator type.
5048func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator {
5049	return VirtualMachineScaleSetListWithLinkResultIterator{page: page}
5050}
5051
5052// IsEmpty returns true if the ListResult contains no values.
5053func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool {
5054	return vmsslwlr.Value == nil || len(*vmsslwlr.Value) == 0
5055}
5056
5057// virtualMachineScaleSetListWithLinkResultPreparer prepares a request to retrieve the next set of results.
5058// It returns nil if no more results exist.
5059func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer(ctx context.Context) (*http.Request, error) {
5060	if vmsslwlr.NextLink == nil || len(to.String(vmsslwlr.NextLink)) < 1 {
5061		return nil, nil
5062	}
5063	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5064		autorest.AsJSON(),
5065		autorest.AsGet(),
5066		autorest.WithBaseURL(to.String(vmsslwlr.NextLink)))
5067}
5068
5069// VirtualMachineScaleSetListWithLinkResultPage contains a page of VirtualMachineScaleSet values.
5070type VirtualMachineScaleSetListWithLinkResultPage struct {
5071	fn       func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)
5072	vmsslwlr VirtualMachineScaleSetListWithLinkResult
5073}
5074
5075// NextWithContext advances to the next page of values.  If there was an error making
5076// the request the page does not advance and the error is returned.
5077func (page *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx context.Context) (err error) {
5078	if tracing.IsEnabled() {
5079		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultPage.NextWithContext")
5080		defer func() {
5081			sc := -1
5082			if page.Response().Response.Response != nil {
5083				sc = page.Response().Response.Response.StatusCode
5084			}
5085			tracing.EndSpan(ctx, sc, err)
5086		}()
5087	}
5088	next, err := page.fn(ctx, page.vmsslwlr)
5089	if err != nil {
5090		return err
5091	}
5092	page.vmsslwlr = next
5093	return nil
5094}
5095
5096// Next advances to the next page of values.  If there was an error making
5097// the request the page does not advance and the error is returned.
5098// Deprecated: Use NextWithContext() instead.
5099func (page *VirtualMachineScaleSetListWithLinkResultPage) Next() error {
5100	return page.NextWithContext(context.Background())
5101}
5102
5103// NotDone returns true if the page enumeration should be started or is not yet complete.
5104func (page VirtualMachineScaleSetListWithLinkResultPage) NotDone() bool {
5105	return !page.vmsslwlr.IsEmpty()
5106}
5107
5108// Response returns the raw server response from the last page request.
5109func (page VirtualMachineScaleSetListWithLinkResultPage) Response() VirtualMachineScaleSetListWithLinkResult {
5110	return page.vmsslwlr
5111}
5112
5113// Values returns the slice of values for the current page or nil if there are no values.
5114func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachineScaleSet {
5115	if page.vmsslwlr.IsEmpty() {
5116		return nil
5117	}
5118	return *page.vmsslwlr.Value
5119}
5120
5121// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type.
5122func NewVirtualMachineScaleSetListWithLinkResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
5123	return VirtualMachineScaleSetListWithLinkResultPage{fn: getNextPage}
5124}
5125
5126// VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk.
5127type VirtualMachineScaleSetManagedDiskParameters struct {
5128	// StorageAccountType - Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'StandardLRS', 'PremiumLRS'
5129	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
5130}
5131
5132// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's
5133// network configurations.
5134type VirtualMachineScaleSetNetworkConfiguration struct {
5135	// Name - The network configuration name.
5136	Name                                                  *string `json:"name,omitempty"`
5137	*VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"`
5138	// ID - Resource Id
5139	ID *string `json:"id,omitempty"`
5140}
5141
5142// MarshalJSON is the custom marshaler for VirtualMachineScaleSetNetworkConfiguration.
5143func (vmssnc VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) {
5144	objectMap := make(map[string]interface{})
5145	if vmssnc.Name != nil {
5146		objectMap["name"] = vmssnc.Name
5147	}
5148	if vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties != nil {
5149		objectMap["properties"] = vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties
5150	}
5151	if vmssnc.ID != nil {
5152		objectMap["id"] = vmssnc.ID
5153	}
5154	return json.Marshal(objectMap)
5155}
5156
5157// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetNetworkConfiguration struct.
5158func (vmssnc *VirtualMachineScaleSetNetworkConfiguration) UnmarshalJSON(body []byte) error {
5159	var m map[string]*json.RawMessage
5160	err := json.Unmarshal(body, &m)
5161	if err != nil {
5162		return err
5163	}
5164	for k, v := range m {
5165		switch k {
5166		case "name":
5167			if v != nil {
5168				var name string
5169				err = json.Unmarshal(*v, &name)
5170				if err != nil {
5171					return err
5172				}
5173				vmssnc.Name = &name
5174			}
5175		case "properties":
5176			if v != nil {
5177				var virtualMachineScaleSetNetworkConfigurationProperties VirtualMachineScaleSetNetworkConfigurationProperties
5178				err = json.Unmarshal(*v, &virtualMachineScaleSetNetworkConfigurationProperties)
5179				if err != nil {
5180					return err
5181				}
5182				vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties = &virtualMachineScaleSetNetworkConfigurationProperties
5183			}
5184		case "id":
5185			if v != nil {
5186				var ID string
5187				err = json.Unmarshal(*v, &ID)
5188				if err != nil {
5189					return err
5190				}
5191				vmssnc.ID = &ID
5192			}
5193		}
5194	}
5195
5196	return nil
5197}
5198
5199// VirtualMachineScaleSetNetworkConfigurationDNSSettings describes a virtual machines scale sets network
5200// configuration's DNS settings.
5201type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
5202	// DNSServers - List of DNS servers IP addresses
5203	DNSServers *[]string `json:"dnsServers,omitempty"`
5204}
5205
5206// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network
5207// profile's IP configuration.
5208type VirtualMachineScaleSetNetworkConfigurationProperties struct {
5209	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
5210	Primary *bool `json:"primary,omitempty"`
5211	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
5212	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
5213	// NetworkSecurityGroup - The network security group.
5214	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
5215	// DNSSettings - The dns settings to be applied on the network interfaces.
5216	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
5217	// IPConfigurations - Specifies the IP configurations of the network interface.
5218	IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"`
5219	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
5220	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
5221}
5222
5223// VirtualMachineScaleSetNetworkProfile describes a virtual machine scale set network profile.
5224type VirtualMachineScaleSetNetworkProfile struct {
5225	// 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}'.
5226	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
5227	// NetworkInterfaceConfigurations - The list of network configurations.
5228	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
5229}
5230
5231// VirtualMachineScaleSetOSDisk describes a virtual machine scale set operating system disk.
5232type VirtualMachineScaleSetOSDisk struct {
5233	// Name - The disk name.
5234	Name *string `json:"name,omitempty"`
5235	// 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: 'None', 'ReadOnly', 'ReadWrite'
5236	Caching CachingTypes `json:"caching,omitempty"`
5237	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
5238	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
5239	// 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: 'FromImage', 'Empty', 'Attach'
5240	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
5241	// 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'
5242	OsType OperatingSystemTypes `json:"osType,omitempty"`
5243	// Image - Specifies information about the unmanaged user image to base the scale set on.
5244	Image *VirtualHardDisk `json:"image,omitempty"`
5245	// VhdContainers - Specifies the container urls that are used to store operating system disks for the scale set.
5246	VhdContainers *[]string `json:"vhdContainers,omitempty"`
5247	// ManagedDisk - The managed disk parameters.
5248	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
5249}
5250
5251// VirtualMachineScaleSetOSProfile describes a virtual machine scale set OS profile.
5252type VirtualMachineScaleSetOSProfile struct {
5253	// 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.
5254	ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"`
5255	// 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)
5256	AdminUsername *string `json:"adminUsername,omitempty"`
5257	// 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)
5258	AdminPassword *string `json:"adminPassword,omitempty"`
5259	// 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)
5260	CustomData *string `json:"customData,omitempty"`
5261	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
5262	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
5263	// 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).
5264	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
5265	// Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set.
5266	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
5267}
5268
5269// VirtualMachineScaleSetProperties describes the properties of a Virtual Machine Scale Set.
5270type VirtualMachineScaleSetProperties struct {
5271	// UpgradePolicy - The upgrade policy.
5272	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
5273	// VirtualMachineProfile - The virtual machine profile.
5274	VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"`
5275	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
5276	ProvisioningState *string `json:"provisioningState,omitempty"`
5277	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
5278	Overprovision *bool `json:"overprovision,omitempty"`
5279	// UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
5280	UniqueID *string `json:"uniqueId,omitempty"`
5281	// SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines.
5282	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
5283	// ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.
5284	ZoneBalance *bool `json:"zoneBalance,omitempty"`
5285	// PlatformFaultDomainCount - Fault Domain count for each placement group.
5286	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
5287}
5288
5289// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP
5290// Configuration's PublicIPAddress configuration
5291type VirtualMachineScaleSetPublicIPAddressConfiguration struct {
5292	// Name - The publicIP address configuration name.
5293	Name                                                          *string `json:"name,omitempty"`
5294	*VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"`
5295}
5296
5297// MarshalJSON is the custom marshaler for VirtualMachineScaleSetPublicIPAddressConfiguration.
5298func (vmsspiac VirtualMachineScaleSetPublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
5299	objectMap := make(map[string]interface{})
5300	if vmsspiac.Name != nil {
5301		objectMap["name"] = vmsspiac.Name
5302	}
5303	if vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties != nil {
5304		objectMap["properties"] = vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties
5305	}
5306	return json.Marshal(objectMap)
5307}
5308
5309// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetPublicIPAddressConfiguration struct.
5310func (vmsspiac *VirtualMachineScaleSetPublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
5311	var m map[string]*json.RawMessage
5312	err := json.Unmarshal(body, &m)
5313	if err != nil {
5314		return err
5315	}
5316	for k, v := range m {
5317		switch k {
5318		case "name":
5319			if v != nil {
5320				var name string
5321				err = json.Unmarshal(*v, &name)
5322				if err != nil {
5323					return err
5324				}
5325				vmsspiac.Name = &name
5326			}
5327		case "properties":
5328			if v != nil {
5329				var virtualMachineScaleSetPublicIPAddressConfigurationProperties VirtualMachineScaleSetPublicIPAddressConfigurationProperties
5330				err = json.Unmarshal(*v, &virtualMachineScaleSetPublicIPAddressConfigurationProperties)
5331				if err != nil {
5332					return err
5333				}
5334				vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties = &virtualMachineScaleSetPublicIPAddressConfigurationProperties
5335			}
5336		}
5337	}
5338
5339	return nil
5340}
5341
5342// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets
5343// network configuration's DNS settings.
5344type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct {
5345	// 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
5346	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
5347}
5348
5349// VirtualMachineScaleSetPublicIPAddressConfigurationProperties describes a virtual machines scale set IP
5350// Configuration's PublicIPAddress configuration
5351type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
5352	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
5353	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
5354	// DNSSettings - The dns settings to be applied on the publicIP addresses .
5355	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
5356}
5357
5358// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the
5359// results of a long-running operation.
5360type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
5361	azure.Future
5362}
5363
5364// Result returns the result of the asynchronous operation.
5365// If the operation has not completed it will return an error.
5366func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, err error) {
5367	var done bool
5368	done, err = future.DoneWithContext(context.Background(), client)
5369	if err != nil {
5370		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Polling failure")
5371		return
5372	}
5373	if !done {
5374		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
5375		return
5376	}
5377	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5378	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5379		osr, err = client.CancelResponder(osr.Response.Response)
5380		if err != nil {
5381			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", osr.Response.Response, "Failure responding to request")
5382		}
5383	}
5384	return
5385}
5386
5387// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving
5388// the results of a long-running operation.
5389type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
5390	azure.Future
5391}
5392
5393// Result returns the result of the asynchronous operation.
5394// If the operation has not completed it will return an error.
5395func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, err error) {
5396	var done bool
5397	done, err = future.DoneWithContext(context.Background(), client)
5398	if err != nil {
5399		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Polling failure")
5400		return
5401	}
5402	if !done {
5403		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
5404		return
5405	}
5406	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5407	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5408		osr, err = client.StartOSUpgradeResponder(osr.Response.Response)
5409		if err != nil {
5410			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", osr.Response.Response, "Failure responding to request")
5411		}
5412	}
5413	return
5414}
5415
5416// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
5417// a long-running operation.
5418type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
5419	azure.Future
5420}
5421
5422// Result returns the result of the asynchronous operation.
5423// If the operation has not completed it will return an error.
5424func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
5425	var done bool
5426	done, err = future.DoneWithContext(context.Background(), client)
5427	if err != nil {
5428		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5429		return
5430	}
5431	if !done {
5432		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
5433		return
5434	}
5435	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5436	if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
5437		vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
5438		if err != nil {
5439			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
5440		}
5441	}
5442	return
5443}
5444
5445// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a
5446// long-running operation.
5447type VirtualMachineScaleSetsDeallocateFuture struct {
5448	azure.Future
5449}
5450
5451// Result returns the result of the asynchronous operation.
5452// If the operation has not completed it will return an error.
5453func (future *VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
5454	var done bool
5455	done, err = future.DoneWithContext(context.Background(), client)
5456	if err != nil {
5457		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Polling failure")
5458		return
5459	}
5460	if !done {
5461		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
5462		return
5463	}
5464	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5465	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5466		osr, err = client.DeallocateResponder(osr.Response.Response)
5467		if err != nil {
5468			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
5469		}
5470	}
5471	return
5472}
5473
5474// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
5475// long-running operation.
5476type VirtualMachineScaleSetsDeleteFuture struct {
5477	azure.Future
5478}
5479
5480// Result returns the result of the asynchronous operation.
5481// If the operation has not completed it will return an error.
5482func (future *VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
5483	var done bool
5484	done, err = future.DoneWithContext(context.Background(), client)
5485	if err != nil {
5486		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Polling failure")
5487		return
5488	}
5489	if !done {
5490		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
5491		return
5492	}
5493	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5494	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5495		osr, err = client.DeleteResponder(osr.Response.Response)
5496		if err != nil {
5497			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
5498		}
5499	}
5500	return
5501}
5502
5503// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of
5504// a long-running operation.
5505type VirtualMachineScaleSetsDeleteInstancesFuture struct {
5506	azure.Future
5507}
5508
5509// Result returns the result of the asynchronous operation.
5510// If the operation has not completed it will return an error.
5511func (future *VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
5512	var done bool
5513	done, err = future.DoneWithContext(context.Background(), client)
5514	if err != nil {
5515		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Polling failure")
5516		return
5517	}
5518	if !done {
5519		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
5520		return
5521	}
5522	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5523	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5524		osr, err = client.DeleteInstancesResponder(osr.Response.Response)
5525		if err != nil {
5526			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
5527		}
5528	}
5529	return
5530}
5531
5532// VirtualMachineScaleSetSku describes an available virtual machine scale set sku.
5533type VirtualMachineScaleSetSku struct {
5534	// ResourceType - READ-ONLY; The type of resource the sku applies to.
5535	ResourceType *string `json:"resourceType,omitempty"`
5536	// Sku - READ-ONLY; The Sku.
5537	Sku *Sku `json:"sku,omitempty"`
5538	// Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
5539	Capacity *VirtualMachineScaleSetSkuCapacity `json:"capacity,omitempty"`
5540}
5541
5542// VirtualMachineScaleSetSkuCapacity describes scaling information of a sku.
5543type VirtualMachineScaleSetSkuCapacity struct {
5544	// Minimum - READ-ONLY; The minimum capacity.
5545	Minimum *int64 `json:"minimum,omitempty"`
5546	// Maximum - READ-ONLY; The maximum capacity that can be set.
5547	Maximum *int64 `json:"maximum,omitempty"`
5548	// DefaultCapacity - READ-ONLY; The default capacity.
5549	DefaultCapacity *int64 `json:"defaultCapacity,omitempty"`
5550	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'VirtualMachineScaleSetSkuScaleTypeAutomatic', 'VirtualMachineScaleSetSkuScaleTypeNone'
5551	ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"`
5552}
5553
5554// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results
5555// of a long-running operation.
5556type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
5557	azure.Future
5558}
5559
5560// Result returns the result of the asynchronous operation.
5561// If the operation has not completed it will return an error.
5562func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
5563	var done bool
5564	done, err = future.DoneWithContext(context.Background(), client)
5565	if err != nil {
5566		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
5567		return
5568	}
5569	if !done {
5570		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
5571		return
5572	}
5573	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5574	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5575		osr, err = client.PerformMaintenanceResponder(osr.Response.Response)
5576		if err != nil {
5577			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", osr.Response.Response, "Failure responding to request")
5578		}
5579	}
5580	return
5581}
5582
5583// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a
5584// long-running operation.
5585type VirtualMachineScaleSetsPowerOffFuture struct {
5586	azure.Future
5587}
5588
5589// Result returns the result of the asynchronous operation.
5590// If the operation has not completed it will return an error.
5591func (future *VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
5592	var done bool
5593	done, err = future.DoneWithContext(context.Background(), client)
5594	if err != nil {
5595		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Polling failure")
5596		return
5597	}
5598	if !done {
5599		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
5600		return
5601	}
5602	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5603	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5604		osr, err = client.PowerOffResponder(osr.Response.Response)
5605		if err != nil {
5606			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
5607		}
5608	}
5609	return
5610}
5611
5612// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a
5613// long-running operation.
5614type VirtualMachineScaleSetsRedeployFuture struct {
5615	azure.Future
5616}
5617
5618// Result returns the result of the asynchronous operation.
5619// If the operation has not completed it will return an error.
5620func (future *VirtualMachineScaleSetsRedeployFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
5621	var done bool
5622	done, err = future.DoneWithContext(context.Background(), client)
5623	if err != nil {
5624		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Polling failure")
5625		return
5626	}
5627	if !done {
5628		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
5629		return
5630	}
5631	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5632	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5633		osr, err = client.RedeployResponder(osr.Response.Response)
5634		if err != nil {
5635			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", osr.Response.Response, "Failure responding to request")
5636		}
5637	}
5638	return
5639}
5640
5641// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a
5642// long-running operation.
5643type VirtualMachineScaleSetsReimageAllFuture struct {
5644	azure.Future
5645}
5646
5647// Result returns the result of the asynchronous operation.
5648// If the operation has not completed it will return an error.
5649func (future *VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
5650	var done bool
5651	done, err = future.DoneWithContext(context.Background(), client)
5652	if err != nil {
5653		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Polling failure")
5654		return
5655	}
5656	if !done {
5657		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
5658		return
5659	}
5660	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5661	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5662		osr, err = client.ReimageAllResponder(osr.Response.Response)
5663		if err != nil {
5664			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", osr.Response.Response, "Failure responding to request")
5665		}
5666	}
5667	return
5668}
5669
5670// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a
5671// long-running operation.
5672type VirtualMachineScaleSetsReimageFuture struct {
5673	azure.Future
5674}
5675
5676// Result returns the result of the asynchronous operation.
5677// If the operation has not completed it will return an error.
5678func (future *VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
5679	var done bool
5680	done, err = future.DoneWithContext(context.Background(), client)
5681	if err != nil {
5682		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Polling failure")
5683		return
5684	}
5685	if !done {
5686		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
5687		return
5688	}
5689	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5690	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5691		osr, err = client.ReimageResponder(osr.Response.Response)
5692		if err != nil {
5693			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
5694		}
5695	}
5696	return
5697}
5698
5699// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a
5700// long-running operation.
5701type VirtualMachineScaleSetsRestartFuture struct {
5702	azure.Future
5703}
5704
5705// Result returns the result of the asynchronous operation.
5706// If the operation has not completed it will return an error.
5707func (future *VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
5708	var done bool
5709	done, err = future.DoneWithContext(context.Background(), client)
5710	if err != nil {
5711		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Polling failure")
5712		return
5713	}
5714	if !done {
5715		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
5716		return
5717	}
5718	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5719	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5720		osr, err = client.RestartResponder(osr.Response.Response)
5721		if err != nil {
5722			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
5723		}
5724	}
5725	return
5726}
5727
5728// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a
5729// long-running operation.
5730type VirtualMachineScaleSetsStartFuture struct {
5731	azure.Future
5732}
5733
5734// Result returns the result of the asynchronous operation.
5735// If the operation has not completed it will return an error.
5736func (future *VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
5737	var done bool
5738	done, err = future.DoneWithContext(context.Background(), client)
5739	if err != nil {
5740		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Polling failure")
5741		return
5742	}
5743	if !done {
5744		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
5745		return
5746	}
5747	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5748	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5749		osr, err = client.StartResponder(osr.Response.Response)
5750		if err != nil {
5751			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
5752		}
5753	}
5754	return
5755}
5756
5757// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile.
5758type VirtualMachineScaleSetStorageProfile struct {
5759	// 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.
5760	ImageReference *ImageReference `json:"imageReference,omitempty"`
5761	// 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).
5762	OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"`
5763	// 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).
5764	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
5765}
5766
5767// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
5768// long-running operation.
5769type VirtualMachineScaleSetsUpdateFuture struct {
5770	azure.Future
5771}
5772
5773// Result returns the result of the asynchronous operation.
5774// If the operation has not completed it will return an error.
5775func (future *VirtualMachineScaleSetsUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
5776	var done bool
5777	done, err = future.DoneWithContext(context.Background(), client)
5778	if err != nil {
5779		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Polling failure")
5780		return
5781	}
5782	if !done {
5783		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
5784		return
5785	}
5786	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5787	if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
5788		vmss, err = client.UpdateResponder(vmss.Response.Response)
5789		if err != nil {
5790			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
5791		}
5792	}
5793	return
5794}
5795
5796// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of
5797// a long-running operation.
5798type VirtualMachineScaleSetsUpdateInstancesFuture struct {
5799	azure.Future
5800}
5801
5802// Result returns the result of the asynchronous operation.
5803// If the operation has not completed it will return an error.
5804func (future *VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, err error) {
5805	var done bool
5806	done, err = future.DoneWithContext(context.Background(), client)
5807	if err != nil {
5808		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Polling failure")
5809		return
5810	}
5811	if !done {
5812		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
5813		return
5814	}
5815	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5816	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
5817		osr, err = client.UpdateInstancesResponder(osr.Response.Response)
5818		if err != nil {
5819			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
5820		}
5821	}
5822	return
5823}
5824
5825// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set.
5826type VirtualMachineScaleSetUpdate struct {
5827	// Sku - The virtual machine scale set sku.
5828	Sku *Sku `json:"sku,omitempty"`
5829	// Plan - The purchase plan when deploying a virtual machine scale set from VM Marketplace images.
5830	Plan                                    *Plan `json:"plan,omitempty"`
5831	*VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"`
5832	// Identity - The identity of the virtual machine scale set, if configured.
5833	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
5834	// Tags - Resource tags
5835	Tags map[string]*string `json:"tags"`
5836}
5837
5838// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate.
5839func (vmssu VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) {
5840	objectMap := make(map[string]interface{})
5841	if vmssu.Sku != nil {
5842		objectMap["sku"] = vmssu.Sku
5843	}
5844	if vmssu.Plan != nil {
5845		objectMap["plan"] = vmssu.Plan
5846	}
5847	if vmssu.VirtualMachineScaleSetUpdateProperties != nil {
5848		objectMap["properties"] = vmssu.VirtualMachineScaleSetUpdateProperties
5849	}
5850	if vmssu.Identity != nil {
5851		objectMap["identity"] = vmssu.Identity
5852	}
5853	if vmssu.Tags != nil {
5854		objectMap["tags"] = vmssu.Tags
5855	}
5856	return json.Marshal(objectMap)
5857}
5858
5859// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdate struct.
5860func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error {
5861	var m map[string]*json.RawMessage
5862	err := json.Unmarshal(body, &m)
5863	if err != nil {
5864		return err
5865	}
5866	for k, v := range m {
5867		switch k {
5868		case "sku":
5869			if v != nil {
5870				var sku Sku
5871				err = json.Unmarshal(*v, &sku)
5872				if err != nil {
5873					return err
5874				}
5875				vmssu.Sku = &sku
5876			}
5877		case "plan":
5878			if v != nil {
5879				var plan Plan
5880				err = json.Unmarshal(*v, &plan)
5881				if err != nil {
5882					return err
5883				}
5884				vmssu.Plan = &plan
5885			}
5886		case "properties":
5887			if v != nil {
5888				var virtualMachineScaleSetUpdateProperties VirtualMachineScaleSetUpdateProperties
5889				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateProperties)
5890				if err != nil {
5891					return err
5892				}
5893				vmssu.VirtualMachineScaleSetUpdateProperties = &virtualMachineScaleSetUpdateProperties
5894			}
5895		case "identity":
5896			if v != nil {
5897				var identity VirtualMachineScaleSetIdentity
5898				err = json.Unmarshal(*v, &identity)
5899				if err != nil {
5900					return err
5901				}
5902				vmssu.Identity = &identity
5903			}
5904		case "tags":
5905			if v != nil {
5906				var tags map[string]*string
5907				err = json.Unmarshal(*v, &tags)
5908				if err != nil {
5909					return err
5910				}
5911				vmssu.Tags = tags
5912			}
5913		}
5914	}
5915
5916	return nil
5917}
5918
5919// VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP
5920// configuration.
5921type VirtualMachineScaleSetUpdateIPConfiguration struct {
5922	// Name - The IP configuration name.
5923	Name                                                   *string `json:"name,omitempty"`
5924	*VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"`
5925	// ID - Resource Id
5926	ID *string `json:"id,omitempty"`
5927}
5928
5929// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateIPConfiguration.
5930func (vmssuic VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) {
5931	objectMap := make(map[string]interface{})
5932	if vmssuic.Name != nil {
5933		objectMap["name"] = vmssuic.Name
5934	}
5935	if vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties != nil {
5936		objectMap["properties"] = vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties
5937	}
5938	if vmssuic.ID != nil {
5939		objectMap["id"] = vmssuic.ID
5940	}
5941	return json.Marshal(objectMap)
5942}
5943
5944// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateIPConfiguration struct.
5945func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body []byte) error {
5946	var m map[string]*json.RawMessage
5947	err := json.Unmarshal(body, &m)
5948	if err != nil {
5949		return err
5950	}
5951	for k, v := range m {
5952		switch k {
5953		case "name":
5954			if v != nil {
5955				var name string
5956				err = json.Unmarshal(*v, &name)
5957				if err != nil {
5958					return err
5959				}
5960				vmssuic.Name = &name
5961			}
5962		case "properties":
5963			if v != nil {
5964				var virtualMachineScaleSetUpdateIPConfigurationProperties VirtualMachineScaleSetUpdateIPConfigurationProperties
5965				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateIPConfigurationProperties)
5966				if err != nil {
5967					return err
5968				}
5969				vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties = &virtualMachineScaleSetUpdateIPConfigurationProperties
5970			}
5971		case "id":
5972			if v != nil {
5973				var ID string
5974				err = json.Unmarshal(*v, &ID)
5975				if err != nil {
5976					return err
5977				}
5978				vmssuic.ID = &ID
5979			}
5980		}
5981	}
5982
5983	return nil
5984}
5985
5986// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network
5987// profile's IP configuration properties.
5988type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
5989	// Subnet - The subnet.
5990	Subnet *APIEntityReference `json:"subnet,omitempty"`
5991	// Primary - Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.
5992	Primary *bool `json:"primary,omitempty"`
5993	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
5994	PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
5995	// 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'
5996	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
5997	// ApplicationGatewayBackendAddressPools - The application gateway backend address pools.
5998	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
5999	// LoadBalancerBackendAddressPools - The load balancer backend address pools.
6000	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
6001	// LoadBalancerInboundNatPools - The load balancer inbound nat pools.
6002	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
6003}
6004
6005// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's
6006// network configurations.
6007type VirtualMachineScaleSetUpdateNetworkConfiguration struct {
6008	// Name - The network configuration name.
6009	Name                                                        *string `json:"name,omitempty"`
6010	*VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"`
6011	// ID - Resource Id
6012	ID *string `json:"id,omitempty"`
6013}
6014
6015// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateNetworkConfiguration.
6016func (vmssunc VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) {
6017	objectMap := make(map[string]interface{})
6018	if vmssunc.Name != nil {
6019		objectMap["name"] = vmssunc.Name
6020	}
6021	if vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties != nil {
6022		objectMap["properties"] = vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties
6023	}
6024	if vmssunc.ID != nil {
6025		objectMap["id"] = vmssunc.ID
6026	}
6027	return json.Marshal(objectMap)
6028}
6029
6030// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateNetworkConfiguration struct.
6031func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(body []byte) error {
6032	var m map[string]*json.RawMessage
6033	err := json.Unmarshal(body, &m)
6034	if err != nil {
6035		return err
6036	}
6037	for k, v := range m {
6038		switch k {
6039		case "name":
6040			if v != nil {
6041				var name string
6042				err = json.Unmarshal(*v, &name)
6043				if err != nil {
6044					return err
6045				}
6046				vmssunc.Name = &name
6047			}
6048		case "properties":
6049			if v != nil {
6050				var virtualMachineScaleSetUpdateNetworkConfigurationProperties VirtualMachineScaleSetUpdateNetworkConfigurationProperties
6051				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateNetworkConfigurationProperties)
6052				if err != nil {
6053					return err
6054				}
6055				vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties = &virtualMachineScaleSetUpdateNetworkConfigurationProperties
6056			}
6057		case "id":
6058			if v != nil {
6059				var ID string
6060				err = json.Unmarshal(*v, &ID)
6061				if err != nil {
6062					return err
6063				}
6064				vmssunc.ID = &ID
6065			}
6066		}
6067	}
6068
6069	return nil
6070}
6071
6072// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set
6073// updatable network profile's IP configuration.Use this object for updating network profile's IP
6074// Configuration.
6075type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct {
6076	// Primary - Whether this is a primary NIC on a virtual machine.
6077	Primary *bool `json:"primary,omitempty"`
6078	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
6079	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
6080	// NetworkSecurityGroup - The network security group.
6081	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
6082	// DNSSettings - The dns settings to be applied on the network interfaces.
6083	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
6084	// IPConfigurations - The virtual machine scale set IP Configuration.
6085	IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"`
6086	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
6087	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
6088}
6089
6090// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile.
6091type VirtualMachineScaleSetUpdateNetworkProfile struct {
6092	// NetworkInterfaceConfigurations - The list of network configurations.
6093	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
6094}
6095
6096// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update
6097// Object. This should be used for Updating VMSS OS Disk.
6098type VirtualMachineScaleSetUpdateOSDisk struct {
6099	// Caching - The caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
6100	Caching CachingTypes `json:"caching,omitempty"`
6101	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
6102	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
6103	// 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.
6104	Image *VirtualHardDisk `json:"image,omitempty"`
6105	// VhdContainers - The list of virtual hard disk container uris.
6106	VhdContainers *[]string `json:"vhdContainers,omitempty"`
6107	// ManagedDisk - The managed disk parameters.
6108	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
6109}
6110
6111// VirtualMachineScaleSetUpdateOSProfile describes a virtual machine scale set OS profile.
6112type VirtualMachineScaleSetUpdateOSProfile struct {
6113	// CustomData - A base-64 encoded string of custom data.
6114	CustomData *string `json:"customData,omitempty"`
6115	// WindowsConfiguration - The Windows Configuration of the OS profile.
6116	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
6117	// LinuxConfiguration - The Linux Configuration of the OS profile.
6118	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
6119	// Secrets - The List of certificates for addition to the VM.
6120	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
6121}
6122
6123// VirtualMachineScaleSetUpdateProperties describes the properties of a Virtual Machine Scale Set.
6124type VirtualMachineScaleSetUpdateProperties struct {
6125	// UpgradePolicy - The upgrade policy.
6126	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
6127	// VirtualMachineProfile - The virtual machine profile.
6128	VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"`
6129	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
6130	Overprovision *bool `json:"overprovision,omitempty"`
6131	// SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines.
6132	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
6133}
6134
6135// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP
6136// Configuration's PublicIPAddress configuration
6137type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct {
6138	// Name - The publicIP address configuration name.
6139	Name                                                                *string `json:"name,omitempty"`
6140	*VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"`
6141}
6142
6143// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.
6144func (vmssupiac VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
6145	objectMap := make(map[string]interface{})
6146	if vmssupiac.Name != nil {
6147		objectMap["name"] = vmssupiac.Name
6148	}
6149	if vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties != nil {
6150		objectMap["properties"] = vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
6151	}
6152	return json.Marshal(objectMap)
6153}
6154
6155// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct.
6156func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
6157	var m map[string]*json.RawMessage
6158	err := json.Unmarshal(body, &m)
6159	if err != nil {
6160		return err
6161	}
6162	for k, v := range m {
6163		switch k {
6164		case "name":
6165			if v != nil {
6166				var name string
6167				err = json.Unmarshal(*v, &name)
6168				if err != nil {
6169					return err
6170				}
6171				vmssupiac.Name = &name
6172			}
6173		case "properties":
6174			if v != nil {
6175				var virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
6176				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties)
6177				if err != nil {
6178					return err
6179				}
6180				vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
6181			}
6182		}
6183	}
6184
6185	return nil
6186}
6187
6188// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale
6189// set IP Configuration's PublicIPAddress configuration
6190type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct {
6191	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
6192	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
6193	// DNSSettings - The dns settings to be applied on the publicIP addresses .
6194	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
6195}
6196
6197// VirtualMachineScaleSetUpdateStorageProfile describes a virtual machine scale set storage profile.
6198type VirtualMachineScaleSetUpdateStorageProfile struct {
6199	// ImageReference - The image reference.
6200	ImageReference *ImageReference `json:"imageReference,omitempty"`
6201	// OsDisk - The OS disk.
6202	OsDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"`
6203	// DataDisks - The data disks.
6204	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
6205}
6206
6207// VirtualMachineScaleSetUpdateVMProfile describes a virtual machine scale set virtual machine profile.
6208type VirtualMachineScaleSetUpdateVMProfile struct {
6209	// OsProfile - The virtual machine scale set OS profile.
6210	OsProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"`
6211	// StorageProfile - The virtual machine scale set storage profile.
6212	StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"`
6213	// NetworkProfile - The virtual machine scale set network profile.
6214	NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"`
6215	// DiagnosticsProfile - The virtual machine scale set diagnostics profile.
6216	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
6217	// ExtensionProfile - The virtual machine scale set extension profile.
6218	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
6219	// LicenseType - The license type, which is for bring your own license scenario.
6220	LicenseType *string `json:"licenseType,omitempty"`
6221}
6222
6223// VirtualMachineScaleSetVM describes a virtual machine scale set virtual machine.
6224type VirtualMachineScaleSetVM struct {
6225	autorest.Response `json:"-"`
6226	// InstanceID - READ-ONLY; The virtual machine instance ID.
6227	InstanceID *string `json:"instanceId,omitempty"`
6228	// Sku - READ-ONLY; The virtual machine SKU.
6229	Sku                                 *Sku `json:"sku,omitempty"`
6230	*VirtualMachineScaleSetVMProperties `json:"properties,omitempty"`
6231	// 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**.
6232	Plan *Plan `json:"plan,omitempty"`
6233	// Resources - READ-ONLY; The virtual machine child extension resources.
6234	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
6235	// ID - READ-ONLY; Resource Id
6236	ID *string `json:"id,omitempty"`
6237	// Name - READ-ONLY; Resource name
6238	Name *string `json:"name,omitempty"`
6239	// Type - READ-ONLY; Resource type
6240	Type *string `json:"type,omitempty"`
6241	// Location - Resource location
6242	Location *string `json:"location,omitempty"`
6243	// Tags - Resource tags
6244	Tags map[string]*string `json:"tags"`
6245}
6246
6247// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVM.
6248func (vmssv VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) {
6249	objectMap := make(map[string]interface{})
6250	if vmssv.VirtualMachineScaleSetVMProperties != nil {
6251		objectMap["properties"] = vmssv.VirtualMachineScaleSetVMProperties
6252	}
6253	if vmssv.Plan != nil {
6254		objectMap["plan"] = vmssv.Plan
6255	}
6256	if vmssv.Location != nil {
6257		objectMap["location"] = vmssv.Location
6258	}
6259	if vmssv.Tags != nil {
6260		objectMap["tags"] = vmssv.Tags
6261	}
6262	return json.Marshal(objectMap)
6263}
6264
6265// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVM struct.
6266func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error {
6267	var m map[string]*json.RawMessage
6268	err := json.Unmarshal(body, &m)
6269	if err != nil {
6270		return err
6271	}
6272	for k, v := range m {
6273		switch k {
6274		case "instanceId":
6275			if v != nil {
6276				var instanceID string
6277				err = json.Unmarshal(*v, &instanceID)
6278				if err != nil {
6279					return err
6280				}
6281				vmssv.InstanceID = &instanceID
6282			}
6283		case "sku":
6284			if v != nil {
6285				var sku Sku
6286				err = json.Unmarshal(*v, &sku)
6287				if err != nil {
6288					return err
6289				}
6290				vmssv.Sku = &sku
6291			}
6292		case "properties":
6293			if v != nil {
6294				var virtualMachineScaleSetVMProperties VirtualMachineScaleSetVMProperties
6295				err = json.Unmarshal(*v, &virtualMachineScaleSetVMProperties)
6296				if err != nil {
6297					return err
6298				}
6299				vmssv.VirtualMachineScaleSetVMProperties = &virtualMachineScaleSetVMProperties
6300			}
6301		case "plan":
6302			if v != nil {
6303				var plan Plan
6304				err = json.Unmarshal(*v, &plan)
6305				if err != nil {
6306					return err
6307				}
6308				vmssv.Plan = &plan
6309			}
6310		case "resources":
6311			if v != nil {
6312				var resources []VirtualMachineExtension
6313				err = json.Unmarshal(*v, &resources)
6314				if err != nil {
6315					return err
6316				}
6317				vmssv.Resources = &resources
6318			}
6319		case "id":
6320			if v != nil {
6321				var ID string
6322				err = json.Unmarshal(*v, &ID)
6323				if err != nil {
6324					return err
6325				}
6326				vmssv.ID = &ID
6327			}
6328		case "name":
6329			if v != nil {
6330				var name string
6331				err = json.Unmarshal(*v, &name)
6332				if err != nil {
6333					return err
6334				}
6335				vmssv.Name = &name
6336			}
6337		case "type":
6338			if v != nil {
6339				var typeVar string
6340				err = json.Unmarshal(*v, &typeVar)
6341				if err != nil {
6342					return err
6343				}
6344				vmssv.Type = &typeVar
6345			}
6346		case "location":
6347			if v != nil {
6348				var location string
6349				err = json.Unmarshal(*v, &location)
6350				if err != nil {
6351					return err
6352				}
6353				vmssv.Location = &location
6354			}
6355		case "tags":
6356			if v != nil {
6357				var tags map[string]*string
6358				err = json.Unmarshal(*v, &tags)
6359				if err != nil {
6360					return err
6361				}
6362				vmssv.Tags = tags
6363			}
6364		}
6365	}
6366
6367	return nil
6368}
6369
6370// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine
6371// scale set.
6372type VirtualMachineScaleSetVMExtensionsSummary struct {
6373	// Name - READ-ONLY; The extension name.
6374	Name *string `json:"name,omitempty"`
6375	// StatusesSummary - READ-ONLY; The extensions information.
6376	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
6377}
6378
6379// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale
6380// set.
6381type VirtualMachineScaleSetVMInstanceIDs struct {
6382	// 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.
6383	InstanceIds *[]string `json:"instanceIds,omitempty"`
6384}
6385
6386// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM
6387// scale set.
6388type VirtualMachineScaleSetVMInstanceRequiredIDs struct {
6389	// InstanceIds - The virtual machine scale set instance ids.
6390	InstanceIds *[]string `json:"instanceIds,omitempty"`
6391}
6392
6393// VirtualMachineScaleSetVMInstanceView the instance view of a virtual machine scale set VM.
6394type VirtualMachineScaleSetVMInstanceView struct {
6395	autorest.Response `json:"-"`
6396	// PlatformUpdateDomain - The Update Domain count.
6397	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
6398	// PlatformFaultDomain - The Fault Domain count.
6399	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
6400	// RdpThumbPrint - The Remote desktop certificate thumbprint.
6401	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
6402	// VMAgent - The VM Agent running on the virtual machine.
6403	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
6404	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
6405	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
6406	// Disks - The disks information.
6407	Disks *[]DiskInstanceView `json:"disks,omitempty"`
6408	// Extensions - The extensions information.
6409	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
6410	// VMHealth - READ-ONLY; The health status for the VM.
6411	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
6412	// 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.
6413	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
6414	// Statuses - The resource status information.
6415	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
6416	// PlacementGroupID - The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId.
6417	PlacementGroupID *string `json:"placementGroupId,omitempty"`
6418}
6419
6420// VirtualMachineScaleSetVMListResult the List Virtual Machine Scale Set VMs operation response.
6421type VirtualMachineScaleSetVMListResult struct {
6422	autorest.Response `json:"-"`
6423	// Value - The list of virtual machine scale sets VMs.
6424	Value *[]VirtualMachineScaleSetVM `json:"value,omitempty"`
6425	// 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
6426	NextLink *string `json:"nextLink,omitempty"`
6427}
6428
6429// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of
6430// VirtualMachineScaleSetVM values.
6431type VirtualMachineScaleSetVMListResultIterator struct {
6432	i    int
6433	page VirtualMachineScaleSetVMListResultPage
6434}
6435
6436// NextWithContext advances to the next value.  If there was an error making
6437// the request the iterator does not advance and the error is returned.
6438func (iter *VirtualMachineScaleSetVMListResultIterator) NextWithContext(ctx context.Context) (err error) {
6439	if tracing.IsEnabled() {
6440		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultIterator.NextWithContext")
6441		defer func() {
6442			sc := -1
6443			if iter.Response().Response.Response != nil {
6444				sc = iter.Response().Response.Response.StatusCode
6445			}
6446			tracing.EndSpan(ctx, sc, err)
6447		}()
6448	}
6449	iter.i++
6450	if iter.i < len(iter.page.Values()) {
6451		return nil
6452	}
6453	err = iter.page.NextWithContext(ctx)
6454	if err != nil {
6455		iter.i--
6456		return err
6457	}
6458	iter.i = 0
6459	return nil
6460}
6461
6462// Next advances to the next value.  If there was an error making
6463// the request the iterator does not advance and the error is returned.
6464// Deprecated: Use NextWithContext() instead.
6465func (iter *VirtualMachineScaleSetVMListResultIterator) Next() error {
6466	return iter.NextWithContext(context.Background())
6467}
6468
6469// NotDone returns true if the enumeration should be started or is not yet complete.
6470func (iter VirtualMachineScaleSetVMListResultIterator) NotDone() bool {
6471	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6472}
6473
6474// Response returns the raw server response from the last page request.
6475func (iter VirtualMachineScaleSetVMListResultIterator) Response() VirtualMachineScaleSetVMListResult {
6476	return iter.page.Response()
6477}
6478
6479// Value returns the current value or a zero-initialized value if the
6480// iterator has advanced beyond the end of the collection.
6481func (iter VirtualMachineScaleSetVMListResultIterator) Value() VirtualMachineScaleSetVM {
6482	if !iter.page.NotDone() {
6483		return VirtualMachineScaleSetVM{}
6484	}
6485	return iter.page.Values()[iter.i]
6486}
6487
6488// Creates a new instance of the VirtualMachineScaleSetVMListResultIterator type.
6489func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator {
6490	return VirtualMachineScaleSetVMListResultIterator{page: page}
6491}
6492
6493// IsEmpty returns true if the ListResult contains no values.
6494func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool {
6495	return vmssvlr.Value == nil || len(*vmssvlr.Value) == 0
6496}
6497
6498// virtualMachineScaleSetVMListResultPreparer prepares a request to retrieve the next set of results.
6499// It returns nil if no more results exist.
6500func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer(ctx context.Context) (*http.Request, error) {
6501	if vmssvlr.NextLink == nil || len(to.String(vmssvlr.NextLink)) < 1 {
6502		return nil, nil
6503	}
6504	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6505		autorest.AsJSON(),
6506		autorest.AsGet(),
6507		autorest.WithBaseURL(to.String(vmssvlr.NextLink)))
6508}
6509
6510// VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values.
6511type VirtualMachineScaleSetVMListResultPage struct {
6512	fn      func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)
6513	vmssvlr VirtualMachineScaleSetVMListResult
6514}
6515
6516// NextWithContext advances to the next page of values.  If there was an error making
6517// the request the page does not advance and the error is returned.
6518func (page *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context.Context) (err error) {
6519	if tracing.IsEnabled() {
6520		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultPage.NextWithContext")
6521		defer func() {
6522			sc := -1
6523			if page.Response().Response.Response != nil {
6524				sc = page.Response().Response.Response.StatusCode
6525			}
6526			tracing.EndSpan(ctx, sc, err)
6527		}()
6528	}
6529	next, err := page.fn(ctx, page.vmssvlr)
6530	if err != nil {
6531		return err
6532	}
6533	page.vmssvlr = next
6534	return nil
6535}
6536
6537// Next advances to the next page of values.  If there was an error making
6538// the request the page does not advance and the error is returned.
6539// Deprecated: Use NextWithContext() instead.
6540func (page *VirtualMachineScaleSetVMListResultPage) Next() error {
6541	return page.NextWithContext(context.Background())
6542}
6543
6544// NotDone returns true if the page enumeration should be started or is not yet complete.
6545func (page VirtualMachineScaleSetVMListResultPage) NotDone() bool {
6546	return !page.vmssvlr.IsEmpty()
6547}
6548
6549// Response returns the raw server response from the last page request.
6550func (page VirtualMachineScaleSetVMListResultPage) Response() VirtualMachineScaleSetVMListResult {
6551	return page.vmssvlr
6552}
6553
6554// Values returns the slice of values for the current page or nil if there are no values.
6555func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScaleSetVM {
6556	if page.vmssvlr.IsEmpty() {
6557		return nil
6558	}
6559	return *page.vmssvlr.Value
6560}
6561
6562// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type.
6563func NewVirtualMachineScaleSetVMListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
6564	return VirtualMachineScaleSetVMListResultPage{fn: getNextPage}
6565}
6566
6567// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile.
6568type VirtualMachineScaleSetVMProfile struct {
6569	// OsProfile - Specifies the operating system settings for the virtual machines in the scale set.
6570	OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"`
6571	// StorageProfile - Specifies the storage settings for the virtual machine disks.
6572	StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"`
6573	// NetworkProfile - Specifies properties of the network interfaces of the virtual machines in the scale set.
6574	NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"`
6575	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
6576	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
6577	// ExtensionProfile - Specifies a collection of settings for extensions installed on virtual machines in the scale set.
6578	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
6579	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15
6580	LicenseType *string `json:"licenseType,omitempty"`
6581	// 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'
6582	Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
6583	// EvictionPolicy - Specifies the eviction policy for virtual machines in a low priority scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
6584	EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
6585}
6586
6587// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual
6588// machine.
6589type VirtualMachineScaleSetVMProperties struct {
6590	// LatestModelApplied - READ-ONLY; Specifies whether the latest model has been applied to the virtual machine.
6591	LatestModelApplied *bool `json:"latestModelApplied,omitempty"`
6592	// VMID - READ-ONLY; Azure VM unique ID.
6593	VMID *string `json:"vmId,omitempty"`
6594	// InstanceView - READ-ONLY; The virtual machine instance view.
6595	InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty"`
6596	// HardwareProfile - Specifies the hardware settings for the virtual machine.
6597	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
6598	// StorageProfile - Specifies the storage settings for the virtual machine disks.
6599	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
6600	// OsProfile - Specifies the operating system settings for the virtual machine.
6601	OsProfile *OSProfile `json:"osProfile,omitempty"`
6602	// NetworkProfile - Specifies the network interfaces of the virtual machine.
6603	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
6604	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
6605	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
6606	// 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.
6607	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
6608	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
6609	ProvisioningState *string `json:"provisioningState,omitempty"`
6610	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15
6611	LicenseType *string `json:"licenseType,omitempty"`
6612}
6613
6614// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a
6615// long-running operation.
6616type VirtualMachineScaleSetVMsDeallocateFuture struct {
6617	azure.Future
6618}
6619
6620// Result returns the result of the asynchronous operation.
6621// If the operation has not completed it will return an error.
6622func (future *VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
6623	var done bool
6624	done, err = future.DoneWithContext(context.Background(), client)
6625	if err != nil {
6626		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Polling failure")
6627		return
6628	}
6629	if !done {
6630		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
6631		return
6632	}
6633	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6634	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
6635		osr, err = client.DeallocateResponder(osr.Response.Response)
6636		if err != nil {
6637			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
6638		}
6639	}
6640	return
6641}
6642
6643// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
6644// long-running operation.
6645type VirtualMachineScaleSetVMsDeleteFuture struct {
6646	azure.Future
6647}
6648
6649// Result returns the result of the asynchronous operation.
6650// If the operation has not completed it will return an error.
6651func (future *VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
6652	var done bool
6653	done, err = future.DoneWithContext(context.Background(), client)
6654	if err != nil {
6655		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Polling failure")
6656		return
6657	}
6658	if !done {
6659		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
6660		return
6661	}
6662	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6663	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
6664		osr, err = client.DeleteResponder(osr.Response.Response)
6665		if err != nil {
6666			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
6667		}
6668	}
6669	return
6670}
6671
6672// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the
6673// results of a long-running operation.
6674type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
6675	azure.Future
6676}
6677
6678// Result returns the result of the asynchronous operation.
6679// If the operation has not completed it will return an error.
6680func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
6681	var done bool
6682	done, err = future.DoneWithContext(context.Background(), client)
6683	if err != nil {
6684		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
6685		return
6686	}
6687	if !done {
6688		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
6689		return
6690	}
6691	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6692	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
6693		osr, err = client.PerformMaintenanceResponder(osr.Response.Response)
6694		if err != nil {
6695			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", osr.Response.Response, "Failure responding to request")
6696		}
6697	}
6698	return
6699}
6700
6701// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a
6702// long-running operation.
6703type VirtualMachineScaleSetVMsPowerOffFuture struct {
6704	azure.Future
6705}
6706
6707// Result returns the result of the asynchronous operation.
6708// If the operation has not completed it will return an error.
6709func (future *VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
6710	var done bool
6711	done, err = future.DoneWithContext(context.Background(), client)
6712	if err != nil {
6713		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Polling failure")
6714		return
6715	}
6716	if !done {
6717		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
6718		return
6719	}
6720	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6721	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
6722		osr, err = client.PowerOffResponder(osr.Response.Response)
6723		if err != nil {
6724			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
6725		}
6726	}
6727	return
6728}
6729
6730// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a
6731// long-running operation.
6732type VirtualMachineScaleSetVMsRedeployFuture struct {
6733	azure.Future
6734}
6735
6736// Result returns the result of the asynchronous operation.
6737// If the operation has not completed it will return an error.
6738func (future *VirtualMachineScaleSetVMsRedeployFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
6739	var done bool
6740	done, err = future.DoneWithContext(context.Background(), client)
6741	if err != nil {
6742		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Polling failure")
6743		return
6744	}
6745	if !done {
6746		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
6747		return
6748	}
6749	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6750	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
6751		osr, err = client.RedeployResponder(osr.Response.Response)
6752		if err != nil {
6753			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", osr.Response.Response, "Failure responding to request")
6754		}
6755	}
6756	return
6757}
6758
6759// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a
6760// long-running operation.
6761type VirtualMachineScaleSetVMsReimageAllFuture struct {
6762	azure.Future
6763}
6764
6765// Result returns the result of the asynchronous operation.
6766// If the operation has not completed it will return an error.
6767func (future *VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
6768	var done bool
6769	done, err = future.DoneWithContext(context.Background(), client)
6770	if err != nil {
6771		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Polling failure")
6772		return
6773	}
6774	if !done {
6775		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
6776		return
6777	}
6778	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6779	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
6780		osr, err = client.ReimageAllResponder(osr.Response.Response)
6781		if err != nil {
6782			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", osr.Response.Response, "Failure responding to request")
6783		}
6784	}
6785	return
6786}
6787
6788// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a
6789// long-running operation.
6790type VirtualMachineScaleSetVMsReimageFuture struct {
6791	azure.Future
6792}
6793
6794// Result returns the result of the asynchronous operation.
6795// If the operation has not completed it will return an error.
6796func (future *VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
6797	var done bool
6798	done, err = future.DoneWithContext(context.Background(), client)
6799	if err != nil {
6800		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Polling failure")
6801		return
6802	}
6803	if !done {
6804		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
6805		return
6806	}
6807	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6808	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
6809		osr, err = client.ReimageResponder(osr.Response.Response)
6810		if err != nil {
6811			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
6812		}
6813	}
6814	return
6815}
6816
6817// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a
6818// long-running operation.
6819type VirtualMachineScaleSetVMsRestartFuture struct {
6820	azure.Future
6821}
6822
6823// Result returns the result of the asynchronous operation.
6824// If the operation has not completed it will return an error.
6825func (future *VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
6826	var done bool
6827	done, err = future.DoneWithContext(context.Background(), client)
6828	if err != nil {
6829		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Polling failure")
6830		return
6831	}
6832	if !done {
6833		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
6834		return
6835	}
6836	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6837	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
6838		osr, err = client.RestartResponder(osr.Response.Response)
6839		if err != nil {
6840			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
6841		}
6842	}
6843	return
6844}
6845
6846// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a
6847// long-running operation.
6848type VirtualMachineScaleSetVMsStartFuture struct {
6849	azure.Future
6850}
6851
6852// Result returns the result of the asynchronous operation.
6853// If the operation has not completed it will return an error.
6854func (future *VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, err error) {
6855	var done bool
6856	done, err = future.DoneWithContext(context.Background(), client)
6857	if err != nil {
6858		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Polling failure")
6859		return
6860	}
6861	if !done {
6862		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
6863		return
6864	}
6865	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6866	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
6867		osr, err = client.StartResponder(osr.Response.Response)
6868		if err != nil {
6869			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
6870		}
6871	}
6872	return
6873}
6874
6875// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a
6876// long-running operation.
6877type VirtualMachineScaleSetVMsUpdateFuture struct {
6878	azure.Future
6879}
6880
6881// Result returns the result of the asynchronous operation.
6882// If the operation has not completed it will return an error.
6883func (future *VirtualMachineScaleSetVMsUpdateFuture) Result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) {
6884	var done bool
6885	done, err = future.DoneWithContext(context.Background(), client)
6886	if err != nil {
6887		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Polling failure")
6888		return
6889	}
6890	if !done {
6891		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
6892		return
6893	}
6894	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6895	if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent {
6896		vmssv, err = client.UpdateResponder(vmssv.Response.Response)
6897		if err != nil {
6898			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request")
6899		}
6900	}
6901	return
6902}
6903
6904// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running
6905// operation.
6906type VirtualMachinesCaptureFuture struct {
6907	azure.Future
6908}
6909
6910// Result returns the result of the asynchronous operation.
6911// If the operation has not completed it will return an error.
6912func (future *VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
6913	var done bool
6914	done, err = future.DoneWithContext(context.Background(), client)
6915	if err != nil {
6916		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Polling failure")
6917		return
6918	}
6919	if !done {
6920		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
6921		return
6922	}
6923	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6924	if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
6925		vmcr, err = client.CaptureResponder(vmcr.Response.Response)
6926		if err != nil {
6927			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
6928		}
6929	}
6930	return
6931}
6932
6933// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a
6934// long-running operation.
6935type VirtualMachinesConvertToManagedDisksFuture struct {
6936	azure.Future
6937}
6938
6939// Result returns the result of the asynchronous operation.
6940// If the operation has not completed it will return an error.
6941func (future *VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
6942	var done bool
6943	done, err = future.DoneWithContext(context.Background(), client)
6944	if err != nil {
6945		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Polling failure")
6946		return
6947	}
6948	if !done {
6949		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
6950		return
6951	}
6952	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6953	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
6954		osr, err = client.ConvertToManagedDisksResponder(osr.Response.Response)
6955		if err != nil {
6956			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", osr.Response.Response, "Failure responding to request")
6957		}
6958	}
6959	return
6960}
6961
6962// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6963// long-running operation.
6964type VirtualMachinesCreateOrUpdateFuture struct {
6965	azure.Future
6966}
6967
6968// Result returns the result of the asynchronous operation.
6969// If the operation has not completed it will return an error.
6970func (future *VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
6971	var done bool
6972	done, err = future.DoneWithContext(context.Background(), client)
6973	if err != nil {
6974		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6975		return
6976	}
6977	if !done {
6978		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
6979		return
6980	}
6981	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6982	if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
6983		VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
6984		if err != nil {
6985			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
6986		}
6987	}
6988	return
6989}
6990
6991// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a
6992// long-running operation.
6993type VirtualMachinesDeallocateFuture struct {
6994	azure.Future
6995}
6996
6997// Result returns the result of the asynchronous operation.
6998// If the operation has not completed it will return an error.
6999func (future *VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
7000	var done bool
7001	done, err = future.DoneWithContext(context.Background(), client)
7002	if err != nil {
7003		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Polling failure")
7004		return
7005	}
7006	if !done {
7007		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
7008		return
7009	}
7010	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7011	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
7012		osr, err = client.DeallocateResponder(osr.Response.Response)
7013		if err != nil {
7014			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
7015		}
7016	}
7017	return
7018}
7019
7020// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7021// operation.
7022type VirtualMachinesDeleteFuture struct {
7023	azure.Future
7024}
7025
7026// Result returns the result of the asynchronous operation.
7027// If the operation has not completed it will return an error.
7028func (future *VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
7029	var done bool
7030	done, err = future.DoneWithContext(context.Background(), client)
7031	if err != nil {
7032		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure")
7033		return
7034	}
7035	if !done {
7036		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
7037		return
7038	}
7039	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7040	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
7041		osr, err = client.DeleteResponder(osr.Response.Response)
7042		if err != nil {
7043			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
7044		}
7045	}
7046	return
7047}
7048
7049// VirtualMachineSize describes the properties of a VM size.
7050type VirtualMachineSize struct {
7051	// Name - The name of the virtual machine size.
7052	Name *string `json:"name,omitempty"`
7053	// NumberOfCores - The number of cores supported by the virtual machine size.
7054	NumberOfCores *int32 `json:"numberOfCores,omitempty"`
7055	// OsDiskSizeInMB - The OS disk size, in MB, allowed by the virtual machine size.
7056	OsDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"`
7057	// ResourceDiskSizeInMB - The resource disk size, in MB, allowed by the virtual machine size.
7058	ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"`
7059	// MemoryInMB - The amount of memory, in MB, supported by the virtual machine size.
7060	MemoryInMB *int32 `json:"memoryInMB,omitempty"`
7061	// MaxDataDiskCount - The maximum number of data disks that can be attached to the virtual machine size.
7062	MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"`
7063}
7064
7065// VirtualMachineSizeListResult the List Virtual Machine operation response.
7066type VirtualMachineSizeListResult struct {
7067	autorest.Response `json:"-"`
7068	// Value - The list of virtual machine sizes.
7069	Value *[]VirtualMachineSize `json:"value,omitempty"`
7070}
7071
7072// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a
7073// long-running operation.
7074type VirtualMachinesPerformMaintenanceFuture struct {
7075	azure.Future
7076}
7077
7078// Result returns the result of the asynchronous operation.
7079// If the operation has not completed it will return an error.
7080func (future *VirtualMachinesPerformMaintenanceFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
7081	var done bool
7082	done, err = future.DoneWithContext(context.Background(), client)
7083	if err != nil {
7084		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
7085		return
7086	}
7087	if !done {
7088		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
7089		return
7090	}
7091	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7092	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
7093		osr, err = client.PerformMaintenanceResponder(osr.Response.Response)
7094		if err != nil {
7095			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", osr.Response.Response, "Failure responding to request")
7096		}
7097	}
7098	return
7099}
7100
7101// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
7102// operation.
7103type VirtualMachinesPowerOffFuture struct {
7104	azure.Future
7105}
7106
7107// Result returns the result of the asynchronous operation.
7108// If the operation has not completed it will return an error.
7109func (future *VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
7110	var done bool
7111	done, err = future.DoneWithContext(context.Background(), client)
7112	if err != nil {
7113		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Polling failure")
7114		return
7115	}
7116	if !done {
7117		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
7118		return
7119	}
7120	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7121	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
7122		osr, err = client.PowerOffResponder(osr.Response.Response)
7123		if err != nil {
7124			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
7125		}
7126	}
7127	return
7128}
7129
7130// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running
7131// operation.
7132type VirtualMachinesRedeployFuture struct {
7133	azure.Future
7134}
7135
7136// Result returns the result of the asynchronous operation.
7137// If the operation has not completed it will return an error.
7138func (future *VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
7139	var done bool
7140	done, err = future.DoneWithContext(context.Background(), client)
7141	if err != nil {
7142		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Polling failure")
7143		return
7144	}
7145	if !done {
7146		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
7147		return
7148	}
7149	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7150	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
7151		osr, err = client.RedeployResponder(osr.Response.Response)
7152		if err != nil {
7153			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", osr.Response.Response, "Failure responding to request")
7154		}
7155	}
7156	return
7157}
7158
7159// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
7160// operation.
7161type VirtualMachinesRestartFuture struct {
7162	azure.Future
7163}
7164
7165// Result returns the result of the asynchronous operation.
7166// If the operation has not completed it will return an error.
7167func (future *VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
7168	var done bool
7169	done, err = future.DoneWithContext(context.Background(), client)
7170	if err != nil {
7171		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Polling failure")
7172		return
7173	}
7174	if !done {
7175		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
7176		return
7177	}
7178	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7179	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
7180		osr, err = client.RestartResponder(osr.Response.Response)
7181		if err != nil {
7182			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
7183		}
7184	}
7185	return
7186}
7187
7188// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a
7189// long-running operation.
7190type VirtualMachinesRunCommandFuture struct {
7191	azure.Future
7192}
7193
7194// Result returns the result of the asynchronous operation.
7195// If the operation has not completed it will return an error.
7196func (future *VirtualMachinesRunCommandFuture) Result(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
7197	var done bool
7198	done, err = future.DoneWithContext(context.Background(), client)
7199	if err != nil {
7200		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Polling failure")
7201		return
7202	}
7203	if !done {
7204		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
7205		return
7206	}
7207	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7208	if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
7209		rcr, err = client.RunCommandResponder(rcr.Response.Response)
7210		if err != nil {
7211			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
7212		}
7213	}
7214	return
7215}
7216
7217// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
7218// operation.
7219type VirtualMachinesStartFuture struct {
7220	azure.Future
7221}
7222
7223// Result returns the result of the asynchronous operation.
7224// If the operation has not completed it will return an error.
7225func (future *VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (osr OperationStatusResponse, err error) {
7226	var done bool
7227	done, err = future.DoneWithContext(context.Background(), client)
7228	if err != nil {
7229		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure")
7230		return
7231	}
7232	if !done {
7233		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
7234		return
7235	}
7236	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7237	if osr.Response.Response, err = future.GetResult(sender); err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
7238		osr, err = client.StartResponder(osr.Response.Response)
7239		if err != nil {
7240			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", osr.Response.Response, "Failure responding to request")
7241		}
7242	}
7243	return
7244}
7245
7246// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view
7247// status summary.
7248type VirtualMachineStatusCodeCount struct {
7249	// Code - READ-ONLY; The instance view status code.
7250	Code *string `json:"code,omitempty"`
7251	// Count - READ-ONLY; The number of instances having a particular status code.
7252	Count *int32 `json:"count,omitempty"`
7253}
7254
7255// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
7256// operation.
7257type VirtualMachinesUpdateFuture struct {
7258	azure.Future
7259}
7260
7261// Result returns the result of the asynchronous operation.
7262// If the operation has not completed it will return an error.
7263func (future *VirtualMachinesUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
7264	var done bool
7265	done, err = future.DoneWithContext(context.Background(), client)
7266	if err != nil {
7267		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Polling failure")
7268		return
7269	}
7270	if !done {
7271		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
7272		return
7273	}
7274	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7275	if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
7276		VM, err = client.UpdateResponder(VM.Response.Response)
7277		if err != nil {
7278			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
7279		}
7280	}
7281	return
7282}
7283
7284// VirtualMachineUpdate describes a Virtual Machine Update.
7285type VirtualMachineUpdate struct {
7286	// 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**.
7287	Plan                      *Plan `json:"plan,omitempty"`
7288	*VirtualMachineProperties `json:"properties,omitempty"`
7289	// Identity - The identity of the virtual machine, if configured.
7290	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
7291	// Zones - The virtual machine zones.
7292	Zones *[]string `json:"zones,omitempty"`
7293	// Tags - Resource tags
7294	Tags map[string]*string `json:"tags"`
7295}
7296
7297// MarshalJSON is the custom marshaler for VirtualMachineUpdate.
7298func (vmu VirtualMachineUpdate) MarshalJSON() ([]byte, error) {
7299	objectMap := make(map[string]interface{})
7300	if vmu.Plan != nil {
7301		objectMap["plan"] = vmu.Plan
7302	}
7303	if vmu.VirtualMachineProperties != nil {
7304		objectMap["properties"] = vmu.VirtualMachineProperties
7305	}
7306	if vmu.Identity != nil {
7307		objectMap["identity"] = vmu.Identity
7308	}
7309	if vmu.Zones != nil {
7310		objectMap["zones"] = vmu.Zones
7311	}
7312	if vmu.Tags != nil {
7313		objectMap["tags"] = vmu.Tags
7314	}
7315	return json.Marshal(objectMap)
7316}
7317
7318// UnmarshalJSON is the custom unmarshaler for VirtualMachineUpdate struct.
7319func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error {
7320	var m map[string]*json.RawMessage
7321	err := json.Unmarshal(body, &m)
7322	if err != nil {
7323		return err
7324	}
7325	for k, v := range m {
7326		switch k {
7327		case "plan":
7328			if v != nil {
7329				var plan Plan
7330				err = json.Unmarshal(*v, &plan)
7331				if err != nil {
7332					return err
7333				}
7334				vmu.Plan = &plan
7335			}
7336		case "properties":
7337			if v != nil {
7338				var virtualMachineProperties VirtualMachineProperties
7339				err = json.Unmarshal(*v, &virtualMachineProperties)
7340				if err != nil {
7341					return err
7342				}
7343				vmu.VirtualMachineProperties = &virtualMachineProperties
7344			}
7345		case "identity":
7346			if v != nil {
7347				var identity VirtualMachineIdentity
7348				err = json.Unmarshal(*v, &identity)
7349				if err != nil {
7350					return err
7351				}
7352				vmu.Identity = &identity
7353			}
7354		case "zones":
7355			if v != nil {
7356				var zones []string
7357				err = json.Unmarshal(*v, &zones)
7358				if err != nil {
7359					return err
7360				}
7361				vmu.Zones = &zones
7362			}
7363		case "tags":
7364			if v != nil {
7365				var tags map[string]*string
7366				err = json.Unmarshal(*v, &tags)
7367				if err != nil {
7368					return err
7369				}
7370				vmu.Tags = tags
7371			}
7372		}
7373	}
7374
7375	return nil
7376}
7377
7378// WindowsConfiguration specifies Windows operating system settings on the virtual machine.
7379type WindowsConfiguration struct {
7380	// 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.
7381	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
7382	// EnableAutomaticUpdates - Indicates whether virtual machine is enabled for automatic updates.
7383	EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
7384	// TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"
7385	TimeZone *string `json:"timeZone,omitempty"`
7386	// AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.
7387	AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"`
7388	// WinRM - Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.
7389	WinRM *WinRMConfiguration `json:"winRM,omitempty"`
7390}
7391
7392// WinRMConfiguration describes Windows Remote Management configuration of the VM
7393type WinRMConfiguration struct {
7394	// Listeners - The list of Windows Remote Management listeners
7395	Listeners *[]WinRMListener `json:"listeners,omitempty"`
7396}
7397
7398// WinRMListener describes Protocol and thumbprint of Windows Remote Management listener
7399type WinRMListener struct {
7400	// Protocol - Specifies the protocol of listener. <br><br> Possible values are: <br>**http** <br><br> **https**. Possible values include: 'HTTP', 'HTTPS'
7401	Protocol ProtocolTypes `json:"protocol,omitempty"`
7402	// 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>}
7403	CertificateURL *string `json:"certificateUrl,omitempty"`
7404}
7405