1package compute
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute"
22
23// AccessURI a disk access SAS uri.
24type AccessURI struct {
25	autorest.Response `json:"-"`
26	// AccessSAS - READ-ONLY; A SAS uri for accessing a disk.
27	AccessSAS *string `json:"accessSAS,omitempty"`
28}
29
30// MarshalJSON is the custom marshaler for AccessURI.
31func (au AccessURI) MarshalJSON() ([]byte, error) {
32	objectMap := make(map[string]interface{})
33	return json.Marshal(objectMap)
34}
35
36// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale
37// set.
38type AdditionalCapabilities struct {
39	// UltraSSDEnabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
40	UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`
41}
42
43// AdditionalUnattendContent specifies additional XML formatted information that can be included in the
44// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name,
45// and the pass in which the content is applied.
46type AdditionalUnattendContent struct {
47	// PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem'
48	PassName PassNames `json:"passName,omitempty"`
49	// ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'MicrosoftWindowsShellSetup'
50	ComponentName ComponentNames `json:"componentName,omitempty"`
51	// SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands'
52	SettingName SettingNames `json:"settingName,omitempty"`
53	// Content - Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
54	Content *string `json:"content,omitempty"`
55}
56
57// APIEntityReference the API entity reference.
58type APIEntityReference struct {
59	// ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
60	ID *string `json:"id,omitempty"`
61}
62
63// APIError api error.
64type APIError struct {
65	// Details - The Api error details
66	Details *[]APIErrorBase `json:"details,omitempty"`
67	// Innererror - The Api inner error
68	Innererror *InnerError `json:"innererror,omitempty"`
69	// Code - The error code.
70	Code *string `json:"code,omitempty"`
71	// Target - The target of the particular error.
72	Target *string `json:"target,omitempty"`
73	// Message - The error message.
74	Message *string `json:"message,omitempty"`
75}
76
77// APIErrorBase api error base.
78type APIErrorBase struct {
79	// Code - The error code.
80	Code *string `json:"code,omitempty"`
81	// Target - The target of the particular error.
82	Target *string `json:"target,omitempty"`
83	// Message - The error message.
84	Message *string `json:"message,omitempty"`
85}
86
87// AutomaticOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade.
88type AutomaticOSUpgradePolicy struct {
89	// EnableAutomaticOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. <br><br> If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true.
90	EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"`
91	// DisableAutomaticRollback - Whether OS image rollback feature should be disabled. Default value is false.
92	DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"`
93}
94
95// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image.
96type AutomaticOSUpgradeProperties struct {
97	// AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image.
98	AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"`
99}
100
101// AutomaticRepairsPolicy specifies the configuration parameters for automatic repairs on the virtual
102// machine scale set.
103type AutomaticRepairsPolicy struct {
104	// Enabled - Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
105	Enabled *bool `json:"enabled,omitempty"`
106	// GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
107	GracePeriod *string `json:"gracePeriod,omitempty"`
108}
109
110// AvailabilitySet specifies information about the availability set that the virtual machine should be
111// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to
112// maximize availability. For more information about availability sets, see [Manage the availability of
113// virtual
114// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
115// <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual
116// machines in
117// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
118// <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot
119// be added to an availability set.
120type AvailabilitySet struct {
121	autorest.Response          `json:"-"`
122	*AvailabilitySetProperties `json:"properties,omitempty"`
123	// Sku - Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.
124	Sku *Sku `json:"sku,omitempty"`
125	// ID - READ-ONLY; Resource Id
126	ID *string `json:"id,omitempty"`
127	// Name - READ-ONLY; Resource name
128	Name *string `json:"name,omitempty"`
129	// Type - READ-ONLY; Resource type
130	Type *string `json:"type,omitempty"`
131	// Location - Resource location
132	Location *string `json:"location,omitempty"`
133	// Tags - Resource tags
134	Tags map[string]*string `json:"tags"`
135}
136
137// MarshalJSON is the custom marshaler for AvailabilitySet.
138func (as AvailabilitySet) MarshalJSON() ([]byte, error) {
139	objectMap := make(map[string]interface{})
140	if as.AvailabilitySetProperties != nil {
141		objectMap["properties"] = as.AvailabilitySetProperties
142	}
143	if as.Sku != nil {
144		objectMap["sku"] = as.Sku
145	}
146	if as.Location != nil {
147		objectMap["location"] = as.Location
148	}
149	if as.Tags != nil {
150		objectMap["tags"] = as.Tags
151	}
152	return json.Marshal(objectMap)
153}
154
155// UnmarshalJSON is the custom unmarshaler for AvailabilitySet struct.
156func (as *AvailabilitySet) UnmarshalJSON(body []byte) error {
157	var m map[string]*json.RawMessage
158	err := json.Unmarshal(body, &m)
159	if err != nil {
160		return err
161	}
162	for k, v := range m {
163		switch k {
164		case "properties":
165			if v != nil {
166				var availabilitySetProperties AvailabilitySetProperties
167				err = json.Unmarshal(*v, &availabilitySetProperties)
168				if err != nil {
169					return err
170				}
171				as.AvailabilitySetProperties = &availabilitySetProperties
172			}
173		case "sku":
174			if v != nil {
175				var sku Sku
176				err = json.Unmarshal(*v, &sku)
177				if err != nil {
178					return err
179				}
180				as.Sku = &sku
181			}
182		case "id":
183			if v != nil {
184				var ID string
185				err = json.Unmarshal(*v, &ID)
186				if err != nil {
187					return err
188				}
189				as.ID = &ID
190			}
191		case "name":
192			if v != nil {
193				var name string
194				err = json.Unmarshal(*v, &name)
195				if err != nil {
196					return err
197				}
198				as.Name = &name
199			}
200		case "type":
201			if v != nil {
202				var typeVar string
203				err = json.Unmarshal(*v, &typeVar)
204				if err != nil {
205					return err
206				}
207				as.Type = &typeVar
208			}
209		case "location":
210			if v != nil {
211				var location string
212				err = json.Unmarshal(*v, &location)
213				if err != nil {
214					return err
215				}
216				as.Location = &location
217			}
218		case "tags":
219			if v != nil {
220				var tags map[string]*string
221				err = json.Unmarshal(*v, &tags)
222				if err != nil {
223					return err
224				}
225				as.Tags = tags
226			}
227		}
228	}
229
230	return nil
231}
232
233// AvailabilitySetListResult the List Availability Set operation response.
234type AvailabilitySetListResult struct {
235	autorest.Response `json:"-"`
236	// Value - The list of availability sets
237	Value *[]AvailabilitySet `json:"value,omitempty"`
238	// NextLink - The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets.
239	NextLink *string `json:"nextLink,omitempty"`
240}
241
242// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values.
243type AvailabilitySetListResultIterator struct {
244	i    int
245	page AvailabilitySetListResultPage
246}
247
248// NextWithContext advances to the next value.  If there was an error making
249// the request the iterator does not advance and the error is returned.
250func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) {
251	if tracing.IsEnabled() {
252		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.NextWithContext")
253		defer func() {
254			sc := -1
255			if iter.Response().Response.Response != nil {
256				sc = iter.Response().Response.Response.StatusCode
257			}
258			tracing.EndSpan(ctx, sc, err)
259		}()
260	}
261	iter.i++
262	if iter.i < len(iter.page.Values()) {
263		return nil
264	}
265	err = iter.page.NextWithContext(ctx)
266	if err != nil {
267		iter.i--
268		return err
269	}
270	iter.i = 0
271	return nil
272}
273
274// Next advances to the next value.  If there was an error making
275// the request the iterator does not advance and the error is returned.
276// Deprecated: Use NextWithContext() instead.
277func (iter *AvailabilitySetListResultIterator) Next() error {
278	return iter.NextWithContext(context.Background())
279}
280
281// NotDone returns true if the enumeration should be started or is not yet complete.
282func (iter AvailabilitySetListResultIterator) NotDone() bool {
283	return iter.page.NotDone() && iter.i < len(iter.page.Values())
284}
285
286// Response returns the raw server response from the last page request.
287func (iter AvailabilitySetListResultIterator) Response() AvailabilitySetListResult {
288	return iter.page.Response()
289}
290
291// Value returns the current value or a zero-initialized value if the
292// iterator has advanced beyond the end of the collection.
293func (iter AvailabilitySetListResultIterator) Value() AvailabilitySet {
294	if !iter.page.NotDone() {
295		return AvailabilitySet{}
296	}
297	return iter.page.Values()[iter.i]
298}
299
300// Creates a new instance of the AvailabilitySetListResultIterator type.
301func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator {
302	return AvailabilitySetListResultIterator{page: page}
303}
304
305// IsEmpty returns true if the ListResult contains no values.
306func (aslr AvailabilitySetListResult) IsEmpty() bool {
307	return aslr.Value == nil || len(*aslr.Value) == 0
308}
309
310// hasNextLink returns true if the NextLink is not empty.
311func (aslr AvailabilitySetListResult) hasNextLink() bool {
312	return aslr.NextLink != nil && len(*aslr.NextLink) != 0
313}
314
315// availabilitySetListResultPreparer prepares a request to retrieve the next set of results.
316// It returns nil if no more results exist.
317func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer(ctx context.Context) (*http.Request, error) {
318	if !aslr.hasNextLink() {
319		return nil, nil
320	}
321	return autorest.Prepare((&http.Request{}).WithContext(ctx),
322		autorest.AsJSON(),
323		autorest.AsGet(),
324		autorest.WithBaseURL(to.String(aslr.NextLink)))
325}
326
327// AvailabilitySetListResultPage contains a page of AvailabilitySet values.
328type AvailabilitySetListResultPage struct {
329	fn   func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)
330	aslr AvailabilitySetListResult
331}
332
333// NextWithContext advances to the next page of values.  If there was an error making
334// the request the page does not advance and the error is returned.
335func (page *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) (err error) {
336	if tracing.IsEnabled() {
337		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultPage.NextWithContext")
338		defer func() {
339			sc := -1
340			if page.Response().Response.Response != nil {
341				sc = page.Response().Response.Response.StatusCode
342			}
343			tracing.EndSpan(ctx, sc, err)
344		}()
345	}
346	for {
347		next, err := page.fn(ctx, page.aslr)
348		if err != nil {
349			return err
350		}
351		page.aslr = next
352		if !next.hasNextLink() || !next.IsEmpty() {
353			break
354		}
355	}
356	return nil
357}
358
359// Next advances to the next page of values.  If there was an error making
360// the request the page does not advance and the error is returned.
361// Deprecated: Use NextWithContext() instead.
362func (page *AvailabilitySetListResultPage) Next() error {
363	return page.NextWithContext(context.Background())
364}
365
366// NotDone returns true if the page enumeration should be started or is not yet complete.
367func (page AvailabilitySetListResultPage) NotDone() bool {
368	return !page.aslr.IsEmpty()
369}
370
371// Response returns the raw server response from the last page request.
372func (page AvailabilitySetListResultPage) Response() AvailabilitySetListResult {
373	return page.aslr
374}
375
376// Values returns the slice of values for the current page or nil if there are no values.
377func (page AvailabilitySetListResultPage) Values() []AvailabilitySet {
378	if page.aslr.IsEmpty() {
379		return nil
380	}
381	return *page.aslr.Value
382}
383
384// Creates a new instance of the AvailabilitySetListResultPage type.
385func NewAvailabilitySetListResultPage(cur AvailabilitySetListResult, getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage {
386	return AvailabilitySetListResultPage{
387		fn:   getNextPage,
388		aslr: cur,
389	}
390}
391
392// AvailabilitySetProperties the instance view of a resource.
393type AvailabilitySetProperties struct {
394	// PlatformUpdateDomainCount - Update Domain count.
395	PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"`
396	// PlatformFaultDomainCount - Fault Domain count.
397	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
398	// VirtualMachines - A list of references to all virtual machines in the availability set.
399	VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"`
400	// ProximityPlacementGroup - Specifies information about the proximity placement group that the availability set should be assigned to. <br><br>Minimum api-version: 2018-04-01.
401	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
402	// Statuses - READ-ONLY; The resource status information.
403	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
404}
405
406// MarshalJSON is the custom marshaler for AvailabilitySetProperties.
407func (asp AvailabilitySetProperties) MarshalJSON() ([]byte, error) {
408	objectMap := make(map[string]interface{})
409	if asp.PlatformUpdateDomainCount != nil {
410		objectMap["platformUpdateDomainCount"] = asp.PlatformUpdateDomainCount
411	}
412	if asp.PlatformFaultDomainCount != nil {
413		objectMap["platformFaultDomainCount"] = asp.PlatformFaultDomainCount
414	}
415	if asp.VirtualMachines != nil {
416		objectMap["virtualMachines"] = asp.VirtualMachines
417	}
418	if asp.ProximityPlacementGroup != nil {
419		objectMap["proximityPlacementGroup"] = asp.ProximityPlacementGroup
420	}
421	return json.Marshal(objectMap)
422}
423
424// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should
425// be assigned to. Only tags may be updated.
426type AvailabilitySetUpdate struct {
427	*AvailabilitySetProperties `json:"properties,omitempty"`
428	// Sku - Sku of the availability set
429	Sku *Sku `json:"sku,omitempty"`
430	// Tags - Resource tags
431	Tags map[string]*string `json:"tags"`
432}
433
434// MarshalJSON is the custom marshaler for AvailabilitySetUpdate.
435func (asu AvailabilitySetUpdate) MarshalJSON() ([]byte, error) {
436	objectMap := make(map[string]interface{})
437	if asu.AvailabilitySetProperties != nil {
438		objectMap["properties"] = asu.AvailabilitySetProperties
439	}
440	if asu.Sku != nil {
441		objectMap["sku"] = asu.Sku
442	}
443	if asu.Tags != nil {
444		objectMap["tags"] = asu.Tags
445	}
446	return json.Marshal(objectMap)
447}
448
449// UnmarshalJSON is the custom unmarshaler for AvailabilitySetUpdate struct.
450func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
451	var m map[string]*json.RawMessage
452	err := json.Unmarshal(body, &m)
453	if err != nil {
454		return err
455	}
456	for k, v := range m {
457		switch k {
458		case "properties":
459			if v != nil {
460				var availabilitySetProperties AvailabilitySetProperties
461				err = json.Unmarshal(*v, &availabilitySetProperties)
462				if err != nil {
463					return err
464				}
465				asu.AvailabilitySetProperties = &availabilitySetProperties
466			}
467		case "sku":
468			if v != nil {
469				var sku Sku
470				err = json.Unmarshal(*v, &sku)
471				if err != nil {
472					return err
473				}
474				asu.Sku = &sku
475			}
476		case "tags":
477			if v != nil {
478				var tags map[string]*string
479				err = json.Unmarshal(*v, &tags)
480				if err != nil {
481					return err
482				}
483				asu.Tags = tags
484			}
485		}
486	}
487
488	return nil
489}
490
491// AvailablePatchSummary describes the properties of an virtual machine instance view for available patch
492// summary.
493type AvailablePatchSummary struct {
494	// Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
495	Status PatchOperationStatus `json:"status,omitempty"`
496	// AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
497	AssessmentActivityID *string `json:"assessmentActivityId,omitempty"`
498	// RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.
499	RebootPending *bool `json:"rebootPending,omitempty"`
500	// CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
501	CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"`
502	// OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security.
503	OtherPatchCount *int32 `json:"otherPatchCount,omitempty"`
504	// StartTime - READ-ONLY; The UTC timestamp when the operation began.
505	StartTime *date.Time `json:"startTime,omitempty"`
506	// LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began.
507	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
508	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
509	Error *APIError `json:"error,omitempty"`
510}
511
512// MarshalJSON is the custom marshaler for AvailablePatchSummary.
513func (aps AvailablePatchSummary) MarshalJSON() ([]byte, error) {
514	objectMap := make(map[string]interface{})
515	return json.Marshal(objectMap)
516}
517
518// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS. <br><br>Minimum
519// api-version: 2019-03-01.
520type BillingProfile struct {
521	// MaxPrice - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if  the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01.
522	MaxPrice *float64 `json:"maxPrice,omitempty"`
523}
524
525// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and
526// Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br>
527// Azure also enables you to see a screenshot of the VM from the hypervisor.
528type BootDiagnostics struct {
529	// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
530	Enabled *bool `json:"enabled,omitempty"`
531	// StorageURI - Uri of the storage account to use for placing the console output and screenshot. <br><br>If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
532	StorageURI *string `json:"storageUri,omitempty"`
533}
534
535// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics.
536type BootDiagnosticsInstanceView struct {
537	// ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI. <br><br>NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage.
538	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
539	// SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob Uri. <br><br>NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage.
540	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
541	// Status - READ-ONLY; The boot diagnostics status information for the VM. <br><br> NOTE: It will be set only if there are errors encountered in enabling boot diagnostics.
542	Status *InstanceViewStatus `json:"status,omitempty"`
543}
544
545// MarshalJSON is the custom marshaler for BootDiagnosticsInstanceView.
546func (bdiv BootDiagnosticsInstanceView) MarshalJSON() ([]byte, error) {
547	objectMap := make(map[string]interface{})
548	return json.Marshal(objectMap)
549}
550
551// CloudError an error response from the Compute service.
552type CloudError struct {
553	Error *APIError `json:"error,omitempty"`
554}
555
556// ContainerService container service.
557type ContainerService struct {
558	autorest.Response           `json:"-"`
559	*ContainerServiceProperties `json:"properties,omitempty"`
560	// ID - READ-ONLY; Resource Id
561	ID *string `json:"id,omitempty"`
562	// Name - READ-ONLY; Resource name
563	Name *string `json:"name,omitempty"`
564	// Type - READ-ONLY; Resource type
565	Type *string `json:"type,omitempty"`
566	// Location - Resource location
567	Location *string `json:"location,omitempty"`
568	// Tags - Resource tags
569	Tags map[string]*string `json:"tags"`
570}
571
572// MarshalJSON is the custom marshaler for ContainerService.
573func (cs ContainerService) MarshalJSON() ([]byte, error) {
574	objectMap := make(map[string]interface{})
575	if cs.ContainerServiceProperties != nil {
576		objectMap["properties"] = cs.ContainerServiceProperties
577	}
578	if cs.Location != nil {
579		objectMap["location"] = cs.Location
580	}
581	if cs.Tags != nil {
582		objectMap["tags"] = cs.Tags
583	}
584	return json.Marshal(objectMap)
585}
586
587// UnmarshalJSON is the custom unmarshaler for ContainerService struct.
588func (cs *ContainerService) UnmarshalJSON(body []byte) error {
589	var m map[string]*json.RawMessage
590	err := json.Unmarshal(body, &m)
591	if err != nil {
592		return err
593	}
594	for k, v := range m {
595		switch k {
596		case "properties":
597			if v != nil {
598				var containerServiceProperties ContainerServiceProperties
599				err = json.Unmarshal(*v, &containerServiceProperties)
600				if err != nil {
601					return err
602				}
603				cs.ContainerServiceProperties = &containerServiceProperties
604			}
605		case "id":
606			if v != nil {
607				var ID string
608				err = json.Unmarshal(*v, &ID)
609				if err != nil {
610					return err
611				}
612				cs.ID = &ID
613			}
614		case "name":
615			if v != nil {
616				var name string
617				err = json.Unmarshal(*v, &name)
618				if err != nil {
619					return err
620				}
621				cs.Name = &name
622			}
623		case "type":
624			if v != nil {
625				var typeVar string
626				err = json.Unmarshal(*v, &typeVar)
627				if err != nil {
628					return err
629				}
630				cs.Type = &typeVar
631			}
632		case "location":
633			if v != nil {
634				var location string
635				err = json.Unmarshal(*v, &location)
636				if err != nil {
637					return err
638				}
639				cs.Location = &location
640			}
641		case "tags":
642			if v != nil {
643				var tags map[string]*string
644				err = json.Unmarshal(*v, &tags)
645				if err != nil {
646					return err
647				}
648				cs.Tags = tags
649			}
650		}
651	}
652
653	return nil
654}
655
656// ContainerServiceAgentPoolProfile profile for the container service agent pool.
657type ContainerServiceAgentPoolProfile struct {
658	// Name - Unique name of the agent pool profile in the context of the subscription and resource group.
659	Name *string `json:"name,omitempty"`
660	// Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
661	Count *int32 `json:"count,omitempty"`
662	// VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA2', 'StandardA3', 'StandardA4', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA9', 'StandardA10', 'StandardA11', 'StandardD1', 'StandardD2', 'StandardD3', 'StandardD4', 'StandardD11', 'StandardD12', 'StandardD13', 'StandardD14', 'StandardD1V2', 'StandardD2V2', 'StandardD3V2', 'StandardD4V2', 'StandardD5V2', 'StandardD11V2', 'StandardD12V2', 'StandardD13V2', 'StandardD14V2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardDS1', 'StandardDS2', 'StandardDS3', 'StandardDS4', 'StandardDS11', 'StandardDS12', 'StandardDS13', 'StandardDS14', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5'
663	VMSize ContainerServiceVMSizeTypes `json:"vmSize,omitempty"`
664	// DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool.
665	DNSPrefix *string `json:"dnsPrefix,omitempty"`
666	// Fqdn - READ-ONLY; FQDN for the agent pool.
667	Fqdn *string `json:"fqdn,omitempty"`
668}
669
670// MarshalJSON is the custom marshaler for ContainerServiceAgentPoolProfile.
671func (csapp ContainerServiceAgentPoolProfile) MarshalJSON() ([]byte, error) {
672	objectMap := make(map[string]interface{})
673	if csapp.Name != nil {
674		objectMap["name"] = csapp.Name
675	}
676	if csapp.Count != nil {
677		objectMap["count"] = csapp.Count
678	}
679	if csapp.VMSize != "" {
680		objectMap["vmSize"] = csapp.VMSize
681	}
682	if csapp.DNSPrefix != nil {
683		objectMap["dnsPrefix"] = csapp.DNSPrefix
684	}
685	return json.Marshal(objectMap)
686}
687
688// ContainerServiceCustomProfile properties to configure a custom container service cluster.
689type ContainerServiceCustomProfile struct {
690	// Orchestrator - The name of the custom orchestrator to use.
691	Orchestrator *string `json:"orchestrator,omitempty"`
692}
693
694// ContainerServiceDiagnosticsProfile ...
695type ContainerServiceDiagnosticsProfile struct {
696	// VMDiagnostics - Profile for the container service VM diagnostic agent.
697	VMDiagnostics *ContainerServiceVMDiagnostics `json:"vmDiagnostics,omitempty"`
698}
699
700// ContainerServiceLinuxProfile profile for Linux VMs in the container service cluster.
701type ContainerServiceLinuxProfile struct {
702	// AdminUsername - The administrator username to use for Linux VMs.
703	AdminUsername *string `json:"adminUsername,omitempty"`
704	// SSH - The ssh key configuration for Linux VMs.
705	SSH *ContainerServiceSSHConfiguration `json:"ssh,omitempty"`
706}
707
708// ContainerServiceListResult the response from the List Container Services operation.
709type ContainerServiceListResult struct {
710	autorest.Response `json:"-"`
711	// Value - the list of container services.
712	Value *[]ContainerService `json:"value,omitempty"`
713	// NextLink - The URL to get the next set of container service results.
714	NextLink *string `json:"nextLink,omitempty"`
715}
716
717// ContainerServiceListResultIterator provides access to a complete listing of ContainerService values.
718type ContainerServiceListResultIterator struct {
719	i    int
720	page ContainerServiceListResultPage
721}
722
723// NextWithContext advances to the next value.  If there was an error making
724// the request the iterator does not advance and the error is returned.
725func (iter *ContainerServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
726	if tracing.IsEnabled() {
727		ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultIterator.NextWithContext")
728		defer func() {
729			sc := -1
730			if iter.Response().Response.Response != nil {
731				sc = iter.Response().Response.Response.StatusCode
732			}
733			tracing.EndSpan(ctx, sc, err)
734		}()
735	}
736	iter.i++
737	if iter.i < len(iter.page.Values()) {
738		return nil
739	}
740	err = iter.page.NextWithContext(ctx)
741	if err != nil {
742		iter.i--
743		return err
744	}
745	iter.i = 0
746	return nil
747}
748
749// Next advances to the next value.  If there was an error making
750// the request the iterator does not advance and the error is returned.
751// Deprecated: Use NextWithContext() instead.
752func (iter *ContainerServiceListResultIterator) Next() error {
753	return iter.NextWithContext(context.Background())
754}
755
756// NotDone returns true if the enumeration should be started or is not yet complete.
757func (iter ContainerServiceListResultIterator) NotDone() bool {
758	return iter.page.NotDone() && iter.i < len(iter.page.Values())
759}
760
761// Response returns the raw server response from the last page request.
762func (iter ContainerServiceListResultIterator) Response() ContainerServiceListResult {
763	return iter.page.Response()
764}
765
766// Value returns the current value or a zero-initialized value if the
767// iterator has advanced beyond the end of the collection.
768func (iter ContainerServiceListResultIterator) Value() ContainerService {
769	if !iter.page.NotDone() {
770		return ContainerService{}
771	}
772	return iter.page.Values()[iter.i]
773}
774
775// Creates a new instance of the ContainerServiceListResultIterator type.
776func NewContainerServiceListResultIterator(page ContainerServiceListResultPage) ContainerServiceListResultIterator {
777	return ContainerServiceListResultIterator{page: page}
778}
779
780// IsEmpty returns true if the ListResult contains no values.
781func (cslr ContainerServiceListResult) IsEmpty() bool {
782	return cslr.Value == nil || len(*cslr.Value) == 0
783}
784
785// hasNextLink returns true if the NextLink is not empty.
786func (cslr ContainerServiceListResult) hasNextLink() bool {
787	return cslr.NextLink != nil && len(*cslr.NextLink) != 0
788}
789
790// containerServiceListResultPreparer prepares a request to retrieve the next set of results.
791// It returns nil if no more results exist.
792func (cslr ContainerServiceListResult) containerServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
793	if !cslr.hasNextLink() {
794		return nil, nil
795	}
796	return autorest.Prepare((&http.Request{}).WithContext(ctx),
797		autorest.AsJSON(),
798		autorest.AsGet(),
799		autorest.WithBaseURL(to.String(cslr.NextLink)))
800}
801
802// ContainerServiceListResultPage contains a page of ContainerService values.
803type ContainerServiceListResultPage struct {
804	fn   func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)
805	cslr ContainerServiceListResult
806}
807
808// NextWithContext advances to the next page of values.  If there was an error making
809// the request the page does not advance and the error is returned.
810func (page *ContainerServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
811	if tracing.IsEnabled() {
812		ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultPage.NextWithContext")
813		defer func() {
814			sc := -1
815			if page.Response().Response.Response != nil {
816				sc = page.Response().Response.Response.StatusCode
817			}
818			tracing.EndSpan(ctx, sc, err)
819		}()
820	}
821	for {
822		next, err := page.fn(ctx, page.cslr)
823		if err != nil {
824			return err
825		}
826		page.cslr = next
827		if !next.hasNextLink() || !next.IsEmpty() {
828			break
829		}
830	}
831	return nil
832}
833
834// Next advances to the next page of values.  If there was an error making
835// the request the page does not advance and the error is returned.
836// Deprecated: Use NextWithContext() instead.
837func (page *ContainerServiceListResultPage) Next() error {
838	return page.NextWithContext(context.Background())
839}
840
841// NotDone returns true if the page enumeration should be started or is not yet complete.
842func (page ContainerServiceListResultPage) NotDone() bool {
843	return !page.cslr.IsEmpty()
844}
845
846// Response returns the raw server response from the last page request.
847func (page ContainerServiceListResultPage) Response() ContainerServiceListResult {
848	return page.cslr
849}
850
851// Values returns the slice of values for the current page or nil if there are no values.
852func (page ContainerServiceListResultPage) Values() []ContainerService {
853	if page.cslr.IsEmpty() {
854		return nil
855	}
856	return *page.cslr.Value
857}
858
859// Creates a new instance of the ContainerServiceListResultPage type.
860func NewContainerServiceListResultPage(cur ContainerServiceListResult, getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage {
861	return ContainerServiceListResultPage{
862		fn:   getNextPage,
863		cslr: cur,
864	}
865}
866
867// ContainerServiceMasterProfile profile for the container service master.
868type ContainerServiceMasterProfile struct {
869	// Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.
870	Count *int32 `json:"count,omitempty"`
871	// DNSPrefix - DNS prefix to be used to create the FQDN for master.
872	DNSPrefix *string `json:"dnsPrefix,omitempty"`
873	// Fqdn - READ-ONLY; FQDN for the master.
874	Fqdn *string `json:"fqdn,omitempty"`
875}
876
877// MarshalJSON is the custom marshaler for ContainerServiceMasterProfile.
878func (csmp ContainerServiceMasterProfile) MarshalJSON() ([]byte, error) {
879	objectMap := make(map[string]interface{})
880	if csmp.Count != nil {
881		objectMap["count"] = csmp.Count
882	}
883	if csmp.DNSPrefix != nil {
884		objectMap["dnsPrefix"] = csmp.DNSPrefix
885	}
886	return json.Marshal(objectMap)
887}
888
889// ContainerServiceOrchestratorProfile profile for the container service orchestrator.
890type ContainerServiceOrchestratorProfile struct {
891	// OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Swarm, DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', 'Kubernetes'
892	OrchestratorType ContainerServiceOrchestratorTypes `json:"orchestratorType,omitempty"`
893}
894
895// ContainerServiceProperties properties of the container service.
896type ContainerServiceProperties struct {
897	// ProvisioningState - READ-ONLY; the current deployment or provisioning state, which only appears in the response.
898	ProvisioningState *string `json:"provisioningState,omitempty"`
899	// OrchestratorProfile - Properties of the orchestrator.
900	OrchestratorProfile *ContainerServiceOrchestratorProfile `json:"orchestratorProfile,omitempty"`
901	// CustomProfile - Properties for custom clusters.
902	CustomProfile *ContainerServiceCustomProfile `json:"customProfile,omitempty"`
903	// ServicePrincipalProfile - Properties for cluster service principals.
904	ServicePrincipalProfile *ContainerServiceServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
905	// MasterProfile - Properties of master agents.
906	MasterProfile *ContainerServiceMasterProfile `json:"masterProfile,omitempty"`
907	// AgentPoolProfiles - Properties of the agent pool.
908	AgentPoolProfiles *[]ContainerServiceAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
909	// WindowsProfile - Properties of Windows VMs.
910	WindowsProfile *ContainerServiceWindowsProfile `json:"windowsProfile,omitempty"`
911	// LinuxProfile - Properties of Linux VMs.
912	LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"`
913	// DiagnosticsProfile - Properties of the diagnostic agent.
914	DiagnosticsProfile *ContainerServiceDiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
915}
916
917// MarshalJSON is the custom marshaler for ContainerServiceProperties.
918func (csp ContainerServiceProperties) MarshalJSON() ([]byte, error) {
919	objectMap := make(map[string]interface{})
920	if csp.OrchestratorProfile != nil {
921		objectMap["orchestratorProfile"] = csp.OrchestratorProfile
922	}
923	if csp.CustomProfile != nil {
924		objectMap["customProfile"] = csp.CustomProfile
925	}
926	if csp.ServicePrincipalProfile != nil {
927		objectMap["servicePrincipalProfile"] = csp.ServicePrincipalProfile
928	}
929	if csp.MasterProfile != nil {
930		objectMap["masterProfile"] = csp.MasterProfile
931	}
932	if csp.AgentPoolProfiles != nil {
933		objectMap["agentPoolProfiles"] = csp.AgentPoolProfiles
934	}
935	if csp.WindowsProfile != nil {
936		objectMap["windowsProfile"] = csp.WindowsProfile
937	}
938	if csp.LinuxProfile != nil {
939		objectMap["linuxProfile"] = csp.LinuxProfile
940	}
941	if csp.DiagnosticsProfile != nil {
942		objectMap["diagnosticsProfile"] = csp.DiagnosticsProfile
943	}
944	return json.Marshal(objectMap)
945}
946
947// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
948// long-running operation.
949type ContainerServicesCreateOrUpdateFuture struct {
950	azure.FutureAPI
951	// Result returns the result of the asynchronous operation.
952	// If the operation has not completed it will return an error.
953	Result func(ContainerServicesClient) (ContainerService, error)
954}
955
956// UnmarshalJSON is the custom unmarshaller for CreateFuture.
957func (future *ContainerServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
958	var azFuture azure.Future
959	if err := json.Unmarshal(body, &azFuture); err != nil {
960		return err
961	}
962	future.FutureAPI = &azFuture
963	future.Result = future.result
964	return nil
965}
966
967// result is the default implementation for ContainerServicesCreateOrUpdateFuture.Result.
968func (future *ContainerServicesCreateOrUpdateFuture) result(client ContainerServicesClient) (cs ContainerService, err error) {
969	var done bool
970	done, err = future.DoneWithContext(context.Background(), client)
971	if err != nil {
972		err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
973		return
974	}
975	if !done {
976		cs.Response.Response = future.Response()
977		err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
978		return
979	}
980	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
981	if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
982		cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
983		if err != nil {
984			err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
985		}
986	}
987	return
988}
989
990// ContainerServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
991// operation.
992type ContainerServicesDeleteFuture struct {
993	azure.FutureAPI
994	// Result returns the result of the asynchronous operation.
995	// If the operation has not completed it will return an error.
996	Result func(ContainerServicesClient) (autorest.Response, error)
997}
998
999// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1000func (future *ContainerServicesDeleteFuture) UnmarshalJSON(body []byte) error {
1001	var azFuture azure.Future
1002	if err := json.Unmarshal(body, &azFuture); err != nil {
1003		return err
1004	}
1005	future.FutureAPI = &azFuture
1006	future.Result = future.result
1007	return nil
1008}
1009
1010// result is the default implementation for ContainerServicesDeleteFuture.Result.
1011func (future *ContainerServicesDeleteFuture) result(client ContainerServicesClient) (ar autorest.Response, err error) {
1012	var done bool
1013	done, err = future.DoneWithContext(context.Background(), client)
1014	if err != nil {
1015		err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Polling failure")
1016		return
1017	}
1018	if !done {
1019		ar.Response = future.Response()
1020		err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
1021		return
1022	}
1023	ar.Response = future.Response()
1024	return
1025}
1026
1027// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster
1028// to use for manipulating Azure APIs.
1029type ContainerServiceServicePrincipalProfile struct {
1030	// ClientID - The ID for the service principal.
1031	ClientID *string `json:"clientId,omitempty"`
1032	// Secret - The secret password associated with the service principal.
1033	Secret *string `json:"secret,omitempty"`
1034}
1035
1036// ContainerServiceSSHConfiguration SSH configuration for Linux-based VMs running on Azure.
1037type ContainerServiceSSHConfiguration struct {
1038	// PublicKeys - the list of SSH public keys used to authenticate with Linux-based VMs.
1039	PublicKeys *[]ContainerServiceSSHPublicKey `json:"publicKeys,omitempty"`
1040}
1041
1042// ContainerServiceSSHPublicKey contains information about SSH certificate public key data.
1043type ContainerServiceSSHPublicKey struct {
1044	// KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers.
1045	KeyData *string `json:"keyData,omitempty"`
1046}
1047
1048// ContainerServiceVMDiagnostics profile for diagnostics on the container service VMs.
1049type ContainerServiceVMDiagnostics struct {
1050	// Enabled - Whether the VM diagnostic agent is provisioned on the VM.
1051	Enabled *bool `json:"enabled,omitempty"`
1052	// StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored.
1053	StorageURI *string `json:"storageUri,omitempty"`
1054}
1055
1056// MarshalJSON is the custom marshaler for ContainerServiceVMDiagnostics.
1057func (csvd ContainerServiceVMDiagnostics) MarshalJSON() ([]byte, error) {
1058	objectMap := make(map[string]interface{})
1059	if csvd.Enabled != nil {
1060		objectMap["enabled"] = csvd.Enabled
1061	}
1062	return json.Marshal(objectMap)
1063}
1064
1065// ContainerServiceWindowsProfile profile for Windows VMs in the container service cluster.
1066type ContainerServiceWindowsProfile struct {
1067	// AdminUsername - The administrator username to use for Windows VMs.
1068	AdminUsername *string `json:"adminUsername,omitempty"`
1069	// AdminPassword - The administrator password to use for Windows VMs.
1070	AdminPassword *string `json:"adminPassword,omitempty"`
1071}
1072
1073// CreationData data used when creating a disk.
1074type CreationData struct {
1075	// CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload'
1076	CreateOption DiskCreateOption `json:"createOption,omitempty"`
1077	// StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
1078	StorageAccountID *string `json:"storageAccountId,omitempty"`
1079	// ImageReference - Disk source information.
1080	ImageReference *ImageDiskReference `json:"imageReference,omitempty"`
1081	// GalleryImageReference - Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
1082	GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"`
1083	// SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk.
1084	SourceURI *string `json:"sourceUri,omitempty"`
1085	// SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk.
1086	SourceResourceID *string `json:"sourceResourceId,omitempty"`
1087	// SourceUniqueID - READ-ONLY; If this field is set, this is the unique id identifying the source of this resource.
1088	SourceUniqueID *string `json:"sourceUniqueId,omitempty"`
1089	// UploadSizeBytes - If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
1090	UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"`
1091}
1092
1093// MarshalJSON is the custom marshaler for CreationData.
1094func (cd CreationData) MarshalJSON() ([]byte, error) {
1095	objectMap := make(map[string]interface{})
1096	if cd.CreateOption != "" {
1097		objectMap["createOption"] = cd.CreateOption
1098	}
1099	if cd.StorageAccountID != nil {
1100		objectMap["storageAccountId"] = cd.StorageAccountID
1101	}
1102	if cd.ImageReference != nil {
1103		objectMap["imageReference"] = cd.ImageReference
1104	}
1105	if cd.GalleryImageReference != nil {
1106		objectMap["galleryImageReference"] = cd.GalleryImageReference
1107	}
1108	if cd.SourceURI != nil {
1109		objectMap["sourceUri"] = cd.SourceURI
1110	}
1111	if cd.SourceResourceID != nil {
1112		objectMap["sourceResourceId"] = cd.SourceResourceID
1113	}
1114	if cd.UploadSizeBytes != nil {
1115		objectMap["uploadSizeBytes"] = cd.UploadSizeBytes
1116	}
1117	return json.Marshal(objectMap)
1118}
1119
1120// DataDisk describes a data disk.
1121type DataDisk struct {
1122	// 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.
1123	Lun *int32 `json:"lun,omitempty"`
1124	// Name - The disk name.
1125	Name *string `json:"name,omitempty"`
1126	// Vhd - The virtual hard disk.
1127	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
1128	// 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.
1129	Image *VirtualHardDisk `json:"image,omitempty"`
1130	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
1131	Caching CachingTypes `json:"caching,omitempty"`
1132	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
1133	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
1134	// CreateOption - Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you  also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
1135	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
1136	// 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
1137	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
1138	// ManagedDisk - The managed disk parameters.
1139	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
1140	// ToBeDetached - Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
1141	ToBeDetached *bool `json:"toBeDetached,omitempty"`
1142	// DiskIOPSReadWrite - READ-ONLY; Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
1143	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
1144	// DiskMBpsReadWrite - READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
1145	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
1146}
1147
1148// MarshalJSON is the custom marshaler for DataDisk.
1149func (dd DataDisk) MarshalJSON() ([]byte, error) {
1150	objectMap := make(map[string]interface{})
1151	if dd.Lun != nil {
1152		objectMap["lun"] = dd.Lun
1153	}
1154	if dd.Name != nil {
1155		objectMap["name"] = dd.Name
1156	}
1157	if dd.Vhd != nil {
1158		objectMap["vhd"] = dd.Vhd
1159	}
1160	if dd.Image != nil {
1161		objectMap["image"] = dd.Image
1162	}
1163	if dd.Caching != "" {
1164		objectMap["caching"] = dd.Caching
1165	}
1166	if dd.WriteAcceleratorEnabled != nil {
1167		objectMap["writeAcceleratorEnabled"] = dd.WriteAcceleratorEnabled
1168	}
1169	if dd.CreateOption != "" {
1170		objectMap["createOption"] = dd.CreateOption
1171	}
1172	if dd.DiskSizeGB != nil {
1173		objectMap["diskSizeGB"] = dd.DiskSizeGB
1174	}
1175	if dd.ManagedDisk != nil {
1176		objectMap["managedDisk"] = dd.ManagedDisk
1177	}
1178	if dd.ToBeDetached != nil {
1179		objectMap["toBeDetached"] = dd.ToBeDetached
1180	}
1181	return json.Marshal(objectMap)
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// MarshalJSON is the custom marshaler for DataDiskImage.
1191func (ddi DataDiskImage) MarshalJSON() ([]byte, error) {
1192	objectMap := make(map[string]interface{})
1193	return json.Marshal(objectMap)
1194}
1195
1196// DataDiskImageEncryption contains encryption settings for a data disk image.
1197type DataDiskImageEncryption struct {
1198	// Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
1199	Lun *int32 `json:"lun,omitempty"`
1200	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
1201	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
1202}
1203
1204// DedicatedHost specifies information about the Dedicated host.
1205type DedicatedHost struct {
1206	autorest.Response        `json:"-"`
1207	*DedicatedHostProperties `json:"properties,omitempty"`
1208	// Sku - SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values.
1209	Sku *Sku `json:"sku,omitempty"`
1210	// ID - READ-ONLY; Resource Id
1211	ID *string `json:"id,omitempty"`
1212	// Name - READ-ONLY; Resource name
1213	Name *string `json:"name,omitempty"`
1214	// Type - READ-ONLY; Resource type
1215	Type *string `json:"type,omitempty"`
1216	// Location - Resource location
1217	Location *string `json:"location,omitempty"`
1218	// Tags - Resource tags
1219	Tags map[string]*string `json:"tags"`
1220}
1221
1222// MarshalJSON is the custom marshaler for DedicatedHost.
1223func (dh DedicatedHost) MarshalJSON() ([]byte, error) {
1224	objectMap := make(map[string]interface{})
1225	if dh.DedicatedHostProperties != nil {
1226		objectMap["properties"] = dh.DedicatedHostProperties
1227	}
1228	if dh.Sku != nil {
1229		objectMap["sku"] = dh.Sku
1230	}
1231	if dh.Location != nil {
1232		objectMap["location"] = dh.Location
1233	}
1234	if dh.Tags != nil {
1235		objectMap["tags"] = dh.Tags
1236	}
1237	return json.Marshal(objectMap)
1238}
1239
1240// UnmarshalJSON is the custom unmarshaler for DedicatedHost struct.
1241func (dh *DedicatedHost) UnmarshalJSON(body []byte) error {
1242	var m map[string]*json.RawMessage
1243	err := json.Unmarshal(body, &m)
1244	if err != nil {
1245		return err
1246	}
1247	for k, v := range m {
1248		switch k {
1249		case "properties":
1250			if v != nil {
1251				var dedicatedHostProperties DedicatedHostProperties
1252				err = json.Unmarshal(*v, &dedicatedHostProperties)
1253				if err != nil {
1254					return err
1255				}
1256				dh.DedicatedHostProperties = &dedicatedHostProperties
1257			}
1258		case "sku":
1259			if v != nil {
1260				var sku Sku
1261				err = json.Unmarshal(*v, &sku)
1262				if err != nil {
1263					return err
1264				}
1265				dh.Sku = &sku
1266			}
1267		case "id":
1268			if v != nil {
1269				var ID string
1270				err = json.Unmarshal(*v, &ID)
1271				if err != nil {
1272					return err
1273				}
1274				dh.ID = &ID
1275			}
1276		case "name":
1277			if v != nil {
1278				var name string
1279				err = json.Unmarshal(*v, &name)
1280				if err != nil {
1281					return err
1282				}
1283				dh.Name = &name
1284			}
1285		case "type":
1286			if v != nil {
1287				var typeVar string
1288				err = json.Unmarshal(*v, &typeVar)
1289				if err != nil {
1290					return err
1291				}
1292				dh.Type = &typeVar
1293			}
1294		case "location":
1295			if v != nil {
1296				var location string
1297				err = json.Unmarshal(*v, &location)
1298				if err != nil {
1299					return err
1300				}
1301				dh.Location = &location
1302			}
1303		case "tags":
1304			if v != nil {
1305				var tags map[string]*string
1306				err = json.Unmarshal(*v, &tags)
1307				if err != nil {
1308					return err
1309				}
1310				dh.Tags = tags
1311			}
1312		}
1313	}
1314
1315	return nil
1316}
1317
1318// DedicatedHostAllocatableVM represents the dedicated host unutilized capacity in terms of a specific VM
1319// size.
1320type DedicatedHostAllocatableVM struct {
1321	// VMSize - VM size in terms of which the unutilized capacity is represented.
1322	VMSize *string `json:"vmSize,omitempty"`
1323	// Count - Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.
1324	Count *float64 `json:"count,omitempty"`
1325}
1326
1327// DedicatedHostAvailableCapacity dedicated host unutilized capacity.
1328type DedicatedHostAvailableCapacity struct {
1329	// AllocatableVMs - The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host.
1330	AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"`
1331}
1332
1333// DedicatedHostGroup specifies information about the dedicated host group that the dedicated hosts should
1334// be assigned to. <br><br> Currently, a dedicated host can only be added to a dedicated host group at
1335// creation time. An existing dedicated host cannot be added to another dedicated host group.
1336type DedicatedHostGroup struct {
1337	autorest.Response             `json:"-"`
1338	*DedicatedHostGroupProperties `json:"properties,omitempty"`
1339	// Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.
1340	Zones *[]string `json:"zones,omitempty"`
1341	// ID - READ-ONLY; Resource Id
1342	ID *string `json:"id,omitempty"`
1343	// Name - READ-ONLY; Resource name
1344	Name *string `json:"name,omitempty"`
1345	// Type - READ-ONLY; Resource type
1346	Type *string `json:"type,omitempty"`
1347	// Location - Resource location
1348	Location *string `json:"location,omitempty"`
1349	// Tags - Resource tags
1350	Tags map[string]*string `json:"tags"`
1351}
1352
1353// MarshalJSON is the custom marshaler for DedicatedHostGroup.
1354func (dhg DedicatedHostGroup) MarshalJSON() ([]byte, error) {
1355	objectMap := make(map[string]interface{})
1356	if dhg.DedicatedHostGroupProperties != nil {
1357		objectMap["properties"] = dhg.DedicatedHostGroupProperties
1358	}
1359	if dhg.Zones != nil {
1360		objectMap["zones"] = dhg.Zones
1361	}
1362	if dhg.Location != nil {
1363		objectMap["location"] = dhg.Location
1364	}
1365	if dhg.Tags != nil {
1366		objectMap["tags"] = dhg.Tags
1367	}
1368	return json.Marshal(objectMap)
1369}
1370
1371// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroup struct.
1372func (dhg *DedicatedHostGroup) UnmarshalJSON(body []byte) error {
1373	var m map[string]*json.RawMessage
1374	err := json.Unmarshal(body, &m)
1375	if err != nil {
1376		return err
1377	}
1378	for k, v := range m {
1379		switch k {
1380		case "properties":
1381			if v != nil {
1382				var dedicatedHostGroupProperties DedicatedHostGroupProperties
1383				err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
1384				if err != nil {
1385					return err
1386				}
1387				dhg.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
1388			}
1389		case "zones":
1390			if v != nil {
1391				var zones []string
1392				err = json.Unmarshal(*v, &zones)
1393				if err != nil {
1394					return err
1395				}
1396				dhg.Zones = &zones
1397			}
1398		case "id":
1399			if v != nil {
1400				var ID string
1401				err = json.Unmarshal(*v, &ID)
1402				if err != nil {
1403					return err
1404				}
1405				dhg.ID = &ID
1406			}
1407		case "name":
1408			if v != nil {
1409				var name string
1410				err = json.Unmarshal(*v, &name)
1411				if err != nil {
1412					return err
1413				}
1414				dhg.Name = &name
1415			}
1416		case "type":
1417			if v != nil {
1418				var typeVar string
1419				err = json.Unmarshal(*v, &typeVar)
1420				if err != nil {
1421					return err
1422				}
1423				dhg.Type = &typeVar
1424			}
1425		case "location":
1426			if v != nil {
1427				var location string
1428				err = json.Unmarshal(*v, &location)
1429				if err != nil {
1430					return err
1431				}
1432				dhg.Location = &location
1433			}
1434		case "tags":
1435			if v != nil {
1436				var tags map[string]*string
1437				err = json.Unmarshal(*v, &tags)
1438				if err != nil {
1439					return err
1440				}
1441				dhg.Tags = tags
1442			}
1443		}
1444	}
1445
1446	return nil
1447}
1448
1449// DedicatedHostGroupInstanceView ...
1450type DedicatedHostGroupInstanceView struct {
1451	// Hosts - List of instance view of the dedicated hosts under the dedicated host group.
1452	Hosts *[]DedicatedHostInstanceViewWithName `json:"hosts,omitempty"`
1453}
1454
1455// DedicatedHostGroupListResult the List Dedicated Host Group with resource group response.
1456type DedicatedHostGroupListResult struct {
1457	autorest.Response `json:"-"`
1458	// Value - The list of dedicated host groups
1459	Value *[]DedicatedHostGroup `json:"value,omitempty"`
1460	// NextLink - The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated Host Groups.
1461	NextLink *string `json:"nextLink,omitempty"`
1462}
1463
1464// DedicatedHostGroupListResultIterator provides access to a complete listing of DedicatedHostGroup values.
1465type DedicatedHostGroupListResultIterator struct {
1466	i    int
1467	page DedicatedHostGroupListResultPage
1468}
1469
1470// NextWithContext advances to the next value.  If there was an error making
1471// the request the iterator does not advance and the error is returned.
1472func (iter *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
1473	if tracing.IsEnabled() {
1474		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultIterator.NextWithContext")
1475		defer func() {
1476			sc := -1
1477			if iter.Response().Response.Response != nil {
1478				sc = iter.Response().Response.Response.StatusCode
1479			}
1480			tracing.EndSpan(ctx, sc, err)
1481		}()
1482	}
1483	iter.i++
1484	if iter.i < len(iter.page.Values()) {
1485		return nil
1486	}
1487	err = iter.page.NextWithContext(ctx)
1488	if err != nil {
1489		iter.i--
1490		return err
1491	}
1492	iter.i = 0
1493	return nil
1494}
1495
1496// Next advances to the next value.  If there was an error making
1497// the request the iterator does not advance and the error is returned.
1498// Deprecated: Use NextWithContext() instead.
1499func (iter *DedicatedHostGroupListResultIterator) Next() error {
1500	return iter.NextWithContext(context.Background())
1501}
1502
1503// NotDone returns true if the enumeration should be started or is not yet complete.
1504func (iter DedicatedHostGroupListResultIterator) NotDone() bool {
1505	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1506}
1507
1508// Response returns the raw server response from the last page request.
1509func (iter DedicatedHostGroupListResultIterator) Response() DedicatedHostGroupListResult {
1510	return iter.page.Response()
1511}
1512
1513// Value returns the current value or a zero-initialized value if the
1514// iterator has advanced beyond the end of the collection.
1515func (iter DedicatedHostGroupListResultIterator) Value() DedicatedHostGroup {
1516	if !iter.page.NotDone() {
1517		return DedicatedHostGroup{}
1518	}
1519	return iter.page.Values()[iter.i]
1520}
1521
1522// Creates a new instance of the DedicatedHostGroupListResultIterator type.
1523func NewDedicatedHostGroupListResultIterator(page DedicatedHostGroupListResultPage) DedicatedHostGroupListResultIterator {
1524	return DedicatedHostGroupListResultIterator{page: page}
1525}
1526
1527// IsEmpty returns true if the ListResult contains no values.
1528func (dhglr DedicatedHostGroupListResult) IsEmpty() bool {
1529	return dhglr.Value == nil || len(*dhglr.Value) == 0
1530}
1531
1532// hasNextLink returns true if the NextLink is not empty.
1533func (dhglr DedicatedHostGroupListResult) hasNextLink() bool {
1534	return dhglr.NextLink != nil && len(*dhglr.NextLink) != 0
1535}
1536
1537// dedicatedHostGroupListResultPreparer prepares a request to retrieve the next set of results.
1538// It returns nil if no more results exist.
1539func (dhglr DedicatedHostGroupListResult) dedicatedHostGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
1540	if !dhglr.hasNextLink() {
1541		return nil, nil
1542	}
1543	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1544		autorest.AsJSON(),
1545		autorest.AsGet(),
1546		autorest.WithBaseURL(to.String(dhglr.NextLink)))
1547}
1548
1549// DedicatedHostGroupListResultPage contains a page of DedicatedHostGroup values.
1550type DedicatedHostGroupListResultPage struct {
1551	fn    func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)
1552	dhglr DedicatedHostGroupListResult
1553}
1554
1555// NextWithContext advances to the next page of values.  If there was an error making
1556// the request the page does not advance and the error is returned.
1557func (page *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
1558	if tracing.IsEnabled() {
1559		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultPage.NextWithContext")
1560		defer func() {
1561			sc := -1
1562			if page.Response().Response.Response != nil {
1563				sc = page.Response().Response.Response.StatusCode
1564			}
1565			tracing.EndSpan(ctx, sc, err)
1566		}()
1567	}
1568	for {
1569		next, err := page.fn(ctx, page.dhglr)
1570		if err != nil {
1571			return err
1572		}
1573		page.dhglr = next
1574		if !next.hasNextLink() || !next.IsEmpty() {
1575			break
1576		}
1577	}
1578	return nil
1579}
1580
1581// Next advances to the next page of values.  If there was an error making
1582// the request the page does not advance and the error is returned.
1583// Deprecated: Use NextWithContext() instead.
1584func (page *DedicatedHostGroupListResultPage) Next() error {
1585	return page.NextWithContext(context.Background())
1586}
1587
1588// NotDone returns true if the page enumeration should be started or is not yet complete.
1589func (page DedicatedHostGroupListResultPage) NotDone() bool {
1590	return !page.dhglr.IsEmpty()
1591}
1592
1593// Response returns the raw server response from the last page request.
1594func (page DedicatedHostGroupListResultPage) Response() DedicatedHostGroupListResult {
1595	return page.dhglr
1596}
1597
1598// Values returns the slice of values for the current page or nil if there are no values.
1599func (page DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup {
1600	if page.dhglr.IsEmpty() {
1601		return nil
1602	}
1603	return *page.dhglr.Value
1604}
1605
1606// Creates a new instance of the DedicatedHostGroupListResultPage type.
1607func NewDedicatedHostGroupListResultPage(cur DedicatedHostGroupListResult, getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage {
1608	return DedicatedHostGroupListResultPage{
1609		fn:    getNextPage,
1610		dhglr: cur,
1611	}
1612}
1613
1614// DedicatedHostGroupProperties dedicated Host Group Properties.
1615type DedicatedHostGroupProperties struct {
1616	// PlatformFaultDomainCount - Number of fault domains that the host group can span.
1617	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
1618	// Hosts - READ-ONLY; A list of references to all dedicated hosts in the dedicated host group.
1619	Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"`
1620	// InstanceView - READ-ONLY; The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group.
1621	InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty"`
1622	// SupportAutomaticPlacement - Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. <br><br>Minimum api-version: 2020-06-01.
1623	SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"`
1624}
1625
1626// MarshalJSON is the custom marshaler for DedicatedHostGroupProperties.
1627func (dhgp DedicatedHostGroupProperties) MarshalJSON() ([]byte, error) {
1628	objectMap := make(map[string]interface{})
1629	if dhgp.PlatformFaultDomainCount != nil {
1630		objectMap["platformFaultDomainCount"] = dhgp.PlatformFaultDomainCount
1631	}
1632	if dhgp.SupportAutomaticPlacement != nil {
1633		objectMap["supportAutomaticPlacement"] = dhgp.SupportAutomaticPlacement
1634	}
1635	return json.Marshal(objectMap)
1636}
1637
1638// DedicatedHostGroupUpdate specifies information about the dedicated host group that the dedicated host
1639// should be assigned to. Only tags may be updated.
1640type DedicatedHostGroupUpdate struct {
1641	*DedicatedHostGroupProperties `json:"properties,omitempty"`
1642	// Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.
1643	Zones *[]string `json:"zones,omitempty"`
1644	// Tags - Resource tags
1645	Tags map[string]*string `json:"tags"`
1646}
1647
1648// MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate.
1649func (dhgu DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) {
1650	objectMap := make(map[string]interface{})
1651	if dhgu.DedicatedHostGroupProperties != nil {
1652		objectMap["properties"] = dhgu.DedicatedHostGroupProperties
1653	}
1654	if dhgu.Zones != nil {
1655		objectMap["zones"] = dhgu.Zones
1656	}
1657	if dhgu.Tags != nil {
1658		objectMap["tags"] = dhgu.Tags
1659	}
1660	return json.Marshal(objectMap)
1661}
1662
1663// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroupUpdate struct.
1664func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error {
1665	var m map[string]*json.RawMessage
1666	err := json.Unmarshal(body, &m)
1667	if err != nil {
1668		return err
1669	}
1670	for k, v := range m {
1671		switch k {
1672		case "properties":
1673			if v != nil {
1674				var dedicatedHostGroupProperties DedicatedHostGroupProperties
1675				err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
1676				if err != nil {
1677					return err
1678				}
1679				dhgu.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
1680			}
1681		case "zones":
1682			if v != nil {
1683				var zones []string
1684				err = json.Unmarshal(*v, &zones)
1685				if err != nil {
1686					return err
1687				}
1688				dhgu.Zones = &zones
1689			}
1690		case "tags":
1691			if v != nil {
1692				var tags map[string]*string
1693				err = json.Unmarshal(*v, &tags)
1694				if err != nil {
1695					return err
1696				}
1697				dhgu.Tags = tags
1698			}
1699		}
1700	}
1701
1702	return nil
1703}
1704
1705// DedicatedHostInstanceView the instance view of a dedicated host.
1706type DedicatedHostInstanceView struct {
1707	// AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
1708	AssetID *string `json:"assetId,omitempty"`
1709	// AvailableCapacity - Unutilized capacity of the dedicated host.
1710	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
1711	// Statuses - The resource status information.
1712	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
1713}
1714
1715// MarshalJSON is the custom marshaler for DedicatedHostInstanceView.
1716func (dhiv DedicatedHostInstanceView) MarshalJSON() ([]byte, error) {
1717	objectMap := make(map[string]interface{})
1718	if dhiv.AvailableCapacity != nil {
1719		objectMap["availableCapacity"] = dhiv.AvailableCapacity
1720	}
1721	if dhiv.Statuses != nil {
1722		objectMap["statuses"] = dhiv.Statuses
1723	}
1724	return json.Marshal(objectMap)
1725}
1726
1727// DedicatedHostInstanceViewWithName the instance view of a dedicated host that includes the name of the
1728// dedicated host. It is used for the response to the instance view of a dedicated host group.
1729type DedicatedHostInstanceViewWithName struct {
1730	// Name - READ-ONLY; The name of the dedicated host.
1731	Name *string `json:"name,omitempty"`
1732	// AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
1733	AssetID *string `json:"assetId,omitempty"`
1734	// AvailableCapacity - Unutilized capacity of the dedicated host.
1735	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
1736	// Statuses - The resource status information.
1737	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
1738}
1739
1740// MarshalJSON is the custom marshaler for DedicatedHostInstanceViewWithName.
1741func (dhivwn DedicatedHostInstanceViewWithName) MarshalJSON() ([]byte, error) {
1742	objectMap := make(map[string]interface{})
1743	if dhivwn.AvailableCapacity != nil {
1744		objectMap["availableCapacity"] = dhivwn.AvailableCapacity
1745	}
1746	if dhivwn.Statuses != nil {
1747		objectMap["statuses"] = dhivwn.Statuses
1748	}
1749	return json.Marshal(objectMap)
1750}
1751
1752// DedicatedHostListResult the list dedicated host operation response.
1753type DedicatedHostListResult struct {
1754	autorest.Response `json:"-"`
1755	// Value - The list of dedicated hosts
1756	Value *[]DedicatedHost `json:"value,omitempty"`
1757	// NextLink - The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts.
1758	NextLink *string `json:"nextLink,omitempty"`
1759}
1760
1761// DedicatedHostListResultIterator provides access to a complete listing of DedicatedHost values.
1762type DedicatedHostListResultIterator struct {
1763	i    int
1764	page DedicatedHostListResultPage
1765}
1766
1767// NextWithContext advances to the next value.  If there was an error making
1768// the request the iterator does not advance and the error is returned.
1769func (iter *DedicatedHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
1770	if tracing.IsEnabled() {
1771		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultIterator.NextWithContext")
1772		defer func() {
1773			sc := -1
1774			if iter.Response().Response.Response != nil {
1775				sc = iter.Response().Response.Response.StatusCode
1776			}
1777			tracing.EndSpan(ctx, sc, err)
1778		}()
1779	}
1780	iter.i++
1781	if iter.i < len(iter.page.Values()) {
1782		return nil
1783	}
1784	err = iter.page.NextWithContext(ctx)
1785	if err != nil {
1786		iter.i--
1787		return err
1788	}
1789	iter.i = 0
1790	return nil
1791}
1792
1793// Next advances to the next value.  If there was an error making
1794// the request the iterator does not advance and the error is returned.
1795// Deprecated: Use NextWithContext() instead.
1796func (iter *DedicatedHostListResultIterator) Next() error {
1797	return iter.NextWithContext(context.Background())
1798}
1799
1800// NotDone returns true if the enumeration should be started or is not yet complete.
1801func (iter DedicatedHostListResultIterator) NotDone() bool {
1802	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1803}
1804
1805// Response returns the raw server response from the last page request.
1806func (iter DedicatedHostListResultIterator) Response() DedicatedHostListResult {
1807	return iter.page.Response()
1808}
1809
1810// Value returns the current value or a zero-initialized value if the
1811// iterator has advanced beyond the end of the collection.
1812func (iter DedicatedHostListResultIterator) Value() DedicatedHost {
1813	if !iter.page.NotDone() {
1814		return DedicatedHost{}
1815	}
1816	return iter.page.Values()[iter.i]
1817}
1818
1819// Creates a new instance of the DedicatedHostListResultIterator type.
1820func NewDedicatedHostListResultIterator(page DedicatedHostListResultPage) DedicatedHostListResultIterator {
1821	return DedicatedHostListResultIterator{page: page}
1822}
1823
1824// IsEmpty returns true if the ListResult contains no values.
1825func (dhlr DedicatedHostListResult) IsEmpty() bool {
1826	return dhlr.Value == nil || len(*dhlr.Value) == 0
1827}
1828
1829// hasNextLink returns true if the NextLink is not empty.
1830func (dhlr DedicatedHostListResult) hasNextLink() bool {
1831	return dhlr.NextLink != nil && len(*dhlr.NextLink) != 0
1832}
1833
1834// dedicatedHostListResultPreparer prepares a request to retrieve the next set of results.
1835// It returns nil if no more results exist.
1836func (dhlr DedicatedHostListResult) dedicatedHostListResultPreparer(ctx context.Context) (*http.Request, error) {
1837	if !dhlr.hasNextLink() {
1838		return nil, nil
1839	}
1840	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1841		autorest.AsJSON(),
1842		autorest.AsGet(),
1843		autorest.WithBaseURL(to.String(dhlr.NextLink)))
1844}
1845
1846// DedicatedHostListResultPage contains a page of DedicatedHost values.
1847type DedicatedHostListResultPage struct {
1848	fn   func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)
1849	dhlr DedicatedHostListResult
1850}
1851
1852// NextWithContext advances to the next page of values.  If there was an error making
1853// the request the page does not advance and the error is returned.
1854func (page *DedicatedHostListResultPage) NextWithContext(ctx context.Context) (err error) {
1855	if tracing.IsEnabled() {
1856		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultPage.NextWithContext")
1857		defer func() {
1858			sc := -1
1859			if page.Response().Response.Response != nil {
1860				sc = page.Response().Response.Response.StatusCode
1861			}
1862			tracing.EndSpan(ctx, sc, err)
1863		}()
1864	}
1865	for {
1866		next, err := page.fn(ctx, page.dhlr)
1867		if err != nil {
1868			return err
1869		}
1870		page.dhlr = next
1871		if !next.hasNextLink() || !next.IsEmpty() {
1872			break
1873		}
1874	}
1875	return nil
1876}
1877
1878// Next advances to the next page of values.  If there was an error making
1879// the request the page does not advance and the error is returned.
1880// Deprecated: Use NextWithContext() instead.
1881func (page *DedicatedHostListResultPage) Next() error {
1882	return page.NextWithContext(context.Background())
1883}
1884
1885// NotDone returns true if the page enumeration should be started or is not yet complete.
1886func (page DedicatedHostListResultPage) NotDone() bool {
1887	return !page.dhlr.IsEmpty()
1888}
1889
1890// Response returns the raw server response from the last page request.
1891func (page DedicatedHostListResultPage) Response() DedicatedHostListResult {
1892	return page.dhlr
1893}
1894
1895// Values returns the slice of values for the current page or nil if there are no values.
1896func (page DedicatedHostListResultPage) Values() []DedicatedHost {
1897	if page.dhlr.IsEmpty() {
1898		return nil
1899	}
1900	return *page.dhlr.Value
1901}
1902
1903// Creates a new instance of the DedicatedHostListResultPage type.
1904func NewDedicatedHostListResultPage(cur DedicatedHostListResult, getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage {
1905	return DedicatedHostListResultPage{
1906		fn:   getNextPage,
1907		dhlr: cur,
1908	}
1909}
1910
1911// DedicatedHostProperties properties of the dedicated host.
1912type DedicatedHostProperties struct {
1913	// PlatformFaultDomain - Fault domain of the dedicated host within a dedicated host group.
1914	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
1915	// AutoReplaceOnFailure - Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided.
1916	AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"`
1917	// HostID - READ-ONLY; A unique id generated and assigned to the dedicated host by the platform. <br><br> Does not change throughout the lifetime of the host.
1918	HostID *string `json:"hostId,omitempty"`
1919	// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the Dedicated Host.
1920	VirtualMachines *[]SubResourceReadOnly `json:"virtualMachines,omitempty"`
1921	// LicenseType - Specifies the software license type that will be applied to the VMs deployed on the dedicated host. <br><br> Possible values are: <br><br> **None** <br><br> **Windows_Server_Hybrid** <br><br> **Windows_Server_Perpetual** <br><br> Default: **None**. Possible values include: 'DedicatedHostLicenseTypesNone', 'DedicatedHostLicenseTypesWindowsServerHybrid', 'DedicatedHostLicenseTypesWindowsServerPerpetual'
1922	LicenseType DedicatedHostLicenseTypes `json:"licenseType,omitempty"`
1923	// ProvisioningTime - READ-ONLY; The date when the host was first provisioned.
1924	ProvisioningTime *date.Time `json:"provisioningTime,omitempty"`
1925	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
1926	ProvisioningState *string `json:"provisioningState,omitempty"`
1927	// InstanceView - READ-ONLY; The dedicated host instance view.
1928	InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty"`
1929}
1930
1931// MarshalJSON is the custom marshaler for DedicatedHostProperties.
1932func (dhp DedicatedHostProperties) MarshalJSON() ([]byte, error) {
1933	objectMap := make(map[string]interface{})
1934	if dhp.PlatformFaultDomain != nil {
1935		objectMap["platformFaultDomain"] = dhp.PlatformFaultDomain
1936	}
1937	if dhp.AutoReplaceOnFailure != nil {
1938		objectMap["autoReplaceOnFailure"] = dhp.AutoReplaceOnFailure
1939	}
1940	if dhp.LicenseType != "" {
1941		objectMap["licenseType"] = dhp.LicenseType
1942	}
1943	return json.Marshal(objectMap)
1944}
1945
1946// DedicatedHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1947// long-running operation.
1948type DedicatedHostsCreateOrUpdateFuture struct {
1949	azure.FutureAPI
1950	// Result returns the result of the asynchronous operation.
1951	// If the operation has not completed it will return an error.
1952	Result func(DedicatedHostsClient) (DedicatedHost, error)
1953}
1954
1955// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1956func (future *DedicatedHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
1957	var azFuture azure.Future
1958	if err := json.Unmarshal(body, &azFuture); err != nil {
1959		return err
1960	}
1961	future.FutureAPI = &azFuture
1962	future.Result = future.result
1963	return nil
1964}
1965
1966// result is the default implementation for DedicatedHostsCreateOrUpdateFuture.Result.
1967func (future *DedicatedHostsCreateOrUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
1968	var done bool
1969	done, err = future.DoneWithContext(context.Background(), client)
1970	if err != nil {
1971		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1972		return
1973	}
1974	if !done {
1975		dh.Response.Response = future.Response()
1976		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsCreateOrUpdateFuture")
1977		return
1978	}
1979	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1980	if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
1981		dh, err = client.CreateOrUpdateResponder(dh.Response.Response)
1982		if err != nil {
1983			err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
1984		}
1985	}
1986	return
1987}
1988
1989// DedicatedHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1990// operation.
1991type DedicatedHostsDeleteFuture struct {
1992	azure.FutureAPI
1993	// Result returns the result of the asynchronous operation.
1994	// If the operation has not completed it will return an error.
1995	Result func(DedicatedHostsClient) (autorest.Response, error)
1996}
1997
1998// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1999func (future *DedicatedHostsDeleteFuture) UnmarshalJSON(body []byte) error {
2000	var azFuture azure.Future
2001	if err := json.Unmarshal(body, &azFuture); err != nil {
2002		return err
2003	}
2004	future.FutureAPI = &azFuture
2005	future.Result = future.result
2006	return nil
2007}
2008
2009// result is the default implementation for DedicatedHostsDeleteFuture.Result.
2010func (future *DedicatedHostsDeleteFuture) result(client DedicatedHostsClient) (ar autorest.Response, err error) {
2011	var done bool
2012	done, err = future.DoneWithContext(context.Background(), client)
2013	if err != nil {
2014		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsDeleteFuture", "Result", future.Response(), "Polling failure")
2015		return
2016	}
2017	if !done {
2018		ar.Response = future.Response()
2019		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsDeleteFuture")
2020		return
2021	}
2022	ar.Response = future.Response()
2023	return
2024}
2025
2026// DedicatedHostsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
2027// operation.
2028type DedicatedHostsUpdateFuture struct {
2029	azure.FutureAPI
2030	// Result returns the result of the asynchronous operation.
2031	// If the operation has not completed it will return an error.
2032	Result func(DedicatedHostsClient) (DedicatedHost, error)
2033}
2034
2035// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2036func (future *DedicatedHostsUpdateFuture) UnmarshalJSON(body []byte) error {
2037	var azFuture azure.Future
2038	if err := json.Unmarshal(body, &azFuture); err != nil {
2039		return err
2040	}
2041	future.FutureAPI = &azFuture
2042	future.Result = future.result
2043	return nil
2044}
2045
2046// result is the default implementation for DedicatedHostsUpdateFuture.Result.
2047func (future *DedicatedHostsUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
2048	var done bool
2049	done, err = future.DoneWithContext(context.Background(), client)
2050	if err != nil {
2051		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", future.Response(), "Polling failure")
2052		return
2053	}
2054	if !done {
2055		dh.Response.Response = future.Response()
2056		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsUpdateFuture")
2057		return
2058	}
2059	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2060	if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
2061		dh, err = client.UpdateResponder(dh.Response.Response)
2062		if err != nil {
2063			err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
2064		}
2065	}
2066	return
2067}
2068
2069// DedicatedHostUpdate specifies information about the dedicated host. Only tags, autoReplaceOnFailure and
2070// licenseType may be updated.
2071type DedicatedHostUpdate struct {
2072	*DedicatedHostProperties `json:"properties,omitempty"`
2073	// Tags - Resource tags
2074	Tags map[string]*string `json:"tags"`
2075}
2076
2077// MarshalJSON is the custom marshaler for DedicatedHostUpdate.
2078func (dhu DedicatedHostUpdate) MarshalJSON() ([]byte, error) {
2079	objectMap := make(map[string]interface{})
2080	if dhu.DedicatedHostProperties != nil {
2081		objectMap["properties"] = dhu.DedicatedHostProperties
2082	}
2083	if dhu.Tags != nil {
2084		objectMap["tags"] = dhu.Tags
2085	}
2086	return json.Marshal(objectMap)
2087}
2088
2089// UnmarshalJSON is the custom unmarshaler for DedicatedHostUpdate struct.
2090func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error {
2091	var m map[string]*json.RawMessage
2092	err := json.Unmarshal(body, &m)
2093	if err != nil {
2094		return err
2095	}
2096	for k, v := range m {
2097		switch k {
2098		case "properties":
2099			if v != nil {
2100				var dedicatedHostProperties DedicatedHostProperties
2101				err = json.Unmarshal(*v, &dedicatedHostProperties)
2102				if err != nil {
2103					return err
2104				}
2105				dhu.DedicatedHostProperties = &dedicatedHostProperties
2106			}
2107		case "tags":
2108			if v != nil {
2109				var tags map[string]*string
2110				err = json.Unmarshal(*v, &tags)
2111				if err != nil {
2112					return err
2113				}
2114				dhu.Tags = tags
2115			}
2116		}
2117	}
2118
2119	return nil
2120}
2121
2122// DiagnosticsProfile specifies the boot diagnostic settings state. <br><br>Minimum api-version:
2123// 2015-06-15.
2124type DiagnosticsProfile struct {
2125	// 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.
2126	BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
2127}
2128
2129// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating
2130// system disk. <br><br> NOTE: The ephemeral disk settings can only be specified for managed disk.
2131type DiffDiskSettings struct {
2132	// Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local'
2133	Option DiffDiskOptions `json:"option,omitempty"`
2134	// Placement - Specifies the ephemeral disk placement for operating system disk.<br><br> Possible values are: <br><br> **CacheDisk** <br><br> **ResourceDisk** <br><br> Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.<br><br> Refer to VM size documentation for Windows VM at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'CacheDisk', 'ResourceDisk'
2135	Placement DiffDiskPlacement `json:"placement,omitempty"`
2136}
2137
2138// Disallowed describes the disallowed disk types.
2139type Disallowed struct {
2140	// DiskTypes - A list of disk types.
2141	DiskTypes *[]string `json:"diskTypes,omitempty"`
2142}
2143
2144// DisallowedConfiguration specifies the disallowed configuration for a virtual machine image.
2145type DisallowedConfiguration struct {
2146	// VMDiskType - VM disk types which are disallowed. Possible values include: 'VMDiskTypesNone', 'VMDiskTypesUnmanaged'
2147	VMDiskType VMDiskTypes `json:"vmDiskType,omitempty"`
2148}
2149
2150// Disk disk resource.
2151type Disk struct {
2152	autorest.Response `json:"-"`
2153	// ManagedBy - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
2154	ManagedBy *string `json:"managedBy,omitempty"`
2155	// ManagedByExtended - READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
2156	ManagedByExtended *[]string `json:"managedByExtended,omitempty"`
2157	Sku               *DiskSku  `json:"sku,omitempty"`
2158	// Zones - The Logical zone list for Disk.
2159	Zones           *[]string `json:"zones,omitempty"`
2160	*DiskProperties `json:"properties,omitempty"`
2161	// ID - READ-ONLY; Resource Id
2162	ID *string `json:"id,omitempty"`
2163	// Name - READ-ONLY; Resource name
2164	Name *string `json:"name,omitempty"`
2165	// Type - READ-ONLY; Resource type
2166	Type *string `json:"type,omitempty"`
2167	// Location - Resource location
2168	Location *string `json:"location,omitempty"`
2169	// Tags - Resource tags
2170	Tags map[string]*string `json:"tags"`
2171}
2172
2173// MarshalJSON is the custom marshaler for Disk.
2174func (d Disk) MarshalJSON() ([]byte, error) {
2175	objectMap := make(map[string]interface{})
2176	if d.Sku != nil {
2177		objectMap["sku"] = d.Sku
2178	}
2179	if d.Zones != nil {
2180		objectMap["zones"] = d.Zones
2181	}
2182	if d.DiskProperties != nil {
2183		objectMap["properties"] = d.DiskProperties
2184	}
2185	if d.Location != nil {
2186		objectMap["location"] = d.Location
2187	}
2188	if d.Tags != nil {
2189		objectMap["tags"] = d.Tags
2190	}
2191	return json.Marshal(objectMap)
2192}
2193
2194// UnmarshalJSON is the custom unmarshaler for Disk struct.
2195func (d *Disk) UnmarshalJSON(body []byte) error {
2196	var m map[string]*json.RawMessage
2197	err := json.Unmarshal(body, &m)
2198	if err != nil {
2199		return err
2200	}
2201	for k, v := range m {
2202		switch k {
2203		case "managedBy":
2204			if v != nil {
2205				var managedBy string
2206				err = json.Unmarshal(*v, &managedBy)
2207				if err != nil {
2208					return err
2209				}
2210				d.ManagedBy = &managedBy
2211			}
2212		case "managedByExtended":
2213			if v != nil {
2214				var managedByExtended []string
2215				err = json.Unmarshal(*v, &managedByExtended)
2216				if err != nil {
2217					return err
2218				}
2219				d.ManagedByExtended = &managedByExtended
2220			}
2221		case "sku":
2222			if v != nil {
2223				var sku DiskSku
2224				err = json.Unmarshal(*v, &sku)
2225				if err != nil {
2226					return err
2227				}
2228				d.Sku = &sku
2229			}
2230		case "zones":
2231			if v != nil {
2232				var zones []string
2233				err = json.Unmarshal(*v, &zones)
2234				if err != nil {
2235					return err
2236				}
2237				d.Zones = &zones
2238			}
2239		case "properties":
2240			if v != nil {
2241				var diskProperties DiskProperties
2242				err = json.Unmarshal(*v, &diskProperties)
2243				if err != nil {
2244					return err
2245				}
2246				d.DiskProperties = &diskProperties
2247			}
2248		case "id":
2249			if v != nil {
2250				var ID string
2251				err = json.Unmarshal(*v, &ID)
2252				if err != nil {
2253					return err
2254				}
2255				d.ID = &ID
2256			}
2257		case "name":
2258			if v != nil {
2259				var name string
2260				err = json.Unmarshal(*v, &name)
2261				if err != nil {
2262					return err
2263				}
2264				d.Name = &name
2265			}
2266		case "type":
2267			if v != nil {
2268				var typeVar string
2269				err = json.Unmarshal(*v, &typeVar)
2270				if err != nil {
2271					return err
2272				}
2273				d.Type = &typeVar
2274			}
2275		case "location":
2276			if v != nil {
2277				var location string
2278				err = json.Unmarshal(*v, &location)
2279				if err != nil {
2280					return err
2281				}
2282				d.Location = &location
2283			}
2284		case "tags":
2285			if v != nil {
2286				var tags map[string]*string
2287				err = json.Unmarshal(*v, &tags)
2288				if err != nil {
2289					return err
2290				}
2291				d.Tags = tags
2292			}
2293		}
2294	}
2295
2296	return nil
2297}
2298
2299// DiskAccess disk access resource.
2300type DiskAccess struct {
2301	autorest.Response     `json:"-"`
2302	*DiskAccessProperties `json:"properties,omitempty"`
2303	// ID - READ-ONLY; Resource Id
2304	ID *string `json:"id,omitempty"`
2305	// Name - READ-ONLY; Resource name
2306	Name *string `json:"name,omitempty"`
2307	// Type - READ-ONLY; Resource type
2308	Type *string `json:"type,omitempty"`
2309	// Location - Resource location
2310	Location *string `json:"location,omitempty"`
2311	// Tags - Resource tags
2312	Tags map[string]*string `json:"tags"`
2313}
2314
2315// MarshalJSON is the custom marshaler for DiskAccess.
2316func (da DiskAccess) MarshalJSON() ([]byte, error) {
2317	objectMap := make(map[string]interface{})
2318	if da.DiskAccessProperties != nil {
2319		objectMap["properties"] = da.DiskAccessProperties
2320	}
2321	if da.Location != nil {
2322		objectMap["location"] = da.Location
2323	}
2324	if da.Tags != nil {
2325		objectMap["tags"] = da.Tags
2326	}
2327	return json.Marshal(objectMap)
2328}
2329
2330// UnmarshalJSON is the custom unmarshaler for DiskAccess struct.
2331func (da *DiskAccess) UnmarshalJSON(body []byte) error {
2332	var m map[string]*json.RawMessage
2333	err := json.Unmarshal(body, &m)
2334	if err != nil {
2335		return err
2336	}
2337	for k, v := range m {
2338		switch k {
2339		case "properties":
2340			if v != nil {
2341				var diskAccessProperties DiskAccessProperties
2342				err = json.Unmarshal(*v, &diskAccessProperties)
2343				if err != nil {
2344					return err
2345				}
2346				da.DiskAccessProperties = &diskAccessProperties
2347			}
2348		case "id":
2349			if v != nil {
2350				var ID string
2351				err = json.Unmarshal(*v, &ID)
2352				if err != nil {
2353					return err
2354				}
2355				da.ID = &ID
2356			}
2357		case "name":
2358			if v != nil {
2359				var name string
2360				err = json.Unmarshal(*v, &name)
2361				if err != nil {
2362					return err
2363				}
2364				da.Name = &name
2365			}
2366		case "type":
2367			if v != nil {
2368				var typeVar string
2369				err = json.Unmarshal(*v, &typeVar)
2370				if err != nil {
2371					return err
2372				}
2373				da.Type = &typeVar
2374			}
2375		case "location":
2376			if v != nil {
2377				var location string
2378				err = json.Unmarshal(*v, &location)
2379				if err != nil {
2380					return err
2381				}
2382				da.Location = &location
2383			}
2384		case "tags":
2385			if v != nil {
2386				var tags map[string]*string
2387				err = json.Unmarshal(*v, &tags)
2388				if err != nil {
2389					return err
2390				}
2391				da.Tags = tags
2392			}
2393		}
2394	}
2395
2396	return nil
2397}
2398
2399// DiskAccessesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2400// long-running operation.
2401type DiskAccessesCreateOrUpdateFuture struct {
2402	azure.FutureAPI
2403	// Result returns the result of the asynchronous operation.
2404	// If the operation has not completed it will return an error.
2405	Result func(DiskAccessesClient) (DiskAccess, error)
2406}
2407
2408// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2409func (future *DiskAccessesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2410	var azFuture azure.Future
2411	if err := json.Unmarshal(body, &azFuture); err != nil {
2412		return err
2413	}
2414	future.FutureAPI = &azFuture
2415	future.Result = future.result
2416	return nil
2417}
2418
2419// result is the default implementation for DiskAccessesCreateOrUpdateFuture.Result.
2420func (future *DiskAccessesCreateOrUpdateFuture) result(client DiskAccessesClient) (da DiskAccess, err error) {
2421	var done bool
2422	done, err = future.DoneWithContext(context.Background(), client)
2423	if err != nil {
2424		err = autorest.NewErrorWithError(err, "compute.DiskAccessesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2425		return
2426	}
2427	if !done {
2428		da.Response.Response = future.Response()
2429		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesCreateOrUpdateFuture")
2430		return
2431	}
2432	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2433	if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
2434		da, err = client.CreateOrUpdateResponder(da.Response.Response)
2435		if err != nil {
2436			err = autorest.NewErrorWithError(err, "compute.DiskAccessesCreateOrUpdateFuture", "Result", da.Response.Response, "Failure responding to request")
2437		}
2438	}
2439	return
2440}
2441
2442// DiskAccessesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
2443// operation.
2444type DiskAccessesDeleteFuture struct {
2445	azure.FutureAPI
2446	// Result returns the result of the asynchronous operation.
2447	// If the operation has not completed it will return an error.
2448	Result func(DiskAccessesClient) (autorest.Response, error)
2449}
2450
2451// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2452func (future *DiskAccessesDeleteFuture) UnmarshalJSON(body []byte) error {
2453	var azFuture azure.Future
2454	if err := json.Unmarshal(body, &azFuture); err != nil {
2455		return err
2456	}
2457	future.FutureAPI = &azFuture
2458	future.Result = future.result
2459	return nil
2460}
2461
2462// result is the default implementation for DiskAccessesDeleteFuture.Result.
2463func (future *DiskAccessesDeleteFuture) result(client DiskAccessesClient) (ar autorest.Response, err error) {
2464	var done bool
2465	done, err = future.DoneWithContext(context.Background(), client)
2466	if err != nil {
2467		err = autorest.NewErrorWithError(err, "compute.DiskAccessesDeleteFuture", "Result", future.Response(), "Polling failure")
2468		return
2469	}
2470	if !done {
2471		ar.Response = future.Response()
2472		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesDeleteFuture")
2473		return
2474	}
2475	ar.Response = future.Response()
2476	return
2477}
2478
2479// DiskAccessesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
2480// operation.
2481type DiskAccessesUpdateFuture struct {
2482	azure.FutureAPI
2483	// Result returns the result of the asynchronous operation.
2484	// If the operation has not completed it will return an error.
2485	Result func(DiskAccessesClient) (DiskAccess, error)
2486}
2487
2488// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2489func (future *DiskAccessesUpdateFuture) UnmarshalJSON(body []byte) error {
2490	var azFuture azure.Future
2491	if err := json.Unmarshal(body, &azFuture); err != nil {
2492		return err
2493	}
2494	future.FutureAPI = &azFuture
2495	future.Result = future.result
2496	return nil
2497}
2498
2499// result is the default implementation for DiskAccessesUpdateFuture.Result.
2500func (future *DiskAccessesUpdateFuture) result(client DiskAccessesClient) (da DiskAccess, err error) {
2501	var done bool
2502	done, err = future.DoneWithContext(context.Background(), client)
2503	if err != nil {
2504		err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateFuture", "Result", future.Response(), "Polling failure")
2505		return
2506	}
2507	if !done {
2508		da.Response.Response = future.Response()
2509		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesUpdateFuture")
2510		return
2511	}
2512	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2513	if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
2514		da, err = client.UpdateResponder(da.Response.Response)
2515		if err != nil {
2516			err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateFuture", "Result", da.Response.Response, "Failure responding to request")
2517		}
2518	}
2519	return
2520}
2521
2522// DiskAccessList the List disk access operation response.
2523type DiskAccessList struct {
2524	autorest.Response `json:"-"`
2525	// Value - A list of disk access resources.
2526	Value *[]DiskAccess `json:"value,omitempty"`
2527	// NextLink - The uri to fetch the next page of disk access resources. Call ListNext() with this to fetch the next page of disk access resources.
2528	NextLink *string `json:"nextLink,omitempty"`
2529}
2530
2531// DiskAccessListIterator provides access to a complete listing of DiskAccess values.
2532type DiskAccessListIterator struct {
2533	i    int
2534	page DiskAccessListPage
2535}
2536
2537// NextWithContext advances to the next value.  If there was an error making
2538// the request the iterator does not advance and the error is returned.
2539func (iter *DiskAccessListIterator) NextWithContext(ctx context.Context) (err error) {
2540	if tracing.IsEnabled() {
2541		ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListIterator.NextWithContext")
2542		defer func() {
2543			sc := -1
2544			if iter.Response().Response.Response != nil {
2545				sc = iter.Response().Response.Response.StatusCode
2546			}
2547			tracing.EndSpan(ctx, sc, err)
2548		}()
2549	}
2550	iter.i++
2551	if iter.i < len(iter.page.Values()) {
2552		return nil
2553	}
2554	err = iter.page.NextWithContext(ctx)
2555	if err != nil {
2556		iter.i--
2557		return err
2558	}
2559	iter.i = 0
2560	return nil
2561}
2562
2563// Next advances to the next value.  If there was an error making
2564// the request the iterator does not advance and the error is returned.
2565// Deprecated: Use NextWithContext() instead.
2566func (iter *DiskAccessListIterator) Next() error {
2567	return iter.NextWithContext(context.Background())
2568}
2569
2570// NotDone returns true if the enumeration should be started or is not yet complete.
2571func (iter DiskAccessListIterator) NotDone() bool {
2572	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2573}
2574
2575// Response returns the raw server response from the last page request.
2576func (iter DiskAccessListIterator) Response() DiskAccessList {
2577	return iter.page.Response()
2578}
2579
2580// Value returns the current value or a zero-initialized value if the
2581// iterator has advanced beyond the end of the collection.
2582func (iter DiskAccessListIterator) Value() DiskAccess {
2583	if !iter.page.NotDone() {
2584		return DiskAccess{}
2585	}
2586	return iter.page.Values()[iter.i]
2587}
2588
2589// Creates a new instance of the DiskAccessListIterator type.
2590func NewDiskAccessListIterator(page DiskAccessListPage) DiskAccessListIterator {
2591	return DiskAccessListIterator{page: page}
2592}
2593
2594// IsEmpty returns true if the ListResult contains no values.
2595func (dal DiskAccessList) IsEmpty() bool {
2596	return dal.Value == nil || len(*dal.Value) == 0
2597}
2598
2599// hasNextLink returns true if the NextLink is not empty.
2600func (dal DiskAccessList) hasNextLink() bool {
2601	return dal.NextLink != nil && len(*dal.NextLink) != 0
2602}
2603
2604// diskAccessListPreparer prepares a request to retrieve the next set of results.
2605// It returns nil if no more results exist.
2606func (dal DiskAccessList) diskAccessListPreparer(ctx context.Context) (*http.Request, error) {
2607	if !dal.hasNextLink() {
2608		return nil, nil
2609	}
2610	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2611		autorest.AsJSON(),
2612		autorest.AsGet(),
2613		autorest.WithBaseURL(to.String(dal.NextLink)))
2614}
2615
2616// DiskAccessListPage contains a page of DiskAccess values.
2617type DiskAccessListPage struct {
2618	fn  func(context.Context, DiskAccessList) (DiskAccessList, error)
2619	dal DiskAccessList
2620}
2621
2622// NextWithContext advances to the next page of values.  If there was an error making
2623// the request the page does not advance and the error is returned.
2624func (page *DiskAccessListPage) NextWithContext(ctx context.Context) (err error) {
2625	if tracing.IsEnabled() {
2626		ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListPage.NextWithContext")
2627		defer func() {
2628			sc := -1
2629			if page.Response().Response.Response != nil {
2630				sc = page.Response().Response.Response.StatusCode
2631			}
2632			tracing.EndSpan(ctx, sc, err)
2633		}()
2634	}
2635	for {
2636		next, err := page.fn(ctx, page.dal)
2637		if err != nil {
2638			return err
2639		}
2640		page.dal = next
2641		if !next.hasNextLink() || !next.IsEmpty() {
2642			break
2643		}
2644	}
2645	return nil
2646}
2647
2648// Next advances to the next page of values.  If there was an error making
2649// the request the page does not advance and the error is returned.
2650// Deprecated: Use NextWithContext() instead.
2651func (page *DiskAccessListPage) Next() error {
2652	return page.NextWithContext(context.Background())
2653}
2654
2655// NotDone returns true if the page enumeration should be started or is not yet complete.
2656func (page DiskAccessListPage) NotDone() bool {
2657	return !page.dal.IsEmpty()
2658}
2659
2660// Response returns the raw server response from the last page request.
2661func (page DiskAccessListPage) Response() DiskAccessList {
2662	return page.dal
2663}
2664
2665// Values returns the slice of values for the current page or nil if there are no values.
2666func (page DiskAccessListPage) Values() []DiskAccess {
2667	if page.dal.IsEmpty() {
2668		return nil
2669	}
2670	return *page.dal.Value
2671}
2672
2673// Creates a new instance of the DiskAccessListPage type.
2674func NewDiskAccessListPage(cur DiskAccessList, getNextPage func(context.Context, DiskAccessList) (DiskAccessList, error)) DiskAccessListPage {
2675	return DiskAccessListPage{
2676		fn:  getNextPage,
2677		dal: cur,
2678	}
2679}
2680
2681// DiskAccessProperties ...
2682type DiskAccessProperties struct {
2683	// PrivateEndpointConnections - READ-ONLY; A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection is supported.
2684	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
2685	// ProvisioningState - READ-ONLY; The disk access resource provisioning state.
2686	ProvisioningState *string `json:"provisioningState,omitempty"`
2687	// TimeCreated - READ-ONLY; The time when the disk access was created.
2688	TimeCreated *date.Time `json:"timeCreated,omitempty"`
2689}
2690
2691// MarshalJSON is the custom marshaler for DiskAccessProperties.
2692func (dap DiskAccessProperties) MarshalJSON() ([]byte, error) {
2693	objectMap := make(map[string]interface{})
2694	return json.Marshal(objectMap)
2695}
2696
2697// DiskAccessUpdate used for updating a disk access resource.
2698type DiskAccessUpdate struct {
2699	// Tags - Resource tags
2700	Tags map[string]*string `json:"tags"`
2701}
2702
2703// MarshalJSON is the custom marshaler for DiskAccessUpdate.
2704func (dau DiskAccessUpdate) MarshalJSON() ([]byte, error) {
2705	objectMap := make(map[string]interface{})
2706	if dau.Tags != nil {
2707		objectMap["tags"] = dau.Tags
2708	}
2709	return json.Marshal(objectMap)
2710}
2711
2712// DiskEncryptionSet disk encryption set resource.
2713type DiskEncryptionSet struct {
2714	autorest.Response        `json:"-"`
2715	Identity                 *EncryptionSetIdentity `json:"identity,omitempty"`
2716	*EncryptionSetProperties `json:"properties,omitempty"`
2717	// ID - READ-ONLY; Resource Id
2718	ID *string `json:"id,omitempty"`
2719	// Name - READ-ONLY; Resource name
2720	Name *string `json:"name,omitempty"`
2721	// Type - READ-ONLY; Resource type
2722	Type *string `json:"type,omitempty"`
2723	// Location - Resource location
2724	Location *string `json:"location,omitempty"`
2725	// Tags - Resource tags
2726	Tags map[string]*string `json:"tags"`
2727}
2728
2729// MarshalJSON is the custom marshaler for DiskEncryptionSet.
2730func (desVar DiskEncryptionSet) MarshalJSON() ([]byte, error) {
2731	objectMap := make(map[string]interface{})
2732	if desVar.Identity != nil {
2733		objectMap["identity"] = desVar.Identity
2734	}
2735	if desVar.EncryptionSetProperties != nil {
2736		objectMap["properties"] = desVar.EncryptionSetProperties
2737	}
2738	if desVar.Location != nil {
2739		objectMap["location"] = desVar.Location
2740	}
2741	if desVar.Tags != nil {
2742		objectMap["tags"] = desVar.Tags
2743	}
2744	return json.Marshal(objectMap)
2745}
2746
2747// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSet struct.
2748func (desVar *DiskEncryptionSet) UnmarshalJSON(body []byte) error {
2749	var m map[string]*json.RawMessage
2750	err := json.Unmarshal(body, &m)
2751	if err != nil {
2752		return err
2753	}
2754	for k, v := range m {
2755		switch k {
2756		case "identity":
2757			if v != nil {
2758				var identity EncryptionSetIdentity
2759				err = json.Unmarshal(*v, &identity)
2760				if err != nil {
2761					return err
2762				}
2763				desVar.Identity = &identity
2764			}
2765		case "properties":
2766			if v != nil {
2767				var encryptionSetProperties EncryptionSetProperties
2768				err = json.Unmarshal(*v, &encryptionSetProperties)
2769				if err != nil {
2770					return err
2771				}
2772				desVar.EncryptionSetProperties = &encryptionSetProperties
2773			}
2774		case "id":
2775			if v != nil {
2776				var ID string
2777				err = json.Unmarshal(*v, &ID)
2778				if err != nil {
2779					return err
2780				}
2781				desVar.ID = &ID
2782			}
2783		case "name":
2784			if v != nil {
2785				var name string
2786				err = json.Unmarshal(*v, &name)
2787				if err != nil {
2788					return err
2789				}
2790				desVar.Name = &name
2791			}
2792		case "type":
2793			if v != nil {
2794				var typeVar string
2795				err = json.Unmarshal(*v, &typeVar)
2796				if err != nil {
2797					return err
2798				}
2799				desVar.Type = &typeVar
2800			}
2801		case "location":
2802			if v != nil {
2803				var location string
2804				err = json.Unmarshal(*v, &location)
2805				if err != nil {
2806					return err
2807				}
2808				desVar.Location = &location
2809			}
2810		case "tags":
2811			if v != nil {
2812				var tags map[string]*string
2813				err = json.Unmarshal(*v, &tags)
2814				if err != nil {
2815					return err
2816				}
2817				desVar.Tags = tags
2818			}
2819		}
2820	}
2821
2822	return nil
2823}
2824
2825// DiskEncryptionSetList the List disk encryption set operation response.
2826type DiskEncryptionSetList struct {
2827	autorest.Response `json:"-"`
2828	// Value - A list of disk encryption sets.
2829	Value *[]DiskEncryptionSet `json:"value,omitempty"`
2830	// NextLink - The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the next page of disk encryption sets.
2831	NextLink *string `json:"nextLink,omitempty"`
2832}
2833
2834// DiskEncryptionSetListIterator provides access to a complete listing of DiskEncryptionSet values.
2835type DiskEncryptionSetListIterator struct {
2836	i    int
2837	page DiskEncryptionSetListPage
2838}
2839
2840// NextWithContext advances to the next value.  If there was an error making
2841// the request the iterator does not advance and the error is returned.
2842func (iter *DiskEncryptionSetListIterator) NextWithContext(ctx context.Context) (err error) {
2843	if tracing.IsEnabled() {
2844		ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListIterator.NextWithContext")
2845		defer func() {
2846			sc := -1
2847			if iter.Response().Response.Response != nil {
2848				sc = iter.Response().Response.Response.StatusCode
2849			}
2850			tracing.EndSpan(ctx, sc, err)
2851		}()
2852	}
2853	iter.i++
2854	if iter.i < len(iter.page.Values()) {
2855		return nil
2856	}
2857	err = iter.page.NextWithContext(ctx)
2858	if err != nil {
2859		iter.i--
2860		return err
2861	}
2862	iter.i = 0
2863	return nil
2864}
2865
2866// Next advances to the next value.  If there was an error making
2867// the request the iterator does not advance and the error is returned.
2868// Deprecated: Use NextWithContext() instead.
2869func (iter *DiskEncryptionSetListIterator) Next() error {
2870	return iter.NextWithContext(context.Background())
2871}
2872
2873// NotDone returns true if the enumeration should be started or is not yet complete.
2874func (iter DiskEncryptionSetListIterator) NotDone() bool {
2875	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2876}
2877
2878// Response returns the raw server response from the last page request.
2879func (iter DiskEncryptionSetListIterator) Response() DiskEncryptionSetList {
2880	return iter.page.Response()
2881}
2882
2883// Value returns the current value or a zero-initialized value if the
2884// iterator has advanced beyond the end of the collection.
2885func (iter DiskEncryptionSetListIterator) Value() DiskEncryptionSet {
2886	if !iter.page.NotDone() {
2887		return DiskEncryptionSet{}
2888	}
2889	return iter.page.Values()[iter.i]
2890}
2891
2892// Creates a new instance of the DiskEncryptionSetListIterator type.
2893func NewDiskEncryptionSetListIterator(page DiskEncryptionSetListPage) DiskEncryptionSetListIterator {
2894	return DiskEncryptionSetListIterator{page: page}
2895}
2896
2897// IsEmpty returns true if the ListResult contains no values.
2898func (desl DiskEncryptionSetList) IsEmpty() bool {
2899	return desl.Value == nil || len(*desl.Value) == 0
2900}
2901
2902// hasNextLink returns true if the NextLink is not empty.
2903func (desl DiskEncryptionSetList) hasNextLink() bool {
2904	return desl.NextLink != nil && len(*desl.NextLink) != 0
2905}
2906
2907// diskEncryptionSetListPreparer prepares a request to retrieve the next set of results.
2908// It returns nil if no more results exist.
2909func (desl DiskEncryptionSetList) diskEncryptionSetListPreparer(ctx context.Context) (*http.Request, error) {
2910	if !desl.hasNextLink() {
2911		return nil, nil
2912	}
2913	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2914		autorest.AsJSON(),
2915		autorest.AsGet(),
2916		autorest.WithBaseURL(to.String(desl.NextLink)))
2917}
2918
2919// DiskEncryptionSetListPage contains a page of DiskEncryptionSet values.
2920type DiskEncryptionSetListPage struct {
2921	fn   func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)
2922	desl DiskEncryptionSetList
2923}
2924
2925// NextWithContext advances to the next page of values.  If there was an error making
2926// the request the page does not advance and the error is returned.
2927func (page *DiskEncryptionSetListPage) NextWithContext(ctx context.Context) (err error) {
2928	if tracing.IsEnabled() {
2929		ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListPage.NextWithContext")
2930		defer func() {
2931			sc := -1
2932			if page.Response().Response.Response != nil {
2933				sc = page.Response().Response.Response.StatusCode
2934			}
2935			tracing.EndSpan(ctx, sc, err)
2936		}()
2937	}
2938	for {
2939		next, err := page.fn(ctx, page.desl)
2940		if err != nil {
2941			return err
2942		}
2943		page.desl = next
2944		if !next.hasNextLink() || !next.IsEmpty() {
2945			break
2946		}
2947	}
2948	return nil
2949}
2950
2951// Next advances to the next page of values.  If there was an error making
2952// the request the page does not advance and the error is returned.
2953// Deprecated: Use NextWithContext() instead.
2954func (page *DiskEncryptionSetListPage) Next() error {
2955	return page.NextWithContext(context.Background())
2956}
2957
2958// NotDone returns true if the page enumeration should be started or is not yet complete.
2959func (page DiskEncryptionSetListPage) NotDone() bool {
2960	return !page.desl.IsEmpty()
2961}
2962
2963// Response returns the raw server response from the last page request.
2964func (page DiskEncryptionSetListPage) Response() DiskEncryptionSetList {
2965	return page.desl
2966}
2967
2968// Values returns the slice of values for the current page or nil if there are no values.
2969func (page DiskEncryptionSetListPage) Values() []DiskEncryptionSet {
2970	if page.desl.IsEmpty() {
2971		return nil
2972	}
2973	return *page.desl.Value
2974}
2975
2976// Creates a new instance of the DiskEncryptionSetListPage type.
2977func NewDiskEncryptionSetListPage(cur DiskEncryptionSetList, getNextPage func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)) DiskEncryptionSetListPage {
2978	return DiskEncryptionSetListPage{
2979		fn:   getNextPage,
2980		desl: cur,
2981	}
2982}
2983
2984// DiskEncryptionSetParameters describes the parameter of customer managed disk encryption set resource id
2985// that can be specified for disk. <br><br> NOTE: The disk encryption set resource id can only be specified
2986// for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.
2987type DiskEncryptionSetParameters struct {
2988	// ID - Resource Id
2989	ID *string `json:"id,omitempty"`
2990}
2991
2992// DiskEncryptionSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2993// long-running operation.
2994type DiskEncryptionSetsCreateOrUpdateFuture struct {
2995	azure.FutureAPI
2996	// Result returns the result of the asynchronous operation.
2997	// If the operation has not completed it will return an error.
2998	Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
2999}
3000
3001// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3002func (future *DiskEncryptionSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3003	var azFuture azure.Future
3004	if err := json.Unmarshal(body, &azFuture); err != nil {
3005		return err
3006	}
3007	future.FutureAPI = &azFuture
3008	future.Result = future.result
3009	return nil
3010}
3011
3012// result is the default implementation for DiskEncryptionSetsCreateOrUpdateFuture.Result.
3013func (future *DiskEncryptionSetsCreateOrUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
3014	var done bool
3015	done, err = future.DoneWithContext(context.Background(), client)
3016	if err != nil {
3017		err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3018		return
3019	}
3020	if !done {
3021		desVar.Response.Response = future.Response()
3022		err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsCreateOrUpdateFuture")
3023		return
3024	}
3025	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3026	if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
3027		desVar, err = client.CreateOrUpdateResponder(desVar.Response.Response)
3028		if err != nil {
3029			err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
3030		}
3031	}
3032	return
3033}
3034
3035// DiskEncryptionSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
3036// long-running operation.
3037type DiskEncryptionSetsDeleteFuture struct {
3038	azure.FutureAPI
3039	// Result returns the result of the asynchronous operation.
3040	// If the operation has not completed it will return an error.
3041	Result func(DiskEncryptionSetsClient) (autorest.Response, error)
3042}
3043
3044// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3045func (future *DiskEncryptionSetsDeleteFuture) UnmarshalJSON(body []byte) error {
3046	var azFuture azure.Future
3047	if err := json.Unmarshal(body, &azFuture); err != nil {
3048		return err
3049	}
3050	future.FutureAPI = &azFuture
3051	future.Result = future.result
3052	return nil
3053}
3054
3055// result is the default implementation for DiskEncryptionSetsDeleteFuture.Result.
3056func (future *DiskEncryptionSetsDeleteFuture) result(client DiskEncryptionSetsClient) (ar autorest.Response, err error) {
3057	var done bool
3058	done, err = future.DoneWithContext(context.Background(), client)
3059	if err != nil {
3060		err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsDeleteFuture", "Result", future.Response(), "Polling failure")
3061		return
3062	}
3063	if !done {
3064		ar.Response = future.Response()
3065		err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsDeleteFuture")
3066		return
3067	}
3068	ar.Response = future.Response()
3069	return
3070}
3071
3072// DiskEncryptionSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
3073// long-running operation.
3074type DiskEncryptionSetsUpdateFuture struct {
3075	azure.FutureAPI
3076	// Result returns the result of the asynchronous operation.
3077	// If the operation has not completed it will return an error.
3078	Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
3079}
3080
3081// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3082func (future *DiskEncryptionSetsUpdateFuture) UnmarshalJSON(body []byte) error {
3083	var azFuture azure.Future
3084	if err := json.Unmarshal(body, &azFuture); err != nil {
3085		return err
3086	}
3087	future.FutureAPI = &azFuture
3088	future.Result = future.result
3089	return nil
3090}
3091
3092// result is the default implementation for DiskEncryptionSetsUpdateFuture.Result.
3093func (future *DiskEncryptionSetsUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
3094	var done bool
3095	done, err = future.DoneWithContext(context.Background(), client)
3096	if err != nil {
3097		err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", future.Response(), "Polling failure")
3098		return
3099	}
3100	if !done {
3101		desVar.Response.Response = future.Response()
3102		err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsUpdateFuture")
3103		return
3104	}
3105	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3106	if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
3107		desVar, err = client.UpdateResponder(desVar.Response.Response)
3108		if err != nil {
3109			err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
3110		}
3111	}
3112	return
3113}
3114
3115// DiskEncryptionSettings describes a Encryption Settings for a Disk
3116type DiskEncryptionSettings struct {
3117	// DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret.
3118	DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"`
3119	// KeyEncryptionKey - Specifies the location of the key encryption key in Key Vault.
3120	KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"`
3121	// Enabled - Specifies whether disk encryption should be enabled on the virtual machine.
3122	Enabled *bool `json:"enabled,omitempty"`
3123}
3124
3125// DiskEncryptionSetUpdate disk encryption set update resource.
3126type DiskEncryptionSetUpdate struct {
3127	*DiskEncryptionSetUpdateProperties `json:"properties,omitempty"`
3128	// Tags - Resource tags
3129	Tags map[string]*string `json:"tags"`
3130}
3131
3132// MarshalJSON is the custom marshaler for DiskEncryptionSetUpdate.
3133func (desu DiskEncryptionSetUpdate) MarshalJSON() ([]byte, error) {
3134	objectMap := make(map[string]interface{})
3135	if desu.DiskEncryptionSetUpdateProperties != nil {
3136		objectMap["properties"] = desu.DiskEncryptionSetUpdateProperties
3137	}
3138	if desu.Tags != nil {
3139		objectMap["tags"] = desu.Tags
3140	}
3141	return json.Marshal(objectMap)
3142}
3143
3144// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSetUpdate struct.
3145func (desu *DiskEncryptionSetUpdate) UnmarshalJSON(body []byte) error {
3146	var m map[string]*json.RawMessage
3147	err := json.Unmarshal(body, &m)
3148	if err != nil {
3149		return err
3150	}
3151	for k, v := range m {
3152		switch k {
3153		case "properties":
3154			if v != nil {
3155				var diskEncryptionSetUpdateProperties DiskEncryptionSetUpdateProperties
3156				err = json.Unmarshal(*v, &diskEncryptionSetUpdateProperties)
3157				if err != nil {
3158					return err
3159				}
3160				desu.DiskEncryptionSetUpdateProperties = &diskEncryptionSetUpdateProperties
3161			}
3162		case "tags":
3163			if v != nil {
3164				var tags map[string]*string
3165				err = json.Unmarshal(*v, &tags)
3166				if err != nil {
3167					return err
3168				}
3169				desu.Tags = tags
3170			}
3171		}
3172	}
3173
3174	return nil
3175}
3176
3177// DiskEncryptionSetUpdateProperties disk encryption set resource update properties.
3178type DiskEncryptionSetUpdateProperties struct {
3179	// EncryptionType - Possible values include: 'EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys'
3180	EncryptionType EncryptionType           `json:"encryptionType,omitempty"`
3181	ActiveKey      *KeyVaultAndKeyReference `json:"activeKey,omitempty"`
3182}
3183
3184// DiskImageEncryption this is the disk image encryption base class.
3185type DiskImageEncryption struct {
3186	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
3187	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
3188}
3189
3190// DiskInstanceView the instance view of the disk.
3191type DiskInstanceView struct {
3192	// Name - The disk name.
3193	Name *string `json:"name,omitempty"`
3194	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
3195	EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
3196	// Statuses - The resource status information.
3197	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
3198}
3199
3200// DiskList the List Disks operation response.
3201type DiskList struct {
3202	autorest.Response `json:"-"`
3203	// Value - A list of disks.
3204	Value *[]Disk `json:"value,omitempty"`
3205	// NextLink - The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks.
3206	NextLink *string `json:"nextLink,omitempty"`
3207}
3208
3209// DiskListIterator provides access to a complete listing of Disk values.
3210type DiskListIterator struct {
3211	i    int
3212	page DiskListPage
3213}
3214
3215// NextWithContext advances to the next value.  If there was an error making
3216// the request the iterator does not advance and the error is returned.
3217func (iter *DiskListIterator) NextWithContext(ctx context.Context) (err error) {
3218	if tracing.IsEnabled() {
3219		ctx = tracing.StartSpan(ctx, fqdn+"/DiskListIterator.NextWithContext")
3220		defer func() {
3221			sc := -1
3222			if iter.Response().Response.Response != nil {
3223				sc = iter.Response().Response.Response.StatusCode
3224			}
3225			tracing.EndSpan(ctx, sc, err)
3226		}()
3227	}
3228	iter.i++
3229	if iter.i < len(iter.page.Values()) {
3230		return nil
3231	}
3232	err = iter.page.NextWithContext(ctx)
3233	if err != nil {
3234		iter.i--
3235		return err
3236	}
3237	iter.i = 0
3238	return nil
3239}
3240
3241// Next advances to the next value.  If there was an error making
3242// the request the iterator does not advance and the error is returned.
3243// Deprecated: Use NextWithContext() instead.
3244func (iter *DiskListIterator) Next() error {
3245	return iter.NextWithContext(context.Background())
3246}
3247
3248// NotDone returns true if the enumeration should be started or is not yet complete.
3249func (iter DiskListIterator) NotDone() bool {
3250	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3251}
3252
3253// Response returns the raw server response from the last page request.
3254func (iter DiskListIterator) Response() DiskList {
3255	return iter.page.Response()
3256}
3257
3258// Value returns the current value or a zero-initialized value if the
3259// iterator has advanced beyond the end of the collection.
3260func (iter DiskListIterator) Value() Disk {
3261	if !iter.page.NotDone() {
3262		return Disk{}
3263	}
3264	return iter.page.Values()[iter.i]
3265}
3266
3267// Creates a new instance of the DiskListIterator type.
3268func NewDiskListIterator(page DiskListPage) DiskListIterator {
3269	return DiskListIterator{page: page}
3270}
3271
3272// IsEmpty returns true if the ListResult contains no values.
3273func (dl DiskList) IsEmpty() bool {
3274	return dl.Value == nil || len(*dl.Value) == 0
3275}
3276
3277// hasNextLink returns true if the NextLink is not empty.
3278func (dl DiskList) hasNextLink() bool {
3279	return dl.NextLink != nil && len(*dl.NextLink) != 0
3280}
3281
3282// diskListPreparer prepares a request to retrieve the next set of results.
3283// It returns nil if no more results exist.
3284func (dl DiskList) diskListPreparer(ctx context.Context) (*http.Request, error) {
3285	if !dl.hasNextLink() {
3286		return nil, nil
3287	}
3288	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3289		autorest.AsJSON(),
3290		autorest.AsGet(),
3291		autorest.WithBaseURL(to.String(dl.NextLink)))
3292}
3293
3294// DiskListPage contains a page of Disk values.
3295type DiskListPage struct {
3296	fn func(context.Context, DiskList) (DiskList, error)
3297	dl DiskList
3298}
3299
3300// NextWithContext advances to the next page of values.  If there was an error making
3301// the request the page does not advance and the error is returned.
3302func (page *DiskListPage) NextWithContext(ctx context.Context) (err error) {
3303	if tracing.IsEnabled() {
3304		ctx = tracing.StartSpan(ctx, fqdn+"/DiskListPage.NextWithContext")
3305		defer func() {
3306			sc := -1
3307			if page.Response().Response.Response != nil {
3308				sc = page.Response().Response.Response.StatusCode
3309			}
3310			tracing.EndSpan(ctx, sc, err)
3311		}()
3312	}
3313	for {
3314		next, err := page.fn(ctx, page.dl)
3315		if err != nil {
3316			return err
3317		}
3318		page.dl = next
3319		if !next.hasNextLink() || !next.IsEmpty() {
3320			break
3321		}
3322	}
3323	return nil
3324}
3325
3326// Next advances to the next page of values.  If there was an error making
3327// the request the page does not advance and the error is returned.
3328// Deprecated: Use NextWithContext() instead.
3329func (page *DiskListPage) Next() error {
3330	return page.NextWithContext(context.Background())
3331}
3332
3333// NotDone returns true if the page enumeration should be started or is not yet complete.
3334func (page DiskListPage) NotDone() bool {
3335	return !page.dl.IsEmpty()
3336}
3337
3338// Response returns the raw server response from the last page request.
3339func (page DiskListPage) Response() DiskList {
3340	return page.dl
3341}
3342
3343// Values returns the slice of values for the current page or nil if there are no values.
3344func (page DiskListPage) Values() []Disk {
3345	if page.dl.IsEmpty() {
3346		return nil
3347	}
3348	return *page.dl.Value
3349}
3350
3351// Creates a new instance of the DiskListPage type.
3352func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
3353	return DiskListPage{
3354		fn: getNextPage,
3355		dl: cur,
3356	}
3357}
3358
3359// DiskProperties disk resource properties.
3360type DiskProperties struct {
3361	// TimeCreated - READ-ONLY; The time when the disk was created.
3362	TimeCreated *date.Time `json:"timeCreated,omitempty"`
3363	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
3364	OsType OperatingSystemTypes `json:"osType,omitempty"`
3365	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
3366	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
3367	// CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
3368	CreationData *CreationData `json:"creationData,omitempty"`
3369	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
3370	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
3371	// DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
3372	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
3373	// UniqueID - READ-ONLY; Unique Guid identifying the resource.
3374	UniqueID *string `json:"uniqueId,omitempty"`
3375	// EncryptionSettingsCollection - Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
3376	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
3377	// ProvisioningState - READ-ONLY; The disk provisioning state.
3378	ProvisioningState *string `json:"provisioningState,omitempty"`
3379	// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
3380	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
3381	// DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
3382	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
3383	// DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
3384	DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
3385	// DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
3386	DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
3387	// DiskState - READ-ONLY; The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
3388	DiskState DiskState `json:"diskState,omitempty"`
3389	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
3390	Encryption *Encryption `json:"encryption,omitempty"`
3391	// MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
3392	MaxShares *int32 `json:"maxShares,omitempty"`
3393	// ShareInfo - READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
3394	ShareInfo *[]ShareInfoElement `json:"shareInfo,omitempty"`
3395	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
3396	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
3397	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
3398	DiskAccessID *string `json:"diskAccessId,omitempty"`
3399}
3400
3401// MarshalJSON is the custom marshaler for DiskProperties.
3402func (dp DiskProperties) MarshalJSON() ([]byte, error) {
3403	objectMap := make(map[string]interface{})
3404	if dp.OsType != "" {
3405		objectMap["osType"] = dp.OsType
3406	}
3407	if dp.HyperVGeneration != "" {
3408		objectMap["hyperVGeneration"] = dp.HyperVGeneration
3409	}
3410	if dp.CreationData != nil {
3411		objectMap["creationData"] = dp.CreationData
3412	}
3413	if dp.DiskSizeGB != nil {
3414		objectMap["diskSizeGB"] = dp.DiskSizeGB
3415	}
3416	if dp.EncryptionSettingsCollection != nil {
3417		objectMap["encryptionSettingsCollection"] = dp.EncryptionSettingsCollection
3418	}
3419	if dp.DiskIOPSReadWrite != nil {
3420		objectMap["diskIOPSReadWrite"] = dp.DiskIOPSReadWrite
3421	}
3422	if dp.DiskMBpsReadWrite != nil {
3423		objectMap["diskMBpsReadWrite"] = dp.DiskMBpsReadWrite
3424	}
3425	if dp.DiskIOPSReadOnly != nil {
3426		objectMap["diskIOPSReadOnly"] = dp.DiskIOPSReadOnly
3427	}
3428	if dp.DiskMBpsReadOnly != nil {
3429		objectMap["diskMBpsReadOnly"] = dp.DiskMBpsReadOnly
3430	}
3431	if dp.Encryption != nil {
3432		objectMap["encryption"] = dp.Encryption
3433	}
3434	if dp.MaxShares != nil {
3435		objectMap["maxShares"] = dp.MaxShares
3436	}
3437	if dp.NetworkAccessPolicy != "" {
3438		objectMap["networkAccessPolicy"] = dp.NetworkAccessPolicy
3439	}
3440	if dp.DiskAccessID != nil {
3441		objectMap["diskAccessId"] = dp.DiskAccessID
3442	}
3443	return json.Marshal(objectMap)
3444}
3445
3446// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3447// operation.
3448type DisksCreateOrUpdateFuture struct {
3449	azure.FutureAPI
3450	// Result returns the result of the asynchronous operation.
3451	// If the operation has not completed it will return an error.
3452	Result func(DisksClient) (Disk, error)
3453}
3454
3455// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3456func (future *DisksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3457	var azFuture azure.Future
3458	if err := json.Unmarshal(body, &azFuture); err != nil {
3459		return err
3460	}
3461	future.FutureAPI = &azFuture
3462	future.Result = future.result
3463	return nil
3464}
3465
3466// result is the default implementation for DisksCreateOrUpdateFuture.Result.
3467func (future *DisksCreateOrUpdateFuture) result(client DisksClient) (d Disk, err error) {
3468	var done bool
3469	done, err = future.DoneWithContext(context.Background(), client)
3470	if err != nil {
3471		err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3472		return
3473	}
3474	if !done {
3475		d.Response.Response = future.Response()
3476		err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
3477		return
3478	}
3479	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3480	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
3481		d, err = client.CreateOrUpdateResponder(d.Response.Response)
3482		if err != nil {
3483			err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
3484		}
3485	}
3486	return
3487}
3488
3489// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3490type DisksDeleteFuture struct {
3491	azure.FutureAPI
3492	// Result returns the result of the asynchronous operation.
3493	// If the operation has not completed it will return an error.
3494	Result func(DisksClient) (autorest.Response, error)
3495}
3496
3497// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3498func (future *DisksDeleteFuture) UnmarshalJSON(body []byte) error {
3499	var azFuture azure.Future
3500	if err := json.Unmarshal(body, &azFuture); err != nil {
3501		return err
3502	}
3503	future.FutureAPI = &azFuture
3504	future.Result = future.result
3505	return nil
3506}
3507
3508// result is the default implementation for DisksDeleteFuture.Result.
3509func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Response, err error) {
3510	var done bool
3511	done, err = future.DoneWithContext(context.Background(), client)
3512	if err != nil {
3513		err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Polling failure")
3514		return
3515	}
3516	if !done {
3517		ar.Response = future.Response()
3518		err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
3519		return
3520	}
3521	ar.Response = future.Response()
3522	return
3523}
3524
3525// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
3526// operation.
3527type DisksGrantAccessFuture struct {
3528	azure.FutureAPI
3529	// Result returns the result of the asynchronous operation.
3530	// If the operation has not completed it will return an error.
3531	Result func(DisksClient) (AccessURI, error)
3532}
3533
3534// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3535func (future *DisksGrantAccessFuture) UnmarshalJSON(body []byte) error {
3536	var azFuture azure.Future
3537	if err := json.Unmarshal(body, &azFuture); err != nil {
3538		return err
3539	}
3540	future.FutureAPI = &azFuture
3541	future.Result = future.result
3542	return nil
3543}
3544
3545// result is the default implementation for DisksGrantAccessFuture.Result.
3546func (future *DisksGrantAccessFuture) result(client DisksClient) (au AccessURI, err error) {
3547	var done bool
3548	done, err = future.DoneWithContext(context.Background(), client)
3549	if err != nil {
3550		err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Polling failure")
3551		return
3552	}
3553	if !done {
3554		au.Response.Response = future.Response()
3555		err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
3556		return
3557	}
3558	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3559	if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
3560		au, err = client.GrantAccessResponder(au.Response.Response)
3561		if err != nil {
3562			err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
3563		}
3564	}
3565	return
3566}
3567
3568// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.
3569type DiskSku struct {
3570	// Name - The sku name. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS', 'UltraSSDLRS'
3571	Name DiskStorageAccountTypes `json:"name,omitempty"`
3572	// Tier - READ-ONLY; The sku tier.
3573	Tier *string `json:"tier,omitempty"`
3574}
3575
3576// MarshalJSON is the custom marshaler for DiskSku.
3577func (ds DiskSku) MarshalJSON() ([]byte, error) {
3578	objectMap := make(map[string]interface{})
3579	if ds.Name != "" {
3580		objectMap["name"] = ds.Name
3581	}
3582	return json.Marshal(objectMap)
3583}
3584
3585// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
3586// operation.
3587type DisksRevokeAccessFuture struct {
3588	azure.FutureAPI
3589	// Result returns the result of the asynchronous operation.
3590	// If the operation has not completed it will return an error.
3591	Result func(DisksClient) (autorest.Response, error)
3592}
3593
3594// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3595func (future *DisksRevokeAccessFuture) UnmarshalJSON(body []byte) error {
3596	var azFuture azure.Future
3597	if err := json.Unmarshal(body, &azFuture); err != nil {
3598		return err
3599	}
3600	future.FutureAPI = &azFuture
3601	future.Result = future.result
3602	return nil
3603}
3604
3605// result is the default implementation for DisksRevokeAccessFuture.Result.
3606func (future *DisksRevokeAccessFuture) result(client DisksClient) (ar autorest.Response, err error) {
3607	var done bool
3608	done, err = future.DoneWithContext(context.Background(), client)
3609	if err != nil {
3610		err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Polling failure")
3611		return
3612	}
3613	if !done {
3614		ar.Response = future.Response()
3615		err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
3616		return
3617	}
3618	ar.Response = future.Response()
3619	return
3620}
3621
3622// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3623type DisksUpdateFuture struct {
3624	azure.FutureAPI
3625	// Result returns the result of the asynchronous operation.
3626	// If the operation has not completed it will return an error.
3627	Result func(DisksClient) (Disk, error)
3628}
3629
3630// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3631func (future *DisksUpdateFuture) UnmarshalJSON(body []byte) error {
3632	var azFuture azure.Future
3633	if err := json.Unmarshal(body, &azFuture); err != nil {
3634		return err
3635	}
3636	future.FutureAPI = &azFuture
3637	future.Result = future.result
3638	return nil
3639}
3640
3641// result is the default implementation for DisksUpdateFuture.Result.
3642func (future *DisksUpdateFuture) result(client DisksClient) (d Disk, err error) {
3643	var done bool
3644	done, err = future.DoneWithContext(context.Background(), client)
3645	if err != nil {
3646		err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Polling failure")
3647		return
3648	}
3649	if !done {
3650		d.Response.Response = future.Response()
3651		err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
3652		return
3653	}
3654	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3655	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
3656		d, err = client.UpdateResponder(d.Response.Response)
3657		if err != nil {
3658			err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
3659		}
3660	}
3661	return
3662}
3663
3664// DiskUpdate disk update resource.
3665type DiskUpdate struct {
3666	*DiskUpdateProperties `json:"properties,omitempty"`
3667	// Tags - Resource tags
3668	Tags map[string]*string `json:"tags"`
3669	Sku  *DiskSku           `json:"sku,omitempty"`
3670}
3671
3672// MarshalJSON is the custom marshaler for DiskUpdate.
3673func (du DiskUpdate) MarshalJSON() ([]byte, error) {
3674	objectMap := make(map[string]interface{})
3675	if du.DiskUpdateProperties != nil {
3676		objectMap["properties"] = du.DiskUpdateProperties
3677	}
3678	if du.Tags != nil {
3679		objectMap["tags"] = du.Tags
3680	}
3681	if du.Sku != nil {
3682		objectMap["sku"] = du.Sku
3683	}
3684	return json.Marshal(objectMap)
3685}
3686
3687// UnmarshalJSON is the custom unmarshaler for DiskUpdate struct.
3688func (du *DiskUpdate) UnmarshalJSON(body []byte) error {
3689	var m map[string]*json.RawMessage
3690	err := json.Unmarshal(body, &m)
3691	if err != nil {
3692		return err
3693	}
3694	for k, v := range m {
3695		switch k {
3696		case "properties":
3697			if v != nil {
3698				var diskUpdateProperties DiskUpdateProperties
3699				err = json.Unmarshal(*v, &diskUpdateProperties)
3700				if err != nil {
3701					return err
3702				}
3703				du.DiskUpdateProperties = &diskUpdateProperties
3704			}
3705		case "tags":
3706			if v != nil {
3707				var tags map[string]*string
3708				err = json.Unmarshal(*v, &tags)
3709				if err != nil {
3710					return err
3711				}
3712				du.Tags = tags
3713			}
3714		case "sku":
3715			if v != nil {
3716				var sku DiskSku
3717				err = json.Unmarshal(*v, &sku)
3718				if err != nil {
3719					return err
3720				}
3721				du.Sku = &sku
3722			}
3723		}
3724	}
3725
3726	return nil
3727}
3728
3729// DiskUpdateProperties disk resource update properties.
3730type DiskUpdateProperties struct {
3731	// OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
3732	OsType OperatingSystemTypes `json:"osType,omitempty"`
3733	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
3734	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
3735	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
3736	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
3737	// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
3738	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
3739	// DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
3740	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
3741	// DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
3742	DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
3743	// DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
3744	DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
3745	// MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
3746	MaxShares *int32 `json:"maxShares,omitempty"`
3747	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
3748	Encryption *Encryption `json:"encryption,omitempty"`
3749	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
3750	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
3751	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
3752	DiskAccessID *string `json:"diskAccessId,omitempty"`
3753}
3754
3755// Encryption encryption at rest settings for disk or snapshot
3756type Encryption struct {
3757	// DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest.
3758	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
3759	// Type - Possible values include: 'EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys'
3760	Type EncryptionType `json:"type,omitempty"`
3761}
3762
3763// EncryptionImages optional. Allows users to provide customer managed keys for encrypting the OS and data
3764// disks in the gallery artifact.
3765type EncryptionImages struct {
3766	OsDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"`
3767	// DataDiskImages - A list of encryption specifications for data disk images.
3768	DataDiskImages *[]DataDiskImageEncryption `json:"dataDiskImages,omitempty"`
3769}
3770
3771// EncryptionSetIdentity the managed identity for the disk encryption set. It should be given permission on
3772// the key vault before it can be used to encrypt disks.
3773type EncryptionSetIdentity struct {
3774	// Type - The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported. Possible values include: 'SystemAssigned'
3775	Type DiskEncryptionSetIdentityType `json:"type,omitempty"`
3776	// PrincipalID - READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity
3777	PrincipalID *string `json:"principalId,omitempty"`
3778	// TenantID - READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity
3779	TenantID *string `json:"tenantId,omitempty"`
3780}
3781
3782// MarshalJSON is the custom marshaler for EncryptionSetIdentity.
3783func (esi EncryptionSetIdentity) MarshalJSON() ([]byte, error) {
3784	objectMap := make(map[string]interface{})
3785	if esi.Type != "" {
3786		objectMap["type"] = esi.Type
3787	}
3788	return json.Marshal(objectMap)
3789}
3790
3791// EncryptionSetProperties ...
3792type EncryptionSetProperties struct {
3793	// EncryptionType - Possible values include: 'EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys'
3794	EncryptionType EncryptionType `json:"encryptionType,omitempty"`
3795	// ActiveKey - The key vault key which is currently used by this disk encryption set.
3796	ActiveKey *KeyVaultAndKeyReference `json:"activeKey,omitempty"`
3797	// PreviousKeys - READ-ONLY; A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation.
3798	PreviousKeys *[]KeyVaultAndKeyReference `json:"previousKeys,omitempty"`
3799	// ProvisioningState - READ-ONLY; The disk encryption set provisioning state.
3800	ProvisioningState *string `json:"provisioningState,omitempty"`
3801}
3802
3803// MarshalJSON is the custom marshaler for EncryptionSetProperties.
3804func (esp EncryptionSetProperties) MarshalJSON() ([]byte, error) {
3805	objectMap := make(map[string]interface{})
3806	if esp.EncryptionType != "" {
3807		objectMap["encryptionType"] = esp.EncryptionType
3808	}
3809	if esp.ActiveKey != nil {
3810		objectMap["activeKey"] = esp.ActiveKey
3811	}
3812	return json.Marshal(objectMap)
3813}
3814
3815// EncryptionSettingsCollection encryption settings for disk or snapshot
3816type EncryptionSettingsCollection struct {
3817	// Enabled - Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.
3818	Enabled *bool `json:"enabled,omitempty"`
3819	// EncryptionSettings - A collection of encryption settings, one for each disk volume.
3820	EncryptionSettings *[]EncryptionSettingsElement `json:"encryptionSettings,omitempty"`
3821	// EncryptionSettingsVersion - Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.
3822	EncryptionSettingsVersion *string `json:"encryptionSettingsVersion,omitempty"`
3823}
3824
3825// EncryptionSettingsElement encryption settings for one disk volume.
3826type EncryptionSettingsElement struct {
3827	// DiskEncryptionKey - Key Vault Secret Url and vault id of the disk encryption key
3828	DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"`
3829	// KeyEncryptionKey - Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.
3830	KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"`
3831}
3832
3833// GalleriesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3834// operation.
3835type GalleriesCreateOrUpdateFuture struct {
3836	azure.FutureAPI
3837	// Result returns the result of the asynchronous operation.
3838	// If the operation has not completed it will return an error.
3839	Result func(GalleriesClient) (Gallery, error)
3840}
3841
3842// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3843func (future *GalleriesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3844	var azFuture azure.Future
3845	if err := json.Unmarshal(body, &azFuture); err != nil {
3846		return err
3847	}
3848	future.FutureAPI = &azFuture
3849	future.Result = future.result
3850	return nil
3851}
3852
3853// result is the default implementation for GalleriesCreateOrUpdateFuture.Result.
3854func (future *GalleriesCreateOrUpdateFuture) result(client GalleriesClient) (g Gallery, err error) {
3855	var done bool
3856	done, err = future.DoneWithContext(context.Background(), client)
3857	if err != nil {
3858		err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3859		return
3860	}
3861	if !done {
3862		g.Response.Response = future.Response()
3863		err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture")
3864		return
3865	}
3866	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3867	if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
3868		g, err = client.CreateOrUpdateResponder(g.Response.Response)
3869		if err != nil {
3870			err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
3871		}
3872	}
3873	return
3874}
3875
3876// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
3877// operation.
3878type GalleriesDeleteFuture struct {
3879	azure.FutureAPI
3880	// Result returns the result of the asynchronous operation.
3881	// If the operation has not completed it will return an error.
3882	Result func(GalleriesClient) (autorest.Response, error)
3883}
3884
3885// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3886func (future *GalleriesDeleteFuture) UnmarshalJSON(body []byte) error {
3887	var azFuture azure.Future
3888	if err := json.Unmarshal(body, &azFuture); err != nil {
3889		return err
3890	}
3891	future.FutureAPI = &azFuture
3892	future.Result = future.result
3893	return nil
3894}
3895
3896// result is the default implementation for GalleriesDeleteFuture.Result.
3897func (future *GalleriesDeleteFuture) result(client GalleriesClient) (ar autorest.Response, err error) {
3898	var done bool
3899	done, err = future.DoneWithContext(context.Background(), client)
3900	if err != nil {
3901		err = autorest.NewErrorWithError(err, "compute.GalleriesDeleteFuture", "Result", future.Response(), "Polling failure")
3902		return
3903	}
3904	if !done {
3905		ar.Response = future.Response()
3906		err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture")
3907		return
3908	}
3909	ar.Response = future.Response()
3910	return
3911}
3912
3913// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3914// operation.
3915type GalleriesUpdateFuture struct {
3916	azure.FutureAPI
3917	// Result returns the result of the asynchronous operation.
3918	// If the operation has not completed it will return an error.
3919	Result func(GalleriesClient) (Gallery, error)
3920}
3921
3922// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3923func (future *GalleriesUpdateFuture) UnmarshalJSON(body []byte) error {
3924	var azFuture azure.Future
3925	if err := json.Unmarshal(body, &azFuture); err != nil {
3926		return err
3927	}
3928	future.FutureAPI = &azFuture
3929	future.Result = future.result
3930	return nil
3931}
3932
3933// result is the default implementation for GalleriesUpdateFuture.Result.
3934func (future *GalleriesUpdateFuture) result(client GalleriesClient) (g Gallery, err error) {
3935	var done bool
3936	done, err = future.DoneWithContext(context.Background(), client)
3937	if err != nil {
3938		err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", future.Response(), "Polling failure")
3939		return
3940	}
3941	if !done {
3942		g.Response.Response = future.Response()
3943		err = azure.NewAsyncOpIncompleteError("compute.GalleriesUpdateFuture")
3944		return
3945	}
3946	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3947	if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
3948		g, err = client.UpdateResponder(g.Response.Response)
3949		if err != nil {
3950			err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
3951		}
3952	}
3953	return
3954}
3955
3956// Gallery specifies information about the Shared Image Gallery that you want to create or update.
3957type Gallery struct {
3958	autorest.Response  `json:"-"`
3959	*GalleryProperties `json:"properties,omitempty"`
3960	// ID - READ-ONLY; Resource Id
3961	ID *string `json:"id,omitempty"`
3962	// Name - READ-ONLY; Resource name
3963	Name *string `json:"name,omitempty"`
3964	// Type - READ-ONLY; Resource type
3965	Type *string `json:"type,omitempty"`
3966	// Location - Resource location
3967	Location *string `json:"location,omitempty"`
3968	// Tags - Resource tags
3969	Tags map[string]*string `json:"tags"`
3970}
3971
3972// MarshalJSON is the custom marshaler for Gallery.
3973func (g Gallery) MarshalJSON() ([]byte, error) {
3974	objectMap := make(map[string]interface{})
3975	if g.GalleryProperties != nil {
3976		objectMap["properties"] = g.GalleryProperties
3977	}
3978	if g.Location != nil {
3979		objectMap["location"] = g.Location
3980	}
3981	if g.Tags != nil {
3982		objectMap["tags"] = g.Tags
3983	}
3984	return json.Marshal(objectMap)
3985}
3986
3987// UnmarshalJSON is the custom unmarshaler for Gallery struct.
3988func (g *Gallery) UnmarshalJSON(body []byte) error {
3989	var m map[string]*json.RawMessage
3990	err := json.Unmarshal(body, &m)
3991	if err != nil {
3992		return err
3993	}
3994	for k, v := range m {
3995		switch k {
3996		case "properties":
3997			if v != nil {
3998				var galleryProperties GalleryProperties
3999				err = json.Unmarshal(*v, &galleryProperties)
4000				if err != nil {
4001					return err
4002				}
4003				g.GalleryProperties = &galleryProperties
4004			}
4005		case "id":
4006			if v != nil {
4007				var ID string
4008				err = json.Unmarshal(*v, &ID)
4009				if err != nil {
4010					return err
4011				}
4012				g.ID = &ID
4013			}
4014		case "name":
4015			if v != nil {
4016				var name string
4017				err = json.Unmarshal(*v, &name)
4018				if err != nil {
4019					return err
4020				}
4021				g.Name = &name
4022			}
4023		case "type":
4024			if v != nil {
4025				var typeVar string
4026				err = json.Unmarshal(*v, &typeVar)
4027				if err != nil {
4028					return err
4029				}
4030				g.Type = &typeVar
4031			}
4032		case "location":
4033			if v != nil {
4034				var location string
4035				err = json.Unmarshal(*v, &location)
4036				if err != nil {
4037					return err
4038				}
4039				g.Location = &location
4040			}
4041		case "tags":
4042			if v != nil {
4043				var tags map[string]*string
4044				err = json.Unmarshal(*v, &tags)
4045				if err != nil {
4046					return err
4047				}
4048				g.Tags = tags
4049			}
4050		}
4051	}
4052
4053	return nil
4054}
4055
4056// GalleryApplication specifies information about the gallery Application Definition that you want to
4057// create or update.
4058type GalleryApplication struct {
4059	autorest.Response             `json:"-"`
4060	*GalleryApplicationProperties `json:"properties,omitempty"`
4061	// ID - READ-ONLY; Resource Id
4062	ID *string `json:"id,omitempty"`
4063	// Name - READ-ONLY; Resource name
4064	Name *string `json:"name,omitempty"`
4065	// Type - READ-ONLY; Resource type
4066	Type *string `json:"type,omitempty"`
4067	// Location - Resource location
4068	Location *string `json:"location,omitempty"`
4069	// Tags - Resource tags
4070	Tags map[string]*string `json:"tags"`
4071}
4072
4073// MarshalJSON is the custom marshaler for GalleryApplication.
4074func (ga GalleryApplication) MarshalJSON() ([]byte, error) {
4075	objectMap := make(map[string]interface{})
4076	if ga.GalleryApplicationProperties != nil {
4077		objectMap["properties"] = ga.GalleryApplicationProperties
4078	}
4079	if ga.Location != nil {
4080		objectMap["location"] = ga.Location
4081	}
4082	if ga.Tags != nil {
4083		objectMap["tags"] = ga.Tags
4084	}
4085	return json.Marshal(objectMap)
4086}
4087
4088// UnmarshalJSON is the custom unmarshaler for GalleryApplication struct.
4089func (ga *GalleryApplication) UnmarshalJSON(body []byte) error {
4090	var m map[string]*json.RawMessage
4091	err := json.Unmarshal(body, &m)
4092	if err != nil {
4093		return err
4094	}
4095	for k, v := range m {
4096		switch k {
4097		case "properties":
4098			if v != nil {
4099				var galleryApplicationProperties GalleryApplicationProperties
4100				err = json.Unmarshal(*v, &galleryApplicationProperties)
4101				if err != nil {
4102					return err
4103				}
4104				ga.GalleryApplicationProperties = &galleryApplicationProperties
4105			}
4106		case "id":
4107			if v != nil {
4108				var ID string
4109				err = json.Unmarshal(*v, &ID)
4110				if err != nil {
4111					return err
4112				}
4113				ga.ID = &ID
4114			}
4115		case "name":
4116			if v != nil {
4117				var name string
4118				err = json.Unmarshal(*v, &name)
4119				if err != nil {
4120					return err
4121				}
4122				ga.Name = &name
4123			}
4124		case "type":
4125			if v != nil {
4126				var typeVar string
4127				err = json.Unmarshal(*v, &typeVar)
4128				if err != nil {
4129					return err
4130				}
4131				ga.Type = &typeVar
4132			}
4133		case "location":
4134			if v != nil {
4135				var location string
4136				err = json.Unmarshal(*v, &location)
4137				if err != nil {
4138					return err
4139				}
4140				ga.Location = &location
4141			}
4142		case "tags":
4143			if v != nil {
4144				var tags map[string]*string
4145				err = json.Unmarshal(*v, &tags)
4146				if err != nil {
4147					return err
4148				}
4149				ga.Tags = tags
4150			}
4151		}
4152	}
4153
4154	return nil
4155}
4156
4157// GalleryApplicationList the List Gallery Applications operation response.
4158type GalleryApplicationList struct {
4159	autorest.Response `json:"-"`
4160	// Value - A list of Gallery Applications.
4161	Value *[]GalleryApplication `json:"value,omitempty"`
4162	// NextLink - The uri to fetch the next page of Application Definitions in the Application Gallery. Call ListNext() with this to fetch the next page of gallery Application Definitions.
4163	NextLink *string `json:"nextLink,omitempty"`
4164}
4165
4166// GalleryApplicationListIterator provides access to a complete listing of GalleryApplication values.
4167type GalleryApplicationListIterator struct {
4168	i    int
4169	page GalleryApplicationListPage
4170}
4171
4172// NextWithContext advances to the next value.  If there was an error making
4173// the request the iterator does not advance and the error is returned.
4174func (iter *GalleryApplicationListIterator) NextWithContext(ctx context.Context) (err error) {
4175	if tracing.IsEnabled() {
4176		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListIterator.NextWithContext")
4177		defer func() {
4178			sc := -1
4179			if iter.Response().Response.Response != nil {
4180				sc = iter.Response().Response.Response.StatusCode
4181			}
4182			tracing.EndSpan(ctx, sc, err)
4183		}()
4184	}
4185	iter.i++
4186	if iter.i < len(iter.page.Values()) {
4187		return nil
4188	}
4189	err = iter.page.NextWithContext(ctx)
4190	if err != nil {
4191		iter.i--
4192		return err
4193	}
4194	iter.i = 0
4195	return nil
4196}
4197
4198// Next advances to the next value.  If there was an error making
4199// the request the iterator does not advance and the error is returned.
4200// Deprecated: Use NextWithContext() instead.
4201func (iter *GalleryApplicationListIterator) Next() error {
4202	return iter.NextWithContext(context.Background())
4203}
4204
4205// NotDone returns true if the enumeration should be started or is not yet complete.
4206func (iter GalleryApplicationListIterator) NotDone() bool {
4207	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4208}
4209
4210// Response returns the raw server response from the last page request.
4211func (iter GalleryApplicationListIterator) Response() GalleryApplicationList {
4212	return iter.page.Response()
4213}
4214
4215// Value returns the current value or a zero-initialized value if the
4216// iterator has advanced beyond the end of the collection.
4217func (iter GalleryApplicationListIterator) Value() GalleryApplication {
4218	if !iter.page.NotDone() {
4219		return GalleryApplication{}
4220	}
4221	return iter.page.Values()[iter.i]
4222}
4223
4224// Creates a new instance of the GalleryApplicationListIterator type.
4225func NewGalleryApplicationListIterator(page GalleryApplicationListPage) GalleryApplicationListIterator {
4226	return GalleryApplicationListIterator{page: page}
4227}
4228
4229// IsEmpty returns true if the ListResult contains no values.
4230func (gal GalleryApplicationList) IsEmpty() bool {
4231	return gal.Value == nil || len(*gal.Value) == 0
4232}
4233
4234// hasNextLink returns true if the NextLink is not empty.
4235func (gal GalleryApplicationList) hasNextLink() bool {
4236	return gal.NextLink != nil && len(*gal.NextLink) != 0
4237}
4238
4239// galleryApplicationListPreparer prepares a request to retrieve the next set of results.
4240// It returns nil if no more results exist.
4241func (gal GalleryApplicationList) galleryApplicationListPreparer(ctx context.Context) (*http.Request, error) {
4242	if !gal.hasNextLink() {
4243		return nil, nil
4244	}
4245	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4246		autorest.AsJSON(),
4247		autorest.AsGet(),
4248		autorest.WithBaseURL(to.String(gal.NextLink)))
4249}
4250
4251// GalleryApplicationListPage contains a page of GalleryApplication values.
4252type GalleryApplicationListPage struct {
4253	fn  func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)
4254	gal GalleryApplicationList
4255}
4256
4257// NextWithContext advances to the next page of values.  If there was an error making
4258// the request the page does not advance and the error is returned.
4259func (page *GalleryApplicationListPage) NextWithContext(ctx context.Context) (err error) {
4260	if tracing.IsEnabled() {
4261		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListPage.NextWithContext")
4262		defer func() {
4263			sc := -1
4264			if page.Response().Response.Response != nil {
4265				sc = page.Response().Response.Response.StatusCode
4266			}
4267			tracing.EndSpan(ctx, sc, err)
4268		}()
4269	}
4270	for {
4271		next, err := page.fn(ctx, page.gal)
4272		if err != nil {
4273			return err
4274		}
4275		page.gal = next
4276		if !next.hasNextLink() || !next.IsEmpty() {
4277			break
4278		}
4279	}
4280	return nil
4281}
4282
4283// Next advances to the next page of values.  If there was an error making
4284// the request the page does not advance and the error is returned.
4285// Deprecated: Use NextWithContext() instead.
4286func (page *GalleryApplicationListPage) Next() error {
4287	return page.NextWithContext(context.Background())
4288}
4289
4290// NotDone returns true if the page enumeration should be started or is not yet complete.
4291func (page GalleryApplicationListPage) NotDone() bool {
4292	return !page.gal.IsEmpty()
4293}
4294
4295// Response returns the raw server response from the last page request.
4296func (page GalleryApplicationListPage) Response() GalleryApplicationList {
4297	return page.gal
4298}
4299
4300// Values returns the slice of values for the current page or nil if there are no values.
4301func (page GalleryApplicationListPage) Values() []GalleryApplication {
4302	if page.gal.IsEmpty() {
4303		return nil
4304	}
4305	return *page.gal.Value
4306}
4307
4308// Creates a new instance of the GalleryApplicationListPage type.
4309func NewGalleryApplicationListPage(cur GalleryApplicationList, getNextPage func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)) GalleryApplicationListPage {
4310	return GalleryApplicationListPage{
4311		fn:  getNextPage,
4312		gal: cur,
4313	}
4314}
4315
4316// GalleryApplicationProperties describes the properties of a gallery Application Definition.
4317type GalleryApplicationProperties struct {
4318	// Description - The description of this gallery Application Definition resource. This property is updatable.
4319	Description *string `json:"description,omitempty"`
4320	// Eula - The Eula agreement for the gallery Application Definition.
4321	Eula *string `json:"eula,omitempty"`
4322	// PrivacyStatementURI - The privacy statement uri.
4323	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
4324	// ReleaseNoteURI - The release note uri.
4325	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
4326	// EndOfLifeDate - The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable.
4327	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
4328	// SupportedOSType - This property allows you to specify the supported type of the OS that application is built for. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
4329	SupportedOSType OperatingSystemTypes `json:"supportedOSType,omitempty"`
4330}
4331
4332// GalleryApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4333// long-running operation.
4334type GalleryApplicationsCreateOrUpdateFuture struct {
4335	azure.FutureAPI
4336	// Result returns the result of the asynchronous operation.
4337	// If the operation has not completed it will return an error.
4338	Result func(GalleryApplicationsClient) (GalleryApplication, error)
4339}
4340
4341// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4342func (future *GalleryApplicationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4343	var azFuture azure.Future
4344	if err := json.Unmarshal(body, &azFuture); err != nil {
4345		return err
4346	}
4347	future.FutureAPI = &azFuture
4348	future.Result = future.result
4349	return nil
4350}
4351
4352// result is the default implementation for GalleryApplicationsCreateOrUpdateFuture.Result.
4353func (future *GalleryApplicationsCreateOrUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
4354	var done bool
4355	done, err = future.DoneWithContext(context.Background(), client)
4356	if err != nil {
4357		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4358		return
4359	}
4360	if !done {
4361		ga.Response.Response = future.Response()
4362		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsCreateOrUpdateFuture")
4363		return
4364	}
4365	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4366	if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
4367		ga, err = client.CreateOrUpdateResponder(ga.Response.Response)
4368		if err != nil {
4369			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
4370		}
4371	}
4372	return
4373}
4374
4375// GalleryApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a
4376// long-running operation.
4377type GalleryApplicationsDeleteFuture struct {
4378	azure.FutureAPI
4379	// Result returns the result of the asynchronous operation.
4380	// If the operation has not completed it will return an error.
4381	Result func(GalleryApplicationsClient) (autorest.Response, error)
4382}
4383
4384// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4385func (future *GalleryApplicationsDeleteFuture) UnmarshalJSON(body []byte) error {
4386	var azFuture azure.Future
4387	if err := json.Unmarshal(body, &azFuture); err != nil {
4388		return err
4389	}
4390	future.FutureAPI = &azFuture
4391	future.Result = future.result
4392	return nil
4393}
4394
4395// result is the default implementation for GalleryApplicationsDeleteFuture.Result.
4396func (future *GalleryApplicationsDeleteFuture) result(client GalleryApplicationsClient) (ar autorest.Response, err error) {
4397	var done bool
4398	done, err = future.DoneWithContext(context.Background(), client)
4399	if err != nil {
4400		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsDeleteFuture", "Result", future.Response(), "Polling failure")
4401		return
4402	}
4403	if !done {
4404		ar.Response = future.Response()
4405		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsDeleteFuture")
4406		return
4407	}
4408	ar.Response = future.Response()
4409	return
4410}
4411
4412// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a
4413// long-running operation.
4414type GalleryApplicationsUpdateFuture struct {
4415	azure.FutureAPI
4416	// Result returns the result of the asynchronous operation.
4417	// If the operation has not completed it will return an error.
4418	Result func(GalleryApplicationsClient) (GalleryApplication, error)
4419}
4420
4421// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4422func (future *GalleryApplicationsUpdateFuture) UnmarshalJSON(body []byte) error {
4423	var azFuture azure.Future
4424	if err := json.Unmarshal(body, &azFuture); err != nil {
4425		return err
4426	}
4427	future.FutureAPI = &azFuture
4428	future.Result = future.result
4429	return nil
4430}
4431
4432// result is the default implementation for GalleryApplicationsUpdateFuture.Result.
4433func (future *GalleryApplicationsUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
4434	var done bool
4435	done, err = future.DoneWithContext(context.Background(), client)
4436	if err != nil {
4437		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", future.Response(), "Polling failure")
4438		return
4439	}
4440	if !done {
4441		ga.Response.Response = future.Response()
4442		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsUpdateFuture")
4443		return
4444	}
4445	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4446	if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
4447		ga, err = client.UpdateResponder(ga.Response.Response)
4448		if err != nil {
4449			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
4450		}
4451	}
4452	return
4453}
4454
4455// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to
4456// update.
4457type GalleryApplicationUpdate struct {
4458	*GalleryApplicationProperties `json:"properties,omitempty"`
4459	// ID - READ-ONLY; Resource Id
4460	ID *string `json:"id,omitempty"`
4461	// Name - READ-ONLY; Resource name
4462	Name *string `json:"name,omitempty"`
4463	// Type - READ-ONLY; Resource type
4464	Type *string `json:"type,omitempty"`
4465	// Tags - Resource tags
4466	Tags map[string]*string `json:"tags"`
4467}
4468
4469// MarshalJSON is the custom marshaler for GalleryApplicationUpdate.
4470func (gau GalleryApplicationUpdate) MarshalJSON() ([]byte, error) {
4471	objectMap := make(map[string]interface{})
4472	if gau.GalleryApplicationProperties != nil {
4473		objectMap["properties"] = gau.GalleryApplicationProperties
4474	}
4475	if gau.Tags != nil {
4476		objectMap["tags"] = gau.Tags
4477	}
4478	return json.Marshal(objectMap)
4479}
4480
4481// UnmarshalJSON is the custom unmarshaler for GalleryApplicationUpdate struct.
4482func (gau *GalleryApplicationUpdate) UnmarshalJSON(body []byte) error {
4483	var m map[string]*json.RawMessage
4484	err := json.Unmarshal(body, &m)
4485	if err != nil {
4486		return err
4487	}
4488	for k, v := range m {
4489		switch k {
4490		case "properties":
4491			if v != nil {
4492				var galleryApplicationProperties GalleryApplicationProperties
4493				err = json.Unmarshal(*v, &galleryApplicationProperties)
4494				if err != nil {
4495					return err
4496				}
4497				gau.GalleryApplicationProperties = &galleryApplicationProperties
4498			}
4499		case "id":
4500			if v != nil {
4501				var ID string
4502				err = json.Unmarshal(*v, &ID)
4503				if err != nil {
4504					return err
4505				}
4506				gau.ID = &ID
4507			}
4508		case "name":
4509			if v != nil {
4510				var name string
4511				err = json.Unmarshal(*v, &name)
4512				if err != nil {
4513					return err
4514				}
4515				gau.Name = &name
4516			}
4517		case "type":
4518			if v != nil {
4519				var typeVar string
4520				err = json.Unmarshal(*v, &typeVar)
4521				if err != nil {
4522					return err
4523				}
4524				gau.Type = &typeVar
4525			}
4526		case "tags":
4527			if v != nil {
4528				var tags map[string]*string
4529				err = json.Unmarshal(*v, &tags)
4530				if err != nil {
4531					return err
4532				}
4533				gau.Tags = tags
4534			}
4535		}
4536	}
4537
4538	return nil
4539}
4540
4541// GalleryApplicationVersion specifies information about the gallery Application Version that you want to
4542// create or update.
4543type GalleryApplicationVersion struct {
4544	autorest.Response                    `json:"-"`
4545	*GalleryApplicationVersionProperties `json:"properties,omitempty"`
4546	// ID - READ-ONLY; Resource Id
4547	ID *string `json:"id,omitempty"`
4548	// Name - READ-ONLY; Resource name
4549	Name *string `json:"name,omitempty"`
4550	// Type - READ-ONLY; Resource type
4551	Type *string `json:"type,omitempty"`
4552	// Location - Resource location
4553	Location *string `json:"location,omitempty"`
4554	// Tags - Resource tags
4555	Tags map[string]*string `json:"tags"`
4556}
4557
4558// MarshalJSON is the custom marshaler for GalleryApplicationVersion.
4559func (gav GalleryApplicationVersion) MarshalJSON() ([]byte, error) {
4560	objectMap := make(map[string]interface{})
4561	if gav.GalleryApplicationVersionProperties != nil {
4562		objectMap["properties"] = gav.GalleryApplicationVersionProperties
4563	}
4564	if gav.Location != nil {
4565		objectMap["location"] = gav.Location
4566	}
4567	if gav.Tags != nil {
4568		objectMap["tags"] = gav.Tags
4569	}
4570	return json.Marshal(objectMap)
4571}
4572
4573// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersion struct.
4574func (gav *GalleryApplicationVersion) UnmarshalJSON(body []byte) error {
4575	var m map[string]*json.RawMessage
4576	err := json.Unmarshal(body, &m)
4577	if err != nil {
4578		return err
4579	}
4580	for k, v := range m {
4581		switch k {
4582		case "properties":
4583			if v != nil {
4584				var galleryApplicationVersionProperties GalleryApplicationVersionProperties
4585				err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
4586				if err != nil {
4587					return err
4588				}
4589				gav.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
4590			}
4591		case "id":
4592			if v != nil {
4593				var ID string
4594				err = json.Unmarshal(*v, &ID)
4595				if err != nil {
4596					return err
4597				}
4598				gav.ID = &ID
4599			}
4600		case "name":
4601			if v != nil {
4602				var name string
4603				err = json.Unmarshal(*v, &name)
4604				if err != nil {
4605					return err
4606				}
4607				gav.Name = &name
4608			}
4609		case "type":
4610			if v != nil {
4611				var typeVar string
4612				err = json.Unmarshal(*v, &typeVar)
4613				if err != nil {
4614					return err
4615				}
4616				gav.Type = &typeVar
4617			}
4618		case "location":
4619			if v != nil {
4620				var location string
4621				err = json.Unmarshal(*v, &location)
4622				if err != nil {
4623					return err
4624				}
4625				gav.Location = &location
4626			}
4627		case "tags":
4628			if v != nil {
4629				var tags map[string]*string
4630				err = json.Unmarshal(*v, &tags)
4631				if err != nil {
4632					return err
4633				}
4634				gav.Tags = tags
4635			}
4636		}
4637	}
4638
4639	return nil
4640}
4641
4642// GalleryApplicationVersionList the List Gallery Application version operation response.
4643type GalleryApplicationVersionList struct {
4644	autorest.Response `json:"-"`
4645	// Value - A list of gallery Application Versions.
4646	Value *[]GalleryApplicationVersion `json:"value,omitempty"`
4647	// NextLink - The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to fetch the next page of gallery Application Versions.
4648	NextLink *string `json:"nextLink,omitempty"`
4649}
4650
4651// GalleryApplicationVersionListIterator provides access to a complete listing of GalleryApplicationVersion
4652// values.
4653type GalleryApplicationVersionListIterator struct {
4654	i    int
4655	page GalleryApplicationVersionListPage
4656}
4657
4658// NextWithContext advances to the next value.  If there was an error making
4659// the request the iterator does not advance and the error is returned.
4660func (iter *GalleryApplicationVersionListIterator) NextWithContext(ctx context.Context) (err error) {
4661	if tracing.IsEnabled() {
4662		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListIterator.NextWithContext")
4663		defer func() {
4664			sc := -1
4665			if iter.Response().Response.Response != nil {
4666				sc = iter.Response().Response.Response.StatusCode
4667			}
4668			tracing.EndSpan(ctx, sc, err)
4669		}()
4670	}
4671	iter.i++
4672	if iter.i < len(iter.page.Values()) {
4673		return nil
4674	}
4675	err = iter.page.NextWithContext(ctx)
4676	if err != nil {
4677		iter.i--
4678		return err
4679	}
4680	iter.i = 0
4681	return nil
4682}
4683
4684// Next advances to the next value.  If there was an error making
4685// the request the iterator does not advance and the error is returned.
4686// Deprecated: Use NextWithContext() instead.
4687func (iter *GalleryApplicationVersionListIterator) Next() error {
4688	return iter.NextWithContext(context.Background())
4689}
4690
4691// NotDone returns true if the enumeration should be started or is not yet complete.
4692func (iter GalleryApplicationVersionListIterator) NotDone() bool {
4693	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4694}
4695
4696// Response returns the raw server response from the last page request.
4697func (iter GalleryApplicationVersionListIterator) Response() GalleryApplicationVersionList {
4698	return iter.page.Response()
4699}
4700
4701// Value returns the current value or a zero-initialized value if the
4702// iterator has advanced beyond the end of the collection.
4703func (iter GalleryApplicationVersionListIterator) Value() GalleryApplicationVersion {
4704	if !iter.page.NotDone() {
4705		return GalleryApplicationVersion{}
4706	}
4707	return iter.page.Values()[iter.i]
4708}
4709
4710// Creates a new instance of the GalleryApplicationVersionListIterator type.
4711func NewGalleryApplicationVersionListIterator(page GalleryApplicationVersionListPage) GalleryApplicationVersionListIterator {
4712	return GalleryApplicationVersionListIterator{page: page}
4713}
4714
4715// IsEmpty returns true if the ListResult contains no values.
4716func (gavl GalleryApplicationVersionList) IsEmpty() bool {
4717	return gavl.Value == nil || len(*gavl.Value) == 0
4718}
4719
4720// hasNextLink returns true if the NextLink is not empty.
4721func (gavl GalleryApplicationVersionList) hasNextLink() bool {
4722	return gavl.NextLink != nil && len(*gavl.NextLink) != 0
4723}
4724
4725// galleryApplicationVersionListPreparer prepares a request to retrieve the next set of results.
4726// It returns nil if no more results exist.
4727func (gavl GalleryApplicationVersionList) galleryApplicationVersionListPreparer(ctx context.Context) (*http.Request, error) {
4728	if !gavl.hasNextLink() {
4729		return nil, nil
4730	}
4731	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4732		autorest.AsJSON(),
4733		autorest.AsGet(),
4734		autorest.WithBaseURL(to.String(gavl.NextLink)))
4735}
4736
4737// GalleryApplicationVersionListPage contains a page of GalleryApplicationVersion values.
4738type GalleryApplicationVersionListPage struct {
4739	fn   func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)
4740	gavl GalleryApplicationVersionList
4741}
4742
4743// NextWithContext advances to the next page of values.  If there was an error making
4744// the request the page does not advance and the error is returned.
4745func (page *GalleryApplicationVersionListPage) NextWithContext(ctx context.Context) (err error) {
4746	if tracing.IsEnabled() {
4747		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListPage.NextWithContext")
4748		defer func() {
4749			sc := -1
4750			if page.Response().Response.Response != nil {
4751				sc = page.Response().Response.Response.StatusCode
4752			}
4753			tracing.EndSpan(ctx, sc, err)
4754		}()
4755	}
4756	for {
4757		next, err := page.fn(ctx, page.gavl)
4758		if err != nil {
4759			return err
4760		}
4761		page.gavl = next
4762		if !next.hasNextLink() || !next.IsEmpty() {
4763			break
4764		}
4765	}
4766	return nil
4767}
4768
4769// Next advances to the next page of values.  If there was an error making
4770// the request the page does not advance and the error is returned.
4771// Deprecated: Use NextWithContext() instead.
4772func (page *GalleryApplicationVersionListPage) Next() error {
4773	return page.NextWithContext(context.Background())
4774}
4775
4776// NotDone returns true if the page enumeration should be started or is not yet complete.
4777func (page GalleryApplicationVersionListPage) NotDone() bool {
4778	return !page.gavl.IsEmpty()
4779}
4780
4781// Response returns the raw server response from the last page request.
4782func (page GalleryApplicationVersionListPage) Response() GalleryApplicationVersionList {
4783	return page.gavl
4784}
4785
4786// Values returns the slice of values for the current page or nil if there are no values.
4787func (page GalleryApplicationVersionListPage) Values() []GalleryApplicationVersion {
4788	if page.gavl.IsEmpty() {
4789		return nil
4790	}
4791	return *page.gavl.Value
4792}
4793
4794// Creates a new instance of the GalleryApplicationVersionListPage type.
4795func NewGalleryApplicationVersionListPage(cur GalleryApplicationVersionList, getNextPage func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)) GalleryApplicationVersionListPage {
4796	return GalleryApplicationVersionListPage{
4797		fn:   getNextPage,
4798		gavl: cur,
4799	}
4800}
4801
4802// GalleryApplicationVersionProperties describes the properties of a gallery Image Version.
4803type GalleryApplicationVersionProperties struct {
4804	PublishingProfile *GalleryApplicationVersionPublishingProfile `json:"publishingProfile,omitempty"`
4805	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1Updating', 'ProvisioningState1Failed', 'ProvisioningState1Succeeded', 'ProvisioningState1Deleting', 'ProvisioningState1Migrating'
4806	ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"`
4807	// ReplicationStatus - READ-ONLY
4808	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
4809}
4810
4811// MarshalJSON is the custom marshaler for GalleryApplicationVersionProperties.
4812func (gavp GalleryApplicationVersionProperties) MarshalJSON() ([]byte, error) {
4813	objectMap := make(map[string]interface{})
4814	if gavp.PublishingProfile != nil {
4815		objectMap["publishingProfile"] = gavp.PublishingProfile
4816	}
4817	return json.Marshal(objectMap)
4818}
4819
4820// GalleryApplicationVersionPublishingProfile the publishing profile of a gallery Image Version.
4821type GalleryApplicationVersionPublishingProfile struct {
4822	Source *UserArtifactSource `json:"source,omitempty"`
4823	// ContentType - Optional. May be used to help process this file. The type of file contained in the source, e.g. zip, json, etc.
4824	ContentType *string `json:"contentType,omitempty"`
4825	// EnableHealthCheck - Optional. Whether or not this application reports health.
4826	EnableHealthCheck *bool `json:"enableHealthCheck,omitempty"`
4827	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
4828	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
4829	// ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
4830	ReplicaCount *int32 `json:"replicaCount,omitempty"`
4831	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
4832	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
4833	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
4834	PublishedDate *date.Time `json:"publishedDate,omitempty"`
4835	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
4836	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
4837	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
4838	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
4839}
4840
4841// MarshalJSON is the custom marshaler for GalleryApplicationVersionPublishingProfile.
4842func (gavpp GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, error) {
4843	objectMap := make(map[string]interface{})
4844	if gavpp.Source != nil {
4845		objectMap["source"] = gavpp.Source
4846	}
4847	if gavpp.ContentType != nil {
4848		objectMap["contentType"] = gavpp.ContentType
4849	}
4850	if gavpp.EnableHealthCheck != nil {
4851		objectMap["enableHealthCheck"] = gavpp.EnableHealthCheck
4852	}
4853	if gavpp.TargetRegions != nil {
4854		objectMap["targetRegions"] = gavpp.TargetRegions
4855	}
4856	if gavpp.ReplicaCount != nil {
4857		objectMap["replicaCount"] = gavpp.ReplicaCount
4858	}
4859	if gavpp.ExcludeFromLatest != nil {
4860		objectMap["excludeFromLatest"] = gavpp.ExcludeFromLatest
4861	}
4862	if gavpp.EndOfLifeDate != nil {
4863		objectMap["endOfLifeDate"] = gavpp.EndOfLifeDate
4864	}
4865	if gavpp.StorageAccountType != "" {
4866		objectMap["storageAccountType"] = gavpp.StorageAccountType
4867	}
4868	return json.Marshal(objectMap)
4869}
4870
4871// GalleryApplicationVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
4872// of a long-running operation.
4873type GalleryApplicationVersionsCreateOrUpdateFuture struct {
4874	azure.FutureAPI
4875	// Result returns the result of the asynchronous operation.
4876	// If the operation has not completed it will return an error.
4877	Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
4878}
4879
4880// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4881func (future *GalleryApplicationVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4882	var azFuture azure.Future
4883	if err := json.Unmarshal(body, &azFuture); err != nil {
4884		return err
4885	}
4886	future.FutureAPI = &azFuture
4887	future.Result = future.result
4888	return nil
4889}
4890
4891// result is the default implementation for GalleryApplicationVersionsCreateOrUpdateFuture.Result.
4892func (future *GalleryApplicationVersionsCreateOrUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
4893	var done bool
4894	done, err = future.DoneWithContext(context.Background(), client)
4895	if err != nil {
4896		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4897		return
4898	}
4899	if !done {
4900		gav.Response.Response = future.Response()
4901		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsCreateOrUpdateFuture")
4902		return
4903	}
4904	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4905	if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
4906		gav, err = client.CreateOrUpdateResponder(gav.Response.Response)
4907		if err != nil {
4908			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
4909		}
4910	}
4911	return
4912}
4913
4914// GalleryApplicationVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
4915// long-running operation.
4916type GalleryApplicationVersionsDeleteFuture struct {
4917	azure.FutureAPI
4918	// Result returns the result of the asynchronous operation.
4919	// If the operation has not completed it will return an error.
4920	Result func(GalleryApplicationVersionsClient) (autorest.Response, error)
4921}
4922
4923// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4924func (future *GalleryApplicationVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
4925	var azFuture azure.Future
4926	if err := json.Unmarshal(body, &azFuture); err != nil {
4927		return err
4928	}
4929	future.FutureAPI = &azFuture
4930	future.Result = future.result
4931	return nil
4932}
4933
4934// result is the default implementation for GalleryApplicationVersionsDeleteFuture.Result.
4935func (future *GalleryApplicationVersionsDeleteFuture) result(client GalleryApplicationVersionsClient) (ar autorest.Response, err error) {
4936	var done bool
4937	done, err = future.DoneWithContext(context.Background(), client)
4938	if err != nil {
4939		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
4940		return
4941	}
4942	if !done {
4943		ar.Response = future.Response()
4944		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsDeleteFuture")
4945		return
4946	}
4947	ar.Response = future.Response()
4948	return
4949}
4950
4951// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
4952// long-running operation.
4953type GalleryApplicationVersionsUpdateFuture struct {
4954	azure.FutureAPI
4955	// Result returns the result of the asynchronous operation.
4956	// If the operation has not completed it will return an error.
4957	Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
4958}
4959
4960// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4961func (future *GalleryApplicationVersionsUpdateFuture) UnmarshalJSON(body []byte) error {
4962	var azFuture azure.Future
4963	if err := json.Unmarshal(body, &azFuture); err != nil {
4964		return err
4965	}
4966	future.FutureAPI = &azFuture
4967	future.Result = future.result
4968	return nil
4969}
4970
4971// result is the default implementation for GalleryApplicationVersionsUpdateFuture.Result.
4972func (future *GalleryApplicationVersionsUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
4973	var done bool
4974	done, err = future.DoneWithContext(context.Background(), client)
4975	if err != nil {
4976		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
4977		return
4978	}
4979	if !done {
4980		gav.Response.Response = future.Response()
4981		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsUpdateFuture")
4982		return
4983	}
4984	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4985	if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
4986		gav, err = client.UpdateResponder(gav.Response.Response)
4987		if err != nil {
4988			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
4989		}
4990	}
4991	return
4992}
4993
4994// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you
4995// want to update.
4996type GalleryApplicationVersionUpdate struct {
4997	*GalleryApplicationVersionProperties `json:"properties,omitempty"`
4998	// ID - READ-ONLY; Resource Id
4999	ID *string `json:"id,omitempty"`
5000	// Name - READ-ONLY; Resource name
5001	Name *string `json:"name,omitempty"`
5002	// Type - READ-ONLY; Resource type
5003	Type *string `json:"type,omitempty"`
5004	// Tags - Resource tags
5005	Tags map[string]*string `json:"tags"`
5006}
5007
5008// MarshalJSON is the custom marshaler for GalleryApplicationVersionUpdate.
5009func (gavu GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) {
5010	objectMap := make(map[string]interface{})
5011	if gavu.GalleryApplicationVersionProperties != nil {
5012		objectMap["properties"] = gavu.GalleryApplicationVersionProperties
5013	}
5014	if gavu.Tags != nil {
5015		objectMap["tags"] = gavu.Tags
5016	}
5017	return json.Marshal(objectMap)
5018}
5019
5020// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersionUpdate struct.
5021func (gavu *GalleryApplicationVersionUpdate) UnmarshalJSON(body []byte) error {
5022	var m map[string]*json.RawMessage
5023	err := json.Unmarshal(body, &m)
5024	if err != nil {
5025		return err
5026	}
5027	for k, v := range m {
5028		switch k {
5029		case "properties":
5030			if v != nil {
5031				var galleryApplicationVersionProperties GalleryApplicationVersionProperties
5032				err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
5033				if err != nil {
5034					return err
5035				}
5036				gavu.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
5037			}
5038		case "id":
5039			if v != nil {
5040				var ID string
5041				err = json.Unmarshal(*v, &ID)
5042				if err != nil {
5043					return err
5044				}
5045				gavu.ID = &ID
5046			}
5047		case "name":
5048			if v != nil {
5049				var name string
5050				err = json.Unmarshal(*v, &name)
5051				if err != nil {
5052					return err
5053				}
5054				gavu.Name = &name
5055			}
5056		case "type":
5057			if v != nil {
5058				var typeVar string
5059				err = json.Unmarshal(*v, &typeVar)
5060				if err != nil {
5061					return err
5062				}
5063				gavu.Type = &typeVar
5064			}
5065		case "tags":
5066			if v != nil {
5067				var tags map[string]*string
5068				err = json.Unmarshal(*v, &tags)
5069				if err != nil {
5070					return err
5071				}
5072				gavu.Tags = tags
5073			}
5074		}
5075	}
5076
5077	return nil
5078}
5079
5080// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile.
5081type GalleryArtifactPublishingProfileBase struct {
5082	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
5083	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
5084	// ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
5085	ReplicaCount *int32 `json:"replicaCount,omitempty"`
5086	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
5087	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
5088	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
5089	PublishedDate *date.Time `json:"publishedDate,omitempty"`
5090	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
5091	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
5092	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
5093	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
5094}
5095
5096// MarshalJSON is the custom marshaler for GalleryArtifactPublishingProfileBase.
5097func (gappb GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error) {
5098	objectMap := make(map[string]interface{})
5099	if gappb.TargetRegions != nil {
5100		objectMap["targetRegions"] = gappb.TargetRegions
5101	}
5102	if gappb.ReplicaCount != nil {
5103		objectMap["replicaCount"] = gappb.ReplicaCount
5104	}
5105	if gappb.ExcludeFromLatest != nil {
5106		objectMap["excludeFromLatest"] = gappb.ExcludeFromLatest
5107	}
5108	if gappb.EndOfLifeDate != nil {
5109		objectMap["endOfLifeDate"] = gappb.EndOfLifeDate
5110	}
5111	if gappb.StorageAccountType != "" {
5112		objectMap["storageAccountType"] = gappb.StorageAccountType
5113	}
5114	return json.Marshal(objectMap)
5115}
5116
5117// GalleryArtifactSource the source image from which the Image Version is going to be created.
5118type GalleryArtifactSource struct {
5119	ManagedImage *ManagedArtifact `json:"managedImage,omitempty"`
5120}
5121
5122// GalleryArtifactVersionSource the gallery artifact version source.
5123type GalleryArtifactVersionSource struct {
5124	// ID - The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, or user image.
5125	ID *string `json:"id,omitempty"`
5126}
5127
5128// GalleryDataDiskImage this is the data disk image.
5129type GalleryDataDiskImage struct {
5130	// Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
5131	Lun *int32 `json:"lun,omitempty"`
5132	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
5133	SizeInGB *int32 `json:"sizeInGB,omitempty"`
5134	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
5135	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
5136	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
5137}
5138
5139// MarshalJSON is the custom marshaler for GalleryDataDiskImage.
5140func (gddi GalleryDataDiskImage) MarshalJSON() ([]byte, error) {
5141	objectMap := make(map[string]interface{})
5142	if gddi.Lun != nil {
5143		objectMap["lun"] = gddi.Lun
5144	}
5145	if gddi.HostCaching != "" {
5146		objectMap["hostCaching"] = gddi.HostCaching
5147	}
5148	if gddi.Source != nil {
5149		objectMap["source"] = gddi.Source
5150	}
5151	return json.Marshal(objectMap)
5152}
5153
5154// GalleryDiskImage this is the disk image base class.
5155type GalleryDiskImage struct {
5156	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
5157	SizeInGB *int32 `json:"sizeInGB,omitempty"`
5158	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
5159	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
5160	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
5161}
5162
5163// MarshalJSON is the custom marshaler for GalleryDiskImage.
5164func (gdi GalleryDiskImage) MarshalJSON() ([]byte, error) {
5165	objectMap := make(map[string]interface{})
5166	if gdi.HostCaching != "" {
5167		objectMap["hostCaching"] = gdi.HostCaching
5168	}
5169	if gdi.Source != nil {
5170		objectMap["source"] = gdi.Source
5171	}
5172	return json.Marshal(objectMap)
5173}
5174
5175// GalleryIdentifier describes the gallery unique name.
5176type GalleryIdentifier struct {
5177	// UniqueName - READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure.
5178	UniqueName *string `json:"uniqueName,omitempty"`
5179}
5180
5181// MarshalJSON is the custom marshaler for GalleryIdentifier.
5182func (gi GalleryIdentifier) MarshalJSON() ([]byte, error) {
5183	objectMap := make(map[string]interface{})
5184	return json.Marshal(objectMap)
5185}
5186
5187// GalleryImage specifies information about the gallery Image Definition that you want to create or update.
5188type GalleryImage struct {
5189	autorest.Response       `json:"-"`
5190	*GalleryImageProperties `json:"properties,omitempty"`
5191	// ID - READ-ONLY; Resource Id
5192	ID *string `json:"id,omitempty"`
5193	// Name - READ-ONLY; Resource name
5194	Name *string `json:"name,omitempty"`
5195	// Type - READ-ONLY; Resource type
5196	Type *string `json:"type,omitempty"`
5197	// Location - Resource location
5198	Location *string `json:"location,omitempty"`
5199	// Tags - Resource tags
5200	Tags map[string]*string `json:"tags"`
5201}
5202
5203// MarshalJSON is the custom marshaler for GalleryImage.
5204func (gi GalleryImage) MarshalJSON() ([]byte, error) {
5205	objectMap := make(map[string]interface{})
5206	if gi.GalleryImageProperties != nil {
5207		objectMap["properties"] = gi.GalleryImageProperties
5208	}
5209	if gi.Location != nil {
5210		objectMap["location"] = gi.Location
5211	}
5212	if gi.Tags != nil {
5213		objectMap["tags"] = gi.Tags
5214	}
5215	return json.Marshal(objectMap)
5216}
5217
5218// UnmarshalJSON is the custom unmarshaler for GalleryImage struct.
5219func (gi *GalleryImage) UnmarshalJSON(body []byte) error {
5220	var m map[string]*json.RawMessage
5221	err := json.Unmarshal(body, &m)
5222	if err != nil {
5223		return err
5224	}
5225	for k, v := range m {
5226		switch k {
5227		case "properties":
5228			if v != nil {
5229				var galleryImageProperties GalleryImageProperties
5230				err = json.Unmarshal(*v, &galleryImageProperties)
5231				if err != nil {
5232					return err
5233				}
5234				gi.GalleryImageProperties = &galleryImageProperties
5235			}
5236		case "id":
5237			if v != nil {
5238				var ID string
5239				err = json.Unmarshal(*v, &ID)
5240				if err != nil {
5241					return err
5242				}
5243				gi.ID = &ID
5244			}
5245		case "name":
5246			if v != nil {
5247				var name string
5248				err = json.Unmarshal(*v, &name)
5249				if err != nil {
5250					return err
5251				}
5252				gi.Name = &name
5253			}
5254		case "type":
5255			if v != nil {
5256				var typeVar string
5257				err = json.Unmarshal(*v, &typeVar)
5258				if err != nil {
5259					return err
5260				}
5261				gi.Type = &typeVar
5262			}
5263		case "location":
5264			if v != nil {
5265				var location string
5266				err = json.Unmarshal(*v, &location)
5267				if err != nil {
5268					return err
5269				}
5270				gi.Location = &location
5271			}
5272		case "tags":
5273			if v != nil {
5274				var tags map[string]*string
5275				err = json.Unmarshal(*v, &tags)
5276				if err != nil {
5277					return err
5278				}
5279				gi.Tags = tags
5280			}
5281		}
5282	}
5283
5284	return nil
5285}
5286
5287// GalleryImageIdentifier this is the gallery Image Definition identifier.
5288type GalleryImageIdentifier struct {
5289	// Publisher - The name of the gallery Image Definition publisher.
5290	Publisher *string `json:"publisher,omitempty"`
5291	// Offer - The name of the gallery Image Definition offer.
5292	Offer *string `json:"offer,omitempty"`
5293	// Sku - The name of the gallery Image Definition SKU.
5294	Sku *string `json:"sku,omitempty"`
5295}
5296
5297// GalleryImageList the List Gallery Images operation response.
5298type GalleryImageList struct {
5299	autorest.Response `json:"-"`
5300	// Value - A list of Shared Image Gallery images.
5301	Value *[]GalleryImage `json:"value,omitempty"`
5302	// NextLink - The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call ListNext() with this to fetch the next page of gallery Image Definitions.
5303	NextLink *string `json:"nextLink,omitempty"`
5304}
5305
5306// GalleryImageListIterator provides access to a complete listing of GalleryImage values.
5307type GalleryImageListIterator struct {
5308	i    int
5309	page GalleryImageListPage
5310}
5311
5312// NextWithContext advances to the next value.  If there was an error making
5313// the request the iterator does not advance and the error is returned.
5314func (iter *GalleryImageListIterator) NextWithContext(ctx context.Context) (err error) {
5315	if tracing.IsEnabled() {
5316		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListIterator.NextWithContext")
5317		defer func() {
5318			sc := -1
5319			if iter.Response().Response.Response != nil {
5320				sc = iter.Response().Response.Response.StatusCode
5321			}
5322			tracing.EndSpan(ctx, sc, err)
5323		}()
5324	}
5325	iter.i++
5326	if iter.i < len(iter.page.Values()) {
5327		return nil
5328	}
5329	err = iter.page.NextWithContext(ctx)
5330	if err != nil {
5331		iter.i--
5332		return err
5333	}
5334	iter.i = 0
5335	return nil
5336}
5337
5338// Next advances to the next value.  If there was an error making
5339// the request the iterator does not advance and the error is returned.
5340// Deprecated: Use NextWithContext() instead.
5341func (iter *GalleryImageListIterator) Next() error {
5342	return iter.NextWithContext(context.Background())
5343}
5344
5345// NotDone returns true if the enumeration should be started or is not yet complete.
5346func (iter GalleryImageListIterator) NotDone() bool {
5347	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5348}
5349
5350// Response returns the raw server response from the last page request.
5351func (iter GalleryImageListIterator) Response() GalleryImageList {
5352	return iter.page.Response()
5353}
5354
5355// Value returns the current value or a zero-initialized value if the
5356// iterator has advanced beyond the end of the collection.
5357func (iter GalleryImageListIterator) Value() GalleryImage {
5358	if !iter.page.NotDone() {
5359		return GalleryImage{}
5360	}
5361	return iter.page.Values()[iter.i]
5362}
5363
5364// Creates a new instance of the GalleryImageListIterator type.
5365func NewGalleryImageListIterator(page GalleryImageListPage) GalleryImageListIterator {
5366	return GalleryImageListIterator{page: page}
5367}
5368
5369// IsEmpty returns true if the ListResult contains no values.
5370func (gil GalleryImageList) IsEmpty() bool {
5371	return gil.Value == nil || len(*gil.Value) == 0
5372}
5373
5374// hasNextLink returns true if the NextLink is not empty.
5375func (gil GalleryImageList) hasNextLink() bool {
5376	return gil.NextLink != nil && len(*gil.NextLink) != 0
5377}
5378
5379// galleryImageListPreparer prepares a request to retrieve the next set of results.
5380// It returns nil if no more results exist.
5381func (gil GalleryImageList) galleryImageListPreparer(ctx context.Context) (*http.Request, error) {
5382	if !gil.hasNextLink() {
5383		return nil, nil
5384	}
5385	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5386		autorest.AsJSON(),
5387		autorest.AsGet(),
5388		autorest.WithBaseURL(to.String(gil.NextLink)))
5389}
5390
5391// GalleryImageListPage contains a page of GalleryImage values.
5392type GalleryImageListPage struct {
5393	fn  func(context.Context, GalleryImageList) (GalleryImageList, error)
5394	gil GalleryImageList
5395}
5396
5397// NextWithContext advances to the next page of values.  If there was an error making
5398// the request the page does not advance and the error is returned.
5399func (page *GalleryImageListPage) NextWithContext(ctx context.Context) (err error) {
5400	if tracing.IsEnabled() {
5401		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListPage.NextWithContext")
5402		defer func() {
5403			sc := -1
5404			if page.Response().Response.Response != nil {
5405				sc = page.Response().Response.Response.StatusCode
5406			}
5407			tracing.EndSpan(ctx, sc, err)
5408		}()
5409	}
5410	for {
5411		next, err := page.fn(ctx, page.gil)
5412		if err != nil {
5413			return err
5414		}
5415		page.gil = next
5416		if !next.hasNextLink() || !next.IsEmpty() {
5417			break
5418		}
5419	}
5420	return nil
5421}
5422
5423// Next advances to the next page of values.  If there was an error making
5424// the request the page does not advance and the error is returned.
5425// Deprecated: Use NextWithContext() instead.
5426func (page *GalleryImageListPage) Next() error {
5427	return page.NextWithContext(context.Background())
5428}
5429
5430// NotDone returns true if the page enumeration should be started or is not yet complete.
5431func (page GalleryImageListPage) NotDone() bool {
5432	return !page.gil.IsEmpty()
5433}
5434
5435// Response returns the raw server response from the last page request.
5436func (page GalleryImageListPage) Response() GalleryImageList {
5437	return page.gil
5438}
5439
5440// Values returns the slice of values for the current page or nil if there are no values.
5441func (page GalleryImageListPage) Values() []GalleryImage {
5442	if page.gil.IsEmpty() {
5443		return nil
5444	}
5445	return *page.gil.Value
5446}
5447
5448// Creates a new instance of the GalleryImageListPage type.
5449func NewGalleryImageListPage(cur GalleryImageList, getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage {
5450	return GalleryImageListPage{
5451		fn:  getNextPage,
5452		gil: cur,
5453	}
5454}
5455
5456// GalleryImageProperties describes the properties of a gallery Image Definition.
5457type GalleryImageProperties struct {
5458	// Description - The description of this gallery Image Definition resource. This property is updatable.
5459	Description *string `json:"description,omitempty"`
5460	// Eula - The Eula agreement for the gallery Image Definition.
5461	Eula *string `json:"eula,omitempty"`
5462	// PrivacyStatementURI - The privacy statement uri.
5463	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
5464	// ReleaseNoteURI - The release note uri.
5465	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
5466	// OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
5467	OsType OperatingSystemTypes `json:"osType,omitempty"`
5468	// OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'Generalized', 'Specialized'
5469	OsState OperatingSystemStateTypes `json:"osState,omitempty"`
5470	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
5471	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
5472	// EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable.
5473	EndOfLifeDate *date.Time                       `json:"endOfLifeDate,omitempty"`
5474	Identifier    *GalleryImageIdentifier          `json:"identifier,omitempty"`
5475	Recommended   *RecommendedMachineConfiguration `json:"recommended,omitempty"`
5476	Disallowed    *Disallowed                      `json:"disallowed,omitempty"`
5477	PurchasePlan  *ImagePurchasePlan               `json:"purchasePlan,omitempty"`
5478	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState2Creating', 'ProvisioningState2Updating', 'ProvisioningState2Failed', 'ProvisioningState2Succeeded', 'ProvisioningState2Deleting', 'ProvisioningState2Migrating'
5479	ProvisioningState ProvisioningState2 `json:"provisioningState,omitempty"`
5480}
5481
5482// MarshalJSON is the custom marshaler for GalleryImageProperties.
5483func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) {
5484	objectMap := make(map[string]interface{})
5485	if gip.Description != nil {
5486		objectMap["description"] = gip.Description
5487	}
5488	if gip.Eula != nil {
5489		objectMap["eula"] = gip.Eula
5490	}
5491	if gip.PrivacyStatementURI != nil {
5492		objectMap["privacyStatementUri"] = gip.PrivacyStatementURI
5493	}
5494	if gip.ReleaseNoteURI != nil {
5495		objectMap["releaseNoteUri"] = gip.ReleaseNoteURI
5496	}
5497	if gip.OsType != "" {
5498		objectMap["osType"] = gip.OsType
5499	}
5500	if gip.OsState != "" {
5501		objectMap["osState"] = gip.OsState
5502	}
5503	if gip.HyperVGeneration != "" {
5504		objectMap["hyperVGeneration"] = gip.HyperVGeneration
5505	}
5506	if gip.EndOfLifeDate != nil {
5507		objectMap["endOfLifeDate"] = gip.EndOfLifeDate
5508	}
5509	if gip.Identifier != nil {
5510		objectMap["identifier"] = gip.Identifier
5511	}
5512	if gip.Recommended != nil {
5513		objectMap["recommended"] = gip.Recommended
5514	}
5515	if gip.Disallowed != nil {
5516		objectMap["disallowed"] = gip.Disallowed
5517	}
5518	if gip.PurchasePlan != nil {
5519		objectMap["purchasePlan"] = gip.PurchasePlan
5520	}
5521	return json.Marshal(objectMap)
5522}
5523
5524// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5525// long-running operation.
5526type GalleryImagesCreateOrUpdateFuture struct {
5527	azure.FutureAPI
5528	// Result returns the result of the asynchronous operation.
5529	// If the operation has not completed it will return an error.
5530	Result func(GalleryImagesClient) (GalleryImage, error)
5531}
5532
5533// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5534func (future *GalleryImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5535	var azFuture azure.Future
5536	if err := json.Unmarshal(body, &azFuture); err != nil {
5537		return err
5538	}
5539	future.FutureAPI = &azFuture
5540	future.Result = future.result
5541	return nil
5542}
5543
5544// result is the default implementation for GalleryImagesCreateOrUpdateFuture.Result.
5545func (future *GalleryImagesCreateOrUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) {
5546	var done bool
5547	done, err = future.DoneWithContext(context.Background(), client)
5548	if err != nil {
5549		err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5550		return
5551	}
5552	if !done {
5553		gi.Response.Response = future.Response()
5554		err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture")
5555		return
5556	}
5557	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5558	if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
5559		gi, err = client.CreateOrUpdateResponder(gi.Response.Response)
5560		if err != nil {
5561			err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
5562		}
5563	}
5564	return
5565}
5566
5567// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5568// operation.
5569type GalleryImagesDeleteFuture struct {
5570	azure.FutureAPI
5571	// Result returns the result of the asynchronous operation.
5572	// If the operation has not completed it will return an error.
5573	Result func(GalleryImagesClient) (autorest.Response, error)
5574}
5575
5576// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5577func (future *GalleryImagesDeleteFuture) UnmarshalJSON(body []byte) error {
5578	var azFuture azure.Future
5579	if err := json.Unmarshal(body, &azFuture); err != nil {
5580		return err
5581	}
5582	future.FutureAPI = &azFuture
5583	future.Result = future.result
5584	return nil
5585}
5586
5587// result is the default implementation for GalleryImagesDeleteFuture.Result.
5588func (future *GalleryImagesDeleteFuture) result(client GalleryImagesClient) (ar autorest.Response, err error) {
5589	var done bool
5590	done, err = future.DoneWithContext(context.Background(), client)
5591	if err != nil {
5592		err = autorest.NewErrorWithError(err, "compute.GalleryImagesDeleteFuture", "Result", future.Response(), "Polling failure")
5593		return
5594	}
5595	if !done {
5596		ar.Response = future.Response()
5597		err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture")
5598		return
5599	}
5600	ar.Response = future.Response()
5601	return
5602}
5603
5604// GalleryImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
5605// operation.
5606type GalleryImagesUpdateFuture struct {
5607	azure.FutureAPI
5608	// Result returns the result of the asynchronous operation.
5609	// If the operation has not completed it will return an error.
5610	Result func(GalleryImagesClient) (GalleryImage, error)
5611}
5612
5613// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5614func (future *GalleryImagesUpdateFuture) UnmarshalJSON(body []byte) error {
5615	var azFuture azure.Future
5616	if err := json.Unmarshal(body, &azFuture); err != nil {
5617		return err
5618	}
5619	future.FutureAPI = &azFuture
5620	future.Result = future.result
5621	return nil
5622}
5623
5624// result is the default implementation for GalleryImagesUpdateFuture.Result.
5625func (future *GalleryImagesUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) {
5626	var done bool
5627	done, err = future.DoneWithContext(context.Background(), client)
5628	if err != nil {
5629		err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", future.Response(), "Polling failure")
5630		return
5631	}
5632	if !done {
5633		gi.Response.Response = future.Response()
5634		err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesUpdateFuture")
5635		return
5636	}
5637	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5638	if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
5639		gi, err = client.UpdateResponder(gi.Response.Response)
5640		if err != nil {
5641			err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
5642		}
5643	}
5644	return
5645}
5646
5647// GalleryImageUpdate specifies information about the gallery Image Definition that you want to update.
5648type GalleryImageUpdate struct {
5649	*GalleryImageProperties `json:"properties,omitempty"`
5650	// ID - READ-ONLY; Resource Id
5651	ID *string `json:"id,omitempty"`
5652	// Name - READ-ONLY; Resource name
5653	Name *string `json:"name,omitempty"`
5654	// Type - READ-ONLY; Resource type
5655	Type *string `json:"type,omitempty"`
5656	// Tags - Resource tags
5657	Tags map[string]*string `json:"tags"`
5658}
5659
5660// MarshalJSON is the custom marshaler for GalleryImageUpdate.
5661func (giu GalleryImageUpdate) MarshalJSON() ([]byte, error) {
5662	objectMap := make(map[string]interface{})
5663	if giu.GalleryImageProperties != nil {
5664		objectMap["properties"] = giu.GalleryImageProperties
5665	}
5666	if giu.Tags != nil {
5667		objectMap["tags"] = giu.Tags
5668	}
5669	return json.Marshal(objectMap)
5670}
5671
5672// UnmarshalJSON is the custom unmarshaler for GalleryImageUpdate struct.
5673func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error {
5674	var m map[string]*json.RawMessage
5675	err := json.Unmarshal(body, &m)
5676	if err != nil {
5677		return err
5678	}
5679	for k, v := range m {
5680		switch k {
5681		case "properties":
5682			if v != nil {
5683				var galleryImageProperties GalleryImageProperties
5684				err = json.Unmarshal(*v, &galleryImageProperties)
5685				if err != nil {
5686					return err
5687				}
5688				giu.GalleryImageProperties = &galleryImageProperties
5689			}
5690		case "id":
5691			if v != nil {
5692				var ID string
5693				err = json.Unmarshal(*v, &ID)
5694				if err != nil {
5695					return err
5696				}
5697				giu.ID = &ID
5698			}
5699		case "name":
5700			if v != nil {
5701				var name string
5702				err = json.Unmarshal(*v, &name)
5703				if err != nil {
5704					return err
5705				}
5706				giu.Name = &name
5707			}
5708		case "type":
5709			if v != nil {
5710				var typeVar string
5711				err = json.Unmarshal(*v, &typeVar)
5712				if err != nil {
5713					return err
5714				}
5715				giu.Type = &typeVar
5716			}
5717		case "tags":
5718			if v != nil {
5719				var tags map[string]*string
5720				err = json.Unmarshal(*v, &tags)
5721				if err != nil {
5722					return err
5723				}
5724				giu.Tags = tags
5725			}
5726		}
5727	}
5728
5729	return nil
5730}
5731
5732// GalleryImageVersion specifies information about the gallery Image Version that you want to create or
5733// update.
5734type GalleryImageVersion struct {
5735	autorest.Response              `json:"-"`
5736	*GalleryImageVersionProperties `json:"properties,omitempty"`
5737	// ID - READ-ONLY; Resource Id
5738	ID *string `json:"id,omitempty"`
5739	// Name - READ-ONLY; Resource name
5740	Name *string `json:"name,omitempty"`
5741	// Type - READ-ONLY; Resource type
5742	Type *string `json:"type,omitempty"`
5743	// Location - Resource location
5744	Location *string `json:"location,omitempty"`
5745	// Tags - Resource tags
5746	Tags map[string]*string `json:"tags"`
5747}
5748
5749// MarshalJSON is the custom marshaler for GalleryImageVersion.
5750func (giv GalleryImageVersion) MarshalJSON() ([]byte, error) {
5751	objectMap := make(map[string]interface{})
5752	if giv.GalleryImageVersionProperties != nil {
5753		objectMap["properties"] = giv.GalleryImageVersionProperties
5754	}
5755	if giv.Location != nil {
5756		objectMap["location"] = giv.Location
5757	}
5758	if giv.Tags != nil {
5759		objectMap["tags"] = giv.Tags
5760	}
5761	return json.Marshal(objectMap)
5762}
5763
5764// UnmarshalJSON is the custom unmarshaler for GalleryImageVersion struct.
5765func (giv *GalleryImageVersion) UnmarshalJSON(body []byte) error {
5766	var m map[string]*json.RawMessage
5767	err := json.Unmarshal(body, &m)
5768	if err != nil {
5769		return err
5770	}
5771	for k, v := range m {
5772		switch k {
5773		case "properties":
5774			if v != nil {
5775				var galleryImageVersionProperties GalleryImageVersionProperties
5776				err = json.Unmarshal(*v, &galleryImageVersionProperties)
5777				if err != nil {
5778					return err
5779				}
5780				giv.GalleryImageVersionProperties = &galleryImageVersionProperties
5781			}
5782		case "id":
5783			if v != nil {
5784				var ID string
5785				err = json.Unmarshal(*v, &ID)
5786				if err != nil {
5787					return err
5788				}
5789				giv.ID = &ID
5790			}
5791		case "name":
5792			if v != nil {
5793				var name string
5794				err = json.Unmarshal(*v, &name)
5795				if err != nil {
5796					return err
5797				}
5798				giv.Name = &name
5799			}
5800		case "type":
5801			if v != nil {
5802				var typeVar string
5803				err = json.Unmarshal(*v, &typeVar)
5804				if err != nil {
5805					return err
5806				}
5807				giv.Type = &typeVar
5808			}
5809		case "location":
5810			if v != nil {
5811				var location string
5812				err = json.Unmarshal(*v, &location)
5813				if err != nil {
5814					return err
5815				}
5816				giv.Location = &location
5817			}
5818		case "tags":
5819			if v != nil {
5820				var tags map[string]*string
5821				err = json.Unmarshal(*v, &tags)
5822				if err != nil {
5823					return err
5824				}
5825				giv.Tags = tags
5826			}
5827		}
5828	}
5829
5830	return nil
5831}
5832
5833// GalleryImageVersionList the List Gallery Image version operation response.
5834type GalleryImageVersionList struct {
5835	autorest.Response `json:"-"`
5836	// Value - A list of gallery Image Versions.
5837	Value *[]GalleryImageVersion `json:"value,omitempty"`
5838	// NextLink - The uri to fetch the next page of gallery Image Versions. Call ListNext() with this to fetch the next page of gallery Image Versions.
5839	NextLink *string `json:"nextLink,omitempty"`
5840}
5841
5842// GalleryImageVersionListIterator provides access to a complete listing of GalleryImageVersion values.
5843type GalleryImageVersionListIterator struct {
5844	i    int
5845	page GalleryImageVersionListPage
5846}
5847
5848// NextWithContext advances to the next value.  If there was an error making
5849// the request the iterator does not advance and the error is returned.
5850func (iter *GalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) {
5851	if tracing.IsEnabled() {
5852		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListIterator.NextWithContext")
5853		defer func() {
5854			sc := -1
5855			if iter.Response().Response.Response != nil {
5856				sc = iter.Response().Response.Response.StatusCode
5857			}
5858			tracing.EndSpan(ctx, sc, err)
5859		}()
5860	}
5861	iter.i++
5862	if iter.i < len(iter.page.Values()) {
5863		return nil
5864	}
5865	err = iter.page.NextWithContext(ctx)
5866	if err != nil {
5867		iter.i--
5868		return err
5869	}
5870	iter.i = 0
5871	return nil
5872}
5873
5874// Next advances to the next value.  If there was an error making
5875// the request the iterator does not advance and the error is returned.
5876// Deprecated: Use NextWithContext() instead.
5877func (iter *GalleryImageVersionListIterator) Next() error {
5878	return iter.NextWithContext(context.Background())
5879}
5880
5881// NotDone returns true if the enumeration should be started or is not yet complete.
5882func (iter GalleryImageVersionListIterator) NotDone() bool {
5883	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5884}
5885
5886// Response returns the raw server response from the last page request.
5887func (iter GalleryImageVersionListIterator) Response() GalleryImageVersionList {
5888	return iter.page.Response()
5889}
5890
5891// Value returns the current value or a zero-initialized value if the
5892// iterator has advanced beyond the end of the collection.
5893func (iter GalleryImageVersionListIterator) Value() GalleryImageVersion {
5894	if !iter.page.NotDone() {
5895		return GalleryImageVersion{}
5896	}
5897	return iter.page.Values()[iter.i]
5898}
5899
5900// Creates a new instance of the GalleryImageVersionListIterator type.
5901func NewGalleryImageVersionListIterator(page GalleryImageVersionListPage) GalleryImageVersionListIterator {
5902	return GalleryImageVersionListIterator{page: page}
5903}
5904
5905// IsEmpty returns true if the ListResult contains no values.
5906func (givl GalleryImageVersionList) IsEmpty() bool {
5907	return givl.Value == nil || len(*givl.Value) == 0
5908}
5909
5910// hasNextLink returns true if the NextLink is not empty.
5911func (givl GalleryImageVersionList) hasNextLink() bool {
5912	return givl.NextLink != nil && len(*givl.NextLink) != 0
5913}
5914
5915// galleryImageVersionListPreparer prepares a request to retrieve the next set of results.
5916// It returns nil if no more results exist.
5917func (givl GalleryImageVersionList) galleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) {
5918	if !givl.hasNextLink() {
5919		return nil, nil
5920	}
5921	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5922		autorest.AsJSON(),
5923		autorest.AsGet(),
5924		autorest.WithBaseURL(to.String(givl.NextLink)))
5925}
5926
5927// GalleryImageVersionListPage contains a page of GalleryImageVersion values.
5928type GalleryImageVersionListPage struct {
5929	fn   func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)
5930	givl GalleryImageVersionList
5931}
5932
5933// NextWithContext advances to the next page of values.  If there was an error making
5934// the request the page does not advance and the error is returned.
5935func (page *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) {
5936	if tracing.IsEnabled() {
5937		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListPage.NextWithContext")
5938		defer func() {
5939			sc := -1
5940			if page.Response().Response.Response != nil {
5941				sc = page.Response().Response.Response.StatusCode
5942			}
5943			tracing.EndSpan(ctx, sc, err)
5944		}()
5945	}
5946	for {
5947		next, err := page.fn(ctx, page.givl)
5948		if err != nil {
5949			return err
5950		}
5951		page.givl = next
5952		if !next.hasNextLink() || !next.IsEmpty() {
5953			break
5954		}
5955	}
5956	return nil
5957}
5958
5959// Next advances to the next page of values.  If there was an error making
5960// the request the page does not advance and the error is returned.
5961// Deprecated: Use NextWithContext() instead.
5962func (page *GalleryImageVersionListPage) Next() error {
5963	return page.NextWithContext(context.Background())
5964}
5965
5966// NotDone returns true if the page enumeration should be started or is not yet complete.
5967func (page GalleryImageVersionListPage) NotDone() bool {
5968	return !page.givl.IsEmpty()
5969}
5970
5971// Response returns the raw server response from the last page request.
5972func (page GalleryImageVersionListPage) Response() GalleryImageVersionList {
5973	return page.givl
5974}
5975
5976// Values returns the slice of values for the current page or nil if there are no values.
5977func (page GalleryImageVersionListPage) Values() []GalleryImageVersion {
5978	if page.givl.IsEmpty() {
5979		return nil
5980	}
5981	return *page.givl.Value
5982}
5983
5984// Creates a new instance of the GalleryImageVersionListPage type.
5985func NewGalleryImageVersionListPage(cur GalleryImageVersionList, getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage {
5986	return GalleryImageVersionListPage{
5987		fn:   getNextPage,
5988		givl: cur,
5989	}
5990}
5991
5992// GalleryImageVersionProperties describes the properties of a gallery Image Version.
5993type GalleryImageVersionProperties struct {
5994	PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"`
5995	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState3Creating', 'ProvisioningState3Updating', 'ProvisioningState3Failed', 'ProvisioningState3Succeeded', 'ProvisioningState3Deleting', 'ProvisioningState3Migrating'
5996	ProvisioningState ProvisioningState3                 `json:"provisioningState,omitempty"`
5997	StorageProfile    *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"`
5998	// ReplicationStatus - READ-ONLY
5999	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
6000}
6001
6002// MarshalJSON is the custom marshaler for GalleryImageVersionProperties.
6003func (givp GalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
6004	objectMap := make(map[string]interface{})
6005	if givp.PublishingProfile != nil {
6006		objectMap["publishingProfile"] = givp.PublishingProfile
6007	}
6008	if givp.StorageProfile != nil {
6009		objectMap["storageProfile"] = givp.StorageProfile
6010	}
6011	return json.Marshal(objectMap)
6012}
6013
6014// GalleryImageVersionPublishingProfile the publishing profile of a gallery Image Version.
6015type GalleryImageVersionPublishingProfile struct {
6016	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
6017	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
6018	// ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
6019	ReplicaCount *int32 `json:"replicaCount,omitempty"`
6020	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
6021	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
6022	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
6023	PublishedDate *date.Time `json:"publishedDate,omitempty"`
6024	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
6025	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
6026	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
6027	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
6028}
6029
6030// MarshalJSON is the custom marshaler for GalleryImageVersionPublishingProfile.
6031func (givpp GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error) {
6032	objectMap := make(map[string]interface{})
6033	if givpp.TargetRegions != nil {
6034		objectMap["targetRegions"] = givpp.TargetRegions
6035	}
6036	if givpp.ReplicaCount != nil {
6037		objectMap["replicaCount"] = givpp.ReplicaCount
6038	}
6039	if givpp.ExcludeFromLatest != nil {
6040		objectMap["excludeFromLatest"] = givpp.ExcludeFromLatest
6041	}
6042	if givpp.EndOfLifeDate != nil {
6043		objectMap["endOfLifeDate"] = givpp.EndOfLifeDate
6044	}
6045	if givpp.StorageAccountType != "" {
6046		objectMap["storageAccountType"] = givpp.StorageAccountType
6047	}
6048	return json.Marshal(objectMap)
6049}
6050
6051// GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6052// long-running operation.
6053type GalleryImageVersionsCreateOrUpdateFuture struct {
6054	azure.FutureAPI
6055	// Result returns the result of the asynchronous operation.
6056	// If the operation has not completed it will return an error.
6057	Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
6058}
6059
6060// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6061func (future *GalleryImageVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6062	var azFuture azure.Future
6063	if err := json.Unmarshal(body, &azFuture); err != nil {
6064		return err
6065	}
6066	future.FutureAPI = &azFuture
6067	future.Result = future.result
6068	return nil
6069}
6070
6071// result is the default implementation for GalleryImageVersionsCreateOrUpdateFuture.Result.
6072func (future *GalleryImageVersionsCreateOrUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
6073	var done bool
6074	done, err = future.DoneWithContext(context.Background(), client)
6075	if err != nil {
6076		err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6077		return
6078	}
6079	if !done {
6080		giv.Response.Response = future.Response()
6081		err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture")
6082		return
6083	}
6084	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6085	if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
6086		giv, err = client.CreateOrUpdateResponder(giv.Response.Response)
6087		if err != nil {
6088			err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
6089		}
6090	}
6091	return
6092}
6093
6094// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
6095// long-running operation.
6096type GalleryImageVersionsDeleteFuture struct {
6097	azure.FutureAPI
6098	// Result returns the result of the asynchronous operation.
6099	// If the operation has not completed it will return an error.
6100	Result func(GalleryImageVersionsClient) (autorest.Response, error)
6101}
6102
6103// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6104func (future *GalleryImageVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
6105	var azFuture azure.Future
6106	if err := json.Unmarshal(body, &azFuture); err != nil {
6107		return err
6108	}
6109	future.FutureAPI = &azFuture
6110	future.Result = future.result
6111	return nil
6112}
6113
6114// result is the default implementation for GalleryImageVersionsDeleteFuture.Result.
6115func (future *GalleryImageVersionsDeleteFuture) result(client GalleryImageVersionsClient) (ar autorest.Response, err error) {
6116	var done bool
6117	done, err = future.DoneWithContext(context.Background(), client)
6118	if err != nil {
6119		err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
6120		return
6121	}
6122	if !done {
6123		ar.Response = future.Response()
6124		err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture")
6125		return
6126	}
6127	ar.Response = future.Response()
6128	return
6129}
6130
6131// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version.
6132type GalleryImageVersionStorageProfile struct {
6133	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
6134	OsDiskImage *GalleryOSDiskImage           `json:"osDiskImage,omitempty"`
6135	// DataDiskImages - A list of data disk images.
6136	DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"`
6137}
6138
6139// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
6140// long-running operation.
6141type GalleryImageVersionsUpdateFuture struct {
6142	azure.FutureAPI
6143	// Result returns the result of the asynchronous operation.
6144	// If the operation has not completed it will return an error.
6145	Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
6146}
6147
6148// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6149func (future *GalleryImageVersionsUpdateFuture) UnmarshalJSON(body []byte) error {
6150	var azFuture azure.Future
6151	if err := json.Unmarshal(body, &azFuture); err != nil {
6152		return err
6153	}
6154	future.FutureAPI = &azFuture
6155	future.Result = future.result
6156	return nil
6157}
6158
6159// result is the default implementation for GalleryImageVersionsUpdateFuture.Result.
6160func (future *GalleryImageVersionsUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
6161	var done bool
6162	done, err = future.DoneWithContext(context.Background(), client)
6163	if err != nil {
6164		err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
6165		return
6166	}
6167	if !done {
6168		giv.Response.Response = future.Response()
6169		err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsUpdateFuture")
6170		return
6171	}
6172	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6173	if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
6174		giv, err = client.UpdateResponder(giv.Response.Response)
6175		if err != nil {
6176			err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
6177		}
6178	}
6179	return
6180}
6181
6182// GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update.
6183type GalleryImageVersionUpdate struct {
6184	*GalleryImageVersionProperties `json:"properties,omitempty"`
6185	// ID - READ-ONLY; Resource Id
6186	ID *string `json:"id,omitempty"`
6187	// Name - READ-ONLY; Resource name
6188	Name *string `json:"name,omitempty"`
6189	// Type - READ-ONLY; Resource type
6190	Type *string `json:"type,omitempty"`
6191	// Tags - Resource tags
6192	Tags map[string]*string `json:"tags"`
6193}
6194
6195// MarshalJSON is the custom marshaler for GalleryImageVersionUpdate.
6196func (givu GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) {
6197	objectMap := make(map[string]interface{})
6198	if givu.GalleryImageVersionProperties != nil {
6199		objectMap["properties"] = givu.GalleryImageVersionProperties
6200	}
6201	if givu.Tags != nil {
6202		objectMap["tags"] = givu.Tags
6203	}
6204	return json.Marshal(objectMap)
6205}
6206
6207// UnmarshalJSON is the custom unmarshaler for GalleryImageVersionUpdate struct.
6208func (givu *GalleryImageVersionUpdate) UnmarshalJSON(body []byte) error {
6209	var m map[string]*json.RawMessage
6210	err := json.Unmarshal(body, &m)
6211	if err != nil {
6212		return err
6213	}
6214	for k, v := range m {
6215		switch k {
6216		case "properties":
6217			if v != nil {
6218				var galleryImageVersionProperties GalleryImageVersionProperties
6219				err = json.Unmarshal(*v, &galleryImageVersionProperties)
6220				if err != nil {
6221					return err
6222				}
6223				givu.GalleryImageVersionProperties = &galleryImageVersionProperties
6224			}
6225		case "id":
6226			if v != nil {
6227				var ID string
6228				err = json.Unmarshal(*v, &ID)
6229				if err != nil {
6230					return err
6231				}
6232				givu.ID = &ID
6233			}
6234		case "name":
6235			if v != nil {
6236				var name string
6237				err = json.Unmarshal(*v, &name)
6238				if err != nil {
6239					return err
6240				}
6241				givu.Name = &name
6242			}
6243		case "type":
6244			if v != nil {
6245				var typeVar string
6246				err = json.Unmarshal(*v, &typeVar)
6247				if err != nil {
6248					return err
6249				}
6250				givu.Type = &typeVar
6251			}
6252		case "tags":
6253			if v != nil {
6254				var tags map[string]*string
6255				err = json.Unmarshal(*v, &tags)
6256				if err != nil {
6257					return err
6258				}
6259				givu.Tags = tags
6260			}
6261		}
6262	}
6263
6264	return nil
6265}
6266
6267// GalleryList the List Galleries operation response.
6268type GalleryList struct {
6269	autorest.Response `json:"-"`
6270	// Value - A list of galleries.
6271	Value *[]Gallery `json:"value,omitempty"`
6272	// NextLink - The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries.
6273	NextLink *string `json:"nextLink,omitempty"`
6274}
6275
6276// GalleryListIterator provides access to a complete listing of Gallery values.
6277type GalleryListIterator struct {
6278	i    int
6279	page GalleryListPage
6280}
6281
6282// NextWithContext advances to the next value.  If there was an error making
6283// the request the iterator does not advance and the error is returned.
6284func (iter *GalleryListIterator) NextWithContext(ctx context.Context) (err error) {
6285	if tracing.IsEnabled() {
6286		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListIterator.NextWithContext")
6287		defer func() {
6288			sc := -1
6289			if iter.Response().Response.Response != nil {
6290				sc = iter.Response().Response.Response.StatusCode
6291			}
6292			tracing.EndSpan(ctx, sc, err)
6293		}()
6294	}
6295	iter.i++
6296	if iter.i < len(iter.page.Values()) {
6297		return nil
6298	}
6299	err = iter.page.NextWithContext(ctx)
6300	if err != nil {
6301		iter.i--
6302		return err
6303	}
6304	iter.i = 0
6305	return nil
6306}
6307
6308// Next advances to the next value.  If there was an error making
6309// the request the iterator does not advance and the error is returned.
6310// Deprecated: Use NextWithContext() instead.
6311func (iter *GalleryListIterator) Next() error {
6312	return iter.NextWithContext(context.Background())
6313}
6314
6315// NotDone returns true if the enumeration should be started or is not yet complete.
6316func (iter GalleryListIterator) NotDone() bool {
6317	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6318}
6319
6320// Response returns the raw server response from the last page request.
6321func (iter GalleryListIterator) Response() GalleryList {
6322	return iter.page.Response()
6323}
6324
6325// Value returns the current value or a zero-initialized value if the
6326// iterator has advanced beyond the end of the collection.
6327func (iter GalleryListIterator) Value() Gallery {
6328	if !iter.page.NotDone() {
6329		return Gallery{}
6330	}
6331	return iter.page.Values()[iter.i]
6332}
6333
6334// Creates a new instance of the GalleryListIterator type.
6335func NewGalleryListIterator(page GalleryListPage) GalleryListIterator {
6336	return GalleryListIterator{page: page}
6337}
6338
6339// IsEmpty returns true if the ListResult contains no values.
6340func (gl GalleryList) IsEmpty() bool {
6341	return gl.Value == nil || len(*gl.Value) == 0
6342}
6343
6344// hasNextLink returns true if the NextLink is not empty.
6345func (gl GalleryList) hasNextLink() bool {
6346	return gl.NextLink != nil && len(*gl.NextLink) != 0
6347}
6348
6349// galleryListPreparer prepares a request to retrieve the next set of results.
6350// It returns nil if no more results exist.
6351func (gl GalleryList) galleryListPreparer(ctx context.Context) (*http.Request, error) {
6352	if !gl.hasNextLink() {
6353		return nil, nil
6354	}
6355	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6356		autorest.AsJSON(),
6357		autorest.AsGet(),
6358		autorest.WithBaseURL(to.String(gl.NextLink)))
6359}
6360
6361// GalleryListPage contains a page of Gallery values.
6362type GalleryListPage struct {
6363	fn func(context.Context, GalleryList) (GalleryList, error)
6364	gl GalleryList
6365}
6366
6367// NextWithContext advances to the next page of values.  If there was an error making
6368// the request the page does not advance and the error is returned.
6369func (page *GalleryListPage) NextWithContext(ctx context.Context) (err error) {
6370	if tracing.IsEnabled() {
6371		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListPage.NextWithContext")
6372		defer func() {
6373			sc := -1
6374			if page.Response().Response.Response != nil {
6375				sc = page.Response().Response.Response.StatusCode
6376			}
6377			tracing.EndSpan(ctx, sc, err)
6378		}()
6379	}
6380	for {
6381		next, err := page.fn(ctx, page.gl)
6382		if err != nil {
6383			return err
6384		}
6385		page.gl = next
6386		if !next.hasNextLink() || !next.IsEmpty() {
6387			break
6388		}
6389	}
6390	return nil
6391}
6392
6393// Next advances to the next page of values.  If there was an error making
6394// the request the page does not advance and the error is returned.
6395// Deprecated: Use NextWithContext() instead.
6396func (page *GalleryListPage) Next() error {
6397	return page.NextWithContext(context.Background())
6398}
6399
6400// NotDone returns true if the page enumeration should be started or is not yet complete.
6401func (page GalleryListPage) NotDone() bool {
6402	return !page.gl.IsEmpty()
6403}
6404
6405// Response returns the raw server response from the last page request.
6406func (page GalleryListPage) Response() GalleryList {
6407	return page.gl
6408}
6409
6410// Values returns the slice of values for the current page or nil if there are no values.
6411func (page GalleryListPage) Values() []Gallery {
6412	if page.gl.IsEmpty() {
6413		return nil
6414	}
6415	return *page.gl.Value
6416}
6417
6418// Creates a new instance of the GalleryListPage type.
6419func NewGalleryListPage(cur GalleryList, getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage {
6420	return GalleryListPage{
6421		fn: getNextPage,
6422		gl: cur,
6423	}
6424}
6425
6426// GalleryOSDiskImage this is the OS disk image.
6427type GalleryOSDiskImage struct {
6428	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
6429	SizeInGB *int32 `json:"sizeInGB,omitempty"`
6430	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
6431	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
6432	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
6433}
6434
6435// MarshalJSON is the custom marshaler for GalleryOSDiskImage.
6436func (godi GalleryOSDiskImage) MarshalJSON() ([]byte, error) {
6437	objectMap := make(map[string]interface{})
6438	if godi.HostCaching != "" {
6439		objectMap["hostCaching"] = godi.HostCaching
6440	}
6441	if godi.Source != nil {
6442		objectMap["source"] = godi.Source
6443	}
6444	return json.Marshal(objectMap)
6445}
6446
6447// GalleryProperties describes the properties of a Shared Image Gallery.
6448type GalleryProperties struct {
6449	// Description - The description of this Shared Image Gallery resource. This property is updatable.
6450	Description *string            `json:"description,omitempty"`
6451	Identifier  *GalleryIdentifier `json:"identifier,omitempty"`
6452	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating'
6453	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6454}
6455
6456// MarshalJSON is the custom marshaler for GalleryProperties.
6457func (gp GalleryProperties) MarshalJSON() ([]byte, error) {
6458	objectMap := make(map[string]interface{})
6459	if gp.Description != nil {
6460		objectMap["description"] = gp.Description
6461	}
6462	if gp.Identifier != nil {
6463		objectMap["identifier"] = gp.Identifier
6464	}
6465	return json.Marshal(objectMap)
6466}
6467
6468// GalleryUpdate specifies information about the Shared Image Gallery that you want to update.
6469type GalleryUpdate struct {
6470	*GalleryProperties `json:"properties,omitempty"`
6471	// ID - READ-ONLY; Resource Id
6472	ID *string `json:"id,omitempty"`
6473	// Name - READ-ONLY; Resource name
6474	Name *string `json:"name,omitempty"`
6475	// Type - READ-ONLY; Resource type
6476	Type *string `json:"type,omitempty"`
6477	// Tags - Resource tags
6478	Tags map[string]*string `json:"tags"`
6479}
6480
6481// MarshalJSON is the custom marshaler for GalleryUpdate.
6482func (gu GalleryUpdate) MarshalJSON() ([]byte, error) {
6483	objectMap := make(map[string]interface{})
6484	if gu.GalleryProperties != nil {
6485		objectMap["properties"] = gu.GalleryProperties
6486	}
6487	if gu.Tags != nil {
6488		objectMap["tags"] = gu.Tags
6489	}
6490	return json.Marshal(objectMap)
6491}
6492
6493// UnmarshalJSON is the custom unmarshaler for GalleryUpdate struct.
6494func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error {
6495	var m map[string]*json.RawMessage
6496	err := json.Unmarshal(body, &m)
6497	if err != nil {
6498		return err
6499	}
6500	for k, v := range m {
6501		switch k {
6502		case "properties":
6503			if v != nil {
6504				var galleryProperties GalleryProperties
6505				err = json.Unmarshal(*v, &galleryProperties)
6506				if err != nil {
6507					return err
6508				}
6509				gu.GalleryProperties = &galleryProperties
6510			}
6511		case "id":
6512			if v != nil {
6513				var ID string
6514				err = json.Unmarshal(*v, &ID)
6515				if err != nil {
6516					return err
6517				}
6518				gu.ID = &ID
6519			}
6520		case "name":
6521			if v != nil {
6522				var name string
6523				err = json.Unmarshal(*v, &name)
6524				if err != nil {
6525					return err
6526				}
6527				gu.Name = &name
6528			}
6529		case "type":
6530			if v != nil {
6531				var typeVar string
6532				err = json.Unmarshal(*v, &typeVar)
6533				if err != nil {
6534					return err
6535				}
6536				gu.Type = &typeVar
6537			}
6538		case "tags":
6539			if v != nil {
6540				var tags map[string]*string
6541				err = json.Unmarshal(*v, &tags)
6542				if err != nil {
6543					return err
6544				}
6545				gu.Tags = tags
6546			}
6547		}
6548	}
6549
6550	return nil
6551}
6552
6553// GrantAccessData data used for requesting a SAS.
6554type GrantAccessData struct {
6555	// Access - Possible values include: 'None', 'Read', 'Write'
6556	Access AccessLevel `json:"access,omitempty"`
6557	// DurationInSeconds - Time duration in seconds until the SAS access expires.
6558	DurationInSeconds *int32 `json:"durationInSeconds,omitempty"`
6559}
6560
6561// HardwareProfile specifies the hardware settings for the virtual machine.
6562type HardwareProfile struct {
6563	// VMSize - Specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes). <br><br> The available VM sizes depend on region and availability set. 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/en-us/rest/api/compute/resourceskus/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). <br><br> This list of sizes is no longer updated and the **VirtualMachineSizeTypes** string constants will be removed from the subsequent REST API specification. Use [List all available virtual machine sizes in a region]( https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) to get the latest sizes. Possible values include: 'VirtualMachineSizeTypesBasicA0', 'VirtualMachineSizeTypesBasicA1', 'VirtualMachineSizeTypesBasicA2', 'VirtualMachineSizeTypesBasicA3', 'VirtualMachineSizeTypesBasicA4', 'VirtualMachineSizeTypesStandardA0', 'VirtualMachineSizeTypesStandardA1', 'VirtualMachineSizeTypesStandardA2', 'VirtualMachineSizeTypesStandardA3', 'VirtualMachineSizeTypesStandardA4', 'VirtualMachineSizeTypesStandardA5', 'VirtualMachineSizeTypesStandardA6', 'VirtualMachineSizeTypesStandardA7', 'VirtualMachineSizeTypesStandardA8', 'VirtualMachineSizeTypesStandardA9', 'VirtualMachineSizeTypesStandardA10', 'VirtualMachineSizeTypesStandardA11', 'VirtualMachineSizeTypesStandardA1V2', 'VirtualMachineSizeTypesStandardA2V2', 'VirtualMachineSizeTypesStandardA4V2', 'VirtualMachineSizeTypesStandardA8V2', 'VirtualMachineSizeTypesStandardA2mV2', 'VirtualMachineSizeTypesStandardA4mV2', 'VirtualMachineSizeTypesStandardA8mV2', 'VirtualMachineSizeTypesStandardB1s', 'VirtualMachineSizeTypesStandardB1ms', 'VirtualMachineSizeTypesStandardB2s', 'VirtualMachineSizeTypesStandardB2ms', 'VirtualMachineSizeTypesStandardB4ms', 'VirtualMachineSizeTypesStandardB8ms', 'VirtualMachineSizeTypesStandardD1', 'VirtualMachineSizeTypesStandardD2', 'VirtualMachineSizeTypesStandardD3', 'VirtualMachineSizeTypesStandardD4', 'VirtualMachineSizeTypesStandardD11', 'VirtualMachineSizeTypesStandardD12', 'VirtualMachineSizeTypesStandardD13', 'VirtualMachineSizeTypesStandardD14', 'VirtualMachineSizeTypesStandardD1V2', 'VirtualMachineSizeTypesStandardD2V2', 'VirtualMachineSizeTypesStandardD3V2', 'VirtualMachineSizeTypesStandardD4V2', 'VirtualMachineSizeTypesStandardD5V2', 'VirtualMachineSizeTypesStandardD2V3', 'VirtualMachineSizeTypesStandardD4V3', 'VirtualMachineSizeTypesStandardD8V3', 'VirtualMachineSizeTypesStandardD16V3', 'VirtualMachineSizeTypesStandardD32V3', 'VirtualMachineSizeTypesStandardD64V3', 'VirtualMachineSizeTypesStandardD2sV3', 'VirtualMachineSizeTypesStandardD4sV3', 'VirtualMachineSizeTypesStandardD8sV3', 'VirtualMachineSizeTypesStandardD16sV3', 'VirtualMachineSizeTypesStandardD32sV3', 'VirtualMachineSizeTypesStandardD64sV3', 'VirtualMachineSizeTypesStandardD11V2', 'VirtualMachineSizeTypesStandardD12V2', 'VirtualMachineSizeTypesStandardD13V2', 'VirtualMachineSizeTypesStandardD14V2', 'VirtualMachineSizeTypesStandardD15V2', 'VirtualMachineSizeTypesStandardDS1', 'VirtualMachineSizeTypesStandardDS2', 'VirtualMachineSizeTypesStandardDS3', 'VirtualMachineSizeTypesStandardDS4', 'VirtualMachineSizeTypesStandardDS11', 'VirtualMachineSizeTypesStandardDS12', 'VirtualMachineSizeTypesStandardDS13', 'VirtualMachineSizeTypesStandardDS14', 'VirtualMachineSizeTypesStandardDS1V2', 'VirtualMachineSizeTypesStandardDS2V2', 'VirtualMachineSizeTypesStandardDS3V2', 'VirtualMachineSizeTypesStandardDS4V2', 'VirtualMachineSizeTypesStandardDS5V2', 'VirtualMachineSizeTypesStandardDS11V2', 'VirtualMachineSizeTypesStandardDS12V2', 'VirtualMachineSizeTypesStandardDS13V2', 'VirtualMachineSizeTypesStandardDS14V2', 'VirtualMachineSizeTypesStandardDS15V2', 'VirtualMachineSizeTypesStandardDS134V2', 'VirtualMachineSizeTypesStandardDS132V2', 'VirtualMachineSizeTypesStandardDS148V2', 'VirtualMachineSizeTypesStandardDS144V2', 'VirtualMachineSizeTypesStandardE2V3', 'VirtualMachineSizeTypesStandardE4V3', 'VirtualMachineSizeTypesStandardE8V3', 'VirtualMachineSizeTypesStandardE16V3', 'VirtualMachineSizeTypesStandardE32V3', 'VirtualMachineSizeTypesStandardE64V3', 'VirtualMachineSizeTypesStandardE2sV3', 'VirtualMachineSizeTypesStandardE4sV3', 'VirtualMachineSizeTypesStandardE8sV3', 'VirtualMachineSizeTypesStandardE16sV3', 'VirtualMachineSizeTypesStandardE32sV3', 'VirtualMachineSizeTypesStandardE64sV3', 'VirtualMachineSizeTypesStandardE3216V3', 'VirtualMachineSizeTypesStandardE328sV3', 'VirtualMachineSizeTypesStandardE6432sV3', 'VirtualMachineSizeTypesStandardE6416sV3', 'VirtualMachineSizeTypesStandardF1', 'VirtualMachineSizeTypesStandardF2', 'VirtualMachineSizeTypesStandardF4', 'VirtualMachineSizeTypesStandardF8', 'VirtualMachineSizeTypesStandardF16', 'VirtualMachineSizeTypesStandardF1s', 'VirtualMachineSizeTypesStandardF2s', 'VirtualMachineSizeTypesStandardF4s', 'VirtualMachineSizeTypesStandardF8s', 'VirtualMachineSizeTypesStandardF16s', 'VirtualMachineSizeTypesStandardF2sV2', 'VirtualMachineSizeTypesStandardF4sV2', 'VirtualMachineSizeTypesStandardF8sV2', 'VirtualMachineSizeTypesStandardF16sV2', 'VirtualMachineSizeTypesStandardF32sV2', 'VirtualMachineSizeTypesStandardF64sV2', 'VirtualMachineSizeTypesStandardF72sV2', 'VirtualMachineSizeTypesStandardG1', 'VirtualMachineSizeTypesStandardG2', 'VirtualMachineSizeTypesStandardG3', 'VirtualMachineSizeTypesStandardG4', 'VirtualMachineSizeTypesStandardG5', 'VirtualMachineSizeTypesStandardGS1', 'VirtualMachineSizeTypesStandardGS2', 'VirtualMachineSizeTypesStandardGS3', 'VirtualMachineSizeTypesStandardGS4', 'VirtualMachineSizeTypesStandardGS5', 'VirtualMachineSizeTypesStandardGS48', 'VirtualMachineSizeTypesStandardGS44', 'VirtualMachineSizeTypesStandardGS516', 'VirtualMachineSizeTypesStandardGS58', 'VirtualMachineSizeTypesStandardH8', 'VirtualMachineSizeTypesStandardH16', 'VirtualMachineSizeTypesStandardH8m', 'VirtualMachineSizeTypesStandardH16m', 'VirtualMachineSizeTypesStandardH16r', 'VirtualMachineSizeTypesStandardH16mr', 'VirtualMachineSizeTypesStandardL4s', 'VirtualMachineSizeTypesStandardL8s', 'VirtualMachineSizeTypesStandardL16s', 'VirtualMachineSizeTypesStandardL32s', 'VirtualMachineSizeTypesStandardM64s', 'VirtualMachineSizeTypesStandardM64ms', 'VirtualMachineSizeTypesStandardM128s', 'VirtualMachineSizeTypesStandardM128ms', 'VirtualMachineSizeTypesStandardM6432ms', 'VirtualMachineSizeTypesStandardM6416ms', 'VirtualMachineSizeTypesStandardM12864ms', 'VirtualMachineSizeTypesStandardM12832ms', 'VirtualMachineSizeTypesStandardNC6', 'VirtualMachineSizeTypesStandardNC12', 'VirtualMachineSizeTypesStandardNC24', 'VirtualMachineSizeTypesStandardNC24r', 'VirtualMachineSizeTypesStandardNC6sV2', 'VirtualMachineSizeTypesStandardNC12sV2', 'VirtualMachineSizeTypesStandardNC24sV2', 'VirtualMachineSizeTypesStandardNC24rsV2', 'VirtualMachineSizeTypesStandardNC6sV3', 'VirtualMachineSizeTypesStandardNC12sV3', 'VirtualMachineSizeTypesStandardNC24sV3', 'VirtualMachineSizeTypesStandardNC24rsV3', 'VirtualMachineSizeTypesStandardND6s', 'VirtualMachineSizeTypesStandardND12s', 'VirtualMachineSizeTypesStandardND24s', 'VirtualMachineSizeTypesStandardND24rs', 'VirtualMachineSizeTypesStandardNV6', 'VirtualMachineSizeTypesStandardNV12', 'VirtualMachineSizeTypesStandardNV24'
6564	VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"`
6565}
6566
6567// Image the source user image virtual hard disk. The virtual hard disk will be copied before being
6568// attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not
6569// exist.
6570type Image struct {
6571	autorest.Response `json:"-"`
6572	*ImageProperties  `json:"properties,omitempty"`
6573	// ID - READ-ONLY; Resource Id
6574	ID *string `json:"id,omitempty"`
6575	// Name - READ-ONLY; Resource name
6576	Name *string `json:"name,omitempty"`
6577	// Type - READ-ONLY; Resource type
6578	Type *string `json:"type,omitempty"`
6579	// Location - Resource location
6580	Location *string `json:"location,omitempty"`
6581	// Tags - Resource tags
6582	Tags map[string]*string `json:"tags"`
6583}
6584
6585// MarshalJSON is the custom marshaler for Image.
6586func (i Image) MarshalJSON() ([]byte, error) {
6587	objectMap := make(map[string]interface{})
6588	if i.ImageProperties != nil {
6589		objectMap["properties"] = i.ImageProperties
6590	}
6591	if i.Location != nil {
6592		objectMap["location"] = i.Location
6593	}
6594	if i.Tags != nil {
6595		objectMap["tags"] = i.Tags
6596	}
6597	return json.Marshal(objectMap)
6598}
6599
6600// UnmarshalJSON is the custom unmarshaler for Image struct.
6601func (i *Image) UnmarshalJSON(body []byte) error {
6602	var m map[string]*json.RawMessage
6603	err := json.Unmarshal(body, &m)
6604	if err != nil {
6605		return err
6606	}
6607	for k, v := range m {
6608		switch k {
6609		case "properties":
6610			if v != nil {
6611				var imageProperties ImageProperties
6612				err = json.Unmarshal(*v, &imageProperties)
6613				if err != nil {
6614					return err
6615				}
6616				i.ImageProperties = &imageProperties
6617			}
6618		case "id":
6619			if v != nil {
6620				var ID string
6621				err = json.Unmarshal(*v, &ID)
6622				if err != nil {
6623					return err
6624				}
6625				i.ID = &ID
6626			}
6627		case "name":
6628			if v != nil {
6629				var name string
6630				err = json.Unmarshal(*v, &name)
6631				if err != nil {
6632					return err
6633				}
6634				i.Name = &name
6635			}
6636		case "type":
6637			if v != nil {
6638				var typeVar string
6639				err = json.Unmarshal(*v, &typeVar)
6640				if err != nil {
6641					return err
6642				}
6643				i.Type = &typeVar
6644			}
6645		case "location":
6646			if v != nil {
6647				var location string
6648				err = json.Unmarshal(*v, &location)
6649				if err != nil {
6650					return err
6651				}
6652				i.Location = &location
6653			}
6654		case "tags":
6655			if v != nil {
6656				var tags map[string]*string
6657				err = json.Unmarshal(*v, &tags)
6658				if err != nil {
6659					return err
6660				}
6661				i.Tags = tags
6662			}
6663		}
6664	}
6665
6666	return nil
6667}
6668
6669// ImageDataDisk describes a data disk.
6670type ImageDataDisk struct {
6671	// 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.
6672	Lun *int32 `json:"lun,omitempty"`
6673	// Snapshot - The snapshot.
6674	Snapshot *SubResource `json:"snapshot,omitempty"`
6675	// ManagedDisk - The managedDisk.
6676	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
6677	// BlobURI - The Virtual Hard Disk.
6678	BlobURI *string `json:"blobUri,omitempty"`
6679	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
6680	Caching CachingTypes `json:"caching,omitempty"`
6681	// 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
6682	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
6683	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
6684	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
6685	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
6686	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
6687}
6688
6689// ImageDisk describes a image disk.
6690type ImageDisk struct {
6691	// Snapshot - The snapshot.
6692	Snapshot *SubResource `json:"snapshot,omitempty"`
6693	// ManagedDisk - The managedDisk.
6694	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
6695	// BlobURI - The Virtual Hard Disk.
6696	BlobURI *string `json:"blobUri,omitempty"`
6697	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
6698	Caching CachingTypes `json:"caching,omitempty"`
6699	// 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
6700	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
6701	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
6702	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
6703	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
6704	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
6705}
6706
6707// ImageDiskReference the source image used for creating the disk.
6708type ImageDiskReference struct {
6709	// ID - A relative uri containing either a Platform Image Repository or user image reference.
6710	ID *string `json:"id,omitempty"`
6711	// Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
6712	Lun *int32 `json:"lun,omitempty"`
6713}
6714
6715// ImageListResult the List Image operation response.
6716type ImageListResult struct {
6717	autorest.Response `json:"-"`
6718	// Value - The list of Images.
6719	Value *[]Image `json:"value,omitempty"`
6720	// NextLink - The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images.
6721	NextLink *string `json:"nextLink,omitempty"`
6722}
6723
6724// ImageListResultIterator provides access to a complete listing of Image values.
6725type ImageListResultIterator struct {
6726	i    int
6727	page ImageListResultPage
6728}
6729
6730// NextWithContext advances to the next value.  If there was an error making
6731// the request the iterator does not advance and the error is returned.
6732func (iter *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) {
6733	if tracing.IsEnabled() {
6734		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.NextWithContext")
6735		defer func() {
6736			sc := -1
6737			if iter.Response().Response.Response != nil {
6738				sc = iter.Response().Response.Response.StatusCode
6739			}
6740			tracing.EndSpan(ctx, sc, err)
6741		}()
6742	}
6743	iter.i++
6744	if iter.i < len(iter.page.Values()) {
6745		return nil
6746	}
6747	err = iter.page.NextWithContext(ctx)
6748	if err != nil {
6749		iter.i--
6750		return err
6751	}
6752	iter.i = 0
6753	return nil
6754}
6755
6756// Next advances to the next value.  If there was an error making
6757// the request the iterator does not advance and the error is returned.
6758// Deprecated: Use NextWithContext() instead.
6759func (iter *ImageListResultIterator) Next() error {
6760	return iter.NextWithContext(context.Background())
6761}
6762
6763// NotDone returns true if the enumeration should be started or is not yet complete.
6764func (iter ImageListResultIterator) NotDone() bool {
6765	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6766}
6767
6768// Response returns the raw server response from the last page request.
6769func (iter ImageListResultIterator) Response() ImageListResult {
6770	return iter.page.Response()
6771}
6772
6773// Value returns the current value or a zero-initialized value if the
6774// iterator has advanced beyond the end of the collection.
6775func (iter ImageListResultIterator) Value() Image {
6776	if !iter.page.NotDone() {
6777		return Image{}
6778	}
6779	return iter.page.Values()[iter.i]
6780}
6781
6782// Creates a new instance of the ImageListResultIterator type.
6783func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator {
6784	return ImageListResultIterator{page: page}
6785}
6786
6787// IsEmpty returns true if the ListResult contains no values.
6788func (ilr ImageListResult) IsEmpty() bool {
6789	return ilr.Value == nil || len(*ilr.Value) == 0
6790}
6791
6792// hasNextLink returns true if the NextLink is not empty.
6793func (ilr ImageListResult) hasNextLink() bool {
6794	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
6795}
6796
6797// imageListResultPreparer prepares a request to retrieve the next set of results.
6798// It returns nil if no more results exist.
6799func (ilr ImageListResult) imageListResultPreparer(ctx context.Context) (*http.Request, error) {
6800	if !ilr.hasNextLink() {
6801		return nil, nil
6802	}
6803	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6804		autorest.AsJSON(),
6805		autorest.AsGet(),
6806		autorest.WithBaseURL(to.String(ilr.NextLink)))
6807}
6808
6809// ImageListResultPage contains a page of Image values.
6810type ImageListResultPage struct {
6811	fn  func(context.Context, ImageListResult) (ImageListResult, error)
6812	ilr ImageListResult
6813}
6814
6815// NextWithContext advances to the next page of values.  If there was an error making
6816// the request the page does not advance and the error is returned.
6817func (page *ImageListResultPage) NextWithContext(ctx context.Context) (err error) {
6818	if tracing.IsEnabled() {
6819		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultPage.NextWithContext")
6820		defer func() {
6821			sc := -1
6822			if page.Response().Response.Response != nil {
6823				sc = page.Response().Response.Response.StatusCode
6824			}
6825			tracing.EndSpan(ctx, sc, err)
6826		}()
6827	}
6828	for {
6829		next, err := page.fn(ctx, page.ilr)
6830		if err != nil {
6831			return err
6832		}
6833		page.ilr = next
6834		if !next.hasNextLink() || !next.IsEmpty() {
6835			break
6836		}
6837	}
6838	return nil
6839}
6840
6841// Next advances to the next page of values.  If there was an error making
6842// the request the page does not advance and the error is returned.
6843// Deprecated: Use NextWithContext() instead.
6844func (page *ImageListResultPage) Next() error {
6845	return page.NextWithContext(context.Background())
6846}
6847
6848// NotDone returns true if the page enumeration should be started or is not yet complete.
6849func (page ImageListResultPage) NotDone() bool {
6850	return !page.ilr.IsEmpty()
6851}
6852
6853// Response returns the raw server response from the last page request.
6854func (page ImageListResultPage) Response() ImageListResult {
6855	return page.ilr
6856}
6857
6858// Values returns the slice of values for the current page or nil if there are no values.
6859func (page ImageListResultPage) Values() []Image {
6860	if page.ilr.IsEmpty() {
6861		return nil
6862	}
6863	return *page.ilr.Value
6864}
6865
6866// Creates a new instance of the ImageListResultPage type.
6867func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
6868	return ImageListResultPage{
6869		fn:  getNextPage,
6870		ilr: cur,
6871	}
6872}
6873
6874// ImageOSDisk describes an Operating System disk.
6875type ImageOSDisk struct {
6876	// 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'
6877	OsType OperatingSystemTypes `json:"osType,omitempty"`
6878	// OsState - The OS State. Possible values include: 'Generalized', 'Specialized'
6879	OsState OperatingSystemStateTypes `json:"osState,omitempty"`
6880	// Snapshot - The snapshot.
6881	Snapshot *SubResource `json:"snapshot,omitempty"`
6882	// ManagedDisk - The managedDisk.
6883	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
6884	// BlobURI - The Virtual Hard Disk.
6885	BlobURI *string `json:"blobUri,omitempty"`
6886	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
6887	Caching CachingTypes `json:"caching,omitempty"`
6888	// 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
6889	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
6890	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
6891	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
6892	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
6893	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
6894}
6895
6896// ImageProperties describes the properties of an Image.
6897type ImageProperties struct {
6898	// SourceVirtualMachine - The source virtual machine from which Image is created.
6899	SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"`
6900	// StorageProfile - Specifies the storage settings for the virtual machine disks.
6901	StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"`
6902	// ProvisioningState - READ-ONLY; The provisioning state.
6903	ProvisioningState *string `json:"provisioningState,omitempty"`
6904	// HyperVGeneration - Gets the HyperVGenerationType of the VirtualMachine created from the image. Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
6905	HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
6906}
6907
6908// MarshalJSON is the custom marshaler for ImageProperties.
6909func (IP ImageProperties) MarshalJSON() ([]byte, error) {
6910	objectMap := make(map[string]interface{})
6911	if IP.SourceVirtualMachine != nil {
6912		objectMap["sourceVirtualMachine"] = IP.SourceVirtualMachine
6913	}
6914	if IP.StorageProfile != nil {
6915		objectMap["storageProfile"] = IP.StorageProfile
6916	}
6917	if IP.HyperVGeneration != "" {
6918		objectMap["hyperVGeneration"] = IP.HyperVGeneration
6919	}
6920	return json.Marshal(objectMap)
6921}
6922
6923// ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace
6924// images.
6925type ImagePurchasePlan struct {
6926	// Name - The plan ID.
6927	Name *string `json:"name,omitempty"`
6928	// Publisher - The publisher ID.
6929	Publisher *string `json:"publisher,omitempty"`
6930	// Product - The product ID.
6931	Product *string `json:"product,omitempty"`
6932}
6933
6934// ImageReference specifies information about the image to use. You can specify information about platform
6935// images, marketplace images, or virtual machine images. This element is required when you want to use a
6936// platform image, marketplace image, or virtual machine image, but is not used in other creation
6937// operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.
6938type ImageReference struct {
6939	// Publisher - The image publisher.
6940	Publisher *string `json:"publisher,omitempty"`
6941	// Offer - Specifies the offer of the platform image or marketplace image used to create the virtual machine.
6942	Offer *string `json:"offer,omitempty"`
6943	// Sku - The image SKU.
6944	Sku *string `json:"sku,omitempty"`
6945	// 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.
6946	Version *string `json:"version,omitempty"`
6947	// ExactVersion - READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.
6948	ExactVersion *string `json:"exactVersion,omitempty"`
6949	// ID - Resource Id
6950	ID *string `json:"id,omitempty"`
6951}
6952
6953// MarshalJSON is the custom marshaler for ImageReference.
6954func (ir ImageReference) MarshalJSON() ([]byte, error) {
6955	objectMap := make(map[string]interface{})
6956	if ir.Publisher != nil {
6957		objectMap["publisher"] = ir.Publisher
6958	}
6959	if ir.Offer != nil {
6960		objectMap["offer"] = ir.Offer
6961	}
6962	if ir.Sku != nil {
6963		objectMap["sku"] = ir.Sku
6964	}
6965	if ir.Version != nil {
6966		objectMap["version"] = ir.Version
6967	}
6968	if ir.ID != nil {
6969		objectMap["id"] = ir.ID
6970	}
6971	return json.Marshal(objectMap)
6972}
6973
6974// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
6975// operation.
6976type ImagesCreateOrUpdateFuture struct {
6977	azure.FutureAPI
6978	// Result returns the result of the asynchronous operation.
6979	// If the operation has not completed it will return an error.
6980	Result func(ImagesClient) (Image, error)
6981}
6982
6983// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6984func (future *ImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6985	var azFuture azure.Future
6986	if err := json.Unmarshal(body, &azFuture); err != nil {
6987		return err
6988	}
6989	future.FutureAPI = &azFuture
6990	future.Result = future.result
6991	return nil
6992}
6993
6994// result is the default implementation for ImagesCreateOrUpdateFuture.Result.
6995func (future *ImagesCreateOrUpdateFuture) result(client ImagesClient) (i Image, err error) {
6996	var done bool
6997	done, err = future.DoneWithContext(context.Background(), client)
6998	if err != nil {
6999		err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7000		return
7001	}
7002	if !done {
7003		i.Response.Response = future.Response()
7004		err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
7005		return
7006	}
7007	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7008	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
7009		i, err = client.CreateOrUpdateResponder(i.Response.Response)
7010		if err != nil {
7011			err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
7012		}
7013	}
7014	return
7015}
7016
7017// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
7018type ImagesDeleteFuture struct {
7019	azure.FutureAPI
7020	// Result returns the result of the asynchronous operation.
7021	// If the operation has not completed it will return an error.
7022	Result func(ImagesClient) (autorest.Response, error)
7023}
7024
7025// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7026func (future *ImagesDeleteFuture) UnmarshalJSON(body []byte) error {
7027	var azFuture azure.Future
7028	if err := json.Unmarshal(body, &azFuture); err != nil {
7029		return err
7030	}
7031	future.FutureAPI = &azFuture
7032	future.Result = future.result
7033	return nil
7034}
7035
7036// result is the default implementation for ImagesDeleteFuture.Result.
7037func (future *ImagesDeleteFuture) result(client ImagesClient) (ar autorest.Response, err error) {
7038	var done bool
7039	done, err = future.DoneWithContext(context.Background(), client)
7040	if err != nil {
7041		err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Polling failure")
7042		return
7043	}
7044	if !done {
7045		ar.Response = future.Response()
7046		err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
7047		return
7048	}
7049	ar.Response = future.Response()
7050	return
7051}
7052
7053// ImageStorageProfile describes a storage profile.
7054type ImageStorageProfile struct {
7055	// 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).
7056	OsDisk *ImageOSDisk `json:"osDisk,omitempty"`
7057	// 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).
7058	DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"`
7059	// 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).
7060	ZoneResilient *bool `json:"zoneResilient,omitempty"`
7061}
7062
7063// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
7064type ImagesUpdateFuture struct {
7065	azure.FutureAPI
7066	// Result returns the result of the asynchronous operation.
7067	// If the operation has not completed it will return an error.
7068	Result func(ImagesClient) (Image, error)
7069}
7070
7071// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7072func (future *ImagesUpdateFuture) UnmarshalJSON(body []byte) error {
7073	var azFuture azure.Future
7074	if err := json.Unmarshal(body, &azFuture); err != nil {
7075		return err
7076	}
7077	future.FutureAPI = &azFuture
7078	future.Result = future.result
7079	return nil
7080}
7081
7082// result is the default implementation for ImagesUpdateFuture.Result.
7083func (future *ImagesUpdateFuture) result(client ImagesClient) (i Image, err error) {
7084	var done bool
7085	done, err = future.DoneWithContext(context.Background(), client)
7086	if err != nil {
7087		err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Polling failure")
7088		return
7089	}
7090	if !done {
7091		i.Response.Response = future.Response()
7092		err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
7093		return
7094	}
7095	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7096	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
7097		i, err = client.UpdateResponder(i.Response.Response)
7098		if err != nil {
7099			err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
7100		}
7101	}
7102	return
7103}
7104
7105// ImageUpdate the source user image virtual hard disk. Only tags may be updated.
7106type ImageUpdate struct {
7107	*ImageProperties `json:"properties,omitempty"`
7108	// Tags - Resource tags
7109	Tags map[string]*string `json:"tags"`
7110}
7111
7112// MarshalJSON is the custom marshaler for ImageUpdate.
7113func (iu ImageUpdate) MarshalJSON() ([]byte, error) {
7114	objectMap := make(map[string]interface{})
7115	if iu.ImageProperties != nil {
7116		objectMap["properties"] = iu.ImageProperties
7117	}
7118	if iu.Tags != nil {
7119		objectMap["tags"] = iu.Tags
7120	}
7121	return json.Marshal(objectMap)
7122}
7123
7124// UnmarshalJSON is the custom unmarshaler for ImageUpdate struct.
7125func (iu *ImageUpdate) UnmarshalJSON(body []byte) error {
7126	var m map[string]*json.RawMessage
7127	err := json.Unmarshal(body, &m)
7128	if err != nil {
7129		return err
7130	}
7131	for k, v := range m {
7132		switch k {
7133		case "properties":
7134			if v != nil {
7135				var imageProperties ImageProperties
7136				err = json.Unmarshal(*v, &imageProperties)
7137				if err != nil {
7138					return err
7139				}
7140				iu.ImageProperties = &imageProperties
7141			}
7142		case "tags":
7143			if v != nil {
7144				var tags map[string]*string
7145				err = json.Unmarshal(*v, &tags)
7146				if err != nil {
7147					return err
7148				}
7149				iu.Tags = tags
7150			}
7151		}
7152	}
7153
7154	return nil
7155}
7156
7157// InnerError inner error details.
7158type InnerError struct {
7159	// Exceptiontype - The exception type.
7160	Exceptiontype *string `json:"exceptiontype,omitempty"`
7161	// Errordetail - The internal error message or exception dump.
7162	Errordetail *string `json:"errordetail,omitempty"`
7163}
7164
7165// InstanceViewStatus instance view status.
7166type InstanceViewStatus struct {
7167	// Code - The status code.
7168	Code *string `json:"code,omitempty"`
7169	// Level - The level code. Possible values include: 'Info', 'Warning', 'Error'
7170	Level StatusLevelTypes `json:"level,omitempty"`
7171	// DisplayStatus - The short localizable label for the status.
7172	DisplayStatus *string `json:"displayStatus,omitempty"`
7173	// Message - The detailed status message, including for alerts and error messages.
7174	Message *string `json:"message,omitempty"`
7175	// Time - The time of the status.
7176	Time *date.Time `json:"time,omitempty"`
7177}
7178
7179// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used
7180// to unwrap the encryptionKey
7181type KeyVaultAndKeyReference struct {
7182	// SourceVault - Resource id of the KeyVault containing the key or secret
7183	SourceVault *SourceVault `json:"sourceVault,omitempty"`
7184	// KeyURL - Url pointing to a key or secret in KeyVault
7185	KeyURL *string `json:"keyUrl,omitempty"`
7186}
7187
7188// KeyVaultAndSecretReference key Vault Secret Url and vault id of the encryption key
7189type KeyVaultAndSecretReference struct {
7190	// SourceVault - Resource id of the KeyVault containing the key or secret
7191	SourceVault *SourceVault `json:"sourceVault,omitempty"`
7192	// SecretURL - Url pointing to a key or secret in KeyVault
7193	SecretURL *string `json:"secretUrl,omitempty"`
7194}
7195
7196// KeyVaultKeyReference describes a reference to Key Vault Key
7197type KeyVaultKeyReference struct {
7198	// KeyURL - The URL referencing a key encryption key in Key Vault.
7199	KeyURL *string `json:"keyUrl,omitempty"`
7200	// SourceVault - The relative URL of the Key Vault containing the key.
7201	SourceVault *SubResource `json:"sourceVault,omitempty"`
7202}
7203
7204// KeyVaultSecretReference describes a reference to Key Vault Secret
7205type KeyVaultSecretReference struct {
7206	// SecretURL - The URL referencing a secret in a Key Vault.
7207	SecretURL *string `json:"secretUrl,omitempty"`
7208	// SourceVault - The relative URL of the Key Vault containing the secret.
7209	SourceVault *SubResource `json:"sourceVault,omitempty"`
7210}
7211
7212// LastPatchInstallationSummary describes the properties of the last installed patch summary.
7213type LastPatchInstallationSummary struct {
7214	// Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
7215	Status PatchOperationStatus `json:"status,omitempty"`
7216	// InstallationActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
7217	InstallationActivityID *string `json:"installationActivityId,omitempty"`
7218	// MaintenanceWindowExceeded - READ-ONLY; Describes whether the operation ran out of time before it completed all its intended actions
7219	MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"`
7220	// RebootStatus - READ-ONLY; The reboot status of the machine after the patch operation. It will be in "NotNeeded" status if reboot is not needed after the patch operation. "Required" will be the status once the patch is applied and machine is required to reboot. "Started" will be the reboot status when the machine has started to reboot. "Failed" will be the status if the machine is failed to reboot. "Completed" will be the status once the machine is rebooted successfully. Possible values include: 'RebootStatusNotNeeded', 'RebootStatusRequired', 'RebootStatusStarted', 'RebootStatusFailed', 'RebootStatusCompleted'
7221	RebootStatus RebootStatus `json:"rebootStatus,omitempty"`
7222	// NotSelectedPatchCount - READ-ONLY; The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry.
7223	NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty"`
7224	// ExcludedPatchCount - READ-ONLY; The number of all available patches but excluded explicitly by a customer-specified exclusion list match.
7225	ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty"`
7226	// PendingPatchCount - READ-ONLY; The number of all available patches expected to be installed over the course of the patch installation operation.
7227	PendingPatchCount *int32 `json:"pendingPatchCount,omitempty"`
7228	// InstalledPatchCount - READ-ONLY; The count of patches that successfully installed.
7229	InstalledPatchCount *int32 `json:"installedPatchCount,omitempty"`
7230	// FailedPatchCount - READ-ONLY; The count of patches that failed installation.
7231	FailedPatchCount *int32 `json:"failedPatchCount,omitempty"`
7232	// StartTime - READ-ONLY; The UTC timestamp when the operation began.
7233	StartTime *date.Time `json:"startTime,omitempty"`
7234	// LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began.
7235	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
7236	// StartedBy - READ-ONLY; The person or system account that started the operation
7237	StartedBy *string `json:"startedBy,omitempty"`
7238	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
7239	Error *APIError `json:"error,omitempty"`
7240}
7241
7242// MarshalJSON is the custom marshaler for LastPatchInstallationSummary.
7243func (lpis LastPatchInstallationSummary) MarshalJSON() ([]byte, error) {
7244	objectMap := make(map[string]interface{})
7245	return json.Marshal(objectMap)
7246}
7247
7248// LinuxConfiguration specifies the Linux operating system settings on the virtual machine. <br><br>For a
7249// list of supported Linux distributions, see [Linux on Azure-Endorsed
7250// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
7251// <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed
7252// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
7253type LinuxConfiguration struct {
7254	// DisablePasswordAuthentication - Specifies whether password authentication should be disabled.
7255	DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"`
7256	// SSH - Specifies the ssh key configuration for a Linux OS.
7257	SSH *SSHConfiguration `json:"ssh,omitempty"`
7258	// 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.
7259	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
7260}
7261
7262// ListUsagesResult the List Usages operation response.
7263type ListUsagesResult struct {
7264	autorest.Response `json:"-"`
7265	// Value - The list of compute resource usages.
7266	Value *[]Usage `json:"value,omitempty"`
7267	// 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.
7268	NextLink *string `json:"nextLink,omitempty"`
7269}
7270
7271// ListUsagesResultIterator provides access to a complete listing of Usage values.
7272type ListUsagesResultIterator struct {
7273	i    int
7274	page ListUsagesResultPage
7275}
7276
7277// NextWithContext advances to the next value.  If there was an error making
7278// the request the iterator does not advance and the error is returned.
7279func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
7280	if tracing.IsEnabled() {
7281		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
7282		defer func() {
7283			sc := -1
7284			if iter.Response().Response.Response != nil {
7285				sc = iter.Response().Response.Response.StatusCode
7286			}
7287			tracing.EndSpan(ctx, sc, err)
7288		}()
7289	}
7290	iter.i++
7291	if iter.i < len(iter.page.Values()) {
7292		return nil
7293	}
7294	err = iter.page.NextWithContext(ctx)
7295	if err != nil {
7296		iter.i--
7297		return err
7298	}
7299	iter.i = 0
7300	return nil
7301}
7302
7303// Next advances to the next value.  If there was an error making
7304// the request the iterator does not advance and the error is returned.
7305// Deprecated: Use NextWithContext() instead.
7306func (iter *ListUsagesResultIterator) Next() error {
7307	return iter.NextWithContext(context.Background())
7308}
7309
7310// NotDone returns true if the enumeration should be started or is not yet complete.
7311func (iter ListUsagesResultIterator) NotDone() bool {
7312	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7313}
7314
7315// Response returns the raw server response from the last page request.
7316func (iter ListUsagesResultIterator) Response() ListUsagesResult {
7317	return iter.page.Response()
7318}
7319
7320// Value returns the current value or a zero-initialized value if the
7321// iterator has advanced beyond the end of the collection.
7322func (iter ListUsagesResultIterator) Value() Usage {
7323	if !iter.page.NotDone() {
7324		return Usage{}
7325	}
7326	return iter.page.Values()[iter.i]
7327}
7328
7329// Creates a new instance of the ListUsagesResultIterator type.
7330func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
7331	return ListUsagesResultIterator{page: page}
7332}
7333
7334// IsEmpty returns true if the ListResult contains no values.
7335func (lur ListUsagesResult) IsEmpty() bool {
7336	return lur.Value == nil || len(*lur.Value) == 0
7337}
7338
7339// hasNextLink returns true if the NextLink is not empty.
7340func (lur ListUsagesResult) hasNextLink() bool {
7341	return lur.NextLink != nil && len(*lur.NextLink) != 0
7342}
7343
7344// listUsagesResultPreparer prepares a request to retrieve the next set of results.
7345// It returns nil if no more results exist.
7346func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
7347	if !lur.hasNextLink() {
7348		return nil, nil
7349	}
7350	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7351		autorest.AsJSON(),
7352		autorest.AsGet(),
7353		autorest.WithBaseURL(to.String(lur.NextLink)))
7354}
7355
7356// ListUsagesResultPage contains a page of Usage values.
7357type ListUsagesResultPage struct {
7358	fn  func(context.Context, ListUsagesResult) (ListUsagesResult, error)
7359	lur ListUsagesResult
7360}
7361
7362// NextWithContext advances to the next page of values.  If there was an error making
7363// the request the page does not advance and the error is returned.
7364func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
7365	if tracing.IsEnabled() {
7366		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
7367		defer func() {
7368			sc := -1
7369			if page.Response().Response.Response != nil {
7370				sc = page.Response().Response.Response.StatusCode
7371			}
7372			tracing.EndSpan(ctx, sc, err)
7373		}()
7374	}
7375	for {
7376		next, err := page.fn(ctx, page.lur)
7377		if err != nil {
7378			return err
7379		}
7380		page.lur = next
7381		if !next.hasNextLink() || !next.IsEmpty() {
7382			break
7383		}
7384	}
7385	return nil
7386}
7387
7388// Next advances to the next page of values.  If there was an error making
7389// the request the page does not advance and the error is returned.
7390// Deprecated: Use NextWithContext() instead.
7391func (page *ListUsagesResultPage) Next() error {
7392	return page.NextWithContext(context.Background())
7393}
7394
7395// NotDone returns true if the page enumeration should be started or is not yet complete.
7396func (page ListUsagesResultPage) NotDone() bool {
7397	return !page.lur.IsEmpty()
7398}
7399
7400// Response returns the raw server response from the last page request.
7401func (page ListUsagesResultPage) Response() ListUsagesResult {
7402	return page.lur
7403}
7404
7405// Values returns the slice of values for the current page or nil if there are no values.
7406func (page ListUsagesResultPage) Values() []Usage {
7407	if page.lur.IsEmpty() {
7408		return nil
7409	}
7410	return *page.lur.Value
7411}
7412
7413// Creates a new instance of the ListUsagesResultPage type.
7414func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
7415	return ListUsagesResultPage{
7416		fn:  getNextPage,
7417		lur: cur,
7418	}
7419}
7420
7421// ListVirtualMachineExtensionImage ...
7422type ListVirtualMachineExtensionImage struct {
7423	autorest.Response `json:"-"`
7424	Value             *[]VirtualMachineExtensionImage `json:"value,omitempty"`
7425}
7426
7427// ListVirtualMachineImageResource ...
7428type ListVirtualMachineImageResource struct {
7429	autorest.Response `json:"-"`
7430	Value             *[]VirtualMachineImageResource `json:"value,omitempty"`
7431}
7432
7433// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results
7434// of a long-running operation.
7435type LogAnalyticsExportRequestRateByIntervalFuture struct {
7436	azure.FutureAPI
7437	// Result returns the result of the asynchronous operation.
7438	// If the operation has not completed it will return an error.
7439	Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
7440}
7441
7442// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7443func (future *LogAnalyticsExportRequestRateByIntervalFuture) UnmarshalJSON(body []byte) error {
7444	var azFuture azure.Future
7445	if err := json.Unmarshal(body, &azFuture); err != nil {
7446		return err
7447	}
7448	future.FutureAPI = &azFuture
7449	future.Result = future.result
7450	return nil
7451}
7452
7453// result is the default implementation for LogAnalyticsExportRequestRateByIntervalFuture.Result.
7454func (future *LogAnalyticsExportRequestRateByIntervalFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
7455	var done bool
7456	done, err = future.DoneWithContext(context.Background(), client)
7457	if err != nil {
7458		err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Polling failure")
7459		return
7460	}
7461	if !done {
7462		laor.Response.Response = future.Response()
7463		err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
7464		return
7465	}
7466	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7467	if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
7468		laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response)
7469		if err != nil {
7470			err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request")
7471		}
7472	}
7473	return
7474}
7475
7476// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a
7477// long-running operation.
7478type LogAnalyticsExportThrottledRequestsFuture struct {
7479	azure.FutureAPI
7480	// Result returns the result of the asynchronous operation.
7481	// If the operation has not completed it will return an error.
7482	Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
7483}
7484
7485// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7486func (future *LogAnalyticsExportThrottledRequestsFuture) UnmarshalJSON(body []byte) error {
7487	var azFuture azure.Future
7488	if err := json.Unmarshal(body, &azFuture); err != nil {
7489		return err
7490	}
7491	future.FutureAPI = &azFuture
7492	future.Result = future.result
7493	return nil
7494}
7495
7496// result is the default implementation for LogAnalyticsExportThrottledRequestsFuture.Result.
7497func (future *LogAnalyticsExportThrottledRequestsFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
7498	var done bool
7499	done, err = future.DoneWithContext(context.Background(), client)
7500	if err != nil {
7501		err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Polling failure")
7502		return
7503	}
7504	if !done {
7505		laor.Response.Response = future.Response()
7506		err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
7507		return
7508	}
7509	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7510	if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
7511		laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response)
7512		if err != nil {
7513			err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request")
7514		}
7515	}
7516	return
7517}
7518
7519// LogAnalyticsInputBase api input base class for LogAnalytics Api.
7520type LogAnalyticsInputBase struct {
7521	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
7522	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
7523	// FromTime - From time of the query
7524	FromTime *date.Time `json:"fromTime,omitempty"`
7525	// ToTime - To time of the query
7526	ToTime *date.Time `json:"toTime,omitempty"`
7527	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
7528	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
7529	// GroupByOperationName - Group query result by Operation Name.
7530	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
7531	// GroupByResourceName - Group query result by Resource Name.
7532	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
7533}
7534
7535// LogAnalyticsOperationResult logAnalytics operation status response
7536type LogAnalyticsOperationResult struct {
7537	autorest.Response `json:"-"`
7538	// Properties - READ-ONLY; LogAnalyticsOutput
7539	Properties *LogAnalyticsOutput `json:"properties,omitempty"`
7540}
7541
7542// MarshalJSON is the custom marshaler for LogAnalyticsOperationResult.
7543func (laor LogAnalyticsOperationResult) MarshalJSON() ([]byte, error) {
7544	objectMap := make(map[string]interface{})
7545	return json.Marshal(objectMap)
7546}
7547
7548// LogAnalyticsOutput logAnalytics output properties
7549type LogAnalyticsOutput struct {
7550	// Output - READ-ONLY; Output file Uri path to blob container.
7551	Output *string `json:"output,omitempty"`
7552}
7553
7554// MarshalJSON is the custom marshaler for LogAnalyticsOutput.
7555func (lao LogAnalyticsOutput) MarshalJSON() ([]byte, error) {
7556	objectMap := make(map[string]interface{})
7557	return json.Marshal(objectMap)
7558}
7559
7560// MaintenanceRedeployStatus maintenance Operation Status.
7561type MaintenanceRedeployStatus struct {
7562	// IsCustomerInitiatedMaintenanceAllowed - True, if customer is allowed to perform Maintenance.
7563	IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"`
7564	// PreMaintenanceWindowStartTime - Start Time for the Pre Maintenance Window.
7565	PreMaintenanceWindowStartTime *date.Time `json:"preMaintenanceWindowStartTime,omitempty"`
7566	// PreMaintenanceWindowEndTime - End Time for the Pre Maintenance Window.
7567	PreMaintenanceWindowEndTime *date.Time `json:"preMaintenanceWindowEndTime,omitempty"`
7568	// MaintenanceWindowStartTime - Start Time for the Maintenance Window.
7569	MaintenanceWindowStartTime *date.Time `json:"maintenanceWindowStartTime,omitempty"`
7570	// MaintenanceWindowEndTime - End Time for the Maintenance Window.
7571	MaintenanceWindowEndTime *date.Time `json:"maintenanceWindowEndTime,omitempty"`
7572	// LastOperationResultCode - The Last Maintenance Operation Result Code. Possible values include: 'MaintenanceOperationResultCodeTypesNone', 'MaintenanceOperationResultCodeTypesRetryLater', 'MaintenanceOperationResultCodeTypesMaintenanceAborted', 'MaintenanceOperationResultCodeTypesMaintenanceCompleted'
7573	LastOperationResultCode MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"`
7574	// LastOperationMessage - Message returned for the last Maintenance Operation.
7575	LastOperationMessage *string `json:"lastOperationMessage,omitempty"`
7576}
7577
7578// ManagedArtifact the managed artifact.
7579type ManagedArtifact struct {
7580	// ID - The managed artifact id.
7581	ID *string `json:"id,omitempty"`
7582}
7583
7584// ManagedDiskParameters the parameters of a managed disk.
7585type ManagedDiskParameters struct {
7586	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
7587	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
7588	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
7589	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
7590	// ID - Resource Id
7591	ID *string `json:"id,omitempty"`
7592}
7593
7594// NetworkInterfaceReference describes a network interface reference.
7595type NetworkInterfaceReference struct {
7596	*NetworkInterfaceReferenceProperties `json:"properties,omitempty"`
7597	// ID - Resource Id
7598	ID *string `json:"id,omitempty"`
7599}
7600
7601// MarshalJSON is the custom marshaler for NetworkInterfaceReference.
7602func (nir NetworkInterfaceReference) MarshalJSON() ([]byte, error) {
7603	objectMap := make(map[string]interface{})
7604	if nir.NetworkInterfaceReferenceProperties != nil {
7605		objectMap["properties"] = nir.NetworkInterfaceReferenceProperties
7606	}
7607	if nir.ID != nil {
7608		objectMap["id"] = nir.ID
7609	}
7610	return json.Marshal(objectMap)
7611}
7612
7613// UnmarshalJSON is the custom unmarshaler for NetworkInterfaceReference struct.
7614func (nir *NetworkInterfaceReference) UnmarshalJSON(body []byte) error {
7615	var m map[string]*json.RawMessage
7616	err := json.Unmarshal(body, &m)
7617	if err != nil {
7618		return err
7619	}
7620	for k, v := range m {
7621		switch k {
7622		case "properties":
7623			if v != nil {
7624				var networkInterfaceReferenceProperties NetworkInterfaceReferenceProperties
7625				err = json.Unmarshal(*v, &networkInterfaceReferenceProperties)
7626				if err != nil {
7627					return err
7628				}
7629				nir.NetworkInterfaceReferenceProperties = &networkInterfaceReferenceProperties
7630			}
7631		case "id":
7632			if v != nil {
7633				var ID string
7634				err = json.Unmarshal(*v, &ID)
7635				if err != nil {
7636					return err
7637				}
7638				nir.ID = &ID
7639			}
7640		}
7641	}
7642
7643	return nil
7644}
7645
7646// NetworkInterfaceReferenceProperties describes a network interface reference properties.
7647type NetworkInterfaceReferenceProperties struct {
7648	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
7649	Primary *bool `json:"primary,omitempty"`
7650}
7651
7652// NetworkProfile specifies the network interfaces of the virtual machine.
7653type NetworkProfile struct {
7654	// NetworkInterfaces - Specifies the list of resource Ids for the network interfaces associated with the virtual machine.
7655	NetworkInterfaces *[]NetworkInterfaceReference `json:"networkInterfaces,omitempty"`
7656}
7657
7658// OperationListResult the List Compute Operation operation response.
7659type OperationListResult struct {
7660	autorest.Response `json:"-"`
7661	// Value - READ-ONLY; The list of compute operations
7662	Value *[]OperationValue `json:"value,omitempty"`
7663}
7664
7665// MarshalJSON is the custom marshaler for OperationListResult.
7666func (olr OperationListResult) MarshalJSON() ([]byte, error) {
7667	objectMap := make(map[string]interface{})
7668	return json.Marshal(objectMap)
7669}
7670
7671// OperationValue describes the properties of a Compute Operation value.
7672type OperationValue struct {
7673	// Origin - READ-ONLY; The origin of the compute operation.
7674	Origin *string `json:"origin,omitempty"`
7675	// Name - READ-ONLY; The name of the compute operation.
7676	Name                   *string `json:"name,omitempty"`
7677	*OperationValueDisplay `json:"display,omitempty"`
7678}
7679
7680// MarshalJSON is the custom marshaler for OperationValue.
7681func (ov OperationValue) MarshalJSON() ([]byte, error) {
7682	objectMap := make(map[string]interface{})
7683	if ov.OperationValueDisplay != nil {
7684		objectMap["display"] = ov.OperationValueDisplay
7685	}
7686	return json.Marshal(objectMap)
7687}
7688
7689// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
7690func (ov *OperationValue) UnmarshalJSON(body []byte) error {
7691	var m map[string]*json.RawMessage
7692	err := json.Unmarshal(body, &m)
7693	if err != nil {
7694		return err
7695	}
7696	for k, v := range m {
7697		switch k {
7698		case "origin":
7699			if v != nil {
7700				var origin string
7701				err = json.Unmarshal(*v, &origin)
7702				if err != nil {
7703					return err
7704				}
7705				ov.Origin = &origin
7706			}
7707		case "name":
7708			if v != nil {
7709				var name string
7710				err = json.Unmarshal(*v, &name)
7711				if err != nil {
7712					return err
7713				}
7714				ov.Name = &name
7715			}
7716		case "display":
7717			if v != nil {
7718				var operationValueDisplay OperationValueDisplay
7719				err = json.Unmarshal(*v, &operationValueDisplay)
7720				if err != nil {
7721					return err
7722				}
7723				ov.OperationValueDisplay = &operationValueDisplay
7724			}
7725		}
7726	}
7727
7728	return nil
7729}
7730
7731// OperationValueDisplay describes the properties of a Compute Operation Value Display.
7732type OperationValueDisplay struct {
7733	// Operation - READ-ONLY; The display name of the compute operation.
7734	Operation *string `json:"operation,omitempty"`
7735	// Resource - READ-ONLY; The display name of the resource the operation applies to.
7736	Resource *string `json:"resource,omitempty"`
7737	// Description - READ-ONLY; The description of the operation.
7738	Description *string `json:"description,omitempty"`
7739	// Provider - READ-ONLY; The resource provider for the operation.
7740	Provider *string `json:"provider,omitempty"`
7741}
7742
7743// MarshalJSON is the custom marshaler for OperationValueDisplay.
7744func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) {
7745	objectMap := make(map[string]interface{})
7746	return json.Marshal(objectMap)
7747}
7748
7749// OrchestrationServiceStateInput the input for OrchestrationServiceState
7750type OrchestrationServiceStateInput struct {
7751	// ServiceName - The name of the service. Possible values include: 'AutomaticRepairs'
7752	ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
7753	// Action - The action to be performed. Possible values include: 'Resume', 'Suspend'
7754	Action OrchestrationServiceStateAction `json:"action,omitempty"`
7755}
7756
7757// OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set.
7758type OrchestrationServiceSummary struct {
7759	// ServiceName - READ-ONLY; The name of the service. Possible values include: 'AutomaticRepairs', 'DummyOrchestrationServiceName'
7760	ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
7761	// ServiceState - READ-ONLY; The current state of the service. Possible values include: 'NotRunning', 'Running', 'Suspended'
7762	ServiceState OrchestrationServiceState `json:"serviceState,omitempty"`
7763}
7764
7765// MarshalJSON is the custom marshaler for OrchestrationServiceSummary.
7766func (oss OrchestrationServiceSummary) MarshalJSON() ([]byte, error) {
7767	objectMap := make(map[string]interface{})
7768	return json.Marshal(objectMap)
7769}
7770
7771// OSDisk specifies information about the operating system disk used by the virtual machine. <br><br> For
7772// more information about disks, see [About disks and VHDs for Azure virtual
7773// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
7774type OSDisk struct {
7775	// 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'
7776	OsType OperatingSystemTypes `json:"osType,omitempty"`
7777	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
7778	EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
7779	// Name - The disk name.
7780	Name *string `json:"name,omitempty"`
7781	// Vhd - The virtual hard disk.
7782	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
7783	// 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.
7784	Image *VirtualHardDisk `json:"image,omitempty"`
7785	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None** for Standard storage. **ReadOnly** for Premium storage. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
7786	Caching CachingTypes `json:"caching,omitempty"`
7787	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
7788	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
7789	// DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
7790	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
7791	// CreateOption - Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you  also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
7792	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
7793	// 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
7794	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
7795	// ManagedDisk - The managed disk parameters.
7796	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
7797}
7798
7799// OSDiskImage contains the os disk image information.
7800type OSDiskImage struct {
7801	// OperatingSystem - The operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'
7802	OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"`
7803}
7804
7805// OSDiskImageEncryption contains encryption settings for an OS disk image.
7806type OSDiskImageEncryption struct {
7807	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
7808	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
7809}
7810
7811// OSProfile specifies the operating system settings for the virtual machine. Some of the settings cannot
7812// be changed once VM is provisioned.
7813type OSProfile struct {
7814	// 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).
7815	ComputerName *string `json:"computerName,omitempty"`
7816	// AdminUsername - Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1  character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters  <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
7817	AdminUsername *string `json:"adminUsername,omitempty"`
7818	// 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)
7819	AdminPassword *string `json:"adminPassword,omitempty"`
7820	// CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> **Note: Do not pass any secrets or passwords in customData property** <br><br> This property cannot be updated after the VM is created. <br><br> customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) <br><br> For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
7821	CustomData *string `json:"customData,omitempty"`
7822	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
7823	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
7824	// 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).
7825	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
7826	// Secrets - Specifies set of certificates that should be installed onto the virtual machine.
7827	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
7828	// AllowExtensionOperations - Specifies whether extension operations should be allowed on the virtual machine. <br><br>This may only be set to False when no extensions are present on the virtual machine.
7829	AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"`
7830	// RequireGuestProvisionSignal - Specifies whether the guest provision signal is required to infer provision success of the virtual machine.  **Note: This property is for private testing only, and all customers must not set the property to false.**
7831	RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"`
7832}
7833
7834// PatchSettings ...
7835type PatchSettings struct {
7836	// PatchMode - Specifies the mode of in-guest patching to IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **Manual** - You  control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> ** AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform'
7837	PatchMode InGuestPatchMode `json:"patchMode,omitempty"`
7838}
7839
7840// Plan specifies information about the marketplace image used to create the virtual machine. This element
7841// is only used for marketplace images. Before you can use a marketplace image from an API, you must enable
7842// the image for programmatic use.  In the Azure portal, find the marketplace image that you want to use
7843// and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and
7844// then click **Save**.
7845type Plan struct {
7846	// Name - The plan ID.
7847	Name *string `json:"name,omitempty"`
7848	// Publisher - The publisher ID.
7849	Publisher *string `json:"publisher,omitempty"`
7850	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
7851	Product *string `json:"product,omitempty"`
7852	// PromotionCode - The promotion code.
7853	PromotionCode *string `json:"promotionCode,omitempty"`
7854}
7855
7856// PrivateEndpoint the Private Endpoint resource.
7857type PrivateEndpoint struct {
7858	// ID - READ-ONLY; The ARM identifier for Private Endpoint
7859	ID *string `json:"id,omitempty"`
7860}
7861
7862// MarshalJSON is the custom marshaler for PrivateEndpoint.
7863func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
7864	objectMap := make(map[string]interface{})
7865	return json.Marshal(objectMap)
7866}
7867
7868// PrivateEndpointConnection the Private Endpoint Connection resource.
7869type PrivateEndpointConnection struct {
7870	// PrivateEndpointConnectionProperties - Resource properties.
7871	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
7872	// ID - READ-ONLY; private endpoint connection Id
7873	ID *string `json:"id,omitempty"`
7874	// Name - READ-ONLY; private endpoint connection name
7875	Name *string `json:"name,omitempty"`
7876	// Type - READ-ONLY; private endpoint connection type
7877	Type *string `json:"type,omitempty"`
7878}
7879
7880// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
7881func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
7882	objectMap := make(map[string]interface{})
7883	if pec.PrivateEndpointConnectionProperties != nil {
7884		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
7885	}
7886	return json.Marshal(objectMap)
7887}
7888
7889// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
7890func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
7891	var m map[string]*json.RawMessage
7892	err := json.Unmarshal(body, &m)
7893	if err != nil {
7894		return err
7895	}
7896	for k, v := range m {
7897		switch k {
7898		case "properties":
7899			if v != nil {
7900				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
7901				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
7902				if err != nil {
7903					return err
7904				}
7905				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
7906			}
7907		case "id":
7908			if v != nil {
7909				var ID string
7910				err = json.Unmarshal(*v, &ID)
7911				if err != nil {
7912					return err
7913				}
7914				pec.ID = &ID
7915			}
7916		case "name":
7917			if v != nil {
7918				var name string
7919				err = json.Unmarshal(*v, &name)
7920				if err != nil {
7921					return err
7922				}
7923				pec.Name = &name
7924			}
7925		case "type":
7926			if v != nil {
7927				var typeVar string
7928				err = json.Unmarshal(*v, &typeVar)
7929				if err != nil {
7930					return err
7931				}
7932				pec.Type = &typeVar
7933			}
7934		}
7935	}
7936
7937	return nil
7938}
7939
7940// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
7941type PrivateEndpointConnectionProperties struct {
7942	// PrivateEndpoint - The resource of private end point.
7943	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
7944	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between DiskAccess and Virtual Network.
7945	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
7946	// ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed'
7947	ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
7948}
7949
7950// PrivateLinkResource a private link resource
7951type PrivateLinkResource struct {
7952	// PrivateLinkResourceProperties - Resource properties.
7953	*PrivateLinkResourceProperties `json:"properties,omitempty"`
7954	// ID - READ-ONLY; private link resource Id
7955	ID *string `json:"id,omitempty"`
7956	// Name - READ-ONLY; private link resource name
7957	Name *string `json:"name,omitempty"`
7958	// Type - READ-ONLY; private link resource type
7959	Type *string `json:"type,omitempty"`
7960}
7961
7962// MarshalJSON is the custom marshaler for PrivateLinkResource.
7963func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
7964	objectMap := make(map[string]interface{})
7965	if plr.PrivateLinkResourceProperties != nil {
7966		objectMap["properties"] = plr.PrivateLinkResourceProperties
7967	}
7968	return json.Marshal(objectMap)
7969}
7970
7971// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
7972func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
7973	var m map[string]*json.RawMessage
7974	err := json.Unmarshal(body, &m)
7975	if err != nil {
7976		return err
7977	}
7978	for k, v := range m {
7979		switch k {
7980		case "properties":
7981			if v != nil {
7982				var privateLinkResourceProperties PrivateLinkResourceProperties
7983				err = json.Unmarshal(*v, &privateLinkResourceProperties)
7984				if err != nil {
7985					return err
7986				}
7987				plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
7988			}
7989		case "id":
7990			if v != nil {
7991				var ID string
7992				err = json.Unmarshal(*v, &ID)
7993				if err != nil {
7994					return err
7995				}
7996				plr.ID = &ID
7997			}
7998		case "name":
7999			if v != nil {
8000				var name string
8001				err = json.Unmarshal(*v, &name)
8002				if err != nil {
8003					return err
8004				}
8005				plr.Name = &name
8006			}
8007		case "type":
8008			if v != nil {
8009				var typeVar string
8010				err = json.Unmarshal(*v, &typeVar)
8011				if err != nil {
8012					return err
8013				}
8014				plr.Type = &typeVar
8015			}
8016		}
8017	}
8018
8019	return nil
8020}
8021
8022// PrivateLinkResourceListResult a list of private link resources
8023type PrivateLinkResourceListResult struct {
8024	autorest.Response `json:"-"`
8025	// Value - Array of private link resources
8026	Value *[]PrivateLinkResource `json:"value,omitempty"`
8027}
8028
8029// PrivateLinkResourceProperties properties of a private link resource.
8030type PrivateLinkResourceProperties struct {
8031	// GroupID - READ-ONLY; The private link resource group id.
8032	GroupID *string `json:"groupId,omitempty"`
8033	// RequiredMembers - READ-ONLY; The private link resource required member names.
8034	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
8035	// RequiredZoneNames - The private link resource DNS zone name.
8036	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
8037}
8038
8039// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
8040func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
8041	objectMap := make(map[string]interface{})
8042	if plrp.RequiredZoneNames != nil {
8043		objectMap["requiredZoneNames"] = plrp.RequiredZoneNames
8044	}
8045	return json.Marshal(objectMap)
8046}
8047
8048// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
8049// service consumer and provider.
8050type PrivateLinkServiceConnectionState struct {
8051	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected'
8052	Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
8053	// Description - The reason for approval/rejection of the connection.
8054	Description *string `json:"description,omitempty"`
8055	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
8056	ActionsRequired *string `json:"actionsRequired,omitempty"`
8057}
8058
8059// ProximityPlacementGroup specifies information about the proximity placement group.
8060type ProximityPlacementGroup struct {
8061	autorest.Response `json:"-"`
8062	// ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group.
8063	*ProximityPlacementGroupProperties `json:"properties,omitempty"`
8064	// ID - READ-ONLY; Resource Id
8065	ID *string `json:"id,omitempty"`
8066	// Name - READ-ONLY; Resource name
8067	Name *string `json:"name,omitempty"`
8068	// Type - READ-ONLY; Resource type
8069	Type *string `json:"type,omitempty"`
8070	// Location - Resource location
8071	Location *string `json:"location,omitempty"`
8072	// Tags - Resource tags
8073	Tags map[string]*string `json:"tags"`
8074}
8075
8076// MarshalJSON is the custom marshaler for ProximityPlacementGroup.
8077func (ppg ProximityPlacementGroup) MarshalJSON() ([]byte, error) {
8078	objectMap := make(map[string]interface{})
8079	if ppg.ProximityPlacementGroupProperties != nil {
8080		objectMap["properties"] = ppg.ProximityPlacementGroupProperties
8081	}
8082	if ppg.Location != nil {
8083		objectMap["location"] = ppg.Location
8084	}
8085	if ppg.Tags != nil {
8086		objectMap["tags"] = ppg.Tags
8087	}
8088	return json.Marshal(objectMap)
8089}
8090
8091// UnmarshalJSON is the custom unmarshaler for ProximityPlacementGroup struct.
8092func (ppg *ProximityPlacementGroup) UnmarshalJSON(body []byte) error {
8093	var m map[string]*json.RawMessage
8094	err := json.Unmarshal(body, &m)
8095	if err != nil {
8096		return err
8097	}
8098	for k, v := range m {
8099		switch k {
8100		case "properties":
8101			if v != nil {
8102				var proximityPlacementGroupProperties ProximityPlacementGroupProperties
8103				err = json.Unmarshal(*v, &proximityPlacementGroupProperties)
8104				if err != nil {
8105					return err
8106				}
8107				ppg.ProximityPlacementGroupProperties = &proximityPlacementGroupProperties
8108			}
8109		case "id":
8110			if v != nil {
8111				var ID string
8112				err = json.Unmarshal(*v, &ID)
8113				if err != nil {
8114					return err
8115				}
8116				ppg.ID = &ID
8117			}
8118		case "name":
8119			if v != nil {
8120				var name string
8121				err = json.Unmarshal(*v, &name)
8122				if err != nil {
8123					return err
8124				}
8125				ppg.Name = &name
8126			}
8127		case "type":
8128			if v != nil {
8129				var typeVar string
8130				err = json.Unmarshal(*v, &typeVar)
8131				if err != nil {
8132					return err
8133				}
8134				ppg.Type = &typeVar
8135			}
8136		case "location":
8137			if v != nil {
8138				var location string
8139				err = json.Unmarshal(*v, &location)
8140				if err != nil {
8141					return err
8142				}
8143				ppg.Location = &location
8144			}
8145		case "tags":
8146			if v != nil {
8147				var tags map[string]*string
8148				err = json.Unmarshal(*v, &tags)
8149				if err != nil {
8150					return err
8151				}
8152				ppg.Tags = tags
8153			}
8154		}
8155	}
8156
8157	return nil
8158}
8159
8160// ProximityPlacementGroupListResult the List Proximity Placement Group operation response.
8161type ProximityPlacementGroupListResult struct {
8162	autorest.Response `json:"-"`
8163	// Value - The list of proximity placement groups
8164	Value *[]ProximityPlacementGroup `json:"value,omitempty"`
8165	// NextLink - The URI to fetch the next page of proximity placement groups.
8166	NextLink *string `json:"nextLink,omitempty"`
8167}
8168
8169// ProximityPlacementGroupListResultIterator provides access to a complete listing of
8170// ProximityPlacementGroup values.
8171type ProximityPlacementGroupListResultIterator struct {
8172	i    int
8173	page ProximityPlacementGroupListResultPage
8174}
8175
8176// NextWithContext advances to the next value.  If there was an error making
8177// the request the iterator does not advance and the error is returned.
8178func (iter *ProximityPlacementGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
8179	if tracing.IsEnabled() {
8180		ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultIterator.NextWithContext")
8181		defer func() {
8182			sc := -1
8183			if iter.Response().Response.Response != nil {
8184				sc = iter.Response().Response.Response.StatusCode
8185			}
8186			tracing.EndSpan(ctx, sc, err)
8187		}()
8188	}
8189	iter.i++
8190	if iter.i < len(iter.page.Values()) {
8191		return nil
8192	}
8193	err = iter.page.NextWithContext(ctx)
8194	if err != nil {
8195		iter.i--
8196		return err
8197	}
8198	iter.i = 0
8199	return nil
8200}
8201
8202// Next advances to the next value.  If there was an error making
8203// the request the iterator does not advance and the error is returned.
8204// Deprecated: Use NextWithContext() instead.
8205func (iter *ProximityPlacementGroupListResultIterator) Next() error {
8206	return iter.NextWithContext(context.Background())
8207}
8208
8209// NotDone returns true if the enumeration should be started or is not yet complete.
8210func (iter ProximityPlacementGroupListResultIterator) NotDone() bool {
8211	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8212}
8213
8214// Response returns the raw server response from the last page request.
8215func (iter ProximityPlacementGroupListResultIterator) Response() ProximityPlacementGroupListResult {
8216	return iter.page.Response()
8217}
8218
8219// Value returns the current value or a zero-initialized value if the
8220// iterator has advanced beyond the end of the collection.
8221func (iter ProximityPlacementGroupListResultIterator) Value() ProximityPlacementGroup {
8222	if !iter.page.NotDone() {
8223		return ProximityPlacementGroup{}
8224	}
8225	return iter.page.Values()[iter.i]
8226}
8227
8228// Creates a new instance of the ProximityPlacementGroupListResultIterator type.
8229func NewProximityPlacementGroupListResultIterator(page ProximityPlacementGroupListResultPage) ProximityPlacementGroupListResultIterator {
8230	return ProximityPlacementGroupListResultIterator{page: page}
8231}
8232
8233// IsEmpty returns true if the ListResult contains no values.
8234func (ppglr ProximityPlacementGroupListResult) IsEmpty() bool {
8235	return ppglr.Value == nil || len(*ppglr.Value) == 0
8236}
8237
8238// hasNextLink returns true if the NextLink is not empty.
8239func (ppglr ProximityPlacementGroupListResult) hasNextLink() bool {
8240	return ppglr.NextLink != nil && len(*ppglr.NextLink) != 0
8241}
8242
8243// proximityPlacementGroupListResultPreparer prepares a request to retrieve the next set of results.
8244// It returns nil if no more results exist.
8245func (ppglr ProximityPlacementGroupListResult) proximityPlacementGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
8246	if !ppglr.hasNextLink() {
8247		return nil, nil
8248	}
8249	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8250		autorest.AsJSON(),
8251		autorest.AsGet(),
8252		autorest.WithBaseURL(to.String(ppglr.NextLink)))
8253}
8254
8255// ProximityPlacementGroupListResultPage contains a page of ProximityPlacementGroup values.
8256type ProximityPlacementGroupListResultPage struct {
8257	fn    func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)
8258	ppglr ProximityPlacementGroupListResult
8259}
8260
8261// NextWithContext advances to the next page of values.  If there was an error making
8262// the request the page does not advance and the error is returned.
8263func (page *ProximityPlacementGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
8264	if tracing.IsEnabled() {
8265		ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultPage.NextWithContext")
8266		defer func() {
8267			sc := -1
8268			if page.Response().Response.Response != nil {
8269				sc = page.Response().Response.Response.StatusCode
8270			}
8271			tracing.EndSpan(ctx, sc, err)
8272		}()
8273	}
8274	for {
8275		next, err := page.fn(ctx, page.ppglr)
8276		if err != nil {
8277			return err
8278		}
8279		page.ppglr = next
8280		if !next.hasNextLink() || !next.IsEmpty() {
8281			break
8282		}
8283	}
8284	return nil
8285}
8286
8287// Next advances to the next page of values.  If there was an error making
8288// the request the page does not advance and the error is returned.
8289// Deprecated: Use NextWithContext() instead.
8290func (page *ProximityPlacementGroupListResultPage) Next() error {
8291	return page.NextWithContext(context.Background())
8292}
8293
8294// NotDone returns true if the page enumeration should be started or is not yet complete.
8295func (page ProximityPlacementGroupListResultPage) NotDone() bool {
8296	return !page.ppglr.IsEmpty()
8297}
8298
8299// Response returns the raw server response from the last page request.
8300func (page ProximityPlacementGroupListResultPage) Response() ProximityPlacementGroupListResult {
8301	return page.ppglr
8302}
8303
8304// Values returns the slice of values for the current page or nil if there are no values.
8305func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementGroup {
8306	if page.ppglr.IsEmpty() {
8307		return nil
8308	}
8309	return *page.ppglr.Value
8310}
8311
8312// Creates a new instance of the ProximityPlacementGroupListResultPage type.
8313func NewProximityPlacementGroupListResultPage(cur ProximityPlacementGroupListResult, getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage {
8314	return ProximityPlacementGroupListResultPage{
8315		fn:    getNextPage,
8316		ppglr: cur,
8317	}
8318}
8319
8320// ProximityPlacementGroupProperties describes the properties of a Proximity Placement Group.
8321type ProximityPlacementGroupProperties struct {
8322	// ProximityPlacementGroupType - Specifies the type of the proximity placement group. <br><br> Possible values are: <br><br> **Standard** : Co-locate resources within an Azure region or Availability Zone. <br><br> **Ultra** : For future use. Possible values include: 'Standard', 'Ultra'
8323	ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"`
8324	// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group.
8325	VirtualMachines *[]SubResourceWithColocationStatus `json:"virtualMachines,omitempty"`
8326	// VirtualMachineScaleSets - READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group.
8327	VirtualMachineScaleSets *[]SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty"`
8328	// AvailabilitySets - READ-ONLY; A list of references to all availability sets in the proximity placement group.
8329	AvailabilitySets *[]SubResourceWithColocationStatus `json:"availabilitySets,omitempty"`
8330	// ColocationStatus - Describes colocation status of the Proximity Placement Group.
8331	ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
8332}
8333
8334// MarshalJSON is the custom marshaler for ProximityPlacementGroupProperties.
8335func (ppgp ProximityPlacementGroupProperties) MarshalJSON() ([]byte, error) {
8336	objectMap := make(map[string]interface{})
8337	if ppgp.ProximityPlacementGroupType != "" {
8338		objectMap["proximityPlacementGroupType"] = ppgp.ProximityPlacementGroupType
8339	}
8340	if ppgp.ColocationStatus != nil {
8341		objectMap["colocationStatus"] = ppgp.ColocationStatus
8342	}
8343	return json.Marshal(objectMap)
8344}
8345
8346// ProximityPlacementGroupUpdate specifies information about the proximity placement group.
8347type ProximityPlacementGroupUpdate struct {
8348	// Tags - Resource tags
8349	Tags map[string]*string `json:"tags"`
8350}
8351
8352// MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate.
8353func (ppgu ProximityPlacementGroupUpdate) MarshalJSON() ([]byte, error) {
8354	objectMap := make(map[string]interface{})
8355	if ppgu.Tags != nil {
8356		objectMap["tags"] = ppgu.Tags
8357	}
8358	return json.Marshal(objectMap)
8359}
8360
8361// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
8362type PurchasePlan struct {
8363	// Publisher - The publisher ID.
8364	Publisher *string `json:"publisher,omitempty"`
8365	// Name - The plan ID.
8366	Name *string `json:"name,omitempty"`
8367	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
8368	Product *string `json:"product,omitempty"`
8369}
8370
8371// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this
8372// Image Definition. These properties are updatable.
8373type RecommendedMachineConfiguration struct {
8374	VCPUs  *ResourceRange `json:"vCPUs,omitempty"`
8375	Memory *ResourceRange `json:"memory,omitempty"`
8376}
8377
8378// RecoveryWalkResponse response after calling a manual recovery walk
8379type RecoveryWalkResponse struct {
8380	autorest.Response `json:"-"`
8381	// WalkPerformed - READ-ONLY; Whether the recovery walk was performed
8382	WalkPerformed *bool `json:"walkPerformed,omitempty"`
8383	// NextPlatformUpdateDomain - READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed
8384	NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"`
8385}
8386
8387// MarshalJSON is the custom marshaler for RecoveryWalkResponse.
8388func (rwr RecoveryWalkResponse) MarshalJSON() ([]byte, error) {
8389	objectMap := make(map[string]interface{})
8390	return json.Marshal(objectMap)
8391}
8392
8393// RegionalReplicationStatus this is the regional replication status.
8394type RegionalReplicationStatus struct {
8395	// Region - READ-ONLY; The region to which the gallery Image Version is being replicated to.
8396	Region *string `json:"region,omitempty"`
8397	// State - READ-ONLY; This is the regional replication state. Possible values include: 'ReplicationStateUnknown', 'ReplicationStateReplicating', 'ReplicationStateCompleted', 'ReplicationStateFailed'
8398	State ReplicationState `json:"state,omitempty"`
8399	// Details - READ-ONLY; The details of the replication status.
8400	Details *string `json:"details,omitempty"`
8401	// Progress - READ-ONLY; It indicates progress of the replication job.
8402	Progress *int32 `json:"progress,omitempty"`
8403}
8404
8405// MarshalJSON is the custom marshaler for RegionalReplicationStatus.
8406func (rrs RegionalReplicationStatus) MarshalJSON() ([]byte, error) {
8407	objectMap := make(map[string]interface{})
8408	return json.Marshal(objectMap)
8409}
8410
8411// ReplicationStatus this is the replication status of the gallery Image Version.
8412type ReplicationStatus struct {
8413	// AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed'
8414	AggregatedState AggregatedReplicationState `json:"aggregatedState,omitempty"`
8415	// Summary - READ-ONLY; This is a summary of replication status for each region.
8416	Summary *[]RegionalReplicationStatus `json:"summary,omitempty"`
8417}
8418
8419// MarshalJSON is the custom marshaler for ReplicationStatus.
8420func (rs ReplicationStatus) MarshalJSON() ([]byte, error) {
8421	objectMap := make(map[string]interface{})
8422	return json.Marshal(objectMap)
8423}
8424
8425// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api.
8426type RequestRateByIntervalInput struct {
8427	// IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'
8428	IntervalLength IntervalInMins `json:"intervalLength,omitempty"`
8429	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
8430	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
8431	// FromTime - From time of the query
8432	FromTime *date.Time `json:"fromTime,omitempty"`
8433	// ToTime - To time of the query
8434	ToTime *date.Time `json:"toTime,omitempty"`
8435	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
8436	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
8437	// GroupByOperationName - Group query result by Operation Name.
8438	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
8439	// GroupByResourceName - Group query result by Resource Name.
8440	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
8441}
8442
8443// Resource the Resource model definition.
8444type Resource struct {
8445	// ID - READ-ONLY; Resource Id
8446	ID *string `json:"id,omitempty"`
8447	// Name - READ-ONLY; Resource name
8448	Name *string `json:"name,omitempty"`
8449	// Type - READ-ONLY; Resource type
8450	Type *string `json:"type,omitempty"`
8451	// Location - Resource location
8452	Location *string `json:"location,omitempty"`
8453	// Tags - Resource tags
8454	Tags map[string]*string `json:"tags"`
8455}
8456
8457// MarshalJSON is the custom marshaler for Resource.
8458func (r Resource) MarshalJSON() ([]byte, error) {
8459	objectMap := make(map[string]interface{})
8460	if r.Location != nil {
8461		objectMap["location"] = r.Location
8462	}
8463	if r.Tags != nil {
8464		objectMap["tags"] = r.Tags
8465	}
8466	return json.Marshal(objectMap)
8467}
8468
8469// ResourceRange describes the resource range.
8470type ResourceRange struct {
8471	// Min - The minimum number of the resource.
8472	Min *int32 `json:"min,omitempty"`
8473	// Max - The maximum number of the resource.
8474	Max *int32 `json:"max,omitempty"`
8475}
8476
8477// ResourceSku describes an available Compute SKU.
8478type ResourceSku struct {
8479	// ResourceType - READ-ONLY; The type of resource the SKU applies to.
8480	ResourceType *string `json:"resourceType,omitempty"`
8481	// Name - READ-ONLY; The name of SKU.
8482	Name *string `json:"name,omitempty"`
8483	// Tier - READ-ONLY; Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
8484	Tier *string `json:"tier,omitempty"`
8485	// Size - READ-ONLY; The Size of the SKU.
8486	Size *string `json:"size,omitempty"`
8487	// Family - READ-ONLY; The Family of this particular SKU.
8488	Family *string `json:"family,omitempty"`
8489	// Kind - READ-ONLY; The Kind of resources that are supported in this SKU.
8490	Kind *string `json:"kind,omitempty"`
8491	// Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
8492	Capacity *ResourceSkuCapacity `json:"capacity,omitempty"`
8493	// Locations - READ-ONLY; The set of locations that the SKU is available.
8494	Locations *[]string `json:"locations,omitempty"`
8495	// LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
8496	LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
8497	// APIVersions - READ-ONLY; The api versions that support this SKU.
8498	APIVersions *[]string `json:"apiVersions,omitempty"`
8499	// Costs - READ-ONLY; Metadata for retrieving price info.
8500	Costs *[]ResourceSkuCosts `json:"costs,omitempty"`
8501	// Capabilities - READ-ONLY; A name value pair to describe the capability.
8502	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
8503	// Restrictions - READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
8504	Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
8505}
8506
8507// MarshalJSON is the custom marshaler for ResourceSku.
8508func (rs ResourceSku) MarshalJSON() ([]byte, error) {
8509	objectMap := make(map[string]interface{})
8510	return json.Marshal(objectMap)
8511}
8512
8513// ResourceSkuCapabilities describes The SKU capabilities object.
8514type ResourceSkuCapabilities struct {
8515	// Name - READ-ONLY; An invariant to describe the feature.
8516	Name *string `json:"name,omitempty"`
8517	// Value - READ-ONLY; An invariant if the feature is measured by quantity.
8518	Value *string `json:"value,omitempty"`
8519}
8520
8521// MarshalJSON is the custom marshaler for ResourceSkuCapabilities.
8522func (rsc ResourceSkuCapabilities) MarshalJSON() ([]byte, error) {
8523	objectMap := make(map[string]interface{})
8524	return json.Marshal(objectMap)
8525}
8526
8527// ResourceSkuCapacity describes scaling information of a SKU.
8528type ResourceSkuCapacity struct {
8529	// Minimum - READ-ONLY; The minimum capacity.
8530	Minimum *int64 `json:"minimum,omitempty"`
8531	// Maximum - READ-ONLY; The maximum capacity that can be set.
8532	Maximum *int64 `json:"maximum,omitempty"`
8533	// Default - READ-ONLY; The default capacity.
8534	Default *int64 `json:"default,omitempty"`
8535	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone'
8536	ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
8537}
8538
8539// MarshalJSON is the custom marshaler for ResourceSkuCapacity.
8540func (rsc ResourceSkuCapacity) MarshalJSON() ([]byte, error) {
8541	objectMap := make(map[string]interface{})
8542	return json.Marshal(objectMap)
8543}
8544
8545// ResourceSkuCosts describes metadata for retrieving price info.
8546type ResourceSkuCosts struct {
8547	// MeterID - READ-ONLY; Used for querying price from commerce.
8548	MeterID *string `json:"meterID,omitempty"`
8549	// Quantity - READ-ONLY; The multiplier is needed to extend the base metered cost.
8550	Quantity *int64 `json:"quantity,omitempty"`
8551	// ExtendedUnit - READ-ONLY; An invariant to show the extended unit.
8552	ExtendedUnit *string `json:"extendedUnit,omitempty"`
8553}
8554
8555// MarshalJSON is the custom marshaler for ResourceSkuCosts.
8556func (rsc ResourceSkuCosts) MarshalJSON() ([]byte, error) {
8557	objectMap := make(map[string]interface{})
8558	return json.Marshal(objectMap)
8559}
8560
8561// ResourceSkuLocationInfo ...
8562type ResourceSkuLocationInfo struct {
8563	// Location - READ-ONLY; Location of the SKU
8564	Location *string `json:"location,omitempty"`
8565	// Zones - READ-ONLY; List of availability zones where the SKU is supported.
8566	Zones *[]string `json:"zones,omitempty"`
8567	// ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones.
8568	ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
8569}
8570
8571// MarshalJSON is the custom marshaler for ResourceSkuLocationInfo.
8572func (rsli ResourceSkuLocationInfo) MarshalJSON() ([]byte, error) {
8573	objectMap := make(map[string]interface{})
8574	return json.Marshal(objectMap)
8575}
8576
8577// ResourceSkuRestrictionInfo ...
8578type ResourceSkuRestrictionInfo struct {
8579	// Locations - READ-ONLY; Locations where the SKU is restricted
8580	Locations *[]string `json:"locations,omitempty"`
8581	// Zones - READ-ONLY; List of availability zones where the SKU is restricted.
8582	Zones *[]string `json:"zones,omitempty"`
8583}
8584
8585// MarshalJSON is the custom marshaler for ResourceSkuRestrictionInfo.
8586func (rsri ResourceSkuRestrictionInfo) MarshalJSON() ([]byte, error) {
8587	objectMap := make(map[string]interface{})
8588	return json.Marshal(objectMap)
8589}
8590
8591// ResourceSkuRestrictions describes scaling information of a SKU.
8592type ResourceSkuRestrictions struct {
8593	// Type - READ-ONLY; The type of restrictions. Possible values include: 'Location', 'Zone'
8594	Type ResourceSkuRestrictionsType `json:"type,omitempty"`
8595	// Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
8596	Values *[]string `json:"values,omitempty"`
8597	// RestrictionInfo - READ-ONLY; The information about the restriction where the SKU cannot be used.
8598	RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"`
8599	// ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription'
8600	ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
8601}
8602
8603// MarshalJSON is the custom marshaler for ResourceSkuRestrictions.
8604func (rsr ResourceSkuRestrictions) MarshalJSON() ([]byte, error) {
8605	objectMap := make(map[string]interface{})
8606	return json.Marshal(objectMap)
8607}
8608
8609// ResourceSkusResult the List Resource Skus operation response.
8610type ResourceSkusResult struct {
8611	autorest.Response `json:"-"`
8612	// Value - The list of skus available for the subscription.
8613	Value *[]ResourceSku `json:"value,omitempty"`
8614	// NextLink - The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus
8615	NextLink *string `json:"nextLink,omitempty"`
8616}
8617
8618// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values.
8619type ResourceSkusResultIterator struct {
8620	i    int
8621	page ResourceSkusResultPage
8622}
8623
8624// NextWithContext advances to the next value.  If there was an error making
8625// the request the iterator does not advance and the error is returned.
8626func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
8627	if tracing.IsEnabled() {
8628		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext")
8629		defer func() {
8630			sc := -1
8631			if iter.Response().Response.Response != nil {
8632				sc = iter.Response().Response.Response.StatusCode
8633			}
8634			tracing.EndSpan(ctx, sc, err)
8635		}()
8636	}
8637	iter.i++
8638	if iter.i < len(iter.page.Values()) {
8639		return nil
8640	}
8641	err = iter.page.NextWithContext(ctx)
8642	if err != nil {
8643		iter.i--
8644		return err
8645	}
8646	iter.i = 0
8647	return nil
8648}
8649
8650// Next advances to the next value.  If there was an error making
8651// the request the iterator does not advance and the error is returned.
8652// Deprecated: Use NextWithContext() instead.
8653func (iter *ResourceSkusResultIterator) Next() error {
8654	return iter.NextWithContext(context.Background())
8655}
8656
8657// NotDone returns true if the enumeration should be started or is not yet complete.
8658func (iter ResourceSkusResultIterator) NotDone() bool {
8659	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8660}
8661
8662// Response returns the raw server response from the last page request.
8663func (iter ResourceSkusResultIterator) Response() ResourceSkusResult {
8664	return iter.page.Response()
8665}
8666
8667// Value returns the current value or a zero-initialized value if the
8668// iterator has advanced beyond the end of the collection.
8669func (iter ResourceSkusResultIterator) Value() ResourceSku {
8670	if !iter.page.NotDone() {
8671		return ResourceSku{}
8672	}
8673	return iter.page.Values()[iter.i]
8674}
8675
8676// Creates a new instance of the ResourceSkusResultIterator type.
8677func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator {
8678	return ResourceSkusResultIterator{page: page}
8679}
8680
8681// IsEmpty returns true if the ListResult contains no values.
8682func (rsr ResourceSkusResult) IsEmpty() bool {
8683	return rsr.Value == nil || len(*rsr.Value) == 0
8684}
8685
8686// hasNextLink returns true if the NextLink is not empty.
8687func (rsr ResourceSkusResult) hasNextLink() bool {
8688	return rsr.NextLink != nil && len(*rsr.NextLink) != 0
8689}
8690
8691// resourceSkusResultPreparer prepares a request to retrieve the next set of results.
8692// It returns nil if no more results exist.
8693func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) {
8694	if !rsr.hasNextLink() {
8695		return nil, nil
8696	}
8697	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8698		autorest.AsJSON(),
8699		autorest.AsGet(),
8700		autorest.WithBaseURL(to.String(rsr.NextLink)))
8701}
8702
8703// ResourceSkusResultPage contains a page of ResourceSku values.
8704type ResourceSkusResultPage struct {
8705	fn  func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)
8706	rsr ResourceSkusResult
8707}
8708
8709// NextWithContext advances to the next page of values.  If there was an error making
8710// the request the page does not advance and the error is returned.
8711func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) {
8712	if tracing.IsEnabled() {
8713		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext")
8714		defer func() {
8715			sc := -1
8716			if page.Response().Response.Response != nil {
8717				sc = page.Response().Response.Response.StatusCode
8718			}
8719			tracing.EndSpan(ctx, sc, err)
8720		}()
8721	}
8722	for {
8723		next, err := page.fn(ctx, page.rsr)
8724		if err != nil {
8725			return err
8726		}
8727		page.rsr = next
8728		if !next.hasNextLink() || !next.IsEmpty() {
8729			break
8730		}
8731	}
8732	return nil
8733}
8734
8735// Next advances to the next page of values.  If there was an error making
8736// the request the page does not advance and the error is returned.
8737// Deprecated: Use NextWithContext() instead.
8738func (page *ResourceSkusResultPage) Next() error {
8739	return page.NextWithContext(context.Background())
8740}
8741
8742// NotDone returns true if the page enumeration should be started or is not yet complete.
8743func (page ResourceSkusResultPage) NotDone() bool {
8744	return !page.rsr.IsEmpty()
8745}
8746
8747// Response returns the raw server response from the last page request.
8748func (page ResourceSkusResultPage) Response() ResourceSkusResult {
8749	return page.rsr
8750}
8751
8752// Values returns the slice of values for the current page or nil if there are no values.
8753func (page ResourceSkusResultPage) Values() []ResourceSku {
8754	if page.rsr.IsEmpty() {
8755		return nil
8756	}
8757	return *page.rsr.Value
8758}
8759
8760// Creates a new instance of the ResourceSkusResultPage type.
8761func NewResourceSkusResultPage(cur ResourceSkusResult, getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
8762	return ResourceSkusResultPage{
8763		fn:  getNextPage,
8764		rsr: cur,
8765	}
8766}
8767
8768// ResourceSkuZoneDetails describes The zonal capabilities of a SKU.
8769type ResourceSkuZoneDetails struct {
8770	// Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
8771	Name *[]string `json:"name,omitempty"`
8772	// Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
8773	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
8774}
8775
8776// MarshalJSON is the custom marshaler for ResourceSkuZoneDetails.
8777func (rszd ResourceSkuZoneDetails) MarshalJSON() ([]byte, error) {
8778	objectMap := make(map[string]interface{})
8779	return json.Marshal(objectMap)
8780}
8781
8782// RetrieveBootDiagnosticsDataResult the SAS URIs of the console screenshot and serial log blobs.
8783type RetrieveBootDiagnosticsDataResult struct {
8784	autorest.Response `json:"-"`
8785	// ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI
8786	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
8787	// SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob URI.
8788	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
8789}
8790
8791// MarshalJSON is the custom marshaler for RetrieveBootDiagnosticsDataResult.
8792func (rbddr RetrieveBootDiagnosticsDataResult) MarshalJSON() ([]byte, error) {
8793	objectMap := make(map[string]interface{})
8794	return json.Marshal(objectMap)
8795}
8796
8797// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
8798type RollbackStatusInfo struct {
8799	// SuccessfullyRolledbackInstanceCount - READ-ONLY; The number of instances which have been successfully rolled back.
8800	SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"`
8801	// FailedRolledbackInstanceCount - READ-ONLY; The number of instances which failed to rollback.
8802	FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"`
8803	// RollbackError - READ-ONLY; Error details if OS rollback failed.
8804	RollbackError *APIError `json:"rollbackError,omitempty"`
8805}
8806
8807// MarshalJSON is the custom marshaler for RollbackStatusInfo.
8808func (rsi RollbackStatusInfo) MarshalJSON() ([]byte, error) {
8809	objectMap := make(map[string]interface{})
8810	return json.Marshal(objectMap)
8811}
8812
8813// RollingUpgradePolicy the configuration parameters used while performing a rolling upgrade.
8814type RollingUpgradePolicy struct {
8815	// 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%.
8816	MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"`
8817	// 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%.
8818	MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"`
8819	// 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%.
8820	MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"`
8821	// 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).
8822	PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"`
8823}
8824
8825// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade
8826// state.
8827type RollingUpgradeProgressInfo struct {
8828	// SuccessfulInstanceCount - READ-ONLY; The number of instances that have been successfully upgraded.
8829	SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"`
8830	// FailedInstanceCount - READ-ONLY; The number of instances that have failed to be upgraded successfully.
8831	FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty"`
8832	// InProgressInstanceCount - READ-ONLY; The number of instances that are currently being upgraded.
8833	InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty"`
8834	// PendingInstanceCount - READ-ONLY; The number of instances that have not yet begun to be upgraded.
8835	PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"`
8836}
8837
8838// MarshalJSON is the custom marshaler for RollingUpgradeProgressInfo.
8839func (rupi RollingUpgradeProgressInfo) MarshalJSON() ([]byte, error) {
8840	objectMap := make(map[string]interface{})
8841	return json.Marshal(objectMap)
8842}
8843
8844// RollingUpgradeRunningStatus information about the current running state of the overall upgrade.
8845type RollingUpgradeRunningStatus struct {
8846	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'RollingUpgradeStatusCodeRollingForward', 'RollingUpgradeStatusCodeCancelled', 'RollingUpgradeStatusCodeCompleted', 'RollingUpgradeStatusCodeFaulted'
8847	Code RollingUpgradeStatusCode `json:"code,omitempty"`
8848	// StartTime - READ-ONLY; Start time of the upgrade.
8849	StartTime *date.Time `json:"startTime,omitempty"`
8850	// LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel'
8851	LastAction RollingUpgradeActionType `json:"lastAction,omitempty"`
8852	// LastActionTime - READ-ONLY; Last action time of the upgrade.
8853	LastActionTime *date.Time `json:"lastActionTime,omitempty"`
8854}
8855
8856// MarshalJSON is the custom marshaler for RollingUpgradeRunningStatus.
8857func (rurs RollingUpgradeRunningStatus) MarshalJSON() ([]byte, error) {
8858	objectMap := make(map[string]interface{})
8859	return json.Marshal(objectMap)
8860}
8861
8862// RollingUpgradeStatusInfo the status of the latest virtual machine scale set rolling upgrade.
8863type RollingUpgradeStatusInfo struct {
8864	autorest.Response                   `json:"-"`
8865	*RollingUpgradeStatusInfoProperties `json:"properties,omitempty"`
8866	// ID - READ-ONLY; Resource Id
8867	ID *string `json:"id,omitempty"`
8868	// Name - READ-ONLY; Resource name
8869	Name *string `json:"name,omitempty"`
8870	// Type - READ-ONLY; Resource type
8871	Type *string `json:"type,omitempty"`
8872	// Location - Resource location
8873	Location *string `json:"location,omitempty"`
8874	// Tags - Resource tags
8875	Tags map[string]*string `json:"tags"`
8876}
8877
8878// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfo.
8879func (rusi RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) {
8880	objectMap := make(map[string]interface{})
8881	if rusi.RollingUpgradeStatusInfoProperties != nil {
8882		objectMap["properties"] = rusi.RollingUpgradeStatusInfoProperties
8883	}
8884	if rusi.Location != nil {
8885		objectMap["location"] = rusi.Location
8886	}
8887	if rusi.Tags != nil {
8888		objectMap["tags"] = rusi.Tags
8889	}
8890	return json.Marshal(objectMap)
8891}
8892
8893// UnmarshalJSON is the custom unmarshaler for RollingUpgradeStatusInfo struct.
8894func (rusi *RollingUpgradeStatusInfo) UnmarshalJSON(body []byte) error {
8895	var m map[string]*json.RawMessage
8896	err := json.Unmarshal(body, &m)
8897	if err != nil {
8898		return err
8899	}
8900	for k, v := range m {
8901		switch k {
8902		case "properties":
8903			if v != nil {
8904				var rollingUpgradeStatusInfoProperties RollingUpgradeStatusInfoProperties
8905				err = json.Unmarshal(*v, &rollingUpgradeStatusInfoProperties)
8906				if err != nil {
8907					return err
8908				}
8909				rusi.RollingUpgradeStatusInfoProperties = &rollingUpgradeStatusInfoProperties
8910			}
8911		case "id":
8912			if v != nil {
8913				var ID string
8914				err = json.Unmarshal(*v, &ID)
8915				if err != nil {
8916					return err
8917				}
8918				rusi.ID = &ID
8919			}
8920		case "name":
8921			if v != nil {
8922				var name string
8923				err = json.Unmarshal(*v, &name)
8924				if err != nil {
8925					return err
8926				}
8927				rusi.Name = &name
8928			}
8929		case "type":
8930			if v != nil {
8931				var typeVar string
8932				err = json.Unmarshal(*v, &typeVar)
8933				if err != nil {
8934					return err
8935				}
8936				rusi.Type = &typeVar
8937			}
8938		case "location":
8939			if v != nil {
8940				var location string
8941				err = json.Unmarshal(*v, &location)
8942				if err != nil {
8943					return err
8944				}
8945				rusi.Location = &location
8946			}
8947		case "tags":
8948			if v != nil {
8949				var tags map[string]*string
8950				err = json.Unmarshal(*v, &tags)
8951				if err != nil {
8952					return err
8953				}
8954				rusi.Tags = tags
8955			}
8956		}
8957	}
8958
8959	return nil
8960}
8961
8962// RollingUpgradeStatusInfoProperties the status of the latest virtual machine scale set rolling upgrade.
8963type RollingUpgradeStatusInfoProperties struct {
8964	// Policy - READ-ONLY; The rolling upgrade policies applied for this upgrade.
8965	Policy *RollingUpgradePolicy `json:"policy,omitempty"`
8966	// RunningStatus - READ-ONLY; Information about the current running state of the overall upgrade.
8967	RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"`
8968	// Progress - READ-ONLY; Information about the number of virtual machine instances in each upgrade state.
8969	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
8970	// Error - READ-ONLY; Error details for this upgrade, if there are any.
8971	Error *APIError `json:"error,omitempty"`
8972}
8973
8974// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfoProperties.
8975func (rusip RollingUpgradeStatusInfoProperties) MarshalJSON() ([]byte, error) {
8976	objectMap := make(map[string]interface{})
8977	return json.Marshal(objectMap)
8978}
8979
8980// RunCommandDocument describes the properties of a Run Command.
8981type RunCommandDocument struct {
8982	autorest.Response `json:"-"`
8983	// Script - The script to be executed.
8984	Script *[]string `json:"script,omitempty"`
8985	// Parameters - The parameters used by the script.
8986	Parameters *[]RunCommandParameterDefinition `json:"parameters,omitempty"`
8987	// Schema - The VM run command schema.
8988	Schema *string `json:"$schema,omitempty"`
8989	// ID - The VM run command id.
8990	ID *string `json:"id,omitempty"`
8991	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
8992	OsType OperatingSystemTypes `json:"osType,omitempty"`
8993	// Label - The VM run command label.
8994	Label *string `json:"label,omitempty"`
8995	// Description - The VM run command description.
8996	Description *string `json:"description,omitempty"`
8997}
8998
8999// RunCommandDocumentBase describes the properties of a Run Command metadata.
9000type RunCommandDocumentBase struct {
9001	// Schema - The VM run command schema.
9002	Schema *string `json:"$schema,omitempty"`
9003	// ID - The VM run command id.
9004	ID *string `json:"id,omitempty"`
9005	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
9006	OsType OperatingSystemTypes `json:"osType,omitempty"`
9007	// Label - The VM run command label.
9008	Label *string `json:"label,omitempty"`
9009	// Description - The VM run command description.
9010	Description *string `json:"description,omitempty"`
9011}
9012
9013// RunCommandInput capture Virtual Machine parameters.
9014type RunCommandInput struct {
9015	// CommandID - The run command id.
9016	CommandID *string `json:"commandId,omitempty"`
9017	// Script - Optional. The script to be executed.  When this value is given, the given script will override the default script of the command.
9018	Script *[]string `json:"script,omitempty"`
9019	// Parameters - The run command parameters.
9020	Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
9021}
9022
9023// RunCommandInputParameter describes the properties of a run command parameter.
9024type RunCommandInputParameter struct {
9025	// Name - The run command parameter name.
9026	Name *string `json:"name,omitempty"`
9027	// Value - The run command parameter value.
9028	Value *string `json:"value,omitempty"`
9029}
9030
9031// RunCommandListResult the List Virtual Machine operation response.
9032type RunCommandListResult struct {
9033	autorest.Response `json:"-"`
9034	// Value - The list of virtual machine run commands.
9035	Value *[]RunCommandDocumentBase `json:"value,omitempty"`
9036	// NextLink - The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands.
9037	NextLink *string `json:"nextLink,omitempty"`
9038}
9039
9040// RunCommandListResultIterator provides access to a complete listing of RunCommandDocumentBase values.
9041type RunCommandListResultIterator struct {
9042	i    int
9043	page RunCommandListResultPage
9044}
9045
9046// NextWithContext advances to the next value.  If there was an error making
9047// the request the iterator does not advance and the error is returned.
9048func (iter *RunCommandListResultIterator) NextWithContext(ctx context.Context) (err error) {
9049	if tracing.IsEnabled() {
9050		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultIterator.NextWithContext")
9051		defer func() {
9052			sc := -1
9053			if iter.Response().Response.Response != nil {
9054				sc = iter.Response().Response.Response.StatusCode
9055			}
9056			tracing.EndSpan(ctx, sc, err)
9057		}()
9058	}
9059	iter.i++
9060	if iter.i < len(iter.page.Values()) {
9061		return nil
9062	}
9063	err = iter.page.NextWithContext(ctx)
9064	if err != nil {
9065		iter.i--
9066		return err
9067	}
9068	iter.i = 0
9069	return nil
9070}
9071
9072// Next advances to the next value.  If there was an error making
9073// the request the iterator does not advance and the error is returned.
9074// Deprecated: Use NextWithContext() instead.
9075func (iter *RunCommandListResultIterator) Next() error {
9076	return iter.NextWithContext(context.Background())
9077}
9078
9079// NotDone returns true if the enumeration should be started or is not yet complete.
9080func (iter RunCommandListResultIterator) NotDone() bool {
9081	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9082}
9083
9084// Response returns the raw server response from the last page request.
9085func (iter RunCommandListResultIterator) Response() RunCommandListResult {
9086	return iter.page.Response()
9087}
9088
9089// Value returns the current value or a zero-initialized value if the
9090// iterator has advanced beyond the end of the collection.
9091func (iter RunCommandListResultIterator) Value() RunCommandDocumentBase {
9092	if !iter.page.NotDone() {
9093		return RunCommandDocumentBase{}
9094	}
9095	return iter.page.Values()[iter.i]
9096}
9097
9098// Creates a new instance of the RunCommandListResultIterator type.
9099func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator {
9100	return RunCommandListResultIterator{page: page}
9101}
9102
9103// IsEmpty returns true if the ListResult contains no values.
9104func (rclr RunCommandListResult) IsEmpty() bool {
9105	return rclr.Value == nil || len(*rclr.Value) == 0
9106}
9107
9108// hasNextLink returns true if the NextLink is not empty.
9109func (rclr RunCommandListResult) hasNextLink() bool {
9110	return rclr.NextLink != nil && len(*rclr.NextLink) != 0
9111}
9112
9113// runCommandListResultPreparer prepares a request to retrieve the next set of results.
9114// It returns nil if no more results exist.
9115func (rclr RunCommandListResult) runCommandListResultPreparer(ctx context.Context) (*http.Request, error) {
9116	if !rclr.hasNextLink() {
9117		return nil, nil
9118	}
9119	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9120		autorest.AsJSON(),
9121		autorest.AsGet(),
9122		autorest.WithBaseURL(to.String(rclr.NextLink)))
9123}
9124
9125// RunCommandListResultPage contains a page of RunCommandDocumentBase values.
9126type RunCommandListResultPage struct {
9127	fn   func(context.Context, RunCommandListResult) (RunCommandListResult, error)
9128	rclr RunCommandListResult
9129}
9130
9131// NextWithContext advances to the next page of values.  If there was an error making
9132// the request the page does not advance and the error is returned.
9133func (page *RunCommandListResultPage) NextWithContext(ctx context.Context) (err error) {
9134	if tracing.IsEnabled() {
9135		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultPage.NextWithContext")
9136		defer func() {
9137			sc := -1
9138			if page.Response().Response.Response != nil {
9139				sc = page.Response().Response.Response.StatusCode
9140			}
9141			tracing.EndSpan(ctx, sc, err)
9142		}()
9143	}
9144	for {
9145		next, err := page.fn(ctx, page.rclr)
9146		if err != nil {
9147			return err
9148		}
9149		page.rclr = next
9150		if !next.hasNextLink() || !next.IsEmpty() {
9151			break
9152		}
9153	}
9154	return nil
9155}
9156
9157// Next advances to the next page of values.  If there was an error making
9158// the request the page does not advance and the error is returned.
9159// Deprecated: Use NextWithContext() instead.
9160func (page *RunCommandListResultPage) Next() error {
9161	return page.NextWithContext(context.Background())
9162}
9163
9164// NotDone returns true if the page enumeration should be started or is not yet complete.
9165func (page RunCommandListResultPage) NotDone() bool {
9166	return !page.rclr.IsEmpty()
9167}
9168
9169// Response returns the raw server response from the last page request.
9170func (page RunCommandListResultPage) Response() RunCommandListResult {
9171	return page.rclr
9172}
9173
9174// Values returns the slice of values for the current page or nil if there are no values.
9175func (page RunCommandListResultPage) Values() []RunCommandDocumentBase {
9176	if page.rclr.IsEmpty() {
9177		return nil
9178	}
9179	return *page.rclr.Value
9180}
9181
9182// Creates a new instance of the RunCommandListResultPage type.
9183func NewRunCommandListResultPage(cur RunCommandListResult, getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
9184	return RunCommandListResultPage{
9185		fn:   getNextPage,
9186		rclr: cur,
9187	}
9188}
9189
9190// RunCommandParameterDefinition describes the properties of a run command parameter.
9191type RunCommandParameterDefinition struct {
9192	// Name - The run command parameter name.
9193	Name *string `json:"name,omitempty"`
9194	// Type - The run command parameter type.
9195	Type *string `json:"type,omitempty"`
9196	// DefaultValue - The run command parameter default value.
9197	DefaultValue *string `json:"defaultValue,omitempty"`
9198	// Required - The run command parameter required.
9199	Required *bool `json:"required,omitempty"`
9200}
9201
9202// RunCommandResult ...
9203type RunCommandResult struct {
9204	autorest.Response `json:"-"`
9205	// Value - Run command operation response.
9206	Value *[]InstanceViewStatus `json:"value,omitempty"`
9207}
9208
9209// ScaleInPolicy describes a scale-in policy for a virtual machine scale set.
9210type ScaleInPolicy struct {
9211	// Rules - The rules to be followed when scaling-in a virtual machine scale set. <br><br> Possible values are: <br><br> **Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in. <br><br> **OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal. <br><br> **NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal. <br><br>
9212	Rules *[]VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"`
9213}
9214
9215// ScheduledEventsProfile ...
9216type ScheduledEventsProfile struct {
9217	// TerminateNotificationProfile - Specifies Terminate Scheduled Event related configurations.
9218	TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"`
9219}
9220
9221// SecurityProfile specifies the Security profile settings for the virtual machine or virtual machine scale
9222// set.
9223type SecurityProfile struct {
9224	// EncryptionAtHost - This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. <br><br> Default: The Encryption at host will be disabled unless this property is set to true for the resource.
9225	EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"`
9226}
9227
9228// ShareInfoElement ...
9229type ShareInfoElement struct {
9230	// VMURI - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
9231	VMURI *string `json:"vmUri,omitempty"`
9232}
9233
9234// MarshalJSON is the custom marshaler for ShareInfoElement.
9235func (sie ShareInfoElement) MarshalJSON() ([]byte, error) {
9236	objectMap := make(map[string]interface{})
9237	return json.Marshal(objectMap)
9238}
9239
9240// Sku describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware
9241// the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU
9242// name.
9243type Sku struct {
9244	// Name - The sku name.
9245	Name *string `json:"name,omitempty"`
9246	// Tier - Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
9247	Tier *string `json:"tier,omitempty"`
9248	// Capacity - Specifies the number of virtual machines in the scale set.
9249	Capacity *int64 `json:"capacity,omitempty"`
9250}
9251
9252// Snapshot snapshot resource.
9253type Snapshot struct {
9254	autorest.Response `json:"-"`
9255	// ManagedBy - READ-ONLY; Unused. Always Null.
9256	ManagedBy           *string      `json:"managedBy,omitempty"`
9257	Sku                 *SnapshotSku `json:"sku,omitempty"`
9258	*SnapshotProperties `json:"properties,omitempty"`
9259	// ID - READ-ONLY; Resource Id
9260	ID *string `json:"id,omitempty"`
9261	// Name - READ-ONLY; Resource name
9262	Name *string `json:"name,omitempty"`
9263	// Type - READ-ONLY; Resource type
9264	Type *string `json:"type,omitempty"`
9265	// Location - Resource location
9266	Location *string `json:"location,omitempty"`
9267	// Tags - Resource tags
9268	Tags map[string]*string `json:"tags"`
9269}
9270
9271// MarshalJSON is the custom marshaler for Snapshot.
9272func (s Snapshot) MarshalJSON() ([]byte, error) {
9273	objectMap := make(map[string]interface{})
9274	if s.Sku != nil {
9275		objectMap["sku"] = s.Sku
9276	}
9277	if s.SnapshotProperties != nil {
9278		objectMap["properties"] = s.SnapshotProperties
9279	}
9280	if s.Location != nil {
9281		objectMap["location"] = s.Location
9282	}
9283	if s.Tags != nil {
9284		objectMap["tags"] = s.Tags
9285	}
9286	return json.Marshal(objectMap)
9287}
9288
9289// UnmarshalJSON is the custom unmarshaler for Snapshot struct.
9290func (s *Snapshot) UnmarshalJSON(body []byte) error {
9291	var m map[string]*json.RawMessage
9292	err := json.Unmarshal(body, &m)
9293	if err != nil {
9294		return err
9295	}
9296	for k, v := range m {
9297		switch k {
9298		case "managedBy":
9299			if v != nil {
9300				var managedBy string
9301				err = json.Unmarshal(*v, &managedBy)
9302				if err != nil {
9303					return err
9304				}
9305				s.ManagedBy = &managedBy
9306			}
9307		case "sku":
9308			if v != nil {
9309				var sku SnapshotSku
9310				err = json.Unmarshal(*v, &sku)
9311				if err != nil {
9312					return err
9313				}
9314				s.Sku = &sku
9315			}
9316		case "properties":
9317			if v != nil {
9318				var snapshotProperties SnapshotProperties
9319				err = json.Unmarshal(*v, &snapshotProperties)
9320				if err != nil {
9321					return err
9322				}
9323				s.SnapshotProperties = &snapshotProperties
9324			}
9325		case "id":
9326			if v != nil {
9327				var ID string
9328				err = json.Unmarshal(*v, &ID)
9329				if err != nil {
9330					return err
9331				}
9332				s.ID = &ID
9333			}
9334		case "name":
9335			if v != nil {
9336				var name string
9337				err = json.Unmarshal(*v, &name)
9338				if err != nil {
9339					return err
9340				}
9341				s.Name = &name
9342			}
9343		case "type":
9344			if v != nil {
9345				var typeVar string
9346				err = json.Unmarshal(*v, &typeVar)
9347				if err != nil {
9348					return err
9349				}
9350				s.Type = &typeVar
9351			}
9352		case "location":
9353			if v != nil {
9354				var location string
9355				err = json.Unmarshal(*v, &location)
9356				if err != nil {
9357					return err
9358				}
9359				s.Location = &location
9360			}
9361		case "tags":
9362			if v != nil {
9363				var tags map[string]*string
9364				err = json.Unmarshal(*v, &tags)
9365				if err != nil {
9366					return err
9367				}
9368				s.Tags = tags
9369			}
9370		}
9371	}
9372
9373	return nil
9374}
9375
9376// SnapshotList the List Snapshots operation response.
9377type SnapshotList struct {
9378	autorest.Response `json:"-"`
9379	// Value - A list of snapshots.
9380	Value *[]Snapshot `json:"value,omitempty"`
9381	// NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
9382	NextLink *string `json:"nextLink,omitempty"`
9383}
9384
9385// SnapshotListIterator provides access to a complete listing of Snapshot values.
9386type SnapshotListIterator struct {
9387	i    int
9388	page SnapshotListPage
9389}
9390
9391// NextWithContext advances to the next value.  If there was an error making
9392// the request the iterator does not advance and the error is returned.
9393func (iter *SnapshotListIterator) NextWithContext(ctx context.Context) (err error) {
9394	if tracing.IsEnabled() {
9395		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListIterator.NextWithContext")
9396		defer func() {
9397			sc := -1
9398			if iter.Response().Response.Response != nil {
9399				sc = iter.Response().Response.Response.StatusCode
9400			}
9401			tracing.EndSpan(ctx, sc, err)
9402		}()
9403	}
9404	iter.i++
9405	if iter.i < len(iter.page.Values()) {
9406		return nil
9407	}
9408	err = iter.page.NextWithContext(ctx)
9409	if err != nil {
9410		iter.i--
9411		return err
9412	}
9413	iter.i = 0
9414	return nil
9415}
9416
9417// Next advances to the next value.  If there was an error making
9418// the request the iterator does not advance and the error is returned.
9419// Deprecated: Use NextWithContext() instead.
9420func (iter *SnapshotListIterator) Next() error {
9421	return iter.NextWithContext(context.Background())
9422}
9423
9424// NotDone returns true if the enumeration should be started or is not yet complete.
9425func (iter SnapshotListIterator) NotDone() bool {
9426	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9427}
9428
9429// Response returns the raw server response from the last page request.
9430func (iter SnapshotListIterator) Response() SnapshotList {
9431	return iter.page.Response()
9432}
9433
9434// Value returns the current value or a zero-initialized value if the
9435// iterator has advanced beyond the end of the collection.
9436func (iter SnapshotListIterator) Value() Snapshot {
9437	if !iter.page.NotDone() {
9438		return Snapshot{}
9439	}
9440	return iter.page.Values()[iter.i]
9441}
9442
9443// Creates a new instance of the SnapshotListIterator type.
9444func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator {
9445	return SnapshotListIterator{page: page}
9446}
9447
9448// IsEmpty returns true if the ListResult contains no values.
9449func (sl SnapshotList) IsEmpty() bool {
9450	return sl.Value == nil || len(*sl.Value) == 0
9451}
9452
9453// hasNextLink returns true if the NextLink is not empty.
9454func (sl SnapshotList) hasNextLink() bool {
9455	return sl.NextLink != nil && len(*sl.NextLink) != 0
9456}
9457
9458// snapshotListPreparer prepares a request to retrieve the next set of results.
9459// It returns nil if no more results exist.
9460func (sl SnapshotList) snapshotListPreparer(ctx context.Context) (*http.Request, error) {
9461	if !sl.hasNextLink() {
9462		return nil, nil
9463	}
9464	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9465		autorest.AsJSON(),
9466		autorest.AsGet(),
9467		autorest.WithBaseURL(to.String(sl.NextLink)))
9468}
9469
9470// SnapshotListPage contains a page of Snapshot values.
9471type SnapshotListPage struct {
9472	fn func(context.Context, SnapshotList) (SnapshotList, error)
9473	sl SnapshotList
9474}
9475
9476// NextWithContext advances to the next page of values.  If there was an error making
9477// the request the page does not advance and the error is returned.
9478func (page *SnapshotListPage) NextWithContext(ctx context.Context) (err error) {
9479	if tracing.IsEnabled() {
9480		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListPage.NextWithContext")
9481		defer func() {
9482			sc := -1
9483			if page.Response().Response.Response != nil {
9484				sc = page.Response().Response.Response.StatusCode
9485			}
9486			tracing.EndSpan(ctx, sc, err)
9487		}()
9488	}
9489	for {
9490		next, err := page.fn(ctx, page.sl)
9491		if err != nil {
9492			return err
9493		}
9494		page.sl = next
9495		if !next.hasNextLink() || !next.IsEmpty() {
9496			break
9497		}
9498	}
9499	return nil
9500}
9501
9502// Next advances to the next page of values.  If there was an error making
9503// the request the page does not advance and the error is returned.
9504// Deprecated: Use NextWithContext() instead.
9505func (page *SnapshotListPage) Next() error {
9506	return page.NextWithContext(context.Background())
9507}
9508
9509// NotDone returns true if the page enumeration should be started or is not yet complete.
9510func (page SnapshotListPage) NotDone() bool {
9511	return !page.sl.IsEmpty()
9512}
9513
9514// Response returns the raw server response from the last page request.
9515func (page SnapshotListPage) Response() SnapshotList {
9516	return page.sl
9517}
9518
9519// Values returns the slice of values for the current page or nil if there are no values.
9520func (page SnapshotListPage) Values() []Snapshot {
9521	if page.sl.IsEmpty() {
9522		return nil
9523	}
9524	return *page.sl.Value
9525}
9526
9527// Creates a new instance of the SnapshotListPage type.
9528func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
9529	return SnapshotListPage{
9530		fn: getNextPage,
9531		sl: cur,
9532	}
9533}
9534
9535// SnapshotProperties snapshot resource properties.
9536type SnapshotProperties struct {
9537	// TimeCreated - READ-ONLY; The time when the snapshot was created.
9538	TimeCreated *date.Time `json:"timeCreated,omitempty"`
9539	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
9540	OsType OperatingSystemTypes `json:"osType,omitempty"`
9541	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
9542	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
9543	// CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
9544	CreationData *CreationData `json:"creationData,omitempty"`
9545	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
9546	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
9547	// DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
9548	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
9549	// UniqueID - READ-ONLY; Unique Guid identifying the resource.
9550	UniqueID *string `json:"uniqueId,omitempty"`
9551	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
9552	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
9553	// ProvisioningState - READ-ONLY; The disk provisioning state.
9554	ProvisioningState *string `json:"provisioningState,omitempty"`
9555	// Incremental - Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.
9556	Incremental *bool `json:"incremental,omitempty"`
9557	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
9558	Encryption *Encryption `json:"encryption,omitempty"`
9559	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
9560	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
9561	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
9562	DiskAccessID *string `json:"diskAccessId,omitempty"`
9563}
9564
9565// MarshalJSON is the custom marshaler for SnapshotProperties.
9566func (sp SnapshotProperties) MarshalJSON() ([]byte, error) {
9567	objectMap := make(map[string]interface{})
9568	if sp.OsType != "" {
9569		objectMap["osType"] = sp.OsType
9570	}
9571	if sp.HyperVGeneration != "" {
9572		objectMap["hyperVGeneration"] = sp.HyperVGeneration
9573	}
9574	if sp.CreationData != nil {
9575		objectMap["creationData"] = sp.CreationData
9576	}
9577	if sp.DiskSizeGB != nil {
9578		objectMap["diskSizeGB"] = sp.DiskSizeGB
9579	}
9580	if sp.EncryptionSettingsCollection != nil {
9581		objectMap["encryptionSettingsCollection"] = sp.EncryptionSettingsCollection
9582	}
9583	if sp.Incremental != nil {
9584		objectMap["incremental"] = sp.Incremental
9585	}
9586	if sp.Encryption != nil {
9587		objectMap["encryption"] = sp.Encryption
9588	}
9589	if sp.NetworkAccessPolicy != "" {
9590		objectMap["networkAccessPolicy"] = sp.NetworkAccessPolicy
9591	}
9592	if sp.DiskAccessID != nil {
9593		objectMap["diskAccessId"] = sp.DiskAccessID
9594	}
9595	return json.Marshal(objectMap)
9596}
9597
9598// SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
9599// operation.
9600type SnapshotsCreateOrUpdateFuture struct {
9601	azure.FutureAPI
9602	// Result returns the result of the asynchronous operation.
9603	// If the operation has not completed it will return an error.
9604	Result func(SnapshotsClient) (Snapshot, error)
9605}
9606
9607// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9608func (future *SnapshotsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9609	var azFuture azure.Future
9610	if err := json.Unmarshal(body, &azFuture); err != nil {
9611		return err
9612	}
9613	future.FutureAPI = &azFuture
9614	future.Result = future.result
9615	return nil
9616}
9617
9618// result is the default implementation for SnapshotsCreateOrUpdateFuture.Result.
9619func (future *SnapshotsCreateOrUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
9620	var done bool
9621	done, err = future.DoneWithContext(context.Background(), client)
9622	if err != nil {
9623		err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9624		return
9625	}
9626	if !done {
9627		s.Response.Response = future.Response()
9628		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
9629		return
9630	}
9631	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9632	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
9633		s, err = client.CreateOrUpdateResponder(s.Response.Response)
9634		if err != nil {
9635			err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
9636		}
9637	}
9638	return
9639}
9640
9641// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9642// operation.
9643type SnapshotsDeleteFuture struct {
9644	azure.FutureAPI
9645	// Result returns the result of the asynchronous operation.
9646	// If the operation has not completed it will return an error.
9647	Result func(SnapshotsClient) (autorest.Response, error)
9648}
9649
9650// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9651func (future *SnapshotsDeleteFuture) UnmarshalJSON(body []byte) error {
9652	var azFuture azure.Future
9653	if err := json.Unmarshal(body, &azFuture); err != nil {
9654		return err
9655	}
9656	future.FutureAPI = &azFuture
9657	future.Result = future.result
9658	return nil
9659}
9660
9661// result is the default implementation for SnapshotsDeleteFuture.Result.
9662func (future *SnapshotsDeleteFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
9663	var done bool
9664	done, err = future.DoneWithContext(context.Background(), client)
9665	if err != nil {
9666		err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Polling failure")
9667		return
9668	}
9669	if !done {
9670		ar.Response = future.Response()
9671		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
9672		return
9673	}
9674	ar.Response = future.Response()
9675	return
9676}
9677
9678// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
9679// operation.
9680type SnapshotsGrantAccessFuture struct {
9681	azure.FutureAPI
9682	// Result returns the result of the asynchronous operation.
9683	// If the operation has not completed it will return an error.
9684	Result func(SnapshotsClient) (AccessURI, error)
9685}
9686
9687// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9688func (future *SnapshotsGrantAccessFuture) UnmarshalJSON(body []byte) error {
9689	var azFuture azure.Future
9690	if err := json.Unmarshal(body, &azFuture); err != nil {
9691		return err
9692	}
9693	future.FutureAPI = &azFuture
9694	future.Result = future.result
9695	return nil
9696}
9697
9698// result is the default implementation for SnapshotsGrantAccessFuture.Result.
9699func (future *SnapshotsGrantAccessFuture) result(client SnapshotsClient) (au AccessURI, err error) {
9700	var done bool
9701	done, err = future.DoneWithContext(context.Background(), client)
9702	if err != nil {
9703		err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Polling failure")
9704		return
9705	}
9706	if !done {
9707		au.Response.Response = future.Response()
9708		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
9709		return
9710	}
9711	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9712	if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
9713		au, err = client.GrantAccessResponder(au.Response.Response)
9714		if err != nil {
9715			err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
9716		}
9717	}
9718	return
9719}
9720
9721// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.
9722type SnapshotSku struct {
9723	// Name - The sku name. Possible values include: 'SnapshotStorageAccountTypesStandardLRS', 'SnapshotStorageAccountTypesPremiumLRS', 'SnapshotStorageAccountTypesStandardZRS'
9724	Name SnapshotStorageAccountTypes `json:"name,omitempty"`
9725	// Tier - READ-ONLY; The sku tier.
9726	Tier *string `json:"tier,omitempty"`
9727}
9728
9729// MarshalJSON is the custom marshaler for SnapshotSku.
9730func (ss SnapshotSku) MarshalJSON() ([]byte, error) {
9731	objectMap := make(map[string]interface{})
9732	if ss.Name != "" {
9733		objectMap["name"] = ss.Name
9734	}
9735	return json.Marshal(objectMap)
9736}
9737
9738// SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
9739// operation.
9740type SnapshotsRevokeAccessFuture struct {
9741	azure.FutureAPI
9742	// Result returns the result of the asynchronous operation.
9743	// If the operation has not completed it will return an error.
9744	Result func(SnapshotsClient) (autorest.Response, error)
9745}
9746
9747// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9748func (future *SnapshotsRevokeAccessFuture) UnmarshalJSON(body []byte) error {
9749	var azFuture azure.Future
9750	if err := json.Unmarshal(body, &azFuture); err != nil {
9751		return err
9752	}
9753	future.FutureAPI = &azFuture
9754	future.Result = future.result
9755	return nil
9756}
9757
9758// result is the default implementation for SnapshotsRevokeAccessFuture.Result.
9759func (future *SnapshotsRevokeAccessFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
9760	var done bool
9761	done, err = future.DoneWithContext(context.Background(), client)
9762	if err != nil {
9763		err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Polling failure")
9764		return
9765	}
9766	if !done {
9767		ar.Response = future.Response()
9768		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
9769		return
9770	}
9771	ar.Response = future.Response()
9772	return
9773}
9774
9775// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
9776// operation.
9777type SnapshotsUpdateFuture struct {
9778	azure.FutureAPI
9779	// Result returns the result of the asynchronous operation.
9780	// If the operation has not completed it will return an error.
9781	Result func(SnapshotsClient) (Snapshot, error)
9782}
9783
9784// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9785func (future *SnapshotsUpdateFuture) UnmarshalJSON(body []byte) error {
9786	var azFuture azure.Future
9787	if err := json.Unmarshal(body, &azFuture); err != nil {
9788		return err
9789	}
9790	future.FutureAPI = &azFuture
9791	future.Result = future.result
9792	return nil
9793}
9794
9795// result is the default implementation for SnapshotsUpdateFuture.Result.
9796func (future *SnapshotsUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
9797	var done bool
9798	done, err = future.DoneWithContext(context.Background(), client)
9799	if err != nil {
9800		err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Polling failure")
9801		return
9802	}
9803	if !done {
9804		s.Response.Response = future.Response()
9805		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
9806		return
9807	}
9808	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9809	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
9810		s, err = client.UpdateResponder(s.Response.Response)
9811		if err != nil {
9812			err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
9813		}
9814	}
9815	return
9816}
9817
9818// SnapshotUpdate snapshot update resource.
9819type SnapshotUpdate struct {
9820	*SnapshotUpdateProperties `json:"properties,omitempty"`
9821	// Tags - Resource tags
9822	Tags map[string]*string `json:"tags"`
9823	Sku  *SnapshotSku       `json:"sku,omitempty"`
9824}
9825
9826// MarshalJSON is the custom marshaler for SnapshotUpdate.
9827func (su SnapshotUpdate) MarshalJSON() ([]byte, error) {
9828	objectMap := make(map[string]interface{})
9829	if su.SnapshotUpdateProperties != nil {
9830		objectMap["properties"] = su.SnapshotUpdateProperties
9831	}
9832	if su.Tags != nil {
9833		objectMap["tags"] = su.Tags
9834	}
9835	if su.Sku != nil {
9836		objectMap["sku"] = su.Sku
9837	}
9838	return json.Marshal(objectMap)
9839}
9840
9841// UnmarshalJSON is the custom unmarshaler for SnapshotUpdate struct.
9842func (su *SnapshotUpdate) UnmarshalJSON(body []byte) error {
9843	var m map[string]*json.RawMessage
9844	err := json.Unmarshal(body, &m)
9845	if err != nil {
9846		return err
9847	}
9848	for k, v := range m {
9849		switch k {
9850		case "properties":
9851			if v != nil {
9852				var snapshotUpdateProperties SnapshotUpdateProperties
9853				err = json.Unmarshal(*v, &snapshotUpdateProperties)
9854				if err != nil {
9855					return err
9856				}
9857				su.SnapshotUpdateProperties = &snapshotUpdateProperties
9858			}
9859		case "tags":
9860			if v != nil {
9861				var tags map[string]*string
9862				err = json.Unmarshal(*v, &tags)
9863				if err != nil {
9864					return err
9865				}
9866				su.Tags = tags
9867			}
9868		case "sku":
9869			if v != nil {
9870				var sku SnapshotSku
9871				err = json.Unmarshal(*v, &sku)
9872				if err != nil {
9873					return err
9874				}
9875				su.Sku = &sku
9876			}
9877		}
9878	}
9879
9880	return nil
9881}
9882
9883// SnapshotUpdateProperties snapshot resource update properties.
9884type SnapshotUpdateProperties struct {
9885	// OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
9886	OsType OperatingSystemTypes `json:"osType,omitempty"`
9887	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
9888	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
9889	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
9890	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
9891	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
9892	Encryption *Encryption `json:"encryption,omitempty"`
9893	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
9894	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
9895	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
9896	DiskAccessID *string `json:"diskAccessId,omitempty"`
9897}
9898
9899// SourceVault the vault id is an Azure Resource Manager Resource id in the form
9900// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
9901type SourceVault struct {
9902	// ID - Resource Id
9903	ID *string `json:"id,omitempty"`
9904}
9905
9906// SSHConfiguration SSH configuration for Linux based VMs running on Azure
9907type SSHConfiguration struct {
9908	// PublicKeys - The list of SSH public keys used to authenticate with linux based VMs.
9909	PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
9910}
9911
9912// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where
9913// the public key is placed.
9914type SSHPublicKey struct {
9915	// 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
9916	Path *string `json:"path,omitempty"`
9917	// 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).
9918	KeyData *string `json:"keyData,omitempty"`
9919}
9920
9921// SSHPublicKeyGenerateKeyPairResult response from generation of an SSH key pair.
9922type SSHPublicKeyGenerateKeyPairResult struct {
9923	autorest.Response `json:"-"`
9924	// PrivateKey - Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret.
9925	PrivateKey *string `json:"privateKey,omitempty"`
9926	// PublicKey - Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format.
9927	PublicKey *string `json:"publicKey,omitempty"`
9928	// ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}
9929	ID *string `json:"id,omitempty"`
9930}
9931
9932// SSHPublicKeyResource specifies information about the SSH public key.
9933type SSHPublicKeyResource struct {
9934	autorest.Response `json:"-"`
9935	// SSHPublicKeyResourceProperties - Properties of the SSH public key.
9936	*SSHPublicKeyResourceProperties `json:"properties,omitempty"`
9937	// ID - READ-ONLY; Resource Id
9938	ID *string `json:"id,omitempty"`
9939	// Name - READ-ONLY; Resource name
9940	Name *string `json:"name,omitempty"`
9941	// Type - READ-ONLY; Resource type
9942	Type *string `json:"type,omitempty"`
9943	// Location - Resource location
9944	Location *string `json:"location,omitempty"`
9945	// Tags - Resource tags
9946	Tags map[string]*string `json:"tags"`
9947}
9948
9949// MarshalJSON is the custom marshaler for SSHPublicKeyResource.
9950func (spkr SSHPublicKeyResource) MarshalJSON() ([]byte, error) {
9951	objectMap := make(map[string]interface{})
9952	if spkr.SSHPublicKeyResourceProperties != nil {
9953		objectMap["properties"] = spkr.SSHPublicKeyResourceProperties
9954	}
9955	if spkr.Location != nil {
9956		objectMap["location"] = spkr.Location
9957	}
9958	if spkr.Tags != nil {
9959		objectMap["tags"] = spkr.Tags
9960	}
9961	return json.Marshal(objectMap)
9962}
9963
9964// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyResource struct.
9965func (spkr *SSHPublicKeyResource) UnmarshalJSON(body []byte) error {
9966	var m map[string]*json.RawMessage
9967	err := json.Unmarshal(body, &m)
9968	if err != nil {
9969		return err
9970	}
9971	for k, v := range m {
9972		switch k {
9973		case "properties":
9974			if v != nil {
9975				var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
9976				err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
9977				if err != nil {
9978					return err
9979				}
9980				spkr.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
9981			}
9982		case "id":
9983			if v != nil {
9984				var ID string
9985				err = json.Unmarshal(*v, &ID)
9986				if err != nil {
9987					return err
9988				}
9989				spkr.ID = &ID
9990			}
9991		case "name":
9992			if v != nil {
9993				var name string
9994				err = json.Unmarshal(*v, &name)
9995				if err != nil {
9996					return err
9997				}
9998				spkr.Name = &name
9999			}
10000		case "type":
10001			if v != nil {
10002				var typeVar string
10003				err = json.Unmarshal(*v, &typeVar)
10004				if err != nil {
10005					return err
10006				}
10007				spkr.Type = &typeVar
10008			}
10009		case "location":
10010			if v != nil {
10011				var location string
10012				err = json.Unmarshal(*v, &location)
10013				if err != nil {
10014					return err
10015				}
10016				spkr.Location = &location
10017			}
10018		case "tags":
10019			if v != nil {
10020				var tags map[string]*string
10021				err = json.Unmarshal(*v, &tags)
10022				if err != nil {
10023					return err
10024				}
10025				spkr.Tags = tags
10026			}
10027		}
10028	}
10029
10030	return nil
10031}
10032
10033// SSHPublicKeyResourceProperties properties of the SSH public key.
10034type SSHPublicKeyResourceProperties struct {
10035	// PublicKey - SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
10036	PublicKey *string `json:"publicKey,omitempty"`
10037}
10038
10039// SSHPublicKeysGroupListResult the list SSH public keys operation response.
10040type SSHPublicKeysGroupListResult struct {
10041	autorest.Response `json:"-"`
10042	// Value - The list of SSH public keys
10043	Value *[]SSHPublicKeyResource `json:"value,omitempty"`
10044	// NextLink - The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys.
10045	NextLink *string `json:"nextLink,omitempty"`
10046}
10047
10048// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource
10049// values.
10050type SSHPublicKeysGroupListResultIterator struct {
10051	i    int
10052	page SSHPublicKeysGroupListResultPage
10053}
10054
10055// NextWithContext advances to the next value.  If there was an error making
10056// the request the iterator does not advance and the error is returned.
10057func (iter *SSHPublicKeysGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
10058	if tracing.IsEnabled() {
10059		ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultIterator.NextWithContext")
10060		defer func() {
10061			sc := -1
10062			if iter.Response().Response.Response != nil {
10063				sc = iter.Response().Response.Response.StatusCode
10064			}
10065			tracing.EndSpan(ctx, sc, err)
10066		}()
10067	}
10068	iter.i++
10069	if iter.i < len(iter.page.Values()) {
10070		return nil
10071	}
10072	err = iter.page.NextWithContext(ctx)
10073	if err != nil {
10074		iter.i--
10075		return err
10076	}
10077	iter.i = 0
10078	return nil
10079}
10080
10081// Next advances to the next value.  If there was an error making
10082// the request the iterator does not advance and the error is returned.
10083// Deprecated: Use NextWithContext() instead.
10084func (iter *SSHPublicKeysGroupListResultIterator) Next() error {
10085	return iter.NextWithContext(context.Background())
10086}
10087
10088// NotDone returns true if the enumeration should be started or is not yet complete.
10089func (iter SSHPublicKeysGroupListResultIterator) NotDone() bool {
10090	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10091}
10092
10093// Response returns the raw server response from the last page request.
10094func (iter SSHPublicKeysGroupListResultIterator) Response() SSHPublicKeysGroupListResult {
10095	return iter.page.Response()
10096}
10097
10098// Value returns the current value or a zero-initialized value if the
10099// iterator has advanced beyond the end of the collection.
10100func (iter SSHPublicKeysGroupListResultIterator) Value() SSHPublicKeyResource {
10101	if !iter.page.NotDone() {
10102		return SSHPublicKeyResource{}
10103	}
10104	return iter.page.Values()[iter.i]
10105}
10106
10107// Creates a new instance of the SSHPublicKeysGroupListResultIterator type.
10108func NewSSHPublicKeysGroupListResultIterator(page SSHPublicKeysGroupListResultPage) SSHPublicKeysGroupListResultIterator {
10109	return SSHPublicKeysGroupListResultIterator{page: page}
10110}
10111
10112// IsEmpty returns true if the ListResult contains no values.
10113func (spkglr SSHPublicKeysGroupListResult) IsEmpty() bool {
10114	return spkglr.Value == nil || len(*spkglr.Value) == 0
10115}
10116
10117// hasNextLink returns true if the NextLink is not empty.
10118func (spkglr SSHPublicKeysGroupListResult) hasNextLink() bool {
10119	return spkglr.NextLink != nil && len(*spkglr.NextLink) != 0
10120}
10121
10122// sSHPublicKeysGroupListResultPreparer prepares a request to retrieve the next set of results.
10123// It returns nil if no more results exist.
10124func (spkglr SSHPublicKeysGroupListResult) sSHPublicKeysGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
10125	if !spkglr.hasNextLink() {
10126		return nil, nil
10127	}
10128	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10129		autorest.AsJSON(),
10130		autorest.AsGet(),
10131		autorest.WithBaseURL(to.String(spkglr.NextLink)))
10132}
10133
10134// SSHPublicKeysGroupListResultPage contains a page of SSHPublicKeyResource values.
10135type SSHPublicKeysGroupListResultPage struct {
10136	fn     func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)
10137	spkglr SSHPublicKeysGroupListResult
10138}
10139
10140// NextWithContext advances to the next page of values.  If there was an error making
10141// the request the page does not advance and the error is returned.
10142func (page *SSHPublicKeysGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
10143	if tracing.IsEnabled() {
10144		ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultPage.NextWithContext")
10145		defer func() {
10146			sc := -1
10147			if page.Response().Response.Response != nil {
10148				sc = page.Response().Response.Response.StatusCode
10149			}
10150			tracing.EndSpan(ctx, sc, err)
10151		}()
10152	}
10153	for {
10154		next, err := page.fn(ctx, page.spkglr)
10155		if err != nil {
10156			return err
10157		}
10158		page.spkglr = next
10159		if !next.hasNextLink() || !next.IsEmpty() {
10160			break
10161		}
10162	}
10163	return nil
10164}
10165
10166// Next advances to the next page of values.  If there was an error making
10167// the request the page does not advance and the error is returned.
10168// Deprecated: Use NextWithContext() instead.
10169func (page *SSHPublicKeysGroupListResultPage) Next() error {
10170	return page.NextWithContext(context.Background())
10171}
10172
10173// NotDone returns true if the page enumeration should be started or is not yet complete.
10174func (page SSHPublicKeysGroupListResultPage) NotDone() bool {
10175	return !page.spkglr.IsEmpty()
10176}
10177
10178// Response returns the raw server response from the last page request.
10179func (page SSHPublicKeysGroupListResultPage) Response() SSHPublicKeysGroupListResult {
10180	return page.spkglr
10181}
10182
10183// Values returns the slice of values for the current page or nil if there are no values.
10184func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource {
10185	if page.spkglr.IsEmpty() {
10186		return nil
10187	}
10188	return *page.spkglr.Value
10189}
10190
10191// Creates a new instance of the SSHPublicKeysGroupListResultPage type.
10192func NewSSHPublicKeysGroupListResultPage(cur SSHPublicKeysGroupListResult, getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage {
10193	return SSHPublicKeysGroupListResultPage{
10194		fn:     getNextPage,
10195		spkglr: cur,
10196	}
10197}
10198
10199// SSHPublicKeyUpdateResource specifies information about the SSH public key.
10200type SSHPublicKeyUpdateResource struct {
10201	// SSHPublicKeyResourceProperties - Properties of the SSH public key.
10202	*SSHPublicKeyResourceProperties `json:"properties,omitempty"`
10203	// Tags - Resource tags
10204	Tags map[string]*string `json:"tags"`
10205}
10206
10207// MarshalJSON is the custom marshaler for SSHPublicKeyUpdateResource.
10208func (spkur SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) {
10209	objectMap := make(map[string]interface{})
10210	if spkur.SSHPublicKeyResourceProperties != nil {
10211		objectMap["properties"] = spkur.SSHPublicKeyResourceProperties
10212	}
10213	if spkur.Tags != nil {
10214		objectMap["tags"] = spkur.Tags
10215	}
10216	return json.Marshal(objectMap)
10217}
10218
10219// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyUpdateResource struct.
10220func (spkur *SSHPublicKeyUpdateResource) UnmarshalJSON(body []byte) error {
10221	var m map[string]*json.RawMessage
10222	err := json.Unmarshal(body, &m)
10223	if err != nil {
10224		return err
10225	}
10226	for k, v := range m {
10227		switch k {
10228		case "properties":
10229			if v != nil {
10230				var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
10231				err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
10232				if err != nil {
10233					return err
10234				}
10235				spkur.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
10236			}
10237		case "tags":
10238			if v != nil {
10239				var tags map[string]*string
10240				err = json.Unmarshal(*v, &tags)
10241				if err != nil {
10242					return err
10243				}
10244				spkur.Tags = tags
10245			}
10246		}
10247	}
10248
10249	return nil
10250}
10251
10252// StorageProfile specifies the storage settings for the virtual machine disks.
10253type StorageProfile struct {
10254	// 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.
10255	ImageReference *ImageReference `json:"imageReference,omitempty"`
10256	// 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).
10257	OsDisk *OSDisk `json:"osDisk,omitempty"`
10258	// 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).
10259	DataDisks *[]DataDisk `json:"dataDisks,omitempty"`
10260}
10261
10262// SubResource ...
10263type SubResource struct {
10264	// ID - Resource Id
10265	ID *string `json:"id,omitempty"`
10266}
10267
10268// SubResourceReadOnly ...
10269type SubResourceReadOnly struct {
10270	// ID - READ-ONLY; Resource Id
10271	ID *string `json:"id,omitempty"`
10272}
10273
10274// MarshalJSON is the custom marshaler for SubResourceReadOnly.
10275func (srro SubResourceReadOnly) MarshalJSON() ([]byte, error) {
10276	objectMap := make(map[string]interface{})
10277	return json.Marshal(objectMap)
10278}
10279
10280// SubResourceWithColocationStatus ...
10281type SubResourceWithColocationStatus struct {
10282	// ColocationStatus - Describes colocation status of a resource in the Proximity Placement Group.
10283	ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
10284	// ID - Resource Id
10285	ID *string `json:"id,omitempty"`
10286}
10287
10288// TargetRegion describes the target region information.
10289type TargetRegion struct {
10290	// Name - The name of the region.
10291	Name *string `json:"name,omitempty"`
10292	// RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable.
10293	RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"`
10294	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
10295	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
10296	Encryption         *EncryptionImages  `json:"encryption,omitempty"`
10297}
10298
10299// TerminateNotificationProfile ...
10300type TerminateNotificationProfile struct {
10301	// NotBeforeTimeout - Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M)
10302	NotBeforeTimeout *string `json:"notBeforeTimeout,omitempty"`
10303	// Enable - Specifies whether the Terminate Scheduled event is enabled or disabled.
10304	Enable *bool `json:"enable,omitempty"`
10305}
10306
10307// ThrottledRequestsInput api request input for LogAnalytics getThrottledRequests Api.
10308type ThrottledRequestsInput struct {
10309	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
10310	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
10311	// FromTime - From time of the query
10312	FromTime *date.Time `json:"fromTime,omitempty"`
10313	// ToTime - To time of the query
10314	ToTime *date.Time `json:"toTime,omitempty"`
10315	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
10316	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
10317	// GroupByOperationName - Group query result by Operation Name.
10318	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
10319	// GroupByResourceName - Group query result by Resource Name.
10320	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
10321}
10322
10323// UpdateResource the Update Resource model definition.
10324type UpdateResource struct {
10325	// Tags - Resource tags
10326	Tags map[string]*string `json:"tags"`
10327}
10328
10329// MarshalJSON is the custom marshaler for UpdateResource.
10330func (ur UpdateResource) MarshalJSON() ([]byte, error) {
10331	objectMap := make(map[string]interface{})
10332	if ur.Tags != nil {
10333		objectMap["tags"] = ur.Tags
10334	}
10335	return json.Marshal(objectMap)
10336}
10337
10338// UpdateResourceDefinition the Update Resource model definition.
10339type UpdateResourceDefinition struct {
10340	// ID - READ-ONLY; Resource Id
10341	ID *string `json:"id,omitempty"`
10342	// Name - READ-ONLY; Resource name
10343	Name *string `json:"name,omitempty"`
10344	// Type - READ-ONLY; Resource type
10345	Type *string `json:"type,omitempty"`
10346	// Tags - Resource tags
10347	Tags map[string]*string `json:"tags"`
10348}
10349
10350// MarshalJSON is the custom marshaler for UpdateResourceDefinition.
10351func (urd UpdateResourceDefinition) MarshalJSON() ([]byte, error) {
10352	objectMap := make(map[string]interface{})
10353	if urd.Tags != nil {
10354		objectMap["tags"] = urd.Tags
10355	}
10356	return json.Marshal(objectMap)
10357}
10358
10359// UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response.
10360type UpgradeOperationHistoricalStatusInfo struct {
10361	// Properties - READ-ONLY; Information about the properties of the upgrade operation.
10362	Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty"`
10363	// Type - READ-ONLY; Resource type
10364	Type *string `json:"type,omitempty"`
10365	// Location - READ-ONLY; Resource location
10366	Location *string `json:"location,omitempty"`
10367}
10368
10369// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfo.
10370func (uohsi UpgradeOperationHistoricalStatusInfo) MarshalJSON() ([]byte, error) {
10371	objectMap := make(map[string]interface{})
10372	return json.Marshal(objectMap)
10373}
10374
10375// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale
10376// Set.
10377type UpgradeOperationHistoricalStatusInfoProperties struct {
10378	// RunningStatus - READ-ONLY; Information about the overall status of the upgrade operation.
10379	RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"`
10380	// Progress - READ-ONLY; Counts of the VMs in each state.
10381	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
10382	// Error - READ-ONLY; Error Details for this upgrade if there are any.
10383	Error *APIError `json:"error,omitempty"`
10384	// StartedBy - READ-ONLY; Invoker of the Upgrade Operation. Possible values include: 'UpgradeOperationInvokerUnknown', 'UpgradeOperationInvokerUser', 'UpgradeOperationInvokerPlatform'
10385	StartedBy UpgradeOperationInvoker `json:"startedBy,omitempty"`
10386	// TargetImageReference - READ-ONLY; Image Reference details
10387	TargetImageReference *ImageReference `json:"targetImageReference,omitempty"`
10388	// RollbackInfo - READ-ONLY; Information about OS rollback if performed
10389	RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"`
10390}
10391
10392// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfoProperties.
10393func (uohsip UpgradeOperationHistoricalStatusInfoProperties) MarshalJSON() ([]byte, error) {
10394	objectMap := make(map[string]interface{})
10395	return json.Marshal(objectMap)
10396}
10397
10398// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade.
10399type UpgradeOperationHistoryStatus struct {
10400	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted'
10401	Code UpgradeState `json:"code,omitempty"`
10402	// StartTime - READ-ONLY; Start time of the upgrade.
10403	StartTime *date.Time `json:"startTime,omitempty"`
10404	// EndTime - READ-ONLY; End time of the upgrade.
10405	EndTime *date.Time `json:"endTime,omitempty"`
10406}
10407
10408// MarshalJSON is the custom marshaler for UpgradeOperationHistoryStatus.
10409func (uohs UpgradeOperationHistoryStatus) MarshalJSON() ([]byte, error) {
10410	objectMap := make(map[string]interface{})
10411	return json.Marshal(objectMap)
10412}
10413
10414// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling.
10415type UpgradePolicy struct {
10416	// 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: 'UpgradeModeAutomatic', 'UpgradeModeManual', 'UpgradeModeRolling'
10417	Mode UpgradeMode `json:"mode,omitempty"`
10418	// RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.
10419	RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"`
10420	// AutomaticOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade.
10421	AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"`
10422}
10423
10424// Usage describes Compute Resource Usage.
10425type Usage struct {
10426	// Unit - An enum describing the unit of usage measurement.
10427	Unit *string `json:"unit,omitempty"`
10428	// CurrentValue - The current usage of the resource.
10429	CurrentValue *int32 `json:"currentValue,omitempty"`
10430	// Limit - The maximum permitted usage of the resource.
10431	Limit *int64 `json:"limit,omitempty"`
10432	// Name - The name of the type of usage.
10433	Name *UsageName `json:"name,omitempty"`
10434}
10435
10436// UsageName the Usage Names.
10437type UsageName struct {
10438	// Value - The name of the resource.
10439	Value *string `json:"value,omitempty"`
10440	// LocalizedValue - The localized name of the resource.
10441	LocalizedValue *string `json:"localizedValue,omitempty"`
10442}
10443
10444// UserArtifactSource the source image from which the Image Version is going to be created.
10445type UserArtifactSource struct {
10446	// FileName - Required. The fileName of the artifact.
10447	FileName *string `json:"fileName,omitempty"`
10448	// MediaLink - Required. The mediaLink of the artifact, must be a readable storage blob.
10449	MediaLink *string `json:"mediaLink,omitempty"`
10450}
10451
10452// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate
10453// should reside on the VM.
10454type VaultCertificate struct {
10455	// 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>}
10456	CertificateURL *string `json:"certificateUrl,omitempty"`
10457	// 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.
10458	CertificateStore *string `json:"certificateStore,omitempty"`
10459}
10460
10461// VaultSecretGroup describes a set of certificates which are all in the same Key Vault.
10462type VaultSecretGroup struct {
10463	// SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
10464	SourceVault *SubResource `json:"sourceVault,omitempty"`
10465	// VaultCertificates - The list of key vault references in SourceVault which contain certificates.
10466	VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"`
10467}
10468
10469// VirtualHardDisk describes the uri of a disk.
10470type VirtualHardDisk struct {
10471	// URI - Specifies the virtual hard disk's uri.
10472	URI *string `json:"uri,omitempty"`
10473}
10474
10475// VirtualMachine describes a Virtual Machine.
10476type VirtualMachine struct {
10477	autorest.Response `json:"-"`
10478	// 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**.
10479	Plan                      *Plan `json:"plan,omitempty"`
10480	*VirtualMachineProperties `json:"properties,omitempty"`
10481	// Resources - READ-ONLY; The virtual machine child extension resources.
10482	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
10483	// Identity - The identity of the virtual machine, if configured.
10484	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
10485	// Zones - The virtual machine zones.
10486	Zones *[]string `json:"zones,omitempty"`
10487	// ID - READ-ONLY; Resource Id
10488	ID *string `json:"id,omitempty"`
10489	// Name - READ-ONLY; Resource name
10490	Name *string `json:"name,omitempty"`
10491	// Type - READ-ONLY; Resource type
10492	Type *string `json:"type,omitempty"`
10493	// Location - Resource location
10494	Location *string `json:"location,omitempty"`
10495	// Tags - Resource tags
10496	Tags map[string]*string `json:"tags"`
10497}
10498
10499// MarshalJSON is the custom marshaler for VirtualMachine.
10500func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
10501	objectMap := make(map[string]interface{})
10502	if VM.Plan != nil {
10503		objectMap["plan"] = VM.Plan
10504	}
10505	if VM.VirtualMachineProperties != nil {
10506		objectMap["properties"] = VM.VirtualMachineProperties
10507	}
10508	if VM.Identity != nil {
10509		objectMap["identity"] = VM.Identity
10510	}
10511	if VM.Zones != nil {
10512		objectMap["zones"] = VM.Zones
10513	}
10514	if VM.Location != nil {
10515		objectMap["location"] = VM.Location
10516	}
10517	if VM.Tags != nil {
10518		objectMap["tags"] = VM.Tags
10519	}
10520	return json.Marshal(objectMap)
10521}
10522
10523// UnmarshalJSON is the custom unmarshaler for VirtualMachine struct.
10524func (VM *VirtualMachine) UnmarshalJSON(body []byte) error {
10525	var m map[string]*json.RawMessage
10526	err := json.Unmarshal(body, &m)
10527	if err != nil {
10528		return err
10529	}
10530	for k, v := range m {
10531		switch k {
10532		case "plan":
10533			if v != nil {
10534				var plan Plan
10535				err = json.Unmarshal(*v, &plan)
10536				if err != nil {
10537					return err
10538				}
10539				VM.Plan = &plan
10540			}
10541		case "properties":
10542			if v != nil {
10543				var virtualMachineProperties VirtualMachineProperties
10544				err = json.Unmarshal(*v, &virtualMachineProperties)
10545				if err != nil {
10546					return err
10547				}
10548				VM.VirtualMachineProperties = &virtualMachineProperties
10549			}
10550		case "resources":
10551			if v != nil {
10552				var resources []VirtualMachineExtension
10553				err = json.Unmarshal(*v, &resources)
10554				if err != nil {
10555					return err
10556				}
10557				VM.Resources = &resources
10558			}
10559		case "identity":
10560			if v != nil {
10561				var identity VirtualMachineIdentity
10562				err = json.Unmarshal(*v, &identity)
10563				if err != nil {
10564					return err
10565				}
10566				VM.Identity = &identity
10567			}
10568		case "zones":
10569			if v != nil {
10570				var zones []string
10571				err = json.Unmarshal(*v, &zones)
10572				if err != nil {
10573					return err
10574				}
10575				VM.Zones = &zones
10576			}
10577		case "id":
10578			if v != nil {
10579				var ID string
10580				err = json.Unmarshal(*v, &ID)
10581				if err != nil {
10582					return err
10583				}
10584				VM.ID = &ID
10585			}
10586		case "name":
10587			if v != nil {
10588				var name string
10589				err = json.Unmarshal(*v, &name)
10590				if err != nil {
10591					return err
10592				}
10593				VM.Name = &name
10594			}
10595		case "type":
10596			if v != nil {
10597				var typeVar string
10598				err = json.Unmarshal(*v, &typeVar)
10599				if err != nil {
10600					return err
10601				}
10602				VM.Type = &typeVar
10603			}
10604		case "location":
10605			if v != nil {
10606				var location string
10607				err = json.Unmarshal(*v, &location)
10608				if err != nil {
10609					return err
10610				}
10611				VM.Location = &location
10612			}
10613		case "tags":
10614			if v != nil {
10615				var tags map[string]*string
10616				err = json.Unmarshal(*v, &tags)
10617				if err != nil {
10618					return err
10619				}
10620				VM.Tags = tags
10621			}
10622		}
10623	}
10624
10625	return nil
10626}
10627
10628// VirtualMachineAgentInstanceView the instance view of the VM Agent running on the virtual machine.
10629type VirtualMachineAgentInstanceView struct {
10630	// VMAgentVersion - The VM Agent full version.
10631	VMAgentVersion *string `json:"vmAgentVersion,omitempty"`
10632	// ExtensionHandlers - The virtual machine extension handler instance view.
10633	ExtensionHandlers *[]VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"`
10634	// Statuses - The resource status information.
10635	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
10636}
10637
10638// VirtualMachineAssessPatchesResult describes the properties of an AssessPatches result.
10639type VirtualMachineAssessPatchesResult struct {
10640	autorest.Response `json:"-"`
10641	// Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
10642	Status PatchOperationStatus `json:"status,omitempty"`
10643	// AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
10644	AssessmentActivityID *string `json:"assessmentActivityId,omitempty"`
10645	// RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.
10646	RebootPending *bool `json:"rebootPending,omitempty"`
10647	// CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
10648	CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"`
10649	// OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security.
10650	OtherPatchCount *int32 `json:"otherPatchCount,omitempty"`
10651	// StartDateTime - READ-ONLY; The UTC timestamp when the operation began.
10652	StartDateTime *date.Time `json:"startDateTime,omitempty"`
10653	// Patches - READ-ONLY; The list of patches that have been detected as available for installation.
10654	Patches *[]VirtualMachineSoftwarePatchProperties `json:"patches,omitempty"`
10655	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
10656	Error *APIError `json:"error,omitempty"`
10657}
10658
10659// MarshalJSON is the custom marshaler for VirtualMachineAssessPatchesResult.
10660func (vmapr VirtualMachineAssessPatchesResult) MarshalJSON() ([]byte, error) {
10661	objectMap := make(map[string]interface{})
10662	return json.Marshal(objectMap)
10663}
10664
10665// VirtualMachineCaptureParameters capture Virtual Machine parameters.
10666type VirtualMachineCaptureParameters struct {
10667	// VhdPrefix - The captured virtual hard disk's name prefix.
10668	VhdPrefix *string `json:"vhdPrefix,omitempty"`
10669	// DestinationContainerName - The destination container name.
10670	DestinationContainerName *string `json:"destinationContainerName,omitempty"`
10671	// OverwriteVhds - Specifies whether to overwrite the destination virtual hard disk, in case of conflict.
10672	OverwriteVhds *bool `json:"overwriteVhds,omitempty"`
10673}
10674
10675// VirtualMachineCaptureResult output of virtual machine capture operation.
10676type VirtualMachineCaptureResult struct {
10677	autorest.Response `json:"-"`
10678	// Schema - READ-ONLY; the schema of the captured virtual machine
10679	Schema *string `json:"$schema,omitempty"`
10680	// ContentVersion - READ-ONLY; the version of the content
10681	ContentVersion *string `json:"contentVersion,omitempty"`
10682	// Parameters - READ-ONLY; parameters of the captured virtual machine
10683	Parameters interface{} `json:"parameters,omitempty"`
10684	// Resources - READ-ONLY; a list of resource items of the captured virtual machine
10685	Resources *[]interface{} `json:"resources,omitempty"`
10686	// ID - Resource Id
10687	ID *string `json:"id,omitempty"`
10688}
10689
10690// MarshalJSON is the custom marshaler for VirtualMachineCaptureResult.
10691func (vmcr VirtualMachineCaptureResult) MarshalJSON() ([]byte, error) {
10692	objectMap := make(map[string]interface{})
10693	if vmcr.ID != nil {
10694		objectMap["id"] = vmcr.ID
10695	}
10696	return json.Marshal(objectMap)
10697}
10698
10699// VirtualMachineExtension describes a Virtual Machine Extension.
10700type VirtualMachineExtension struct {
10701	autorest.Response                  `json:"-"`
10702	*VirtualMachineExtensionProperties `json:"properties,omitempty"`
10703	// ID - READ-ONLY; Resource Id
10704	ID *string `json:"id,omitempty"`
10705	// Name - READ-ONLY; Resource name
10706	Name *string `json:"name,omitempty"`
10707	// Type - READ-ONLY; Resource type
10708	Type *string `json:"type,omitempty"`
10709	// Location - Resource location
10710	Location *string `json:"location,omitempty"`
10711	// Tags - Resource tags
10712	Tags map[string]*string `json:"tags"`
10713}
10714
10715// MarshalJSON is the custom marshaler for VirtualMachineExtension.
10716func (vme VirtualMachineExtension) MarshalJSON() ([]byte, error) {
10717	objectMap := make(map[string]interface{})
10718	if vme.VirtualMachineExtensionProperties != nil {
10719		objectMap["properties"] = vme.VirtualMachineExtensionProperties
10720	}
10721	if vme.Location != nil {
10722		objectMap["location"] = vme.Location
10723	}
10724	if vme.Tags != nil {
10725		objectMap["tags"] = vme.Tags
10726	}
10727	return json.Marshal(objectMap)
10728}
10729
10730// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtension struct.
10731func (vme *VirtualMachineExtension) UnmarshalJSON(body []byte) error {
10732	var m map[string]*json.RawMessage
10733	err := json.Unmarshal(body, &m)
10734	if err != nil {
10735		return err
10736	}
10737	for k, v := range m {
10738		switch k {
10739		case "properties":
10740			if v != nil {
10741				var virtualMachineExtensionProperties VirtualMachineExtensionProperties
10742				err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
10743				if err != nil {
10744					return err
10745				}
10746				vme.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
10747			}
10748		case "id":
10749			if v != nil {
10750				var ID string
10751				err = json.Unmarshal(*v, &ID)
10752				if err != nil {
10753					return err
10754				}
10755				vme.ID = &ID
10756			}
10757		case "name":
10758			if v != nil {
10759				var name string
10760				err = json.Unmarshal(*v, &name)
10761				if err != nil {
10762					return err
10763				}
10764				vme.Name = &name
10765			}
10766		case "type":
10767			if v != nil {
10768				var typeVar string
10769				err = json.Unmarshal(*v, &typeVar)
10770				if err != nil {
10771					return err
10772				}
10773				vme.Type = &typeVar
10774			}
10775		case "location":
10776			if v != nil {
10777				var location string
10778				err = json.Unmarshal(*v, &location)
10779				if err != nil {
10780					return err
10781				}
10782				vme.Location = &location
10783			}
10784		case "tags":
10785			if v != nil {
10786				var tags map[string]*string
10787				err = json.Unmarshal(*v, &tags)
10788				if err != nil {
10789					return err
10790				}
10791				vme.Tags = tags
10792			}
10793		}
10794	}
10795
10796	return nil
10797}
10798
10799// VirtualMachineExtensionHandlerInstanceView the instance view of a virtual machine extension handler.
10800type VirtualMachineExtensionHandlerInstanceView struct {
10801	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
10802	Type *string `json:"type,omitempty"`
10803	// TypeHandlerVersion - Specifies the version of the script handler.
10804	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
10805	// Status - The extension handler status.
10806	Status *InstanceViewStatus `json:"status,omitempty"`
10807}
10808
10809// VirtualMachineExtensionImage describes a Virtual Machine Extension Image.
10810type VirtualMachineExtensionImage struct {
10811	autorest.Response                       `json:"-"`
10812	*VirtualMachineExtensionImageProperties `json:"properties,omitempty"`
10813	// ID - READ-ONLY; Resource Id
10814	ID *string `json:"id,omitempty"`
10815	// Name - READ-ONLY; Resource name
10816	Name *string `json:"name,omitempty"`
10817	// Type - READ-ONLY; Resource type
10818	Type *string `json:"type,omitempty"`
10819	// Location - Resource location
10820	Location *string `json:"location,omitempty"`
10821	// Tags - Resource tags
10822	Tags map[string]*string `json:"tags"`
10823}
10824
10825// MarshalJSON is the custom marshaler for VirtualMachineExtensionImage.
10826func (vmei VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) {
10827	objectMap := make(map[string]interface{})
10828	if vmei.VirtualMachineExtensionImageProperties != nil {
10829		objectMap["properties"] = vmei.VirtualMachineExtensionImageProperties
10830	}
10831	if vmei.Location != nil {
10832		objectMap["location"] = vmei.Location
10833	}
10834	if vmei.Tags != nil {
10835		objectMap["tags"] = vmei.Tags
10836	}
10837	return json.Marshal(objectMap)
10838}
10839
10840// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionImage struct.
10841func (vmei *VirtualMachineExtensionImage) UnmarshalJSON(body []byte) error {
10842	var m map[string]*json.RawMessage
10843	err := json.Unmarshal(body, &m)
10844	if err != nil {
10845		return err
10846	}
10847	for k, v := range m {
10848		switch k {
10849		case "properties":
10850			if v != nil {
10851				var virtualMachineExtensionImageProperties VirtualMachineExtensionImageProperties
10852				err = json.Unmarshal(*v, &virtualMachineExtensionImageProperties)
10853				if err != nil {
10854					return err
10855				}
10856				vmei.VirtualMachineExtensionImageProperties = &virtualMachineExtensionImageProperties
10857			}
10858		case "id":
10859			if v != nil {
10860				var ID string
10861				err = json.Unmarshal(*v, &ID)
10862				if err != nil {
10863					return err
10864				}
10865				vmei.ID = &ID
10866			}
10867		case "name":
10868			if v != nil {
10869				var name string
10870				err = json.Unmarshal(*v, &name)
10871				if err != nil {
10872					return err
10873				}
10874				vmei.Name = &name
10875			}
10876		case "type":
10877			if v != nil {
10878				var typeVar string
10879				err = json.Unmarshal(*v, &typeVar)
10880				if err != nil {
10881					return err
10882				}
10883				vmei.Type = &typeVar
10884			}
10885		case "location":
10886			if v != nil {
10887				var location string
10888				err = json.Unmarshal(*v, &location)
10889				if err != nil {
10890					return err
10891				}
10892				vmei.Location = &location
10893			}
10894		case "tags":
10895			if v != nil {
10896				var tags map[string]*string
10897				err = json.Unmarshal(*v, &tags)
10898				if err != nil {
10899					return err
10900				}
10901				vmei.Tags = tags
10902			}
10903		}
10904	}
10905
10906	return nil
10907}
10908
10909// VirtualMachineExtensionImageProperties describes the properties of a Virtual Machine Extension Image.
10910type VirtualMachineExtensionImageProperties struct {
10911	// OperatingSystem - The operating system this extension supports.
10912	OperatingSystem *string `json:"operatingSystem,omitempty"`
10913	// ComputeRole - The type of role (IaaS or PaaS) this extension supports.
10914	ComputeRole *string `json:"computeRole,omitempty"`
10915	// HandlerSchema - The schema defined by publisher, where extension consumers should provide settings in a matching schema.
10916	HandlerSchema *string `json:"handlerSchema,omitempty"`
10917	// 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.
10918	VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"`
10919	// SupportsMultipleExtensions - Whether the handler can support multiple extensions.
10920	SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"`
10921}
10922
10923// VirtualMachineExtensionInstanceView the instance view of a virtual machine extension.
10924type VirtualMachineExtensionInstanceView struct {
10925	// Name - The virtual machine extension name.
10926	Name *string `json:"name,omitempty"`
10927	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
10928	Type *string `json:"type,omitempty"`
10929	// TypeHandlerVersion - Specifies the version of the script handler.
10930	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
10931	// Substatuses - The resource status information.
10932	Substatuses *[]InstanceViewStatus `json:"substatuses,omitempty"`
10933	// Statuses - The resource status information.
10934	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
10935}
10936
10937// VirtualMachineExtensionProperties describes the properties of a Virtual Machine Extension.
10938type VirtualMachineExtensionProperties struct {
10939	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
10940	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
10941	// Publisher - The name of the extension handler publisher.
10942	Publisher *string `json:"publisher,omitempty"`
10943	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
10944	Type *string `json:"type,omitempty"`
10945	// TypeHandlerVersion - Specifies the version of the script handler.
10946	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
10947	// 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.
10948	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
10949	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
10950	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
10951	// Settings - Json formatted public settings for the extension.
10952	Settings interface{} `json:"settings,omitempty"`
10953	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
10954	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
10955	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
10956	ProvisioningState *string `json:"provisioningState,omitempty"`
10957	// InstanceView - The virtual machine extension instance view.
10958	InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`
10959}
10960
10961// MarshalJSON is the custom marshaler for VirtualMachineExtensionProperties.
10962func (vmep VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) {
10963	objectMap := make(map[string]interface{})
10964	if vmep.ForceUpdateTag != nil {
10965		objectMap["forceUpdateTag"] = vmep.ForceUpdateTag
10966	}
10967	if vmep.Publisher != nil {
10968		objectMap["publisher"] = vmep.Publisher
10969	}
10970	if vmep.Type != nil {
10971		objectMap["type"] = vmep.Type
10972	}
10973	if vmep.TypeHandlerVersion != nil {
10974		objectMap["typeHandlerVersion"] = vmep.TypeHandlerVersion
10975	}
10976	if vmep.AutoUpgradeMinorVersion != nil {
10977		objectMap["autoUpgradeMinorVersion"] = vmep.AutoUpgradeMinorVersion
10978	}
10979	if vmep.EnableAutomaticUpgrade != nil {
10980		objectMap["enableAutomaticUpgrade"] = vmep.EnableAutomaticUpgrade
10981	}
10982	if vmep.Settings != nil {
10983		objectMap["settings"] = vmep.Settings
10984	}
10985	if vmep.ProtectedSettings != nil {
10986		objectMap["protectedSettings"] = vmep.ProtectedSettings
10987	}
10988	if vmep.InstanceView != nil {
10989		objectMap["instanceView"] = vmep.InstanceView
10990	}
10991	return json.Marshal(objectMap)
10992}
10993
10994// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
10995// a long-running operation.
10996type VirtualMachineExtensionsCreateOrUpdateFuture struct {
10997	azure.FutureAPI
10998	// Result returns the result of the asynchronous operation.
10999	// If the operation has not completed it will return an error.
11000	Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
11001}
11002
11003// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11004func (future *VirtualMachineExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11005	var azFuture azure.Future
11006	if err := json.Unmarshal(body, &azFuture); err != nil {
11007		return err
11008	}
11009	future.FutureAPI = &azFuture
11010	future.Result = future.result
11011	return nil
11012}
11013
11014// result is the default implementation for VirtualMachineExtensionsCreateOrUpdateFuture.Result.
11015func (future *VirtualMachineExtensionsCreateOrUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
11016	var done bool
11017	done, err = future.DoneWithContext(context.Background(), client)
11018	if err != nil {
11019		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11020		return
11021	}
11022	if !done {
11023		vme.Response.Response = future.Response()
11024		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
11025		return
11026	}
11027	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11028	if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
11029		vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
11030		if err != nil {
11031			err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
11032		}
11033	}
11034	return
11035}
11036
11037// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
11038// long-running operation.
11039type VirtualMachineExtensionsDeleteFuture struct {
11040	azure.FutureAPI
11041	// Result returns the result of the asynchronous operation.
11042	// If the operation has not completed it will return an error.
11043	Result func(VirtualMachineExtensionsClient) (autorest.Response, error)
11044}
11045
11046// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11047func (future *VirtualMachineExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
11048	var azFuture azure.Future
11049	if err := json.Unmarshal(body, &azFuture); err != nil {
11050		return err
11051	}
11052	future.FutureAPI = &azFuture
11053	future.Result = future.result
11054	return nil
11055}
11056
11057// result is the default implementation for VirtualMachineExtensionsDeleteFuture.Result.
11058func (future *VirtualMachineExtensionsDeleteFuture) result(client VirtualMachineExtensionsClient) (ar autorest.Response, err error) {
11059	var done bool
11060	done, err = future.DoneWithContext(context.Background(), client)
11061	if err != nil {
11062		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
11063		return
11064	}
11065	if !done {
11066		ar.Response = future.Response()
11067		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
11068		return
11069	}
11070	ar.Response = future.Response()
11071	return
11072}
11073
11074// VirtualMachineExtensionsListResult the List Extension operation response
11075type VirtualMachineExtensionsListResult struct {
11076	autorest.Response `json:"-"`
11077	// Value - The list of extensions
11078	Value *[]VirtualMachineExtension `json:"value,omitempty"`
11079}
11080
11081// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
11082// long-running operation.
11083type VirtualMachineExtensionsUpdateFuture struct {
11084	azure.FutureAPI
11085	// Result returns the result of the asynchronous operation.
11086	// If the operation has not completed it will return an error.
11087	Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
11088}
11089
11090// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11091func (future *VirtualMachineExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
11092	var azFuture azure.Future
11093	if err := json.Unmarshal(body, &azFuture); err != nil {
11094		return err
11095	}
11096	future.FutureAPI = &azFuture
11097	future.Result = future.result
11098	return nil
11099}
11100
11101// result is the default implementation for VirtualMachineExtensionsUpdateFuture.Result.
11102func (future *VirtualMachineExtensionsUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
11103	var done bool
11104	done, err = future.DoneWithContext(context.Background(), client)
11105	if err != nil {
11106		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
11107		return
11108	}
11109	if !done {
11110		vme.Response.Response = future.Response()
11111		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
11112		return
11113	}
11114	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11115	if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
11116		vme, err = client.UpdateResponder(vme.Response.Response)
11117		if err != nil {
11118			err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
11119		}
11120	}
11121	return
11122}
11123
11124// VirtualMachineExtensionUpdate describes a Virtual Machine Extension.
11125type VirtualMachineExtensionUpdate struct {
11126	*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
11127	// Tags - Resource tags
11128	Tags map[string]*string `json:"tags"`
11129}
11130
11131// MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate.
11132func (vmeu VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) {
11133	objectMap := make(map[string]interface{})
11134	if vmeu.VirtualMachineExtensionUpdateProperties != nil {
11135		objectMap["properties"] = vmeu.VirtualMachineExtensionUpdateProperties
11136	}
11137	if vmeu.Tags != nil {
11138		objectMap["tags"] = vmeu.Tags
11139	}
11140	return json.Marshal(objectMap)
11141}
11142
11143// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionUpdate struct.
11144func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error {
11145	var m map[string]*json.RawMessage
11146	err := json.Unmarshal(body, &m)
11147	if err != nil {
11148		return err
11149	}
11150	for k, v := range m {
11151		switch k {
11152		case "properties":
11153			if v != nil {
11154				var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
11155				err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
11156				if err != nil {
11157					return err
11158				}
11159				vmeu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
11160			}
11161		case "tags":
11162			if v != nil {
11163				var tags map[string]*string
11164				err = json.Unmarshal(*v, &tags)
11165				if err != nil {
11166					return err
11167				}
11168				vmeu.Tags = tags
11169			}
11170		}
11171	}
11172
11173	return nil
11174}
11175
11176// VirtualMachineExtensionUpdateProperties describes the properties of a Virtual Machine Extension.
11177type VirtualMachineExtensionUpdateProperties struct {
11178	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
11179	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
11180	// Publisher - The name of the extension handler publisher.
11181	Publisher *string `json:"publisher,omitempty"`
11182	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
11183	Type *string `json:"type,omitempty"`
11184	// TypeHandlerVersion - Specifies the version of the script handler.
11185	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
11186	// 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.
11187	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
11188	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
11189	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
11190	// Settings - Json formatted public settings for the extension.
11191	Settings interface{} `json:"settings,omitempty"`
11192	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
11193	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
11194}
11195
11196// VirtualMachineHealthStatus the health status of the VM.
11197type VirtualMachineHealthStatus struct {
11198	// Status - READ-ONLY; The health status information for the VM.
11199	Status *InstanceViewStatus `json:"status,omitempty"`
11200}
11201
11202// MarshalJSON is the custom marshaler for VirtualMachineHealthStatus.
11203func (vmhs VirtualMachineHealthStatus) MarshalJSON() ([]byte, error) {
11204	objectMap := make(map[string]interface{})
11205	return json.Marshal(objectMap)
11206}
11207
11208// VirtualMachineIdentity identity for the virtual machine.
11209type VirtualMachineIdentity struct {
11210	// PrincipalID - READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity.
11211	PrincipalID *string `json:"principalId,omitempty"`
11212	// TenantID - READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity.
11213	TenantID *string `json:"tenantId,omitempty"`
11214	// 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'
11215	Type ResourceIdentityType `json:"type,omitempty"`
11216	// UserAssignedIdentities - The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
11217	UserAssignedIdentities map[string]*VirtualMachineIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
11218}
11219
11220// MarshalJSON is the custom marshaler for VirtualMachineIdentity.
11221func (vmi VirtualMachineIdentity) MarshalJSON() ([]byte, error) {
11222	objectMap := make(map[string]interface{})
11223	if vmi.Type != "" {
11224		objectMap["type"] = vmi.Type
11225	}
11226	if vmi.UserAssignedIdentities != nil {
11227		objectMap["userAssignedIdentities"] = vmi.UserAssignedIdentities
11228	}
11229	return json.Marshal(objectMap)
11230}
11231
11232// VirtualMachineIdentityUserAssignedIdentitiesValue ...
11233type VirtualMachineIdentityUserAssignedIdentitiesValue struct {
11234	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
11235	PrincipalID *string `json:"principalId,omitempty"`
11236	// ClientID - READ-ONLY; The client id of user assigned identity.
11237	ClientID *string `json:"clientId,omitempty"`
11238}
11239
11240// MarshalJSON is the custom marshaler for VirtualMachineIdentityUserAssignedIdentitiesValue.
11241func (vmiAiv VirtualMachineIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
11242	objectMap := make(map[string]interface{})
11243	return json.Marshal(objectMap)
11244}
11245
11246// VirtualMachineImage describes a Virtual Machine Image.
11247type VirtualMachineImage struct {
11248	autorest.Response              `json:"-"`
11249	*VirtualMachineImageProperties `json:"properties,omitempty"`
11250	// Name - The name of the resource.
11251	Name *string `json:"name,omitempty"`
11252	// Location - The supported Azure location of the resource.
11253	Location *string `json:"location,omitempty"`
11254	// 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).
11255	Tags map[string]*string `json:"tags"`
11256	// ID - Resource Id
11257	ID *string `json:"id,omitempty"`
11258}
11259
11260// MarshalJSON is the custom marshaler for VirtualMachineImage.
11261func (vmi VirtualMachineImage) MarshalJSON() ([]byte, error) {
11262	objectMap := make(map[string]interface{})
11263	if vmi.VirtualMachineImageProperties != nil {
11264		objectMap["properties"] = vmi.VirtualMachineImageProperties
11265	}
11266	if vmi.Name != nil {
11267		objectMap["name"] = vmi.Name
11268	}
11269	if vmi.Location != nil {
11270		objectMap["location"] = vmi.Location
11271	}
11272	if vmi.Tags != nil {
11273		objectMap["tags"] = vmi.Tags
11274	}
11275	if vmi.ID != nil {
11276		objectMap["id"] = vmi.ID
11277	}
11278	return json.Marshal(objectMap)
11279}
11280
11281// UnmarshalJSON is the custom unmarshaler for VirtualMachineImage struct.
11282func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error {
11283	var m map[string]*json.RawMessage
11284	err := json.Unmarshal(body, &m)
11285	if err != nil {
11286		return err
11287	}
11288	for k, v := range m {
11289		switch k {
11290		case "properties":
11291			if v != nil {
11292				var virtualMachineImageProperties VirtualMachineImageProperties
11293				err = json.Unmarshal(*v, &virtualMachineImageProperties)
11294				if err != nil {
11295					return err
11296				}
11297				vmi.VirtualMachineImageProperties = &virtualMachineImageProperties
11298			}
11299		case "name":
11300			if v != nil {
11301				var name string
11302				err = json.Unmarshal(*v, &name)
11303				if err != nil {
11304					return err
11305				}
11306				vmi.Name = &name
11307			}
11308		case "location":
11309			if v != nil {
11310				var location string
11311				err = json.Unmarshal(*v, &location)
11312				if err != nil {
11313					return err
11314				}
11315				vmi.Location = &location
11316			}
11317		case "tags":
11318			if v != nil {
11319				var tags map[string]*string
11320				err = json.Unmarshal(*v, &tags)
11321				if err != nil {
11322					return err
11323				}
11324				vmi.Tags = tags
11325			}
11326		case "id":
11327			if v != nil {
11328				var ID string
11329				err = json.Unmarshal(*v, &ID)
11330				if err != nil {
11331					return err
11332				}
11333				vmi.ID = &ID
11334			}
11335		}
11336	}
11337
11338	return nil
11339}
11340
11341// VirtualMachineImageProperties describes the properties of a Virtual Machine Image.
11342type VirtualMachineImageProperties struct {
11343	Plan                         *PurchasePlan                 `json:"plan,omitempty"`
11344	OsDiskImage                  *OSDiskImage                  `json:"osDiskImage,omitempty"`
11345	DataDiskImages               *[]DataDiskImage              `json:"dataDiskImages,omitempty"`
11346	AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"`
11347	// HyperVGeneration - Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
11348	HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
11349	// Disallowed - Specifies disallowed configuration for the VirtualMachine created from the image
11350	Disallowed *DisallowedConfiguration `json:"disallowed,omitempty"`
11351}
11352
11353// VirtualMachineImageResource virtual machine image resource information.
11354type VirtualMachineImageResource struct {
11355	// Name - The name of the resource.
11356	Name *string `json:"name,omitempty"`
11357	// Location - The supported Azure location of the resource.
11358	Location *string `json:"location,omitempty"`
11359	// 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).
11360	Tags map[string]*string `json:"tags"`
11361	// ID - Resource Id
11362	ID *string `json:"id,omitempty"`
11363}
11364
11365// MarshalJSON is the custom marshaler for VirtualMachineImageResource.
11366func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) {
11367	objectMap := make(map[string]interface{})
11368	if vmir.Name != nil {
11369		objectMap["name"] = vmir.Name
11370	}
11371	if vmir.Location != nil {
11372		objectMap["location"] = vmir.Location
11373	}
11374	if vmir.Tags != nil {
11375		objectMap["tags"] = vmir.Tags
11376	}
11377	if vmir.ID != nil {
11378		objectMap["id"] = vmir.ID
11379	}
11380	return json.Marshal(objectMap)
11381}
11382
11383// VirtualMachineInstanceView the instance view of a virtual machine.
11384type VirtualMachineInstanceView struct {
11385	autorest.Response `json:"-"`
11386	// PlatformUpdateDomain - Specifies the update domain of the virtual machine.
11387	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
11388	// PlatformFaultDomain - Specifies the fault domain of the virtual machine.
11389	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
11390	// ComputerName - The computer name assigned to the virtual machine.
11391	ComputerName *string `json:"computerName,omitempty"`
11392	// OsName - The Operating System running on the virtual machine.
11393	OsName *string `json:"osName,omitempty"`
11394	// OsVersion - The version of Operating System running on the virtual machine.
11395	OsVersion *string `json:"osVersion,omitempty"`
11396	// HyperVGeneration - Specifies the HyperVGeneration Type associated with a resource. Possible values include: 'HyperVGenerationTypeV1', 'HyperVGenerationTypeV2'
11397	HyperVGeneration HyperVGenerationType `json:"hyperVGeneration,omitempty"`
11398	// RdpThumbPrint - The Remote desktop certificate thumbprint.
11399	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
11400	// VMAgent - The VM Agent running on the virtual machine.
11401	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
11402	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
11403	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
11404	// Disks - The virtual machine disk information.
11405	Disks *[]DiskInstanceView `json:"disks,omitempty"`
11406	// Extensions - The extensions information.
11407	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
11408	// VMHealth - READ-ONLY; The health status for the VM.
11409	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
11410	// 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.
11411	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
11412	// AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. <br><br>Minimum api-version: 2020-06-01.
11413	AssignedHost *string `json:"assignedHost,omitempty"`
11414	// Statuses - The resource status information.
11415	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
11416	// PatchStatus - The status of virtual machine patch operations.
11417	PatchStatus *VirtualMachinePatchStatus `json:"patchStatus,omitempty"`
11418}
11419
11420// MarshalJSON is the custom marshaler for VirtualMachineInstanceView.
11421func (vmiv VirtualMachineInstanceView) MarshalJSON() ([]byte, error) {
11422	objectMap := make(map[string]interface{})
11423	if vmiv.PlatformUpdateDomain != nil {
11424		objectMap["platformUpdateDomain"] = vmiv.PlatformUpdateDomain
11425	}
11426	if vmiv.PlatformFaultDomain != nil {
11427		objectMap["platformFaultDomain"] = vmiv.PlatformFaultDomain
11428	}
11429	if vmiv.ComputerName != nil {
11430		objectMap["computerName"] = vmiv.ComputerName
11431	}
11432	if vmiv.OsName != nil {
11433		objectMap["osName"] = vmiv.OsName
11434	}
11435	if vmiv.OsVersion != nil {
11436		objectMap["osVersion"] = vmiv.OsVersion
11437	}
11438	if vmiv.HyperVGeneration != "" {
11439		objectMap["hyperVGeneration"] = vmiv.HyperVGeneration
11440	}
11441	if vmiv.RdpThumbPrint != nil {
11442		objectMap["rdpThumbPrint"] = vmiv.RdpThumbPrint
11443	}
11444	if vmiv.VMAgent != nil {
11445		objectMap["vmAgent"] = vmiv.VMAgent
11446	}
11447	if vmiv.MaintenanceRedeployStatus != nil {
11448		objectMap["maintenanceRedeployStatus"] = vmiv.MaintenanceRedeployStatus
11449	}
11450	if vmiv.Disks != nil {
11451		objectMap["disks"] = vmiv.Disks
11452	}
11453	if vmiv.Extensions != nil {
11454		objectMap["extensions"] = vmiv.Extensions
11455	}
11456	if vmiv.BootDiagnostics != nil {
11457		objectMap["bootDiagnostics"] = vmiv.BootDiagnostics
11458	}
11459	if vmiv.Statuses != nil {
11460		objectMap["statuses"] = vmiv.Statuses
11461	}
11462	if vmiv.PatchStatus != nil {
11463		objectMap["patchStatus"] = vmiv.PatchStatus
11464	}
11465	return json.Marshal(objectMap)
11466}
11467
11468// VirtualMachineListResult the List Virtual Machine operation response.
11469type VirtualMachineListResult struct {
11470	autorest.Response `json:"-"`
11471	// Value - The list of virtual machines.
11472	Value *[]VirtualMachine `json:"value,omitempty"`
11473	// NextLink - The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines.
11474	NextLink *string `json:"nextLink,omitempty"`
11475}
11476
11477// VirtualMachineListResultIterator provides access to a complete listing of VirtualMachine values.
11478type VirtualMachineListResultIterator struct {
11479	i    int
11480	page VirtualMachineListResultPage
11481}
11482
11483// NextWithContext advances to the next value.  If there was an error making
11484// the request the iterator does not advance and the error is returned.
11485func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) {
11486	if tracing.IsEnabled() {
11487		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.NextWithContext")
11488		defer func() {
11489			sc := -1
11490			if iter.Response().Response.Response != nil {
11491				sc = iter.Response().Response.Response.StatusCode
11492			}
11493			tracing.EndSpan(ctx, sc, err)
11494		}()
11495	}
11496	iter.i++
11497	if iter.i < len(iter.page.Values()) {
11498		return nil
11499	}
11500	err = iter.page.NextWithContext(ctx)
11501	if err != nil {
11502		iter.i--
11503		return err
11504	}
11505	iter.i = 0
11506	return nil
11507}
11508
11509// Next advances to the next value.  If there was an error making
11510// the request the iterator does not advance and the error is returned.
11511// Deprecated: Use NextWithContext() instead.
11512func (iter *VirtualMachineListResultIterator) Next() error {
11513	return iter.NextWithContext(context.Background())
11514}
11515
11516// NotDone returns true if the enumeration should be started or is not yet complete.
11517func (iter VirtualMachineListResultIterator) NotDone() bool {
11518	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11519}
11520
11521// Response returns the raw server response from the last page request.
11522func (iter VirtualMachineListResultIterator) Response() VirtualMachineListResult {
11523	return iter.page.Response()
11524}
11525
11526// Value returns the current value or a zero-initialized value if the
11527// iterator has advanced beyond the end of the collection.
11528func (iter VirtualMachineListResultIterator) Value() VirtualMachine {
11529	if !iter.page.NotDone() {
11530		return VirtualMachine{}
11531	}
11532	return iter.page.Values()[iter.i]
11533}
11534
11535// Creates a new instance of the VirtualMachineListResultIterator type.
11536func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator {
11537	return VirtualMachineListResultIterator{page: page}
11538}
11539
11540// IsEmpty returns true if the ListResult contains no values.
11541func (vmlr VirtualMachineListResult) IsEmpty() bool {
11542	return vmlr.Value == nil || len(*vmlr.Value) == 0
11543}
11544
11545// hasNextLink returns true if the NextLink is not empty.
11546func (vmlr VirtualMachineListResult) hasNextLink() bool {
11547	return vmlr.NextLink != nil && len(*vmlr.NextLink) != 0
11548}
11549
11550// virtualMachineListResultPreparer prepares a request to retrieve the next set of results.
11551// It returns nil if no more results exist.
11552func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) {
11553	if !vmlr.hasNextLink() {
11554		return nil, nil
11555	}
11556	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11557		autorest.AsJSON(),
11558		autorest.AsGet(),
11559		autorest.WithBaseURL(to.String(vmlr.NextLink)))
11560}
11561
11562// VirtualMachineListResultPage contains a page of VirtualMachine values.
11563type VirtualMachineListResultPage struct {
11564	fn   func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)
11565	vmlr VirtualMachineListResult
11566}
11567
11568// NextWithContext advances to the next page of values.  If there was an error making
11569// the request the page does not advance and the error is returned.
11570func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) {
11571	if tracing.IsEnabled() {
11572		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext")
11573		defer func() {
11574			sc := -1
11575			if page.Response().Response.Response != nil {
11576				sc = page.Response().Response.Response.StatusCode
11577			}
11578			tracing.EndSpan(ctx, sc, err)
11579		}()
11580	}
11581	for {
11582		next, err := page.fn(ctx, page.vmlr)
11583		if err != nil {
11584			return err
11585		}
11586		page.vmlr = next
11587		if !next.hasNextLink() || !next.IsEmpty() {
11588			break
11589		}
11590	}
11591	return nil
11592}
11593
11594// Next advances to the next page of values.  If there was an error making
11595// the request the page does not advance and the error is returned.
11596// Deprecated: Use NextWithContext() instead.
11597func (page *VirtualMachineListResultPage) Next() error {
11598	return page.NextWithContext(context.Background())
11599}
11600
11601// NotDone returns true if the page enumeration should be started or is not yet complete.
11602func (page VirtualMachineListResultPage) NotDone() bool {
11603	return !page.vmlr.IsEmpty()
11604}
11605
11606// Response returns the raw server response from the last page request.
11607func (page VirtualMachineListResultPage) Response() VirtualMachineListResult {
11608	return page.vmlr
11609}
11610
11611// Values returns the slice of values for the current page or nil if there are no values.
11612func (page VirtualMachineListResultPage) Values() []VirtualMachine {
11613	if page.vmlr.IsEmpty() {
11614		return nil
11615	}
11616	return *page.vmlr.Value
11617}
11618
11619// Creates a new instance of the VirtualMachineListResultPage type.
11620func NewVirtualMachineListResultPage(cur VirtualMachineListResult, getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
11621	return VirtualMachineListResultPage{
11622		fn:   getNextPage,
11623		vmlr: cur,
11624	}
11625}
11626
11627// VirtualMachinePatchStatus the status of virtual machine patch operations.
11628type VirtualMachinePatchStatus struct {
11629	// AvailablePatchSummary - The available patch summary of the latest assessment operation for the virtual machine.
11630	AvailablePatchSummary *AvailablePatchSummary `json:"availablePatchSummary,omitempty"`
11631	// LastPatchInstallationSummary - The installation summary of the latest installation operation for the virtual machine.
11632	LastPatchInstallationSummary *LastPatchInstallationSummary `json:"lastPatchInstallationSummary,omitempty"`
11633}
11634
11635// VirtualMachineProperties describes the properties of a Virtual Machine.
11636type VirtualMachineProperties struct {
11637	// HardwareProfile - Specifies the hardware settings for the virtual machine.
11638	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
11639	// StorageProfile - Specifies the storage settings for the virtual machine disks.
11640	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
11641	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine.
11642	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
11643	// OsProfile - Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
11644	OsProfile *OSProfile `json:"osProfile,omitempty"`
11645	// NetworkProfile - Specifies the network interfaces of the virtual machine.
11646	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
11647	// SecurityProfile - Specifies the Security related profile settings for the virtual machine.
11648	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
11649	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
11650	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
11651	// AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
11652	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
11653	// VirtualMachineScaleSet - Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01
11654	VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"`
11655	// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.
11656	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
11657	// Priority - Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot'
11658	Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
11659	// EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
11660	EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
11661	// BillingProfile - Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
11662	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
11663	// Host - Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
11664	Host *SubResource `json:"host,omitempty"`
11665	// HostGroup - Specifies information about the dedicated host group that the virtual machine resides in. <br><br>Minimum api-version: 2020-06-01. <br><br>NOTE: User cannot specify both host and hostGroup properties.
11666	HostGroup *SubResource `json:"hostGroup,omitempty"`
11667	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
11668	ProvisioningState *string `json:"provisioningState,omitempty"`
11669	// InstanceView - READ-ONLY; The virtual machine instance view.
11670	InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"`
11671	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15
11672	LicenseType *string `json:"licenseType,omitempty"`
11673	// 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.
11674	VMID *string `json:"vmId,omitempty"`
11675	// ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01
11676	ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`
11677}
11678
11679// MarshalJSON is the custom marshaler for VirtualMachineProperties.
11680func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) {
11681	objectMap := make(map[string]interface{})
11682	if vmp.HardwareProfile != nil {
11683		objectMap["hardwareProfile"] = vmp.HardwareProfile
11684	}
11685	if vmp.StorageProfile != nil {
11686		objectMap["storageProfile"] = vmp.StorageProfile
11687	}
11688	if vmp.AdditionalCapabilities != nil {
11689		objectMap["additionalCapabilities"] = vmp.AdditionalCapabilities
11690	}
11691	if vmp.OsProfile != nil {
11692		objectMap["osProfile"] = vmp.OsProfile
11693	}
11694	if vmp.NetworkProfile != nil {
11695		objectMap["networkProfile"] = vmp.NetworkProfile
11696	}
11697	if vmp.SecurityProfile != nil {
11698		objectMap["securityProfile"] = vmp.SecurityProfile
11699	}
11700	if vmp.DiagnosticsProfile != nil {
11701		objectMap["diagnosticsProfile"] = vmp.DiagnosticsProfile
11702	}
11703	if vmp.AvailabilitySet != nil {
11704		objectMap["availabilitySet"] = vmp.AvailabilitySet
11705	}
11706	if vmp.VirtualMachineScaleSet != nil {
11707		objectMap["virtualMachineScaleSet"] = vmp.VirtualMachineScaleSet
11708	}
11709	if vmp.ProximityPlacementGroup != nil {
11710		objectMap["proximityPlacementGroup"] = vmp.ProximityPlacementGroup
11711	}
11712	if vmp.Priority != "" {
11713		objectMap["priority"] = vmp.Priority
11714	}
11715	if vmp.EvictionPolicy != "" {
11716		objectMap["evictionPolicy"] = vmp.EvictionPolicy
11717	}
11718	if vmp.BillingProfile != nil {
11719		objectMap["billingProfile"] = vmp.BillingProfile
11720	}
11721	if vmp.Host != nil {
11722		objectMap["host"] = vmp.Host
11723	}
11724	if vmp.HostGroup != nil {
11725		objectMap["hostGroup"] = vmp.HostGroup
11726	}
11727	if vmp.LicenseType != nil {
11728		objectMap["licenseType"] = vmp.LicenseType
11729	}
11730	if vmp.ExtensionsTimeBudget != nil {
11731		objectMap["extensionsTimeBudget"] = vmp.ExtensionsTimeBudget
11732	}
11733	return json.Marshal(objectMap)
11734}
11735
11736// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk
11737// will always be reimaged
11738type VirtualMachineReimageParameters struct {
11739	// TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
11740	TempDisk *bool `json:"tempDisk,omitempty"`
11741}
11742
11743// VirtualMachineRunCommand describes a Virtual Machine run command.
11744type VirtualMachineRunCommand struct {
11745	autorest.Response                   `json:"-"`
11746	*VirtualMachineRunCommandProperties `json:"properties,omitempty"`
11747	// ID - READ-ONLY; Resource Id
11748	ID *string `json:"id,omitempty"`
11749	// Name - READ-ONLY; Resource name
11750	Name *string `json:"name,omitempty"`
11751	// Type - READ-ONLY; Resource type
11752	Type *string `json:"type,omitempty"`
11753	// Location - Resource location
11754	Location *string `json:"location,omitempty"`
11755	// Tags - Resource tags
11756	Tags map[string]*string `json:"tags"`
11757}
11758
11759// MarshalJSON is the custom marshaler for VirtualMachineRunCommand.
11760func (vmrc VirtualMachineRunCommand) MarshalJSON() ([]byte, error) {
11761	objectMap := make(map[string]interface{})
11762	if vmrc.VirtualMachineRunCommandProperties != nil {
11763		objectMap["properties"] = vmrc.VirtualMachineRunCommandProperties
11764	}
11765	if vmrc.Location != nil {
11766		objectMap["location"] = vmrc.Location
11767	}
11768	if vmrc.Tags != nil {
11769		objectMap["tags"] = vmrc.Tags
11770	}
11771	return json.Marshal(objectMap)
11772}
11773
11774// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommand struct.
11775func (vmrc *VirtualMachineRunCommand) UnmarshalJSON(body []byte) error {
11776	var m map[string]*json.RawMessage
11777	err := json.Unmarshal(body, &m)
11778	if err != nil {
11779		return err
11780	}
11781	for k, v := range m {
11782		switch k {
11783		case "properties":
11784			if v != nil {
11785				var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties
11786				err = json.Unmarshal(*v, &virtualMachineRunCommandProperties)
11787				if err != nil {
11788					return err
11789				}
11790				vmrc.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties
11791			}
11792		case "id":
11793			if v != nil {
11794				var ID string
11795				err = json.Unmarshal(*v, &ID)
11796				if err != nil {
11797					return err
11798				}
11799				vmrc.ID = &ID
11800			}
11801		case "name":
11802			if v != nil {
11803				var name string
11804				err = json.Unmarshal(*v, &name)
11805				if err != nil {
11806					return err
11807				}
11808				vmrc.Name = &name
11809			}
11810		case "type":
11811			if v != nil {
11812				var typeVar string
11813				err = json.Unmarshal(*v, &typeVar)
11814				if err != nil {
11815					return err
11816				}
11817				vmrc.Type = &typeVar
11818			}
11819		case "location":
11820			if v != nil {
11821				var location string
11822				err = json.Unmarshal(*v, &location)
11823				if err != nil {
11824					return err
11825				}
11826				vmrc.Location = &location
11827			}
11828		case "tags":
11829			if v != nil {
11830				var tags map[string]*string
11831				err = json.Unmarshal(*v, &tags)
11832				if err != nil {
11833					return err
11834				}
11835				vmrc.Tags = tags
11836			}
11837		}
11838	}
11839
11840	return nil
11841}
11842
11843// VirtualMachineRunCommandInstanceView the instance view of a virtual machine run command.
11844type VirtualMachineRunCommandInstanceView struct {
11845	// ExecutionState - Script execution status. Possible values include: 'ExecutionStateUnknown', 'ExecutionStatePending', 'ExecutionStateRunning', 'ExecutionStateFailed', 'ExecutionStateSucceeded', 'ExecutionStateTimedOut', 'ExecutionStateCanceled'
11846	ExecutionState ExecutionState `json:"executionState,omitempty"`
11847	// ExecutionMessage - Communicate script configuration errors or execution messages.
11848	ExecutionMessage *string `json:"executionMessage,omitempty"`
11849	// ExitCode - Exit code returned from script execution.
11850	ExitCode *int32 `json:"exitCode,omitempty"`
11851	// Output - Script output stream.
11852	Output *string `json:"output,omitempty"`
11853	// Error - Script error stream.
11854	Error *string `json:"error,omitempty"`
11855	// StartTime - Script start time.
11856	StartTime *date.Time `json:"startTime,omitempty"`
11857	// EndTime - Script end time.
11858	EndTime *date.Time `json:"endTime,omitempty"`
11859	// Statuses - The resource status information.
11860	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
11861}
11862
11863// VirtualMachineRunCommandProperties describes the properties of a Virtual Machine run command.
11864type VirtualMachineRunCommandProperties struct {
11865	// Source - The source of the run command script.
11866	Source *VirtualMachineRunCommandScriptSource `json:"source,omitempty"`
11867	// Parameters - The parameters used by the script.
11868	Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
11869	// ProtectedParameters - The parameters used by the script.
11870	ProtectedParameters *[]RunCommandInputParameter `json:"protectedParameters,omitempty"`
11871	// AsyncExecution - Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
11872	AsyncExecution *bool `json:"asyncExecution,omitempty"`
11873	// RunAsUser - Specifies the user account on the VM when executing the run command.
11874	RunAsUser *string `json:"runAsUser,omitempty"`
11875	// RunAsPassword - Specifies the user account password on the VM when executing the run command.
11876	RunAsPassword *string `json:"runAsPassword,omitempty"`
11877	// TimeoutInSeconds - The timeout in seconds to execute the run command.
11878	TimeoutInSeconds *int32 `json:"timeoutInSeconds,omitempty"`
11879	// OutputBlobURI - Specifies the Azure storage blob where script output stream will be uploaded.
11880	OutputBlobURI *string `json:"outputBlobUri,omitempty"`
11881	// ErrorBlobURI - Specifies the Azure storage blob where script error stream will be uploaded.
11882	ErrorBlobURI *string `json:"errorBlobUri,omitempty"`
11883	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
11884	ProvisioningState *string `json:"provisioningState,omitempty"`
11885	// InstanceView - READ-ONLY; The virtual machine run command instance view.
11886	InstanceView *VirtualMachineRunCommandInstanceView `json:"instanceView,omitempty"`
11887}
11888
11889// MarshalJSON is the custom marshaler for VirtualMachineRunCommandProperties.
11890func (vmrcp VirtualMachineRunCommandProperties) MarshalJSON() ([]byte, error) {
11891	objectMap := make(map[string]interface{})
11892	if vmrcp.Source != nil {
11893		objectMap["source"] = vmrcp.Source
11894	}
11895	if vmrcp.Parameters != nil {
11896		objectMap["parameters"] = vmrcp.Parameters
11897	}
11898	if vmrcp.ProtectedParameters != nil {
11899		objectMap["protectedParameters"] = vmrcp.ProtectedParameters
11900	}
11901	if vmrcp.AsyncExecution != nil {
11902		objectMap["asyncExecution"] = vmrcp.AsyncExecution
11903	}
11904	if vmrcp.RunAsUser != nil {
11905		objectMap["runAsUser"] = vmrcp.RunAsUser
11906	}
11907	if vmrcp.RunAsPassword != nil {
11908		objectMap["runAsPassword"] = vmrcp.RunAsPassword
11909	}
11910	if vmrcp.TimeoutInSeconds != nil {
11911		objectMap["timeoutInSeconds"] = vmrcp.TimeoutInSeconds
11912	}
11913	if vmrcp.OutputBlobURI != nil {
11914		objectMap["outputBlobUri"] = vmrcp.OutputBlobURI
11915	}
11916	if vmrcp.ErrorBlobURI != nil {
11917		objectMap["errorBlobUri"] = vmrcp.ErrorBlobURI
11918	}
11919	return json.Marshal(objectMap)
11920}
11921
11922// VirtualMachineRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
11923// of a long-running operation.
11924type VirtualMachineRunCommandsCreateOrUpdateFuture struct {
11925	azure.FutureAPI
11926	// Result returns the result of the asynchronous operation.
11927	// If the operation has not completed it will return an error.
11928	Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error)
11929}
11930
11931// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11932func (future *VirtualMachineRunCommandsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11933	var azFuture azure.Future
11934	if err := json.Unmarshal(body, &azFuture); err != nil {
11935		return err
11936	}
11937	future.FutureAPI = &azFuture
11938	future.Result = future.result
11939	return nil
11940}
11941
11942// result is the default implementation for VirtualMachineRunCommandsCreateOrUpdateFuture.Result.
11943func (future *VirtualMachineRunCommandsCreateOrUpdateFuture) result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
11944	var done bool
11945	done, err = future.DoneWithContext(context.Background(), client)
11946	if err != nil {
11947		err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11948		return
11949	}
11950	if !done {
11951		vmrc.Response.Response = future.Response()
11952		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsCreateOrUpdateFuture")
11953		return
11954	}
11955	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11956	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
11957		vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response)
11958		if err != nil {
11959			err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
11960		}
11961	}
11962	return
11963}
11964
11965// VirtualMachineRunCommandScriptSource describes the script sources for run command.
11966type VirtualMachineRunCommandScriptSource struct {
11967	// Script - Specifies the script content to be executed on the VM.
11968	Script *string `json:"script,omitempty"`
11969	// ScriptURI - Specifies the script download location.
11970	ScriptURI *string `json:"scriptUri,omitempty"`
11971	// CommandID - Specifies a commandId of predefined built-in script.
11972	CommandID *string `json:"commandId,omitempty"`
11973}
11974
11975// VirtualMachineRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results of a
11976// long-running operation.
11977type VirtualMachineRunCommandsDeleteFuture struct {
11978	azure.FutureAPI
11979	// Result returns the result of the asynchronous operation.
11980	// If the operation has not completed it will return an error.
11981	Result func(VirtualMachineRunCommandsClient) (autorest.Response, error)
11982}
11983
11984// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11985func (future *VirtualMachineRunCommandsDeleteFuture) UnmarshalJSON(body []byte) error {
11986	var azFuture azure.Future
11987	if err := json.Unmarshal(body, &azFuture); err != nil {
11988		return err
11989	}
11990	future.FutureAPI = &azFuture
11991	future.Result = future.result
11992	return nil
11993}
11994
11995// result is the default implementation for VirtualMachineRunCommandsDeleteFuture.Result.
11996func (future *VirtualMachineRunCommandsDeleteFuture) result(client VirtualMachineRunCommandsClient) (ar autorest.Response, err error) {
11997	var done bool
11998	done, err = future.DoneWithContext(context.Background(), client)
11999	if err != nil {
12000		err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure")
12001		return
12002	}
12003	if !done {
12004		ar.Response = future.Response()
12005		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsDeleteFuture")
12006		return
12007	}
12008	ar.Response = future.Response()
12009	return
12010}
12011
12012// VirtualMachineRunCommandsListResult the List run command operation response
12013type VirtualMachineRunCommandsListResult struct {
12014	autorest.Response `json:"-"`
12015	// Value - The list of run commands
12016	Value *[]VirtualMachineRunCommand `json:"value,omitempty"`
12017	// NextLink - The uri to fetch the next page of run commands.
12018	NextLink *string `json:"nextLink,omitempty"`
12019}
12020
12021// VirtualMachineRunCommandsListResultIterator provides access to a complete listing of
12022// VirtualMachineRunCommand values.
12023type VirtualMachineRunCommandsListResultIterator struct {
12024	i    int
12025	page VirtualMachineRunCommandsListResultPage
12026}
12027
12028// NextWithContext advances to the next value.  If there was an error making
12029// the request the iterator does not advance and the error is returned.
12030func (iter *VirtualMachineRunCommandsListResultIterator) NextWithContext(ctx context.Context) (err error) {
12031	if tracing.IsEnabled() {
12032		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultIterator.NextWithContext")
12033		defer func() {
12034			sc := -1
12035			if iter.Response().Response.Response != nil {
12036				sc = iter.Response().Response.Response.StatusCode
12037			}
12038			tracing.EndSpan(ctx, sc, err)
12039		}()
12040	}
12041	iter.i++
12042	if iter.i < len(iter.page.Values()) {
12043		return nil
12044	}
12045	err = iter.page.NextWithContext(ctx)
12046	if err != nil {
12047		iter.i--
12048		return err
12049	}
12050	iter.i = 0
12051	return nil
12052}
12053
12054// Next advances to the next value.  If there was an error making
12055// the request the iterator does not advance and the error is returned.
12056// Deprecated: Use NextWithContext() instead.
12057func (iter *VirtualMachineRunCommandsListResultIterator) Next() error {
12058	return iter.NextWithContext(context.Background())
12059}
12060
12061// NotDone returns true if the enumeration should be started or is not yet complete.
12062func (iter VirtualMachineRunCommandsListResultIterator) NotDone() bool {
12063	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12064}
12065
12066// Response returns the raw server response from the last page request.
12067func (iter VirtualMachineRunCommandsListResultIterator) Response() VirtualMachineRunCommandsListResult {
12068	return iter.page.Response()
12069}
12070
12071// Value returns the current value or a zero-initialized value if the
12072// iterator has advanced beyond the end of the collection.
12073func (iter VirtualMachineRunCommandsListResultIterator) Value() VirtualMachineRunCommand {
12074	if !iter.page.NotDone() {
12075		return VirtualMachineRunCommand{}
12076	}
12077	return iter.page.Values()[iter.i]
12078}
12079
12080// Creates a new instance of the VirtualMachineRunCommandsListResultIterator type.
12081func NewVirtualMachineRunCommandsListResultIterator(page VirtualMachineRunCommandsListResultPage) VirtualMachineRunCommandsListResultIterator {
12082	return VirtualMachineRunCommandsListResultIterator{page: page}
12083}
12084
12085// IsEmpty returns true if the ListResult contains no values.
12086func (vmrclr VirtualMachineRunCommandsListResult) IsEmpty() bool {
12087	return vmrclr.Value == nil || len(*vmrclr.Value) == 0
12088}
12089
12090// hasNextLink returns true if the NextLink is not empty.
12091func (vmrclr VirtualMachineRunCommandsListResult) hasNextLink() bool {
12092	return vmrclr.NextLink != nil && len(*vmrclr.NextLink) != 0
12093}
12094
12095// virtualMachineRunCommandsListResultPreparer prepares a request to retrieve the next set of results.
12096// It returns nil if no more results exist.
12097func (vmrclr VirtualMachineRunCommandsListResult) virtualMachineRunCommandsListResultPreparer(ctx context.Context) (*http.Request, error) {
12098	if !vmrclr.hasNextLink() {
12099		return nil, nil
12100	}
12101	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12102		autorest.AsJSON(),
12103		autorest.AsGet(),
12104		autorest.WithBaseURL(to.String(vmrclr.NextLink)))
12105}
12106
12107// VirtualMachineRunCommandsListResultPage contains a page of VirtualMachineRunCommand values.
12108type VirtualMachineRunCommandsListResultPage struct {
12109	fn     func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)
12110	vmrclr VirtualMachineRunCommandsListResult
12111}
12112
12113// NextWithContext advances to the next page of values.  If there was an error making
12114// the request the page does not advance and the error is returned.
12115func (page *VirtualMachineRunCommandsListResultPage) NextWithContext(ctx context.Context) (err error) {
12116	if tracing.IsEnabled() {
12117		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultPage.NextWithContext")
12118		defer func() {
12119			sc := -1
12120			if page.Response().Response.Response != nil {
12121				sc = page.Response().Response.Response.StatusCode
12122			}
12123			tracing.EndSpan(ctx, sc, err)
12124		}()
12125	}
12126	for {
12127		next, err := page.fn(ctx, page.vmrclr)
12128		if err != nil {
12129			return err
12130		}
12131		page.vmrclr = next
12132		if !next.hasNextLink() || !next.IsEmpty() {
12133			break
12134		}
12135	}
12136	return nil
12137}
12138
12139// Next advances to the next page of values.  If there was an error making
12140// the request the page does not advance and the error is returned.
12141// Deprecated: Use NextWithContext() instead.
12142func (page *VirtualMachineRunCommandsListResultPage) Next() error {
12143	return page.NextWithContext(context.Background())
12144}
12145
12146// NotDone returns true if the page enumeration should be started or is not yet complete.
12147func (page VirtualMachineRunCommandsListResultPage) NotDone() bool {
12148	return !page.vmrclr.IsEmpty()
12149}
12150
12151// Response returns the raw server response from the last page request.
12152func (page VirtualMachineRunCommandsListResultPage) Response() VirtualMachineRunCommandsListResult {
12153	return page.vmrclr
12154}
12155
12156// Values returns the slice of values for the current page or nil if there are no values.
12157func (page VirtualMachineRunCommandsListResultPage) Values() []VirtualMachineRunCommand {
12158	if page.vmrclr.IsEmpty() {
12159		return nil
12160	}
12161	return *page.vmrclr.Value
12162}
12163
12164// Creates a new instance of the VirtualMachineRunCommandsListResultPage type.
12165func NewVirtualMachineRunCommandsListResultPage(cur VirtualMachineRunCommandsListResult, getNextPage func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)) VirtualMachineRunCommandsListResultPage {
12166	return VirtualMachineRunCommandsListResultPage{
12167		fn:     getNextPage,
12168		vmrclr: cur,
12169	}
12170}
12171
12172// VirtualMachineRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results of a
12173// long-running operation.
12174type VirtualMachineRunCommandsUpdateFuture struct {
12175	azure.FutureAPI
12176	// Result returns the result of the asynchronous operation.
12177	// If the operation has not completed it will return an error.
12178	Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error)
12179}
12180
12181// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12182func (future *VirtualMachineRunCommandsUpdateFuture) UnmarshalJSON(body []byte) error {
12183	var azFuture azure.Future
12184	if err := json.Unmarshal(body, &azFuture); err != nil {
12185		return err
12186	}
12187	future.FutureAPI = &azFuture
12188	future.Result = future.result
12189	return nil
12190}
12191
12192// result is the default implementation for VirtualMachineRunCommandsUpdateFuture.Result.
12193func (future *VirtualMachineRunCommandsUpdateFuture) result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
12194	var done bool
12195	done, err = future.DoneWithContext(context.Background(), client)
12196	if err != nil {
12197		err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure")
12198		return
12199	}
12200	if !done {
12201		vmrc.Response.Response = future.Response()
12202		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsUpdateFuture")
12203		return
12204	}
12205	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12206	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
12207		vmrc, err = client.UpdateResponder(vmrc.Response.Response)
12208		if err != nil {
12209			err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
12210		}
12211	}
12212	return
12213}
12214
12215// VirtualMachineRunCommandUpdate describes a Virtual Machine run command.
12216type VirtualMachineRunCommandUpdate struct {
12217	*VirtualMachineRunCommandProperties `json:"properties,omitempty"`
12218	// Tags - Resource tags
12219	Tags map[string]*string `json:"tags"`
12220}
12221
12222// MarshalJSON is the custom marshaler for VirtualMachineRunCommandUpdate.
12223func (vmrcu VirtualMachineRunCommandUpdate) MarshalJSON() ([]byte, error) {
12224	objectMap := make(map[string]interface{})
12225	if vmrcu.VirtualMachineRunCommandProperties != nil {
12226		objectMap["properties"] = vmrcu.VirtualMachineRunCommandProperties
12227	}
12228	if vmrcu.Tags != nil {
12229		objectMap["tags"] = vmrcu.Tags
12230	}
12231	return json.Marshal(objectMap)
12232}
12233
12234// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommandUpdate struct.
12235func (vmrcu *VirtualMachineRunCommandUpdate) UnmarshalJSON(body []byte) error {
12236	var m map[string]*json.RawMessage
12237	err := json.Unmarshal(body, &m)
12238	if err != nil {
12239		return err
12240	}
12241	for k, v := range m {
12242		switch k {
12243		case "properties":
12244			if v != nil {
12245				var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties
12246				err = json.Unmarshal(*v, &virtualMachineRunCommandProperties)
12247				if err != nil {
12248					return err
12249				}
12250				vmrcu.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties
12251			}
12252		case "tags":
12253			if v != nil {
12254				var tags map[string]*string
12255				err = json.Unmarshal(*v, &tags)
12256				if err != nil {
12257					return err
12258				}
12259				vmrcu.Tags = tags
12260			}
12261		}
12262	}
12263
12264	return nil
12265}
12266
12267// VirtualMachinesAssessPatchesFuture an abstraction for monitoring and retrieving the results of a
12268// long-running operation.
12269type VirtualMachinesAssessPatchesFuture struct {
12270	azure.FutureAPI
12271	// Result returns the result of the asynchronous operation.
12272	// If the operation has not completed it will return an error.
12273	Result func(VirtualMachinesClient) (VirtualMachineAssessPatchesResult, error)
12274}
12275
12276// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12277func (future *VirtualMachinesAssessPatchesFuture) UnmarshalJSON(body []byte) error {
12278	var azFuture azure.Future
12279	if err := json.Unmarshal(body, &azFuture); err != nil {
12280		return err
12281	}
12282	future.FutureAPI = &azFuture
12283	future.Result = future.result
12284	return nil
12285}
12286
12287// result is the default implementation for VirtualMachinesAssessPatchesFuture.Result.
12288func (future *VirtualMachinesAssessPatchesFuture) result(client VirtualMachinesClient) (vmapr VirtualMachineAssessPatchesResult, err error) {
12289	var done bool
12290	done, err = future.DoneWithContext(context.Background(), client)
12291	if err != nil {
12292		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesAssessPatchesFuture", "Result", future.Response(), "Polling failure")
12293		return
12294	}
12295	if !done {
12296		vmapr.Response.Response = future.Response()
12297		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesAssessPatchesFuture")
12298		return
12299	}
12300	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12301	if vmapr.Response.Response, err = future.GetResult(sender); err == nil && vmapr.Response.Response.StatusCode != http.StatusNoContent {
12302		vmapr, err = client.AssessPatchesResponder(vmapr.Response.Response)
12303		if err != nil {
12304			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesAssessPatchesFuture", "Result", vmapr.Response.Response, "Failure responding to request")
12305		}
12306	}
12307	return
12308}
12309
12310// VirtualMachineScaleSet describes a Virtual Machine Scale Set.
12311type VirtualMachineScaleSet struct {
12312	autorest.Response `json:"-"`
12313	// Sku - The virtual machine scale set sku.
12314	Sku *Sku `json:"sku,omitempty"`
12315	// 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**.
12316	Plan                              *Plan `json:"plan,omitempty"`
12317	*VirtualMachineScaleSetProperties `json:"properties,omitempty"`
12318	// Identity - The identity of the virtual machine scale set, if configured.
12319	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
12320	// Zones - The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set
12321	Zones *[]string `json:"zones,omitempty"`
12322	// ID - READ-ONLY; Resource Id
12323	ID *string `json:"id,omitempty"`
12324	// Name - READ-ONLY; Resource name
12325	Name *string `json:"name,omitempty"`
12326	// Type - READ-ONLY; Resource type
12327	Type *string `json:"type,omitempty"`
12328	// Location - Resource location
12329	Location *string `json:"location,omitempty"`
12330	// Tags - Resource tags
12331	Tags map[string]*string `json:"tags"`
12332}
12333
12334// MarshalJSON is the custom marshaler for VirtualMachineScaleSet.
12335func (vmss VirtualMachineScaleSet) MarshalJSON() ([]byte, error) {
12336	objectMap := make(map[string]interface{})
12337	if vmss.Sku != nil {
12338		objectMap["sku"] = vmss.Sku
12339	}
12340	if vmss.Plan != nil {
12341		objectMap["plan"] = vmss.Plan
12342	}
12343	if vmss.VirtualMachineScaleSetProperties != nil {
12344		objectMap["properties"] = vmss.VirtualMachineScaleSetProperties
12345	}
12346	if vmss.Identity != nil {
12347		objectMap["identity"] = vmss.Identity
12348	}
12349	if vmss.Zones != nil {
12350		objectMap["zones"] = vmss.Zones
12351	}
12352	if vmss.Location != nil {
12353		objectMap["location"] = vmss.Location
12354	}
12355	if vmss.Tags != nil {
12356		objectMap["tags"] = vmss.Tags
12357	}
12358	return json.Marshal(objectMap)
12359}
12360
12361// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSet struct.
12362func (vmss *VirtualMachineScaleSet) UnmarshalJSON(body []byte) error {
12363	var m map[string]*json.RawMessage
12364	err := json.Unmarshal(body, &m)
12365	if err != nil {
12366		return err
12367	}
12368	for k, v := range m {
12369		switch k {
12370		case "sku":
12371			if v != nil {
12372				var sku Sku
12373				err = json.Unmarshal(*v, &sku)
12374				if err != nil {
12375					return err
12376				}
12377				vmss.Sku = &sku
12378			}
12379		case "plan":
12380			if v != nil {
12381				var plan Plan
12382				err = json.Unmarshal(*v, &plan)
12383				if err != nil {
12384					return err
12385				}
12386				vmss.Plan = &plan
12387			}
12388		case "properties":
12389			if v != nil {
12390				var virtualMachineScaleSetProperties VirtualMachineScaleSetProperties
12391				err = json.Unmarshal(*v, &virtualMachineScaleSetProperties)
12392				if err != nil {
12393					return err
12394				}
12395				vmss.VirtualMachineScaleSetProperties = &virtualMachineScaleSetProperties
12396			}
12397		case "identity":
12398			if v != nil {
12399				var identity VirtualMachineScaleSetIdentity
12400				err = json.Unmarshal(*v, &identity)
12401				if err != nil {
12402					return err
12403				}
12404				vmss.Identity = &identity
12405			}
12406		case "zones":
12407			if v != nil {
12408				var zones []string
12409				err = json.Unmarshal(*v, &zones)
12410				if err != nil {
12411					return err
12412				}
12413				vmss.Zones = &zones
12414			}
12415		case "id":
12416			if v != nil {
12417				var ID string
12418				err = json.Unmarshal(*v, &ID)
12419				if err != nil {
12420					return err
12421				}
12422				vmss.ID = &ID
12423			}
12424		case "name":
12425			if v != nil {
12426				var name string
12427				err = json.Unmarshal(*v, &name)
12428				if err != nil {
12429					return err
12430				}
12431				vmss.Name = &name
12432			}
12433		case "type":
12434			if v != nil {
12435				var typeVar string
12436				err = json.Unmarshal(*v, &typeVar)
12437				if err != nil {
12438					return err
12439				}
12440				vmss.Type = &typeVar
12441			}
12442		case "location":
12443			if v != nil {
12444				var location string
12445				err = json.Unmarshal(*v, &location)
12446				if err != nil {
12447					return err
12448				}
12449				vmss.Location = &location
12450			}
12451		case "tags":
12452			if v != nil {
12453				var tags map[string]*string
12454				err = json.Unmarshal(*v, &tags)
12455				if err != nil {
12456					return err
12457				}
12458				vmss.Tags = tags
12459			}
12460		}
12461	}
12462
12463	return nil
12464}
12465
12466// VirtualMachineScaleSetDataDisk describes a virtual machine scale set data disk.
12467type VirtualMachineScaleSetDataDisk struct {
12468	// Name - The disk name.
12469	Name *string `json:"name,omitempty"`
12470	// 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.
12471	Lun *int32 `json:"lun,omitempty"`
12472	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
12473	Caching CachingTypes `json:"caching,omitempty"`
12474	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
12475	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
12476	// CreateOption - The create option. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
12477	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
12478	// 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
12479	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
12480	// ManagedDisk - The managed disk parameters.
12481	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
12482	// DiskIOPSReadWrite - Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
12483	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
12484	// DiskMBpsReadWrite - Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
12485	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
12486}
12487
12488// VirtualMachineScaleSetExtension describes a Virtual Machine Scale Set Extension.
12489type VirtualMachineScaleSetExtension struct {
12490	autorest.Response `json:"-"`
12491	// Name - The name of the extension.
12492	Name *string `json:"name,omitempty"`
12493	// Type - READ-ONLY; Resource type
12494	Type                                       *string `json:"type,omitempty"`
12495	*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
12496	// ID - READ-ONLY; Resource Id
12497	ID *string `json:"id,omitempty"`
12498}
12499
12500// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtension.
12501func (vmsse VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) {
12502	objectMap := make(map[string]interface{})
12503	if vmsse.Name != nil {
12504		objectMap["name"] = vmsse.Name
12505	}
12506	if vmsse.VirtualMachineScaleSetExtensionProperties != nil {
12507		objectMap["properties"] = vmsse.VirtualMachineScaleSetExtensionProperties
12508	}
12509	return json.Marshal(objectMap)
12510}
12511
12512// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtension struct.
12513func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error {
12514	var m map[string]*json.RawMessage
12515	err := json.Unmarshal(body, &m)
12516	if err != nil {
12517		return err
12518	}
12519	for k, v := range m {
12520		switch k {
12521		case "name":
12522			if v != nil {
12523				var name string
12524				err = json.Unmarshal(*v, &name)
12525				if err != nil {
12526					return err
12527				}
12528				vmsse.Name = &name
12529			}
12530		case "type":
12531			if v != nil {
12532				var typeVar string
12533				err = json.Unmarshal(*v, &typeVar)
12534				if err != nil {
12535					return err
12536				}
12537				vmsse.Type = &typeVar
12538			}
12539		case "properties":
12540			if v != nil {
12541				var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
12542				err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
12543				if err != nil {
12544					return err
12545				}
12546				vmsse.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
12547			}
12548		case "id":
12549			if v != nil {
12550				var ID string
12551				err = json.Unmarshal(*v, &ID)
12552				if err != nil {
12553					return err
12554				}
12555				vmsse.ID = &ID
12556			}
12557		}
12558	}
12559
12560	return nil
12561}
12562
12563// VirtualMachineScaleSetExtensionListResult the List VM scale set extension operation response.
12564type VirtualMachineScaleSetExtensionListResult struct {
12565	autorest.Response `json:"-"`
12566	// Value - The list of VM scale set extensions.
12567	Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"`
12568	// 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.
12569	NextLink *string `json:"nextLink,omitempty"`
12570}
12571
12572// VirtualMachineScaleSetExtensionListResultIterator provides access to a complete listing of
12573// VirtualMachineScaleSetExtension values.
12574type VirtualMachineScaleSetExtensionListResultIterator struct {
12575	i    int
12576	page VirtualMachineScaleSetExtensionListResultPage
12577}
12578
12579// NextWithContext advances to the next value.  If there was an error making
12580// the request the iterator does not advance and the error is returned.
12581func (iter *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) {
12582	if tracing.IsEnabled() {
12583		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.NextWithContext")
12584		defer func() {
12585			sc := -1
12586			if iter.Response().Response.Response != nil {
12587				sc = iter.Response().Response.Response.StatusCode
12588			}
12589			tracing.EndSpan(ctx, sc, err)
12590		}()
12591	}
12592	iter.i++
12593	if iter.i < len(iter.page.Values()) {
12594		return nil
12595	}
12596	err = iter.page.NextWithContext(ctx)
12597	if err != nil {
12598		iter.i--
12599		return err
12600	}
12601	iter.i = 0
12602	return nil
12603}
12604
12605// Next advances to the next value.  If there was an error making
12606// the request the iterator does not advance and the error is returned.
12607// Deprecated: Use NextWithContext() instead.
12608func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error {
12609	return iter.NextWithContext(context.Background())
12610}
12611
12612// NotDone returns true if the enumeration should be started or is not yet complete.
12613func (iter VirtualMachineScaleSetExtensionListResultIterator) NotDone() bool {
12614	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12615}
12616
12617// Response returns the raw server response from the last page request.
12618func (iter VirtualMachineScaleSetExtensionListResultIterator) Response() VirtualMachineScaleSetExtensionListResult {
12619	return iter.page.Response()
12620}
12621
12622// Value returns the current value or a zero-initialized value if the
12623// iterator has advanced beyond the end of the collection.
12624func (iter VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMachineScaleSetExtension {
12625	if !iter.page.NotDone() {
12626		return VirtualMachineScaleSetExtension{}
12627	}
12628	return iter.page.Values()[iter.i]
12629}
12630
12631// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type.
12632func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator {
12633	return VirtualMachineScaleSetExtensionListResultIterator{page: page}
12634}
12635
12636// IsEmpty returns true if the ListResult contains no values.
12637func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool {
12638	return vmsselr.Value == nil || len(*vmsselr.Value) == 0
12639}
12640
12641// hasNextLink returns true if the NextLink is not empty.
12642func (vmsselr VirtualMachineScaleSetExtensionListResult) hasNextLink() bool {
12643	return vmsselr.NextLink != nil && len(*vmsselr.NextLink) != 0
12644}
12645
12646// virtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results.
12647// It returns nil if no more results exist.
12648func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer(ctx context.Context) (*http.Request, error) {
12649	if !vmsselr.hasNextLink() {
12650		return nil, nil
12651	}
12652	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12653		autorest.AsJSON(),
12654		autorest.AsGet(),
12655		autorest.WithBaseURL(to.String(vmsselr.NextLink)))
12656}
12657
12658// VirtualMachineScaleSetExtensionListResultPage contains a page of VirtualMachineScaleSetExtension values.
12659type VirtualMachineScaleSetExtensionListResultPage struct {
12660	fn      func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)
12661	vmsselr VirtualMachineScaleSetExtensionListResult
12662}
12663
12664// NextWithContext advances to the next page of values.  If there was an error making
12665// the request the page does not advance and the error is returned.
12666func (page *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx context.Context) (err error) {
12667	if tracing.IsEnabled() {
12668		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultPage.NextWithContext")
12669		defer func() {
12670			sc := -1
12671			if page.Response().Response.Response != nil {
12672				sc = page.Response().Response.Response.StatusCode
12673			}
12674			tracing.EndSpan(ctx, sc, err)
12675		}()
12676	}
12677	for {
12678		next, err := page.fn(ctx, page.vmsselr)
12679		if err != nil {
12680			return err
12681		}
12682		page.vmsselr = next
12683		if !next.hasNextLink() || !next.IsEmpty() {
12684			break
12685		}
12686	}
12687	return nil
12688}
12689
12690// Next advances to the next page of values.  If there was an error making
12691// the request the page does not advance and the error is returned.
12692// Deprecated: Use NextWithContext() instead.
12693func (page *VirtualMachineScaleSetExtensionListResultPage) Next() error {
12694	return page.NextWithContext(context.Background())
12695}
12696
12697// NotDone returns true if the page enumeration should be started or is not yet complete.
12698func (page VirtualMachineScaleSetExtensionListResultPage) NotDone() bool {
12699	return !page.vmsselr.IsEmpty()
12700}
12701
12702// Response returns the raw server response from the last page request.
12703func (page VirtualMachineScaleSetExtensionListResultPage) Response() VirtualMachineScaleSetExtensionListResult {
12704	return page.vmsselr
12705}
12706
12707// Values returns the slice of values for the current page or nil if there are no values.
12708func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMachineScaleSetExtension {
12709	if page.vmsselr.IsEmpty() {
12710		return nil
12711	}
12712	return *page.vmsselr.Value
12713}
12714
12715// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type.
12716func NewVirtualMachineScaleSetExtensionListResultPage(cur VirtualMachineScaleSetExtensionListResult, getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
12717	return VirtualMachineScaleSetExtensionListResultPage{
12718		fn:      getNextPage,
12719		vmsselr: cur,
12720	}
12721}
12722
12723// VirtualMachineScaleSetExtensionProfile describes a virtual machine scale set extension profile.
12724type VirtualMachineScaleSetExtensionProfile struct {
12725	// Extensions - The virtual machine scale set child extension resources.
12726	Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"`
12727	// ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01
12728	ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`
12729}
12730
12731// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set
12732// Extension.
12733type VirtualMachineScaleSetExtensionProperties struct {
12734	// 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.
12735	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
12736	// Publisher - The name of the extension handler publisher.
12737	Publisher *string `json:"publisher,omitempty"`
12738	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
12739	Type *string `json:"type,omitempty"`
12740	// TypeHandlerVersion - Specifies the version of the script handler.
12741	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
12742	// 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.
12743	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
12744	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
12745	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
12746	// Settings - Json formatted public settings for the extension.
12747	Settings interface{} `json:"settings,omitempty"`
12748	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
12749	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
12750	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
12751	ProvisioningState *string `json:"provisioningState,omitempty"`
12752	// ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
12753	ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
12754}
12755
12756// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionProperties.
12757func (vmssep VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, error) {
12758	objectMap := make(map[string]interface{})
12759	if vmssep.ForceUpdateTag != nil {
12760		objectMap["forceUpdateTag"] = vmssep.ForceUpdateTag
12761	}
12762	if vmssep.Publisher != nil {
12763		objectMap["publisher"] = vmssep.Publisher
12764	}
12765	if vmssep.Type != nil {
12766		objectMap["type"] = vmssep.Type
12767	}
12768	if vmssep.TypeHandlerVersion != nil {
12769		objectMap["typeHandlerVersion"] = vmssep.TypeHandlerVersion
12770	}
12771	if vmssep.AutoUpgradeMinorVersion != nil {
12772		objectMap["autoUpgradeMinorVersion"] = vmssep.AutoUpgradeMinorVersion
12773	}
12774	if vmssep.EnableAutomaticUpgrade != nil {
12775		objectMap["enableAutomaticUpgrade"] = vmssep.EnableAutomaticUpgrade
12776	}
12777	if vmssep.Settings != nil {
12778		objectMap["settings"] = vmssep.Settings
12779	}
12780	if vmssep.ProtectedSettings != nil {
12781		objectMap["protectedSettings"] = vmssep.ProtectedSettings
12782	}
12783	if vmssep.ProvisionAfterExtensions != nil {
12784		objectMap["provisionAfterExtensions"] = vmssep.ProvisionAfterExtensions
12785	}
12786	return json.Marshal(objectMap)
12787}
12788
12789// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
12790// results of a long-running operation.
12791type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
12792	azure.FutureAPI
12793	// Result returns the result of the asynchronous operation.
12794	// If the operation has not completed it will return an error.
12795	Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
12796}
12797
12798// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12799func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12800	var azFuture azure.Future
12801	if err := json.Unmarshal(body, &azFuture); err != nil {
12802		return err
12803	}
12804	future.FutureAPI = &azFuture
12805	future.Result = future.result
12806	return nil
12807}
12808
12809// result is the default implementation for VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.Result.
12810func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
12811	var done bool
12812	done, err = future.DoneWithContext(context.Background(), client)
12813	if err != nil {
12814		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12815		return
12816	}
12817	if !done {
12818		vmsse.Response.Response = future.Response()
12819		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
12820		return
12821	}
12822	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12823	if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
12824		vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response)
12825		if err != nil {
12826			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
12827		}
12828	}
12829	return
12830}
12831
12832// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of
12833// a long-running operation.
12834type VirtualMachineScaleSetExtensionsDeleteFuture struct {
12835	azure.FutureAPI
12836	// Result returns the result of the asynchronous operation.
12837	// If the operation has not completed it will return an error.
12838	Result func(VirtualMachineScaleSetExtensionsClient) (autorest.Response, error)
12839}
12840
12841// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12842func (future *VirtualMachineScaleSetExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
12843	var azFuture azure.Future
12844	if err := json.Unmarshal(body, &azFuture); err != nil {
12845		return err
12846	}
12847	future.FutureAPI = &azFuture
12848	future.Result = future.result
12849	return nil
12850}
12851
12852// result is the default implementation for VirtualMachineScaleSetExtensionsDeleteFuture.Result.
12853func (future *VirtualMachineScaleSetExtensionsDeleteFuture) result(client VirtualMachineScaleSetExtensionsClient) (ar autorest.Response, err error) {
12854	var done bool
12855	done, err = future.DoneWithContext(context.Background(), client)
12856	if err != nil {
12857		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
12858		return
12859	}
12860	if !done {
12861		ar.Response = future.Response()
12862		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
12863		return
12864	}
12865	ar.Response = future.Response()
12866	return
12867}
12868
12869// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of
12870// a long-running operation.
12871type VirtualMachineScaleSetExtensionsUpdateFuture struct {
12872	azure.FutureAPI
12873	// Result returns the result of the asynchronous operation.
12874	// If the operation has not completed it will return an error.
12875	Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
12876}
12877
12878// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12879func (future *VirtualMachineScaleSetExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
12880	var azFuture azure.Future
12881	if err := json.Unmarshal(body, &azFuture); err != nil {
12882		return err
12883	}
12884	future.FutureAPI = &azFuture
12885	future.Result = future.result
12886	return nil
12887}
12888
12889// result is the default implementation for VirtualMachineScaleSetExtensionsUpdateFuture.Result.
12890func (future *VirtualMachineScaleSetExtensionsUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
12891	var done bool
12892	done, err = future.DoneWithContext(context.Background(), client)
12893	if err != nil {
12894		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
12895		return
12896	}
12897	if !done {
12898		vmsse.Response.Response = future.Response()
12899		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsUpdateFuture")
12900		return
12901	}
12902	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12903	if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
12904		vmsse, err = client.UpdateResponder(vmsse.Response.Response)
12905		if err != nil {
12906			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
12907		}
12908	}
12909	return
12910}
12911
12912// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension.
12913type VirtualMachineScaleSetExtensionUpdate struct {
12914	// Name - READ-ONLY; The name of the extension.
12915	Name *string `json:"name,omitempty"`
12916	// Type - READ-ONLY; Resource type
12917	Type                                       *string `json:"type,omitempty"`
12918	*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
12919	// ID - READ-ONLY; Resource Id
12920	ID *string `json:"id,omitempty"`
12921}
12922
12923// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionUpdate.
12924func (vmsseu VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) {
12925	objectMap := make(map[string]interface{})
12926	if vmsseu.VirtualMachineScaleSetExtensionProperties != nil {
12927		objectMap["properties"] = vmsseu.VirtualMachineScaleSetExtensionProperties
12928	}
12929	return json.Marshal(objectMap)
12930}
12931
12932// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtensionUpdate struct.
12933func (vmsseu *VirtualMachineScaleSetExtensionUpdate) UnmarshalJSON(body []byte) error {
12934	var m map[string]*json.RawMessage
12935	err := json.Unmarshal(body, &m)
12936	if err != nil {
12937		return err
12938	}
12939	for k, v := range m {
12940		switch k {
12941		case "name":
12942			if v != nil {
12943				var name string
12944				err = json.Unmarshal(*v, &name)
12945				if err != nil {
12946					return err
12947				}
12948				vmsseu.Name = &name
12949			}
12950		case "type":
12951			if v != nil {
12952				var typeVar string
12953				err = json.Unmarshal(*v, &typeVar)
12954				if err != nil {
12955					return err
12956				}
12957				vmsseu.Type = &typeVar
12958			}
12959		case "properties":
12960			if v != nil {
12961				var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
12962				err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
12963				if err != nil {
12964					return err
12965				}
12966				vmsseu.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
12967			}
12968		case "id":
12969			if v != nil {
12970				var ID string
12971				err = json.Unmarshal(*v, &ID)
12972				if err != nil {
12973					return err
12974				}
12975				vmsseu.ID = &ID
12976			}
12977		}
12978	}
12979
12980	return nil
12981}
12982
12983// VirtualMachineScaleSetIdentity identity for the virtual machine scale set.
12984type VirtualMachineScaleSetIdentity struct {
12985	// PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity.
12986	PrincipalID *string `json:"principalId,omitempty"`
12987	// TenantID - READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity.
12988	TenantID *string `json:"tenantId,omitempty"`
12989	// 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'
12990	Type ResourceIdentityType `json:"type,omitempty"`
12991	// UserAssignedIdentities - The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
12992	UserAssignedIdentities map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
12993}
12994
12995// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentity.
12996func (vmssi VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) {
12997	objectMap := make(map[string]interface{})
12998	if vmssi.Type != "" {
12999		objectMap["type"] = vmssi.Type
13000	}
13001	if vmssi.UserAssignedIdentities != nil {
13002		objectMap["userAssignedIdentities"] = vmssi.UserAssignedIdentities
13003	}
13004	return json.Marshal(objectMap)
13005}
13006
13007// VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue ...
13008type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct {
13009	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
13010	PrincipalID *string `json:"principalId,omitempty"`
13011	// ClientID - READ-ONLY; The client id of user assigned identity.
13012	ClientID *string `json:"clientId,omitempty"`
13013}
13014
13015// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue.
13016func (vmssiAiv VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
13017	objectMap := make(map[string]interface{})
13018	return json.Marshal(objectMap)
13019}
13020
13021// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set.
13022type VirtualMachineScaleSetInstanceView struct {
13023	autorest.Response `json:"-"`
13024	// VirtualMachine - READ-ONLY; The instance view status summary for the virtual machine scale set.
13025	VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"`
13026	// Extensions - READ-ONLY; The extensions information.
13027	Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"`
13028	// Statuses - The resource status information.
13029	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
13030	// OrchestrationServices - READ-ONLY; The orchestration services information.
13031	OrchestrationServices *[]OrchestrationServiceSummary `json:"orchestrationServices,omitempty"`
13032}
13033
13034// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceView.
13035func (vmssiv VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) {
13036	objectMap := make(map[string]interface{})
13037	if vmssiv.Statuses != nil {
13038		objectMap["statuses"] = vmssiv.Statuses
13039	}
13040	return json.Marshal(objectMap)
13041}
13042
13043// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of
13044// a virtual machine scale set.
13045type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
13046	// StatusesSummary - READ-ONLY; The extensions information.
13047	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
13048}
13049
13050// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceViewStatusesSummary.
13051func (vmssivss VirtualMachineScaleSetInstanceViewStatusesSummary) MarshalJSON() ([]byte, error) {
13052	objectMap := make(map[string]interface{})
13053	return json.Marshal(objectMap)
13054}
13055
13056// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP
13057// configuration.
13058type VirtualMachineScaleSetIPConfiguration struct {
13059	// Name - The IP configuration name.
13060	Name                                             *string `json:"name,omitempty"`
13061	*VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"`
13062	// ID - Resource Id
13063	ID *string `json:"id,omitempty"`
13064}
13065
13066// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIPConfiguration.
13067func (vmssic VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) {
13068	objectMap := make(map[string]interface{})
13069	if vmssic.Name != nil {
13070		objectMap["name"] = vmssic.Name
13071	}
13072	if vmssic.VirtualMachineScaleSetIPConfigurationProperties != nil {
13073		objectMap["properties"] = vmssic.VirtualMachineScaleSetIPConfigurationProperties
13074	}
13075	if vmssic.ID != nil {
13076		objectMap["id"] = vmssic.ID
13077	}
13078	return json.Marshal(objectMap)
13079}
13080
13081// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetIPConfiguration struct.
13082func (vmssic *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(body []byte) error {
13083	var m map[string]*json.RawMessage
13084	err := json.Unmarshal(body, &m)
13085	if err != nil {
13086		return err
13087	}
13088	for k, v := range m {
13089		switch k {
13090		case "name":
13091			if v != nil {
13092				var name string
13093				err = json.Unmarshal(*v, &name)
13094				if err != nil {
13095					return err
13096				}
13097				vmssic.Name = &name
13098			}
13099		case "properties":
13100			if v != nil {
13101				var virtualMachineScaleSetIPConfigurationProperties VirtualMachineScaleSetIPConfigurationProperties
13102				err = json.Unmarshal(*v, &virtualMachineScaleSetIPConfigurationProperties)
13103				if err != nil {
13104					return err
13105				}
13106				vmssic.VirtualMachineScaleSetIPConfigurationProperties = &virtualMachineScaleSetIPConfigurationProperties
13107			}
13108		case "id":
13109			if v != nil {
13110				var ID string
13111				err = json.Unmarshal(*v, &ID)
13112				if err != nil {
13113					return err
13114				}
13115				vmssic.ID = &ID
13116			}
13117		}
13118	}
13119
13120	return nil
13121}
13122
13123// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's
13124// IP configuration properties.
13125type VirtualMachineScaleSetIPConfigurationProperties struct {
13126	// Subnet - Specifies the identifier of the subnet.
13127	Subnet *APIEntityReference `json:"subnet,omitempty"`
13128	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
13129	Primary *bool `json:"primary,omitempty"`
13130	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
13131	PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
13132	// 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'
13133	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
13134	// 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.
13135	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
13136	// ApplicationSecurityGroups - Specifies an array of references to application security group.
13137	ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
13138	// LoadBalancerBackendAddressPools - Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.
13139	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
13140	// LoadBalancerInboundNatPools - Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.
13141	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
13142}
13143
13144// VirtualMachineScaleSetIPTag contains the IP tag associated with the public IP address.
13145type VirtualMachineScaleSetIPTag struct {
13146	// IPTagType - IP tag type. Example: FirstPartyUsage.
13147	IPTagType *string `json:"ipTagType,omitempty"`
13148	// Tag - IP tag associated with the public IP. Example: SQL, Storage etc.
13149	Tag *string `json:"tag,omitempty"`
13150}
13151
13152// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History
13153// operation response.
13154type VirtualMachineScaleSetListOSUpgradeHistory struct {
13155	autorest.Response `json:"-"`
13156	// Value - The list of OS upgrades performed on the virtual machine scale set.
13157	Value *[]UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"`
13158	// 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.
13159	NextLink *string `json:"nextLink,omitempty"`
13160}
13161
13162// VirtualMachineScaleSetListOSUpgradeHistoryIterator provides access to a complete listing of
13163// UpgradeOperationHistoricalStatusInfo values.
13164type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct {
13165	i    int
13166	page VirtualMachineScaleSetListOSUpgradeHistoryPage
13167}
13168
13169// NextWithContext advances to the next value.  If there was an error making
13170// the request the iterator does not advance and the error is returned.
13171func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) {
13172	if tracing.IsEnabled() {
13173		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.NextWithContext")
13174		defer func() {
13175			sc := -1
13176			if iter.Response().Response.Response != nil {
13177				sc = iter.Response().Response.Response.StatusCode
13178			}
13179			tracing.EndSpan(ctx, sc, err)
13180		}()
13181	}
13182	iter.i++
13183	if iter.i < len(iter.page.Values()) {
13184		return nil
13185	}
13186	err = iter.page.NextWithContext(ctx)
13187	if err != nil {
13188		iter.i--
13189		return err
13190	}
13191	iter.i = 0
13192	return nil
13193}
13194
13195// Next advances to the next value.  If there was an error making
13196// the request the iterator does not advance and the error is returned.
13197// Deprecated: Use NextWithContext() instead.
13198func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error {
13199	return iter.NextWithContext(context.Background())
13200}
13201
13202// NotDone returns true if the enumeration should be started or is not yet complete.
13203func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) NotDone() bool {
13204	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13205}
13206
13207// Response returns the raw server response from the last page request.
13208func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Response() VirtualMachineScaleSetListOSUpgradeHistory {
13209	return iter.page.Response()
13210}
13211
13212// Value returns the current value or a zero-initialized value if the
13213// iterator has advanced beyond the end of the collection.
13214func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOperationHistoricalStatusInfo {
13215	if !iter.page.NotDone() {
13216		return UpgradeOperationHistoricalStatusInfo{}
13217	}
13218	return iter.page.Values()[iter.i]
13219}
13220
13221// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type.
13222func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator {
13223	return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page}
13224}
13225
13226// IsEmpty returns true if the ListResult contains no values.
13227func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool {
13228	return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0
13229}
13230
13231// hasNextLink returns true if the NextLink is not empty.
13232func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) hasNextLink() bool {
13233	return vmsslouh.NextLink != nil && len(*vmsslouh.NextLink) != 0
13234}
13235
13236// virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results.
13237// It returns nil if no more results exist.
13238func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) {
13239	if !vmsslouh.hasNextLink() {
13240		return nil, nil
13241	}
13242	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13243		autorest.AsJSON(),
13244		autorest.AsGet(),
13245		autorest.WithBaseURL(to.String(vmsslouh.NextLink)))
13246}
13247
13248// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo
13249// values.
13250type VirtualMachineScaleSetListOSUpgradeHistoryPage struct {
13251	fn       func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)
13252	vmsslouh VirtualMachineScaleSetListOSUpgradeHistory
13253}
13254
13255// NextWithContext advances to the next page of values.  If there was an error making
13256// the request the page does not advance and the error is returned.
13257func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) {
13258	if tracing.IsEnabled() {
13259		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.NextWithContext")
13260		defer func() {
13261			sc := -1
13262			if page.Response().Response.Response != nil {
13263				sc = page.Response().Response.Response.StatusCode
13264			}
13265			tracing.EndSpan(ctx, sc, err)
13266		}()
13267	}
13268	for {
13269		next, err := page.fn(ctx, page.vmsslouh)
13270		if err != nil {
13271			return err
13272		}
13273		page.vmsslouh = next
13274		if !next.hasNextLink() || !next.IsEmpty() {
13275			break
13276		}
13277	}
13278	return nil
13279}
13280
13281// Next advances to the next page of values.  If there was an error making
13282// the request the page does not advance and the error is returned.
13283// Deprecated: Use NextWithContext() instead.
13284func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error {
13285	return page.NextWithContext(context.Background())
13286}
13287
13288// NotDone returns true if the page enumeration should be started or is not yet complete.
13289func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool {
13290	return !page.vmsslouh.IsEmpty()
13291}
13292
13293// Response returns the raw server response from the last page request.
13294func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Response() VirtualMachineScaleSetListOSUpgradeHistory {
13295	return page.vmsslouh
13296}
13297
13298// Values returns the slice of values for the current page or nil if there are no values.
13299func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOperationHistoricalStatusInfo {
13300	if page.vmsslouh.IsEmpty() {
13301		return nil
13302	}
13303	return *page.vmsslouh.Value
13304}
13305
13306// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type.
13307func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(cur VirtualMachineScaleSetListOSUpgradeHistory, getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage {
13308	return VirtualMachineScaleSetListOSUpgradeHistoryPage{
13309		fn:       getNextPage,
13310		vmsslouh: cur,
13311	}
13312}
13313
13314// VirtualMachineScaleSetListResult the List Virtual Machine operation response.
13315type VirtualMachineScaleSetListResult struct {
13316	autorest.Response `json:"-"`
13317	// Value - The list of virtual machine scale sets.
13318	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
13319	// NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS.
13320	NextLink *string `json:"nextLink,omitempty"`
13321}
13322
13323// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet
13324// values.
13325type VirtualMachineScaleSetListResultIterator struct {
13326	i    int
13327	page VirtualMachineScaleSetListResultPage
13328}
13329
13330// NextWithContext advances to the next value.  If there was an error making
13331// the request the iterator does not advance and the error is returned.
13332func (iter *VirtualMachineScaleSetListResultIterator) NextWithContext(ctx context.Context) (err error) {
13333	if tracing.IsEnabled() {
13334		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultIterator.NextWithContext")
13335		defer func() {
13336			sc := -1
13337			if iter.Response().Response.Response != nil {
13338				sc = iter.Response().Response.Response.StatusCode
13339			}
13340			tracing.EndSpan(ctx, sc, err)
13341		}()
13342	}
13343	iter.i++
13344	if iter.i < len(iter.page.Values()) {
13345		return nil
13346	}
13347	err = iter.page.NextWithContext(ctx)
13348	if err != nil {
13349		iter.i--
13350		return err
13351	}
13352	iter.i = 0
13353	return nil
13354}
13355
13356// Next advances to the next value.  If there was an error making
13357// the request the iterator does not advance and the error is returned.
13358// Deprecated: Use NextWithContext() instead.
13359func (iter *VirtualMachineScaleSetListResultIterator) Next() error {
13360	return iter.NextWithContext(context.Background())
13361}
13362
13363// NotDone returns true if the enumeration should be started or is not yet complete.
13364func (iter VirtualMachineScaleSetListResultIterator) NotDone() bool {
13365	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13366}
13367
13368// Response returns the raw server response from the last page request.
13369func (iter VirtualMachineScaleSetListResultIterator) Response() VirtualMachineScaleSetListResult {
13370	return iter.page.Response()
13371}
13372
13373// Value returns the current value or a zero-initialized value if the
13374// iterator has advanced beyond the end of the collection.
13375func (iter VirtualMachineScaleSetListResultIterator) Value() VirtualMachineScaleSet {
13376	if !iter.page.NotDone() {
13377		return VirtualMachineScaleSet{}
13378	}
13379	return iter.page.Values()[iter.i]
13380}
13381
13382// Creates a new instance of the VirtualMachineScaleSetListResultIterator type.
13383func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator {
13384	return VirtualMachineScaleSetListResultIterator{page: page}
13385}
13386
13387// IsEmpty returns true if the ListResult contains no values.
13388func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool {
13389	return vmsslr.Value == nil || len(*vmsslr.Value) == 0
13390}
13391
13392// hasNextLink returns true if the NextLink is not empty.
13393func (vmsslr VirtualMachineScaleSetListResult) hasNextLink() bool {
13394	return vmsslr.NextLink != nil && len(*vmsslr.NextLink) != 0
13395}
13396
13397// virtualMachineScaleSetListResultPreparer prepares a request to retrieve the next set of results.
13398// It returns nil if no more results exist.
13399func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer(ctx context.Context) (*http.Request, error) {
13400	if !vmsslr.hasNextLink() {
13401		return nil, nil
13402	}
13403	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13404		autorest.AsJSON(),
13405		autorest.AsGet(),
13406		autorest.WithBaseURL(to.String(vmsslr.NextLink)))
13407}
13408
13409// VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values.
13410type VirtualMachineScaleSetListResultPage struct {
13411	fn     func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)
13412	vmsslr VirtualMachineScaleSetListResult
13413}
13414
13415// NextWithContext advances to the next page of values.  If there was an error making
13416// the request the page does not advance and the error is returned.
13417func (page *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error) {
13418	if tracing.IsEnabled() {
13419		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultPage.NextWithContext")
13420		defer func() {
13421			sc := -1
13422			if page.Response().Response.Response != nil {
13423				sc = page.Response().Response.Response.StatusCode
13424			}
13425			tracing.EndSpan(ctx, sc, err)
13426		}()
13427	}
13428	for {
13429		next, err := page.fn(ctx, page.vmsslr)
13430		if err != nil {
13431			return err
13432		}
13433		page.vmsslr = next
13434		if !next.hasNextLink() || !next.IsEmpty() {
13435			break
13436		}
13437	}
13438	return nil
13439}
13440
13441// Next advances to the next page of values.  If there was an error making
13442// the request the page does not advance and the error is returned.
13443// Deprecated: Use NextWithContext() instead.
13444func (page *VirtualMachineScaleSetListResultPage) Next() error {
13445	return page.NextWithContext(context.Background())
13446}
13447
13448// NotDone returns true if the page enumeration should be started or is not yet complete.
13449func (page VirtualMachineScaleSetListResultPage) NotDone() bool {
13450	return !page.vmsslr.IsEmpty()
13451}
13452
13453// Response returns the raw server response from the last page request.
13454func (page VirtualMachineScaleSetListResultPage) Response() VirtualMachineScaleSetListResult {
13455	return page.vmsslr
13456}
13457
13458// Values returns the slice of values for the current page or nil if there are no values.
13459func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleSet {
13460	if page.vmsslr.IsEmpty() {
13461		return nil
13462	}
13463	return *page.vmsslr.Value
13464}
13465
13466// Creates a new instance of the VirtualMachineScaleSetListResultPage type.
13467func NewVirtualMachineScaleSetListResultPage(cur VirtualMachineScaleSetListResult, getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
13468	return VirtualMachineScaleSetListResultPage{
13469		fn:     getNextPage,
13470		vmsslr: cur,
13471	}
13472}
13473
13474// VirtualMachineScaleSetListSkusResult the Virtual Machine Scale Set List Skus operation response.
13475type VirtualMachineScaleSetListSkusResult struct {
13476	autorest.Response `json:"-"`
13477	// Value - The list of skus available for the virtual machine scale set.
13478	Value *[]VirtualMachineScaleSetSku `json:"value,omitempty"`
13479	// 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.
13480	NextLink *string `json:"nextLink,omitempty"`
13481}
13482
13483// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of
13484// VirtualMachineScaleSetSku values.
13485type VirtualMachineScaleSetListSkusResultIterator struct {
13486	i    int
13487	page VirtualMachineScaleSetListSkusResultPage
13488}
13489
13490// NextWithContext advances to the next value.  If there was an error making
13491// the request the iterator does not advance and the error is returned.
13492func (iter *VirtualMachineScaleSetListSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
13493	if tracing.IsEnabled() {
13494		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultIterator.NextWithContext")
13495		defer func() {
13496			sc := -1
13497			if iter.Response().Response.Response != nil {
13498				sc = iter.Response().Response.Response.StatusCode
13499			}
13500			tracing.EndSpan(ctx, sc, err)
13501		}()
13502	}
13503	iter.i++
13504	if iter.i < len(iter.page.Values()) {
13505		return nil
13506	}
13507	err = iter.page.NextWithContext(ctx)
13508	if err != nil {
13509		iter.i--
13510		return err
13511	}
13512	iter.i = 0
13513	return nil
13514}
13515
13516// Next advances to the next value.  If there was an error making
13517// the request the iterator does not advance and the error is returned.
13518// Deprecated: Use NextWithContext() instead.
13519func (iter *VirtualMachineScaleSetListSkusResultIterator) Next() error {
13520	return iter.NextWithContext(context.Background())
13521}
13522
13523// NotDone returns true if the enumeration should be started or is not yet complete.
13524func (iter VirtualMachineScaleSetListSkusResultIterator) NotDone() bool {
13525	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13526}
13527
13528// Response returns the raw server response from the last page request.
13529func (iter VirtualMachineScaleSetListSkusResultIterator) Response() VirtualMachineScaleSetListSkusResult {
13530	return iter.page.Response()
13531}
13532
13533// Value returns the current value or a zero-initialized value if the
13534// iterator has advanced beyond the end of the collection.
13535func (iter VirtualMachineScaleSetListSkusResultIterator) Value() VirtualMachineScaleSetSku {
13536	if !iter.page.NotDone() {
13537		return VirtualMachineScaleSetSku{}
13538	}
13539	return iter.page.Values()[iter.i]
13540}
13541
13542// Creates a new instance of the VirtualMachineScaleSetListSkusResultIterator type.
13543func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator {
13544	return VirtualMachineScaleSetListSkusResultIterator{page: page}
13545}
13546
13547// IsEmpty returns true if the ListResult contains no values.
13548func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool {
13549	return vmsslsr.Value == nil || len(*vmsslsr.Value) == 0
13550}
13551
13552// hasNextLink returns true if the NextLink is not empty.
13553func (vmsslsr VirtualMachineScaleSetListSkusResult) hasNextLink() bool {
13554	return vmsslsr.NextLink != nil && len(*vmsslsr.NextLink) != 0
13555}
13556
13557// virtualMachineScaleSetListSkusResultPreparer prepares a request to retrieve the next set of results.
13558// It returns nil if no more results exist.
13559func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer(ctx context.Context) (*http.Request, error) {
13560	if !vmsslsr.hasNextLink() {
13561		return nil, nil
13562	}
13563	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13564		autorest.AsJSON(),
13565		autorest.AsGet(),
13566		autorest.WithBaseURL(to.String(vmsslsr.NextLink)))
13567}
13568
13569// VirtualMachineScaleSetListSkusResultPage contains a page of VirtualMachineScaleSetSku values.
13570type VirtualMachineScaleSetListSkusResultPage struct {
13571	fn      func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)
13572	vmsslsr VirtualMachineScaleSetListSkusResult
13573}
13574
13575// NextWithContext advances to the next page of values.  If there was an error making
13576// the request the page does not advance and the error is returned.
13577func (page *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx context.Context) (err error) {
13578	if tracing.IsEnabled() {
13579		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultPage.NextWithContext")
13580		defer func() {
13581			sc := -1
13582			if page.Response().Response.Response != nil {
13583				sc = page.Response().Response.Response.StatusCode
13584			}
13585			tracing.EndSpan(ctx, sc, err)
13586		}()
13587	}
13588	for {
13589		next, err := page.fn(ctx, page.vmsslsr)
13590		if err != nil {
13591			return err
13592		}
13593		page.vmsslsr = next
13594		if !next.hasNextLink() || !next.IsEmpty() {
13595			break
13596		}
13597	}
13598	return nil
13599}
13600
13601// Next advances to the next page of values.  If there was an error making
13602// the request the page does not advance and the error is returned.
13603// Deprecated: Use NextWithContext() instead.
13604func (page *VirtualMachineScaleSetListSkusResultPage) Next() error {
13605	return page.NextWithContext(context.Background())
13606}
13607
13608// NotDone returns true if the page enumeration should be started or is not yet complete.
13609func (page VirtualMachineScaleSetListSkusResultPage) NotDone() bool {
13610	return !page.vmsslsr.IsEmpty()
13611}
13612
13613// Response returns the raw server response from the last page request.
13614func (page VirtualMachineScaleSetListSkusResultPage) Response() VirtualMachineScaleSetListSkusResult {
13615	return page.vmsslsr
13616}
13617
13618// Values returns the slice of values for the current page or nil if there are no values.
13619func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineScaleSetSku {
13620	if page.vmsslsr.IsEmpty() {
13621		return nil
13622	}
13623	return *page.vmsslsr.Value
13624}
13625
13626// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type.
13627func NewVirtualMachineScaleSetListSkusResultPage(cur VirtualMachineScaleSetListSkusResult, getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
13628	return VirtualMachineScaleSetListSkusResultPage{
13629		fn:      getNextPage,
13630		vmsslsr: cur,
13631	}
13632}
13633
13634// VirtualMachineScaleSetListWithLinkResult the List Virtual Machine operation response.
13635type VirtualMachineScaleSetListWithLinkResult struct {
13636	autorest.Response `json:"-"`
13637	// Value - The list of virtual machine scale sets.
13638	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
13639	// 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.
13640	NextLink *string `json:"nextLink,omitempty"`
13641}
13642
13643// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of
13644// VirtualMachineScaleSet values.
13645type VirtualMachineScaleSetListWithLinkResultIterator struct {
13646	i    int
13647	page VirtualMachineScaleSetListWithLinkResultPage
13648}
13649
13650// NextWithContext advances to the next value.  If there was an error making
13651// the request the iterator does not advance and the error is returned.
13652func (iter *VirtualMachineScaleSetListWithLinkResultIterator) NextWithContext(ctx context.Context) (err error) {
13653	if tracing.IsEnabled() {
13654		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultIterator.NextWithContext")
13655		defer func() {
13656			sc := -1
13657			if iter.Response().Response.Response != nil {
13658				sc = iter.Response().Response.Response.StatusCode
13659			}
13660			tracing.EndSpan(ctx, sc, err)
13661		}()
13662	}
13663	iter.i++
13664	if iter.i < len(iter.page.Values()) {
13665		return nil
13666	}
13667	err = iter.page.NextWithContext(ctx)
13668	if err != nil {
13669		iter.i--
13670		return err
13671	}
13672	iter.i = 0
13673	return nil
13674}
13675
13676// Next advances to the next value.  If there was an error making
13677// the request the iterator does not advance and the error is returned.
13678// Deprecated: Use NextWithContext() instead.
13679func (iter *VirtualMachineScaleSetListWithLinkResultIterator) Next() error {
13680	return iter.NextWithContext(context.Background())
13681}
13682
13683// NotDone returns true if the enumeration should be started or is not yet complete.
13684func (iter VirtualMachineScaleSetListWithLinkResultIterator) NotDone() bool {
13685	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13686}
13687
13688// Response returns the raw server response from the last page request.
13689func (iter VirtualMachineScaleSetListWithLinkResultIterator) Response() VirtualMachineScaleSetListWithLinkResult {
13690	return iter.page.Response()
13691}
13692
13693// Value returns the current value or a zero-initialized value if the
13694// iterator has advanced beyond the end of the collection.
13695func (iter VirtualMachineScaleSetListWithLinkResultIterator) Value() VirtualMachineScaleSet {
13696	if !iter.page.NotDone() {
13697		return VirtualMachineScaleSet{}
13698	}
13699	return iter.page.Values()[iter.i]
13700}
13701
13702// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultIterator type.
13703func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator {
13704	return VirtualMachineScaleSetListWithLinkResultIterator{page: page}
13705}
13706
13707// IsEmpty returns true if the ListResult contains no values.
13708func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool {
13709	return vmsslwlr.Value == nil || len(*vmsslwlr.Value) == 0
13710}
13711
13712// hasNextLink returns true if the NextLink is not empty.
13713func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) hasNextLink() bool {
13714	return vmsslwlr.NextLink != nil && len(*vmsslwlr.NextLink) != 0
13715}
13716
13717// virtualMachineScaleSetListWithLinkResultPreparer prepares a request to retrieve the next set of results.
13718// It returns nil if no more results exist.
13719func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer(ctx context.Context) (*http.Request, error) {
13720	if !vmsslwlr.hasNextLink() {
13721		return nil, nil
13722	}
13723	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13724		autorest.AsJSON(),
13725		autorest.AsGet(),
13726		autorest.WithBaseURL(to.String(vmsslwlr.NextLink)))
13727}
13728
13729// VirtualMachineScaleSetListWithLinkResultPage contains a page of VirtualMachineScaleSet values.
13730type VirtualMachineScaleSetListWithLinkResultPage struct {
13731	fn       func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)
13732	vmsslwlr VirtualMachineScaleSetListWithLinkResult
13733}
13734
13735// NextWithContext advances to the next page of values.  If there was an error making
13736// the request the page does not advance and the error is returned.
13737func (page *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx context.Context) (err error) {
13738	if tracing.IsEnabled() {
13739		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultPage.NextWithContext")
13740		defer func() {
13741			sc := -1
13742			if page.Response().Response.Response != nil {
13743				sc = page.Response().Response.Response.StatusCode
13744			}
13745			tracing.EndSpan(ctx, sc, err)
13746		}()
13747	}
13748	for {
13749		next, err := page.fn(ctx, page.vmsslwlr)
13750		if err != nil {
13751			return err
13752		}
13753		page.vmsslwlr = next
13754		if !next.hasNextLink() || !next.IsEmpty() {
13755			break
13756		}
13757	}
13758	return nil
13759}
13760
13761// Next advances to the next page of values.  If there was an error making
13762// the request the page does not advance and the error is returned.
13763// Deprecated: Use NextWithContext() instead.
13764func (page *VirtualMachineScaleSetListWithLinkResultPage) Next() error {
13765	return page.NextWithContext(context.Background())
13766}
13767
13768// NotDone returns true if the page enumeration should be started or is not yet complete.
13769func (page VirtualMachineScaleSetListWithLinkResultPage) NotDone() bool {
13770	return !page.vmsslwlr.IsEmpty()
13771}
13772
13773// Response returns the raw server response from the last page request.
13774func (page VirtualMachineScaleSetListWithLinkResultPage) Response() VirtualMachineScaleSetListWithLinkResult {
13775	return page.vmsslwlr
13776}
13777
13778// Values returns the slice of values for the current page or nil if there are no values.
13779func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachineScaleSet {
13780	if page.vmsslwlr.IsEmpty() {
13781		return nil
13782	}
13783	return *page.vmsslwlr.Value
13784}
13785
13786// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type.
13787func NewVirtualMachineScaleSetListWithLinkResultPage(cur VirtualMachineScaleSetListWithLinkResult, getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
13788	return VirtualMachineScaleSetListWithLinkResultPage{
13789		fn:       getNextPage,
13790		vmsslwlr: cur,
13791	}
13792}
13793
13794// VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk.
13795type VirtualMachineScaleSetManagedDiskParameters struct {
13796	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
13797	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
13798	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
13799	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
13800}
13801
13802// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's
13803// network configurations.
13804type VirtualMachineScaleSetNetworkConfiguration struct {
13805	// Name - The network configuration name.
13806	Name                                                  *string `json:"name,omitempty"`
13807	*VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"`
13808	// ID - Resource Id
13809	ID *string `json:"id,omitempty"`
13810}
13811
13812// MarshalJSON is the custom marshaler for VirtualMachineScaleSetNetworkConfiguration.
13813func (vmssnc VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) {
13814	objectMap := make(map[string]interface{})
13815	if vmssnc.Name != nil {
13816		objectMap["name"] = vmssnc.Name
13817	}
13818	if vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties != nil {
13819		objectMap["properties"] = vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties
13820	}
13821	if vmssnc.ID != nil {
13822		objectMap["id"] = vmssnc.ID
13823	}
13824	return json.Marshal(objectMap)
13825}
13826
13827// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetNetworkConfiguration struct.
13828func (vmssnc *VirtualMachineScaleSetNetworkConfiguration) UnmarshalJSON(body []byte) error {
13829	var m map[string]*json.RawMessage
13830	err := json.Unmarshal(body, &m)
13831	if err != nil {
13832		return err
13833	}
13834	for k, v := range m {
13835		switch k {
13836		case "name":
13837			if v != nil {
13838				var name string
13839				err = json.Unmarshal(*v, &name)
13840				if err != nil {
13841					return err
13842				}
13843				vmssnc.Name = &name
13844			}
13845		case "properties":
13846			if v != nil {
13847				var virtualMachineScaleSetNetworkConfigurationProperties VirtualMachineScaleSetNetworkConfigurationProperties
13848				err = json.Unmarshal(*v, &virtualMachineScaleSetNetworkConfigurationProperties)
13849				if err != nil {
13850					return err
13851				}
13852				vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties = &virtualMachineScaleSetNetworkConfigurationProperties
13853			}
13854		case "id":
13855			if v != nil {
13856				var ID string
13857				err = json.Unmarshal(*v, &ID)
13858				if err != nil {
13859					return err
13860				}
13861				vmssnc.ID = &ID
13862			}
13863		}
13864	}
13865
13866	return nil
13867}
13868
13869// VirtualMachineScaleSetNetworkConfigurationDNSSettings describes a virtual machines scale sets network
13870// configuration's DNS settings.
13871type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
13872	// DNSServers - List of DNS servers IP addresses
13873	DNSServers *[]string `json:"dnsServers,omitempty"`
13874}
13875
13876// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network
13877// profile's IP configuration.
13878type VirtualMachineScaleSetNetworkConfigurationProperties struct {
13879	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
13880	Primary *bool `json:"primary,omitempty"`
13881	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
13882	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
13883	// NetworkSecurityGroup - The network security group.
13884	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
13885	// DNSSettings - The dns settings to be applied on the network interfaces.
13886	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
13887	// IPConfigurations - Specifies the IP configurations of the network interface.
13888	IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"`
13889	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
13890	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
13891}
13892
13893// VirtualMachineScaleSetNetworkProfile describes a virtual machine scale set network profile.
13894type VirtualMachineScaleSetNetworkProfile struct {
13895	// 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}'.
13896	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
13897	// NetworkInterfaceConfigurations - The list of network configurations.
13898	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
13899}
13900
13901// VirtualMachineScaleSetOSDisk describes a virtual machine scale set operating system disk.
13902type VirtualMachineScaleSetOSDisk struct {
13903	// Name - The disk name.
13904	Name *string `json:"name,omitempty"`
13905	// Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
13906	Caching CachingTypes `json:"caching,omitempty"`
13907	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
13908	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
13909	// CreateOption - Specifies how the virtual machines in the scale set should be created.<br><br> The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you  also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
13910	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
13911	// DiffDiskSettings - Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
13912	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
13913	// DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
13914	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
13915	// 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'
13916	OsType OperatingSystemTypes `json:"osType,omitempty"`
13917	// Image - Specifies information about the unmanaged user image to base the scale set on.
13918	Image *VirtualHardDisk `json:"image,omitempty"`
13919	// VhdContainers - Specifies the container urls that are used to store operating system disks for the scale set.
13920	VhdContainers *[]string `json:"vhdContainers,omitempty"`
13921	// ManagedDisk - The managed disk parameters.
13922	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
13923}
13924
13925// VirtualMachineScaleSetOSProfile describes a virtual machine scale set OS profile.
13926type VirtualMachineScaleSetOSProfile struct {
13927	// 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.
13928	ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"`
13929	// 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)
13930	AdminUsername *string `json:"adminUsername,omitempty"`
13931	// 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)
13932	AdminPassword *string `json:"adminPassword,omitempty"`
13933	// 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)
13934	CustomData *string `json:"customData,omitempty"`
13935	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
13936	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
13937	// 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).
13938	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
13939	// Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set.
13940	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
13941}
13942
13943// VirtualMachineScaleSetProperties describes the properties of a Virtual Machine Scale Set.
13944type VirtualMachineScaleSetProperties struct {
13945	// UpgradePolicy - The upgrade policy.
13946	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
13947	// AutomaticRepairsPolicy - Policy for automatic repairs.
13948	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
13949	// VirtualMachineProfile - The virtual machine profile.
13950	VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"`
13951	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
13952	ProvisioningState *string `json:"provisioningState,omitempty"`
13953	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
13954	Overprovision *bool `json:"overprovision,omitempty"`
13955	// DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
13956	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
13957	// UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
13958	UniqueID *string `json:"uniqueId,omitempty"`
13959	// SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
13960	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
13961	// ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.
13962	ZoneBalance *bool `json:"zoneBalance,omitempty"`
13963	// PlatformFaultDomainCount - Fault Domain count for each placement group.
13964	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
13965	// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. <br><br>Minimum api-version: 2018-04-01.
13966	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
13967	// HostGroup - Specifies information about the dedicated host group that the virtual machine scale set resides in. <br><br>Minimum api-version: 2020-06-01.
13968	HostGroup *SubResource `json:"hostGroup,omitempty"`
13969	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
13970	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
13971	// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
13972	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
13973}
13974
13975// MarshalJSON is the custom marshaler for VirtualMachineScaleSetProperties.
13976func (vmssp VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) {
13977	objectMap := make(map[string]interface{})
13978	if vmssp.UpgradePolicy != nil {
13979		objectMap["upgradePolicy"] = vmssp.UpgradePolicy
13980	}
13981	if vmssp.AutomaticRepairsPolicy != nil {
13982		objectMap["automaticRepairsPolicy"] = vmssp.AutomaticRepairsPolicy
13983	}
13984	if vmssp.VirtualMachineProfile != nil {
13985		objectMap["virtualMachineProfile"] = vmssp.VirtualMachineProfile
13986	}
13987	if vmssp.Overprovision != nil {
13988		objectMap["overprovision"] = vmssp.Overprovision
13989	}
13990	if vmssp.DoNotRunExtensionsOnOverprovisionedVMs != nil {
13991		objectMap["doNotRunExtensionsOnOverprovisionedVMs"] = vmssp.DoNotRunExtensionsOnOverprovisionedVMs
13992	}
13993	if vmssp.SinglePlacementGroup != nil {
13994		objectMap["singlePlacementGroup"] = vmssp.SinglePlacementGroup
13995	}
13996	if vmssp.ZoneBalance != nil {
13997		objectMap["zoneBalance"] = vmssp.ZoneBalance
13998	}
13999	if vmssp.PlatformFaultDomainCount != nil {
14000		objectMap["platformFaultDomainCount"] = vmssp.PlatformFaultDomainCount
14001	}
14002	if vmssp.ProximityPlacementGroup != nil {
14003		objectMap["proximityPlacementGroup"] = vmssp.ProximityPlacementGroup
14004	}
14005	if vmssp.HostGroup != nil {
14006		objectMap["hostGroup"] = vmssp.HostGroup
14007	}
14008	if vmssp.AdditionalCapabilities != nil {
14009		objectMap["additionalCapabilities"] = vmssp.AdditionalCapabilities
14010	}
14011	if vmssp.ScaleInPolicy != nil {
14012		objectMap["scaleInPolicy"] = vmssp.ScaleInPolicy
14013	}
14014	return json.Marshal(objectMap)
14015}
14016
14017// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP
14018// Configuration's PublicIPAddress configuration
14019type VirtualMachineScaleSetPublicIPAddressConfiguration struct {
14020	// Name - The publicIP address configuration name.
14021	Name                                                          *string `json:"name,omitempty"`
14022	*VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"`
14023}
14024
14025// MarshalJSON is the custom marshaler for VirtualMachineScaleSetPublicIPAddressConfiguration.
14026func (vmsspiac VirtualMachineScaleSetPublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
14027	objectMap := make(map[string]interface{})
14028	if vmsspiac.Name != nil {
14029		objectMap["name"] = vmsspiac.Name
14030	}
14031	if vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties != nil {
14032		objectMap["properties"] = vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties
14033	}
14034	return json.Marshal(objectMap)
14035}
14036
14037// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetPublicIPAddressConfiguration struct.
14038func (vmsspiac *VirtualMachineScaleSetPublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
14039	var m map[string]*json.RawMessage
14040	err := json.Unmarshal(body, &m)
14041	if err != nil {
14042		return err
14043	}
14044	for k, v := range m {
14045		switch k {
14046		case "name":
14047			if v != nil {
14048				var name string
14049				err = json.Unmarshal(*v, &name)
14050				if err != nil {
14051					return err
14052				}
14053				vmsspiac.Name = &name
14054			}
14055		case "properties":
14056			if v != nil {
14057				var virtualMachineScaleSetPublicIPAddressConfigurationProperties VirtualMachineScaleSetPublicIPAddressConfigurationProperties
14058				err = json.Unmarshal(*v, &virtualMachineScaleSetPublicIPAddressConfigurationProperties)
14059				if err != nil {
14060					return err
14061				}
14062				vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties = &virtualMachineScaleSetPublicIPAddressConfigurationProperties
14063			}
14064		}
14065	}
14066
14067	return nil
14068}
14069
14070// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets
14071// network configuration's DNS settings.
14072type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct {
14073	// 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
14074	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
14075}
14076
14077// VirtualMachineScaleSetPublicIPAddressConfigurationProperties describes a virtual machines scale set IP
14078// Configuration's PublicIPAddress configuration
14079type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
14080	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
14081	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
14082	// DNSSettings - The dns settings to be applied on the publicIP addresses .
14083	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
14084	// IPTags - The list of IP tags associated with the public IP address.
14085	IPTags *[]VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"`
14086	// PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses.
14087	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
14088	// PublicIPAddressVersion - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
14089	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
14090}
14091
14092// VirtualMachineScaleSetReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
14093type VirtualMachineScaleSetReimageParameters struct {
14094	// 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.
14095	InstanceIds *[]string `json:"instanceIds,omitempty"`
14096	// TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
14097	TempDisk *bool `json:"tempDisk,omitempty"`
14098}
14099
14100// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the
14101// results of a long-running operation.
14102type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
14103	azure.FutureAPI
14104	// Result returns the result of the asynchronous operation.
14105	// If the operation has not completed it will return an error.
14106	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
14107}
14108
14109// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14110func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) UnmarshalJSON(body []byte) error {
14111	var azFuture azure.Future
14112	if err := json.Unmarshal(body, &azFuture); err != nil {
14113		return err
14114	}
14115	future.FutureAPI = &azFuture
14116	future.Result = future.result
14117	return nil
14118}
14119
14120// result is the default implementation for VirtualMachineScaleSetRollingUpgradesCancelFuture.Result.
14121func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
14122	var done bool
14123	done, err = future.DoneWithContext(context.Background(), client)
14124	if err != nil {
14125		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Polling failure")
14126		return
14127	}
14128	if !done {
14129		ar.Response = future.Response()
14130		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
14131		return
14132	}
14133	ar.Response = future.Response()
14134	return
14135}
14136
14137// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and
14138// retrieving the results of a long-running operation.
14139type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct {
14140	azure.FutureAPI
14141	// Result returns the result of the asynchronous operation.
14142	// If the operation has not completed it will return an error.
14143	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
14144}
14145
14146// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14147func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) UnmarshalJSON(body []byte) error {
14148	var azFuture azure.Future
14149	if err := json.Unmarshal(body, &azFuture); err != nil {
14150		return err
14151	}
14152	future.FutureAPI = &azFuture
14153	future.Result = future.result
14154	return nil
14155}
14156
14157// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.Result.
14158func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
14159	var done bool
14160	done, err = future.DoneWithContext(context.Background(), client)
14161	if err != nil {
14162		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture", "Result", future.Response(), "Polling failure")
14163		return
14164	}
14165	if !done {
14166		ar.Response = future.Response()
14167		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture")
14168		return
14169	}
14170	ar.Response = future.Response()
14171	return
14172}
14173
14174// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving
14175// the results of a long-running operation.
14176type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
14177	azure.FutureAPI
14178	// Result returns the result of the asynchronous operation.
14179	// If the operation has not completed it will return an error.
14180	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
14181}
14182
14183// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14184func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) UnmarshalJSON(body []byte) error {
14185	var azFuture azure.Future
14186	if err := json.Unmarshal(body, &azFuture); err != nil {
14187		return err
14188	}
14189	future.FutureAPI = &azFuture
14190	future.Result = future.result
14191	return nil
14192}
14193
14194// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.Result.
14195func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
14196	var done bool
14197	done, err = future.DoneWithContext(context.Background(), client)
14198	if err != nil {
14199		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Polling failure")
14200		return
14201	}
14202	if !done {
14203		ar.Response = future.Response()
14204		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
14205		return
14206	}
14207	ar.Response = future.Response()
14208	return
14209}
14210
14211// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
14212// a long-running operation.
14213type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
14214	azure.FutureAPI
14215	// Result returns the result of the asynchronous operation.
14216	// If the operation has not completed it will return an error.
14217	Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
14218}
14219
14220// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14221func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14222	var azFuture azure.Future
14223	if err := json.Unmarshal(body, &azFuture); err != nil {
14224		return err
14225	}
14226	future.FutureAPI = &azFuture
14227	future.Result = future.result
14228	return nil
14229}
14230
14231// result is the default implementation for VirtualMachineScaleSetsCreateOrUpdateFuture.Result.
14232func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
14233	var done bool
14234	done, err = future.DoneWithContext(context.Background(), client)
14235	if err != nil {
14236		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14237		return
14238	}
14239	if !done {
14240		vmss.Response.Response = future.Response()
14241		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
14242		return
14243	}
14244	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14245	if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
14246		vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
14247		if err != nil {
14248			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
14249		}
14250	}
14251	return
14252}
14253
14254// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a
14255// long-running operation.
14256type VirtualMachineScaleSetsDeallocateFuture struct {
14257	azure.FutureAPI
14258	// Result returns the result of the asynchronous operation.
14259	// If the operation has not completed it will return an error.
14260	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14261}
14262
14263// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14264func (future *VirtualMachineScaleSetsDeallocateFuture) UnmarshalJSON(body []byte) error {
14265	var azFuture azure.Future
14266	if err := json.Unmarshal(body, &azFuture); err != nil {
14267		return err
14268	}
14269	future.FutureAPI = &azFuture
14270	future.Result = future.result
14271	return nil
14272}
14273
14274// result is the default implementation for VirtualMachineScaleSetsDeallocateFuture.Result.
14275func (future *VirtualMachineScaleSetsDeallocateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14276	var done bool
14277	done, err = future.DoneWithContext(context.Background(), client)
14278	if err != nil {
14279		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Polling failure")
14280		return
14281	}
14282	if !done {
14283		ar.Response = future.Response()
14284		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
14285		return
14286	}
14287	ar.Response = future.Response()
14288	return
14289}
14290
14291// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
14292// long-running operation.
14293type VirtualMachineScaleSetsDeleteFuture struct {
14294	azure.FutureAPI
14295	// Result returns the result of the asynchronous operation.
14296	// If the operation has not completed it will return an error.
14297	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14298}
14299
14300// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14301func (future *VirtualMachineScaleSetsDeleteFuture) UnmarshalJSON(body []byte) error {
14302	var azFuture azure.Future
14303	if err := json.Unmarshal(body, &azFuture); err != nil {
14304		return err
14305	}
14306	future.FutureAPI = &azFuture
14307	future.Result = future.result
14308	return nil
14309}
14310
14311// result is the default implementation for VirtualMachineScaleSetsDeleteFuture.Result.
14312func (future *VirtualMachineScaleSetsDeleteFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14313	var done bool
14314	done, err = future.DoneWithContext(context.Background(), client)
14315	if err != nil {
14316		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Polling failure")
14317		return
14318	}
14319	if !done {
14320		ar.Response = future.Response()
14321		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
14322		return
14323	}
14324	ar.Response = future.Response()
14325	return
14326}
14327
14328// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of
14329// a long-running operation.
14330type VirtualMachineScaleSetsDeleteInstancesFuture struct {
14331	azure.FutureAPI
14332	// Result returns the result of the asynchronous operation.
14333	// If the operation has not completed it will return an error.
14334	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14335}
14336
14337// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14338func (future *VirtualMachineScaleSetsDeleteInstancesFuture) UnmarshalJSON(body []byte) error {
14339	var azFuture azure.Future
14340	if err := json.Unmarshal(body, &azFuture); err != nil {
14341		return err
14342	}
14343	future.FutureAPI = &azFuture
14344	future.Result = future.result
14345	return nil
14346}
14347
14348// result is the default implementation for VirtualMachineScaleSetsDeleteInstancesFuture.Result.
14349func (future *VirtualMachineScaleSetsDeleteInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14350	var done bool
14351	done, err = future.DoneWithContext(context.Background(), client)
14352	if err != nil {
14353		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Polling failure")
14354		return
14355	}
14356	if !done {
14357		ar.Response = future.Response()
14358		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
14359		return
14360	}
14361	ar.Response = future.Response()
14362	return
14363}
14364
14365// VirtualMachineScaleSetSku describes an available virtual machine scale set sku.
14366type VirtualMachineScaleSetSku struct {
14367	// ResourceType - READ-ONLY; The type of resource the sku applies to.
14368	ResourceType *string `json:"resourceType,omitempty"`
14369	// Sku - READ-ONLY; The Sku.
14370	Sku *Sku `json:"sku,omitempty"`
14371	// Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
14372	Capacity *VirtualMachineScaleSetSkuCapacity `json:"capacity,omitempty"`
14373}
14374
14375// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSku.
14376func (vmsss VirtualMachineScaleSetSku) MarshalJSON() ([]byte, error) {
14377	objectMap := make(map[string]interface{})
14378	return json.Marshal(objectMap)
14379}
14380
14381// VirtualMachineScaleSetSkuCapacity describes scaling information of a sku.
14382type VirtualMachineScaleSetSkuCapacity struct {
14383	// Minimum - READ-ONLY; The minimum capacity.
14384	Minimum *int64 `json:"minimum,omitempty"`
14385	// Maximum - READ-ONLY; The maximum capacity that can be set.
14386	Maximum *int64 `json:"maximum,omitempty"`
14387	// DefaultCapacity - READ-ONLY; The default capacity.
14388	DefaultCapacity *int64 `json:"defaultCapacity,omitempty"`
14389	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'VirtualMachineScaleSetSkuScaleTypeAutomatic', 'VirtualMachineScaleSetSkuScaleTypeNone'
14390	ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"`
14391}
14392
14393// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSkuCapacity.
14394func (vmsssc VirtualMachineScaleSetSkuCapacity) MarshalJSON() ([]byte, error) {
14395	objectMap := make(map[string]interface{})
14396	return json.Marshal(objectMap)
14397}
14398
14399// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results
14400// of a long-running operation.
14401type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
14402	azure.FutureAPI
14403	// Result returns the result of the asynchronous operation.
14404	// If the operation has not completed it will return an error.
14405	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14406}
14407
14408// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14409func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
14410	var azFuture azure.Future
14411	if err := json.Unmarshal(body, &azFuture); err != nil {
14412		return err
14413	}
14414	future.FutureAPI = &azFuture
14415	future.Result = future.result
14416	return nil
14417}
14418
14419// result is the default implementation for VirtualMachineScaleSetsPerformMaintenanceFuture.Result.
14420func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14421	var done bool
14422	done, err = future.DoneWithContext(context.Background(), client)
14423	if err != nil {
14424		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
14425		return
14426	}
14427	if !done {
14428		ar.Response = future.Response()
14429		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
14430		return
14431	}
14432	ar.Response = future.Response()
14433	return
14434}
14435
14436// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a
14437// long-running operation.
14438type VirtualMachineScaleSetsPowerOffFuture struct {
14439	azure.FutureAPI
14440	// Result returns the result of the asynchronous operation.
14441	// If the operation has not completed it will return an error.
14442	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14443}
14444
14445// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14446func (future *VirtualMachineScaleSetsPowerOffFuture) UnmarshalJSON(body []byte) error {
14447	var azFuture azure.Future
14448	if err := json.Unmarshal(body, &azFuture); err != nil {
14449		return err
14450	}
14451	future.FutureAPI = &azFuture
14452	future.Result = future.result
14453	return nil
14454}
14455
14456// result is the default implementation for VirtualMachineScaleSetsPowerOffFuture.Result.
14457func (future *VirtualMachineScaleSetsPowerOffFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14458	var done bool
14459	done, err = future.DoneWithContext(context.Background(), client)
14460	if err != nil {
14461		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Polling failure")
14462		return
14463	}
14464	if !done {
14465		ar.Response = future.Response()
14466		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
14467		return
14468	}
14469	ar.Response = future.Response()
14470	return
14471}
14472
14473// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a
14474// long-running operation.
14475type VirtualMachineScaleSetsRedeployFuture struct {
14476	azure.FutureAPI
14477	// Result returns the result of the asynchronous operation.
14478	// If the operation has not completed it will return an error.
14479	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14480}
14481
14482// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14483func (future *VirtualMachineScaleSetsRedeployFuture) UnmarshalJSON(body []byte) error {
14484	var azFuture azure.Future
14485	if err := json.Unmarshal(body, &azFuture); err != nil {
14486		return err
14487	}
14488	future.FutureAPI = &azFuture
14489	future.Result = future.result
14490	return nil
14491}
14492
14493// result is the default implementation for VirtualMachineScaleSetsRedeployFuture.Result.
14494func (future *VirtualMachineScaleSetsRedeployFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14495	var done bool
14496	done, err = future.DoneWithContext(context.Background(), client)
14497	if err != nil {
14498		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Polling failure")
14499		return
14500	}
14501	if !done {
14502		ar.Response = future.Response()
14503		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
14504		return
14505	}
14506	ar.Response = future.Response()
14507	return
14508}
14509
14510// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a
14511// long-running operation.
14512type VirtualMachineScaleSetsReimageAllFuture struct {
14513	azure.FutureAPI
14514	// Result returns the result of the asynchronous operation.
14515	// If the operation has not completed it will return an error.
14516	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14517}
14518
14519// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14520func (future *VirtualMachineScaleSetsReimageAllFuture) UnmarshalJSON(body []byte) error {
14521	var azFuture azure.Future
14522	if err := json.Unmarshal(body, &azFuture); err != nil {
14523		return err
14524	}
14525	future.FutureAPI = &azFuture
14526	future.Result = future.result
14527	return nil
14528}
14529
14530// result is the default implementation for VirtualMachineScaleSetsReimageAllFuture.Result.
14531func (future *VirtualMachineScaleSetsReimageAllFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14532	var done bool
14533	done, err = future.DoneWithContext(context.Background(), client)
14534	if err != nil {
14535		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Polling failure")
14536		return
14537	}
14538	if !done {
14539		ar.Response = future.Response()
14540		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
14541		return
14542	}
14543	ar.Response = future.Response()
14544	return
14545}
14546
14547// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a
14548// long-running operation.
14549type VirtualMachineScaleSetsReimageFuture struct {
14550	azure.FutureAPI
14551	// Result returns the result of the asynchronous operation.
14552	// If the operation has not completed it will return an error.
14553	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14554}
14555
14556// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14557func (future *VirtualMachineScaleSetsReimageFuture) UnmarshalJSON(body []byte) error {
14558	var azFuture azure.Future
14559	if err := json.Unmarshal(body, &azFuture); err != nil {
14560		return err
14561	}
14562	future.FutureAPI = &azFuture
14563	future.Result = future.result
14564	return nil
14565}
14566
14567// result is the default implementation for VirtualMachineScaleSetsReimageFuture.Result.
14568func (future *VirtualMachineScaleSetsReimageFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14569	var done bool
14570	done, err = future.DoneWithContext(context.Background(), client)
14571	if err != nil {
14572		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Polling failure")
14573		return
14574	}
14575	if !done {
14576		ar.Response = future.Response()
14577		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
14578		return
14579	}
14580	ar.Response = future.Response()
14581	return
14582}
14583
14584// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a
14585// long-running operation.
14586type VirtualMachineScaleSetsRestartFuture struct {
14587	azure.FutureAPI
14588	// Result returns the result of the asynchronous operation.
14589	// If the operation has not completed it will return an error.
14590	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14591}
14592
14593// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14594func (future *VirtualMachineScaleSetsRestartFuture) UnmarshalJSON(body []byte) error {
14595	var azFuture azure.Future
14596	if err := json.Unmarshal(body, &azFuture); err != nil {
14597		return err
14598	}
14599	future.FutureAPI = &azFuture
14600	future.Result = future.result
14601	return nil
14602}
14603
14604// result is the default implementation for VirtualMachineScaleSetsRestartFuture.Result.
14605func (future *VirtualMachineScaleSetsRestartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14606	var done bool
14607	done, err = future.DoneWithContext(context.Background(), client)
14608	if err != nil {
14609		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Polling failure")
14610		return
14611	}
14612	if !done {
14613		ar.Response = future.Response()
14614		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
14615		return
14616	}
14617	ar.Response = future.Response()
14618	return
14619}
14620
14621// VirtualMachineScaleSetsSetOrchestrationServiceStateFuture an abstraction for monitoring and retrieving
14622// the results of a long-running operation.
14623type VirtualMachineScaleSetsSetOrchestrationServiceStateFuture struct {
14624	azure.FutureAPI
14625	// Result returns the result of the asynchronous operation.
14626	// If the operation has not completed it will return an error.
14627	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14628}
14629
14630// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14631func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) UnmarshalJSON(body []byte) error {
14632	var azFuture azure.Future
14633	if err := json.Unmarshal(body, &azFuture); err != nil {
14634		return err
14635	}
14636	future.FutureAPI = &azFuture
14637	future.Result = future.result
14638	return nil
14639}
14640
14641// result is the default implementation for VirtualMachineScaleSetsSetOrchestrationServiceStateFuture.Result.
14642func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14643	var done bool
14644	done, err = future.DoneWithContext(context.Background(), client)
14645	if err != nil {
14646		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture", "Result", future.Response(), "Polling failure")
14647		return
14648	}
14649	if !done {
14650		ar.Response = future.Response()
14651		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture")
14652		return
14653	}
14654	ar.Response = future.Response()
14655	return
14656}
14657
14658// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a
14659// long-running operation.
14660type VirtualMachineScaleSetsStartFuture struct {
14661	azure.FutureAPI
14662	// Result returns the result of the asynchronous operation.
14663	// If the operation has not completed it will return an error.
14664	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14665}
14666
14667// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14668func (future *VirtualMachineScaleSetsStartFuture) UnmarshalJSON(body []byte) error {
14669	var azFuture azure.Future
14670	if err := json.Unmarshal(body, &azFuture); err != nil {
14671		return err
14672	}
14673	future.FutureAPI = &azFuture
14674	future.Result = future.result
14675	return nil
14676}
14677
14678// result is the default implementation for VirtualMachineScaleSetsStartFuture.Result.
14679func (future *VirtualMachineScaleSetsStartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14680	var done bool
14681	done, err = future.DoneWithContext(context.Background(), client)
14682	if err != nil {
14683		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Polling failure")
14684		return
14685	}
14686	if !done {
14687		ar.Response = future.Response()
14688		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
14689		return
14690	}
14691	ar.Response = future.Response()
14692	return
14693}
14694
14695// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile.
14696type VirtualMachineScaleSetStorageProfile struct {
14697	// 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.
14698	ImageReference *ImageReference `json:"imageReference,omitempty"`
14699	// 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).
14700	OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"`
14701	// 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).
14702	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
14703}
14704
14705// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
14706// long-running operation.
14707type VirtualMachineScaleSetsUpdateFuture struct {
14708	azure.FutureAPI
14709	// Result returns the result of the asynchronous operation.
14710	// If the operation has not completed it will return an error.
14711	Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
14712}
14713
14714// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14715func (future *VirtualMachineScaleSetsUpdateFuture) UnmarshalJSON(body []byte) error {
14716	var azFuture azure.Future
14717	if err := json.Unmarshal(body, &azFuture); err != nil {
14718		return err
14719	}
14720	future.FutureAPI = &azFuture
14721	future.Result = future.result
14722	return nil
14723}
14724
14725// result is the default implementation for VirtualMachineScaleSetsUpdateFuture.Result.
14726func (future *VirtualMachineScaleSetsUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
14727	var done bool
14728	done, err = future.DoneWithContext(context.Background(), client)
14729	if err != nil {
14730		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Polling failure")
14731		return
14732	}
14733	if !done {
14734		vmss.Response.Response = future.Response()
14735		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
14736		return
14737	}
14738	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14739	if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
14740		vmss, err = client.UpdateResponder(vmss.Response.Response)
14741		if err != nil {
14742			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
14743		}
14744	}
14745	return
14746}
14747
14748// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of
14749// a long-running operation.
14750type VirtualMachineScaleSetsUpdateInstancesFuture struct {
14751	azure.FutureAPI
14752	// Result returns the result of the asynchronous operation.
14753	// If the operation has not completed it will return an error.
14754	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14755}
14756
14757// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14758func (future *VirtualMachineScaleSetsUpdateInstancesFuture) UnmarshalJSON(body []byte) error {
14759	var azFuture azure.Future
14760	if err := json.Unmarshal(body, &azFuture); err != nil {
14761		return err
14762	}
14763	future.FutureAPI = &azFuture
14764	future.Result = future.result
14765	return nil
14766}
14767
14768// result is the default implementation for VirtualMachineScaleSetsUpdateInstancesFuture.Result.
14769func (future *VirtualMachineScaleSetsUpdateInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
14770	var done bool
14771	done, err = future.DoneWithContext(context.Background(), client)
14772	if err != nil {
14773		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Polling failure")
14774		return
14775	}
14776	if !done {
14777		ar.Response = future.Response()
14778		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
14779		return
14780	}
14781	ar.Response = future.Response()
14782	return
14783}
14784
14785// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set.
14786type VirtualMachineScaleSetUpdate struct {
14787	// Sku - The virtual machine scale set sku.
14788	Sku *Sku `json:"sku,omitempty"`
14789	// Plan - The purchase plan when deploying a virtual machine scale set from VM Marketplace images.
14790	Plan                                    *Plan `json:"plan,omitempty"`
14791	*VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"`
14792	// Identity - The identity of the virtual machine scale set, if configured.
14793	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
14794	// Tags - Resource tags
14795	Tags map[string]*string `json:"tags"`
14796}
14797
14798// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate.
14799func (vmssu VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) {
14800	objectMap := make(map[string]interface{})
14801	if vmssu.Sku != nil {
14802		objectMap["sku"] = vmssu.Sku
14803	}
14804	if vmssu.Plan != nil {
14805		objectMap["plan"] = vmssu.Plan
14806	}
14807	if vmssu.VirtualMachineScaleSetUpdateProperties != nil {
14808		objectMap["properties"] = vmssu.VirtualMachineScaleSetUpdateProperties
14809	}
14810	if vmssu.Identity != nil {
14811		objectMap["identity"] = vmssu.Identity
14812	}
14813	if vmssu.Tags != nil {
14814		objectMap["tags"] = vmssu.Tags
14815	}
14816	return json.Marshal(objectMap)
14817}
14818
14819// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdate struct.
14820func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error {
14821	var m map[string]*json.RawMessage
14822	err := json.Unmarshal(body, &m)
14823	if err != nil {
14824		return err
14825	}
14826	for k, v := range m {
14827		switch k {
14828		case "sku":
14829			if v != nil {
14830				var sku Sku
14831				err = json.Unmarshal(*v, &sku)
14832				if err != nil {
14833					return err
14834				}
14835				vmssu.Sku = &sku
14836			}
14837		case "plan":
14838			if v != nil {
14839				var plan Plan
14840				err = json.Unmarshal(*v, &plan)
14841				if err != nil {
14842					return err
14843				}
14844				vmssu.Plan = &plan
14845			}
14846		case "properties":
14847			if v != nil {
14848				var virtualMachineScaleSetUpdateProperties VirtualMachineScaleSetUpdateProperties
14849				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateProperties)
14850				if err != nil {
14851					return err
14852				}
14853				vmssu.VirtualMachineScaleSetUpdateProperties = &virtualMachineScaleSetUpdateProperties
14854			}
14855		case "identity":
14856			if v != nil {
14857				var identity VirtualMachineScaleSetIdentity
14858				err = json.Unmarshal(*v, &identity)
14859				if err != nil {
14860					return err
14861				}
14862				vmssu.Identity = &identity
14863			}
14864		case "tags":
14865			if v != nil {
14866				var tags map[string]*string
14867				err = json.Unmarshal(*v, &tags)
14868				if err != nil {
14869					return err
14870				}
14871				vmssu.Tags = tags
14872			}
14873		}
14874	}
14875
14876	return nil
14877}
14878
14879// VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP
14880// configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the
14881// new subnet are in the same virtual network
14882type VirtualMachineScaleSetUpdateIPConfiguration struct {
14883	// Name - The IP configuration name.
14884	Name                                                   *string `json:"name,omitempty"`
14885	*VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"`
14886	// ID - Resource Id
14887	ID *string `json:"id,omitempty"`
14888}
14889
14890// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateIPConfiguration.
14891func (vmssuic VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) {
14892	objectMap := make(map[string]interface{})
14893	if vmssuic.Name != nil {
14894		objectMap["name"] = vmssuic.Name
14895	}
14896	if vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties != nil {
14897		objectMap["properties"] = vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties
14898	}
14899	if vmssuic.ID != nil {
14900		objectMap["id"] = vmssuic.ID
14901	}
14902	return json.Marshal(objectMap)
14903}
14904
14905// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateIPConfiguration struct.
14906func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body []byte) error {
14907	var m map[string]*json.RawMessage
14908	err := json.Unmarshal(body, &m)
14909	if err != nil {
14910		return err
14911	}
14912	for k, v := range m {
14913		switch k {
14914		case "name":
14915			if v != nil {
14916				var name string
14917				err = json.Unmarshal(*v, &name)
14918				if err != nil {
14919					return err
14920				}
14921				vmssuic.Name = &name
14922			}
14923		case "properties":
14924			if v != nil {
14925				var virtualMachineScaleSetUpdateIPConfigurationProperties VirtualMachineScaleSetUpdateIPConfigurationProperties
14926				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateIPConfigurationProperties)
14927				if err != nil {
14928					return err
14929				}
14930				vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties = &virtualMachineScaleSetUpdateIPConfigurationProperties
14931			}
14932		case "id":
14933			if v != nil {
14934				var ID string
14935				err = json.Unmarshal(*v, &ID)
14936				if err != nil {
14937					return err
14938				}
14939				vmssuic.ID = &ID
14940			}
14941		}
14942	}
14943
14944	return nil
14945}
14946
14947// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network
14948// profile's IP configuration properties.
14949type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
14950	// Subnet - The subnet.
14951	Subnet *APIEntityReference `json:"subnet,omitempty"`
14952	// Primary - Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.
14953	Primary *bool `json:"primary,omitempty"`
14954	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
14955	PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
14956	// 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'
14957	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
14958	// ApplicationGatewayBackendAddressPools - The application gateway backend address pools.
14959	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
14960	// ApplicationSecurityGroups - Specifies an array of references to application security group.
14961	ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
14962	// LoadBalancerBackendAddressPools - The load balancer backend address pools.
14963	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
14964	// LoadBalancerInboundNatPools - The load balancer inbound nat pools.
14965	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
14966}
14967
14968// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's
14969// network configurations.
14970type VirtualMachineScaleSetUpdateNetworkConfiguration struct {
14971	// Name - The network configuration name.
14972	Name                                                        *string `json:"name,omitempty"`
14973	*VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"`
14974	// ID - Resource Id
14975	ID *string `json:"id,omitempty"`
14976}
14977
14978// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateNetworkConfiguration.
14979func (vmssunc VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) {
14980	objectMap := make(map[string]interface{})
14981	if vmssunc.Name != nil {
14982		objectMap["name"] = vmssunc.Name
14983	}
14984	if vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties != nil {
14985		objectMap["properties"] = vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties
14986	}
14987	if vmssunc.ID != nil {
14988		objectMap["id"] = vmssunc.ID
14989	}
14990	return json.Marshal(objectMap)
14991}
14992
14993// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateNetworkConfiguration struct.
14994func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(body []byte) error {
14995	var m map[string]*json.RawMessage
14996	err := json.Unmarshal(body, &m)
14997	if err != nil {
14998		return err
14999	}
15000	for k, v := range m {
15001		switch k {
15002		case "name":
15003			if v != nil {
15004				var name string
15005				err = json.Unmarshal(*v, &name)
15006				if err != nil {
15007					return err
15008				}
15009				vmssunc.Name = &name
15010			}
15011		case "properties":
15012			if v != nil {
15013				var virtualMachineScaleSetUpdateNetworkConfigurationProperties VirtualMachineScaleSetUpdateNetworkConfigurationProperties
15014				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateNetworkConfigurationProperties)
15015				if err != nil {
15016					return err
15017				}
15018				vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties = &virtualMachineScaleSetUpdateNetworkConfigurationProperties
15019			}
15020		case "id":
15021			if v != nil {
15022				var ID string
15023				err = json.Unmarshal(*v, &ID)
15024				if err != nil {
15025					return err
15026				}
15027				vmssunc.ID = &ID
15028			}
15029		}
15030	}
15031
15032	return nil
15033}
15034
15035// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set
15036// updatable network profile's IP configuration.Use this object for updating network profile's IP
15037// Configuration.
15038type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct {
15039	// Primary - Whether this is a primary NIC on a virtual machine.
15040	Primary *bool `json:"primary,omitempty"`
15041	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
15042	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
15043	// NetworkSecurityGroup - The network security group.
15044	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
15045	// DNSSettings - The dns settings to be applied on the network interfaces.
15046	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
15047	// IPConfigurations - The virtual machine scale set IP Configuration.
15048	IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"`
15049	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
15050	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
15051}
15052
15053// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile.
15054type VirtualMachineScaleSetUpdateNetworkProfile struct {
15055	// 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}'.
15056	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
15057	// NetworkInterfaceConfigurations - The list of network configurations.
15058	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
15059}
15060
15061// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update
15062// Object. This should be used for Updating VMSS OS Disk.
15063type VirtualMachineScaleSetUpdateOSDisk struct {
15064	// Caching - The caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
15065	Caching CachingTypes `json:"caching,omitempty"`
15066	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
15067	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
15068	// DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
15069	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
15070	// 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.
15071	Image *VirtualHardDisk `json:"image,omitempty"`
15072	// VhdContainers - The list of virtual hard disk container uris.
15073	VhdContainers *[]string `json:"vhdContainers,omitempty"`
15074	// ManagedDisk - The managed disk parameters.
15075	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
15076}
15077
15078// VirtualMachineScaleSetUpdateOSProfile describes a virtual machine scale set OS profile.
15079type VirtualMachineScaleSetUpdateOSProfile struct {
15080	// CustomData - A base-64 encoded string of custom data.
15081	CustomData *string `json:"customData,omitempty"`
15082	// WindowsConfiguration - The Windows Configuration of the OS profile.
15083	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
15084	// LinuxConfiguration - The Linux Configuration of the OS profile.
15085	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
15086	// Secrets - The List of certificates for addition to the VM.
15087	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
15088}
15089
15090// VirtualMachineScaleSetUpdateProperties describes the properties of a Virtual Machine Scale Set.
15091type VirtualMachineScaleSetUpdateProperties struct {
15092	// UpgradePolicy - The upgrade policy.
15093	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
15094	// AutomaticRepairsPolicy - Policy for automatic repairs.
15095	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
15096	// VirtualMachineProfile - The virtual machine profile.
15097	VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"`
15098	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
15099	Overprovision *bool `json:"overprovision,omitempty"`
15100	// DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
15101	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
15102	// SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
15103	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
15104	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
15105	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
15106	// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
15107	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
15108	// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. <br><br>Minimum api-version: 2018-04-01.
15109	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
15110}
15111
15112// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP
15113// Configuration's PublicIPAddress configuration
15114type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct {
15115	// Name - The publicIP address configuration name.
15116	Name                                                                *string `json:"name,omitempty"`
15117	*VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"`
15118}
15119
15120// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.
15121func (vmssupiac VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
15122	objectMap := make(map[string]interface{})
15123	if vmssupiac.Name != nil {
15124		objectMap["name"] = vmssupiac.Name
15125	}
15126	if vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties != nil {
15127		objectMap["properties"] = vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
15128	}
15129	return json.Marshal(objectMap)
15130}
15131
15132// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct.
15133func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
15134	var m map[string]*json.RawMessage
15135	err := json.Unmarshal(body, &m)
15136	if err != nil {
15137		return err
15138	}
15139	for k, v := range m {
15140		switch k {
15141		case "name":
15142			if v != nil {
15143				var name string
15144				err = json.Unmarshal(*v, &name)
15145				if err != nil {
15146					return err
15147				}
15148				vmssupiac.Name = &name
15149			}
15150		case "properties":
15151			if v != nil {
15152				var virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
15153				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties)
15154				if err != nil {
15155					return err
15156				}
15157				vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
15158			}
15159		}
15160	}
15161
15162	return nil
15163}
15164
15165// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale
15166// set IP Configuration's PublicIPAddress configuration
15167type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct {
15168	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
15169	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
15170	// DNSSettings - The dns settings to be applied on the publicIP addresses .
15171	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
15172}
15173
15174// VirtualMachineScaleSetUpdateStorageProfile describes a virtual machine scale set storage profile.
15175type VirtualMachineScaleSetUpdateStorageProfile struct {
15176	// ImageReference - The image reference.
15177	ImageReference *ImageReference `json:"imageReference,omitempty"`
15178	// OsDisk - The OS disk.
15179	OsDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"`
15180	// DataDisks - The data disks.
15181	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
15182}
15183
15184// VirtualMachineScaleSetUpdateVMProfile describes a virtual machine scale set virtual machine profile.
15185type VirtualMachineScaleSetUpdateVMProfile struct {
15186	// OsProfile - The virtual machine scale set OS profile.
15187	OsProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"`
15188	// StorageProfile - The virtual machine scale set storage profile.
15189	StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"`
15190	// NetworkProfile - The virtual machine scale set network profile.
15191	NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"`
15192	// SecurityProfile - The virtual machine scale set Security profile
15193	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
15194	// DiagnosticsProfile - The virtual machine scale set diagnostics profile.
15195	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
15196	// ExtensionProfile - The virtual machine scale set extension profile.
15197	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
15198	// LicenseType - The license type, which is for bring your own license scenario.
15199	LicenseType *string `json:"licenseType,omitempty"`
15200	// BillingProfile - Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01.
15201	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
15202	// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
15203	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
15204}
15205
15206// VirtualMachineScaleSetVM describes a virtual machine scale set virtual machine.
15207type VirtualMachineScaleSetVM struct {
15208	autorest.Response `json:"-"`
15209	// InstanceID - READ-ONLY; The virtual machine instance ID.
15210	InstanceID *string `json:"instanceId,omitempty"`
15211	// Sku - READ-ONLY; The virtual machine SKU.
15212	Sku                                 *Sku `json:"sku,omitempty"`
15213	*VirtualMachineScaleSetVMProperties `json:"properties,omitempty"`
15214	// 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**.
15215	Plan *Plan `json:"plan,omitempty"`
15216	// Resources - READ-ONLY; The virtual machine child extension resources.
15217	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
15218	// Zones - READ-ONLY; The virtual machine zones.
15219	Zones *[]string `json:"zones,omitempty"`
15220	// ID - READ-ONLY; Resource Id
15221	ID *string `json:"id,omitempty"`
15222	// Name - READ-ONLY; Resource name
15223	Name *string `json:"name,omitempty"`
15224	// Type - READ-ONLY; Resource type
15225	Type *string `json:"type,omitempty"`
15226	// Location - Resource location
15227	Location *string `json:"location,omitempty"`
15228	// Tags - Resource tags
15229	Tags map[string]*string `json:"tags"`
15230}
15231
15232// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVM.
15233func (vmssv VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) {
15234	objectMap := make(map[string]interface{})
15235	if vmssv.VirtualMachineScaleSetVMProperties != nil {
15236		objectMap["properties"] = vmssv.VirtualMachineScaleSetVMProperties
15237	}
15238	if vmssv.Plan != nil {
15239		objectMap["plan"] = vmssv.Plan
15240	}
15241	if vmssv.Location != nil {
15242		objectMap["location"] = vmssv.Location
15243	}
15244	if vmssv.Tags != nil {
15245		objectMap["tags"] = vmssv.Tags
15246	}
15247	return json.Marshal(objectMap)
15248}
15249
15250// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVM struct.
15251func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error {
15252	var m map[string]*json.RawMessage
15253	err := json.Unmarshal(body, &m)
15254	if err != nil {
15255		return err
15256	}
15257	for k, v := range m {
15258		switch k {
15259		case "instanceId":
15260			if v != nil {
15261				var instanceID string
15262				err = json.Unmarshal(*v, &instanceID)
15263				if err != nil {
15264					return err
15265				}
15266				vmssv.InstanceID = &instanceID
15267			}
15268		case "sku":
15269			if v != nil {
15270				var sku Sku
15271				err = json.Unmarshal(*v, &sku)
15272				if err != nil {
15273					return err
15274				}
15275				vmssv.Sku = &sku
15276			}
15277		case "properties":
15278			if v != nil {
15279				var virtualMachineScaleSetVMProperties VirtualMachineScaleSetVMProperties
15280				err = json.Unmarshal(*v, &virtualMachineScaleSetVMProperties)
15281				if err != nil {
15282					return err
15283				}
15284				vmssv.VirtualMachineScaleSetVMProperties = &virtualMachineScaleSetVMProperties
15285			}
15286		case "plan":
15287			if v != nil {
15288				var plan Plan
15289				err = json.Unmarshal(*v, &plan)
15290				if err != nil {
15291					return err
15292				}
15293				vmssv.Plan = &plan
15294			}
15295		case "resources":
15296			if v != nil {
15297				var resources []VirtualMachineExtension
15298				err = json.Unmarshal(*v, &resources)
15299				if err != nil {
15300					return err
15301				}
15302				vmssv.Resources = &resources
15303			}
15304		case "zones":
15305			if v != nil {
15306				var zones []string
15307				err = json.Unmarshal(*v, &zones)
15308				if err != nil {
15309					return err
15310				}
15311				vmssv.Zones = &zones
15312			}
15313		case "id":
15314			if v != nil {
15315				var ID string
15316				err = json.Unmarshal(*v, &ID)
15317				if err != nil {
15318					return err
15319				}
15320				vmssv.ID = &ID
15321			}
15322		case "name":
15323			if v != nil {
15324				var name string
15325				err = json.Unmarshal(*v, &name)
15326				if err != nil {
15327					return err
15328				}
15329				vmssv.Name = &name
15330			}
15331		case "type":
15332			if v != nil {
15333				var typeVar string
15334				err = json.Unmarshal(*v, &typeVar)
15335				if err != nil {
15336					return err
15337				}
15338				vmssv.Type = &typeVar
15339			}
15340		case "location":
15341			if v != nil {
15342				var location string
15343				err = json.Unmarshal(*v, &location)
15344				if err != nil {
15345					return err
15346				}
15347				vmssv.Location = &location
15348			}
15349		case "tags":
15350			if v != nil {
15351				var tags map[string]*string
15352				err = json.Unmarshal(*v, &tags)
15353				if err != nil {
15354					return err
15355				}
15356				vmssv.Tags = tags
15357			}
15358		}
15359	}
15360
15361	return nil
15362}
15363
15364// VirtualMachineScaleSetVMExtension describes a VMSS VM Extension.
15365type VirtualMachineScaleSetVMExtension struct {
15366	autorest.Response `json:"-"`
15367	// Name - READ-ONLY; The name of the extension.
15368	Name *string `json:"name,omitempty"`
15369	// Type - READ-ONLY; Resource type
15370	Type                               *string `json:"type,omitempty"`
15371	*VirtualMachineExtensionProperties `json:"properties,omitempty"`
15372	// ID - READ-ONLY; Resource Id
15373	ID *string `json:"id,omitempty"`
15374}
15375
15376// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtension.
15377func (vmssve VirtualMachineScaleSetVMExtension) MarshalJSON() ([]byte, error) {
15378	objectMap := make(map[string]interface{})
15379	if vmssve.VirtualMachineExtensionProperties != nil {
15380		objectMap["properties"] = vmssve.VirtualMachineExtensionProperties
15381	}
15382	return json.Marshal(objectMap)
15383}
15384
15385// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtension struct.
15386func (vmssve *VirtualMachineScaleSetVMExtension) UnmarshalJSON(body []byte) error {
15387	var m map[string]*json.RawMessage
15388	err := json.Unmarshal(body, &m)
15389	if err != nil {
15390		return err
15391	}
15392	for k, v := range m {
15393		switch k {
15394		case "name":
15395			if v != nil {
15396				var name string
15397				err = json.Unmarshal(*v, &name)
15398				if err != nil {
15399					return err
15400				}
15401				vmssve.Name = &name
15402			}
15403		case "type":
15404			if v != nil {
15405				var typeVar string
15406				err = json.Unmarshal(*v, &typeVar)
15407				if err != nil {
15408					return err
15409				}
15410				vmssve.Type = &typeVar
15411			}
15412		case "properties":
15413			if v != nil {
15414				var virtualMachineExtensionProperties VirtualMachineExtensionProperties
15415				err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
15416				if err != nil {
15417					return err
15418				}
15419				vmssve.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
15420			}
15421		case "id":
15422			if v != nil {
15423				var ID string
15424				err = json.Unmarshal(*v, &ID)
15425				if err != nil {
15426					return err
15427				}
15428				vmssve.ID = &ID
15429			}
15430		}
15431	}
15432
15433	return nil
15434}
15435
15436// VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
15437// results of a long-running operation.
15438type VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture struct {
15439	azure.FutureAPI
15440	// Result returns the result of the asynchronous operation.
15441	// If the operation has not completed it will return an error.
15442	Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error)
15443}
15444
15445// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15446func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15447	var azFuture azure.Future
15448	if err := json.Unmarshal(body, &azFuture); err != nil {
15449		return err
15450	}
15451	future.FutureAPI = &azFuture
15452	future.Result = future.result
15453	return nil
15454}
15455
15456// result is the default implementation for VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.Result.
15457func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) {
15458	var done bool
15459	done, err = future.DoneWithContext(context.Background(), client)
15460	if err != nil {
15461		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15462		return
15463	}
15464	if !done {
15465		vmssve.Response.Response = future.Response()
15466		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture")
15467		return
15468	}
15469	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15470	if vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent {
15471		vmssve, err = client.CreateOrUpdateResponder(vmssve.Response.Response)
15472		if err != nil {
15473			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request")
15474		}
15475	}
15476	return
15477}
15478
15479// VirtualMachineScaleSetVMExtensionsDeleteFuture an abstraction for monitoring and retrieving the results
15480// of a long-running operation.
15481type VirtualMachineScaleSetVMExtensionsDeleteFuture struct {
15482	azure.FutureAPI
15483	// Result returns the result of the asynchronous operation.
15484	// If the operation has not completed it will return an error.
15485	Result func(VirtualMachineScaleSetVMExtensionsClient) (autorest.Response, error)
15486}
15487
15488// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15489func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
15490	var azFuture azure.Future
15491	if err := json.Unmarshal(body, &azFuture); err != nil {
15492		return err
15493	}
15494	future.FutureAPI = &azFuture
15495	future.Result = future.result
15496	return nil
15497}
15498
15499// result is the default implementation for VirtualMachineScaleSetVMExtensionsDeleteFuture.Result.
15500func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (ar autorest.Response, err error) {
15501	var done bool
15502	done, err = future.DoneWithContext(context.Background(), client)
15503	if err != nil {
15504		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
15505		return
15506	}
15507	if !done {
15508		ar.Response = future.Response()
15509		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsDeleteFuture")
15510		return
15511	}
15512	ar.Response = future.Response()
15513	return
15514}
15515
15516// VirtualMachineScaleSetVMExtensionsListResult the List VMSS VM Extension operation response
15517type VirtualMachineScaleSetVMExtensionsListResult struct {
15518	autorest.Response `json:"-"`
15519	// Value - The list of VMSS VM extensions
15520	Value *[]VirtualMachineScaleSetVMExtension `json:"value,omitempty"`
15521}
15522
15523// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine
15524// scale set.
15525type VirtualMachineScaleSetVMExtensionsSummary struct {
15526	// Name - READ-ONLY; The extension name.
15527	Name *string `json:"name,omitempty"`
15528	// StatusesSummary - READ-ONLY; The extensions information.
15529	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
15530}
15531
15532// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionsSummary.
15533func (vmssves VirtualMachineScaleSetVMExtensionsSummary) MarshalJSON() ([]byte, error) {
15534	objectMap := make(map[string]interface{})
15535	return json.Marshal(objectMap)
15536}
15537
15538// VirtualMachineScaleSetVMExtensionsUpdateFuture an abstraction for monitoring and retrieving the results
15539// of a long-running operation.
15540type VirtualMachineScaleSetVMExtensionsUpdateFuture struct {
15541	azure.FutureAPI
15542	// Result returns the result of the asynchronous operation.
15543	// If the operation has not completed it will return an error.
15544	Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error)
15545}
15546
15547// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15548func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
15549	var azFuture azure.Future
15550	if err := json.Unmarshal(body, &azFuture); err != nil {
15551		return err
15552	}
15553	future.FutureAPI = &azFuture
15554	future.Result = future.result
15555	return nil
15556}
15557
15558// result is the default implementation for VirtualMachineScaleSetVMExtensionsUpdateFuture.Result.
15559func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) {
15560	var done bool
15561	done, err = future.DoneWithContext(context.Background(), client)
15562	if err != nil {
15563		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
15564		return
15565	}
15566	if !done {
15567		vmssve.Response.Response = future.Response()
15568		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsUpdateFuture")
15569		return
15570	}
15571	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15572	if vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent {
15573		vmssve, err = client.UpdateResponder(vmssve.Response.Response)
15574		if err != nil {
15575			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request")
15576		}
15577	}
15578	return
15579}
15580
15581// VirtualMachineScaleSetVMExtensionUpdate describes a VMSS VM Extension.
15582type VirtualMachineScaleSetVMExtensionUpdate struct {
15583	// Name - READ-ONLY; The name of the extension.
15584	Name *string `json:"name,omitempty"`
15585	// Type - READ-ONLY; Resource type
15586	Type                                     *string `json:"type,omitempty"`
15587	*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
15588	// ID - READ-ONLY; Resource Id
15589	ID *string `json:"id,omitempty"`
15590}
15591
15592// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionUpdate.
15593func (vmssveu VirtualMachineScaleSetVMExtensionUpdate) MarshalJSON() ([]byte, error) {
15594	objectMap := make(map[string]interface{})
15595	if vmssveu.VirtualMachineExtensionUpdateProperties != nil {
15596		objectMap["properties"] = vmssveu.VirtualMachineExtensionUpdateProperties
15597	}
15598	return json.Marshal(objectMap)
15599}
15600
15601// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtensionUpdate struct.
15602func (vmssveu *VirtualMachineScaleSetVMExtensionUpdate) UnmarshalJSON(body []byte) error {
15603	var m map[string]*json.RawMessage
15604	err := json.Unmarshal(body, &m)
15605	if err != nil {
15606		return err
15607	}
15608	for k, v := range m {
15609		switch k {
15610		case "name":
15611			if v != nil {
15612				var name string
15613				err = json.Unmarshal(*v, &name)
15614				if err != nil {
15615					return err
15616				}
15617				vmssveu.Name = &name
15618			}
15619		case "type":
15620			if v != nil {
15621				var typeVar string
15622				err = json.Unmarshal(*v, &typeVar)
15623				if err != nil {
15624					return err
15625				}
15626				vmssveu.Type = &typeVar
15627			}
15628		case "properties":
15629			if v != nil {
15630				var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
15631				err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
15632				if err != nil {
15633					return err
15634				}
15635				vmssveu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
15636			}
15637		case "id":
15638			if v != nil {
15639				var ID string
15640				err = json.Unmarshal(*v, &ID)
15641				if err != nil {
15642					return err
15643				}
15644				vmssveu.ID = &ID
15645			}
15646		}
15647	}
15648
15649	return nil
15650}
15651
15652// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale
15653// set.
15654type VirtualMachineScaleSetVMInstanceIDs struct {
15655	// 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.
15656	InstanceIds *[]string `json:"instanceIds,omitempty"`
15657}
15658
15659// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM
15660// scale set.
15661type VirtualMachineScaleSetVMInstanceRequiredIDs struct {
15662	// InstanceIds - The virtual machine scale set instance ids.
15663	InstanceIds *[]string `json:"instanceIds,omitempty"`
15664}
15665
15666// VirtualMachineScaleSetVMInstanceView the instance view of a virtual machine scale set VM.
15667type VirtualMachineScaleSetVMInstanceView struct {
15668	autorest.Response `json:"-"`
15669	// PlatformUpdateDomain - The Update Domain count.
15670	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
15671	// PlatformFaultDomain - The Fault Domain count.
15672	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
15673	// RdpThumbPrint - The Remote desktop certificate thumbprint.
15674	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
15675	// VMAgent - The VM Agent running on the virtual machine.
15676	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
15677	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
15678	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
15679	// Disks - The disks information.
15680	Disks *[]DiskInstanceView `json:"disks,omitempty"`
15681	// Extensions - The extensions information.
15682	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
15683	// VMHealth - READ-ONLY; The health status for the VM.
15684	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
15685	// 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.
15686	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
15687	// Statuses - The resource status information.
15688	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
15689	// AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. <br><br>Minimum api-version: 2020-06-01.
15690	AssignedHost *string `json:"assignedHost,omitempty"`
15691	// PlacementGroupID - The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId.
15692	PlacementGroupID *string `json:"placementGroupId,omitempty"`
15693}
15694
15695// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMInstanceView.
15696func (vmssviv VirtualMachineScaleSetVMInstanceView) MarshalJSON() ([]byte, error) {
15697	objectMap := make(map[string]interface{})
15698	if vmssviv.PlatformUpdateDomain != nil {
15699		objectMap["platformUpdateDomain"] = vmssviv.PlatformUpdateDomain
15700	}
15701	if vmssviv.PlatformFaultDomain != nil {
15702		objectMap["platformFaultDomain"] = vmssviv.PlatformFaultDomain
15703	}
15704	if vmssviv.RdpThumbPrint != nil {
15705		objectMap["rdpThumbPrint"] = vmssviv.RdpThumbPrint
15706	}
15707	if vmssviv.VMAgent != nil {
15708		objectMap["vmAgent"] = vmssviv.VMAgent
15709	}
15710	if vmssviv.MaintenanceRedeployStatus != nil {
15711		objectMap["maintenanceRedeployStatus"] = vmssviv.MaintenanceRedeployStatus
15712	}
15713	if vmssviv.Disks != nil {
15714		objectMap["disks"] = vmssviv.Disks
15715	}
15716	if vmssviv.Extensions != nil {
15717		objectMap["extensions"] = vmssviv.Extensions
15718	}
15719	if vmssviv.BootDiagnostics != nil {
15720		objectMap["bootDiagnostics"] = vmssviv.BootDiagnostics
15721	}
15722	if vmssviv.Statuses != nil {
15723		objectMap["statuses"] = vmssviv.Statuses
15724	}
15725	if vmssviv.PlacementGroupID != nil {
15726		objectMap["placementGroupId"] = vmssviv.PlacementGroupID
15727	}
15728	return json.Marshal(objectMap)
15729}
15730
15731// VirtualMachineScaleSetVMListResult the List Virtual Machine Scale Set VMs operation response.
15732type VirtualMachineScaleSetVMListResult struct {
15733	autorest.Response `json:"-"`
15734	// Value - The list of virtual machine scale sets VMs.
15735	Value *[]VirtualMachineScaleSetVM `json:"value,omitempty"`
15736	// 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
15737	NextLink *string `json:"nextLink,omitempty"`
15738}
15739
15740// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of
15741// VirtualMachineScaleSetVM values.
15742type VirtualMachineScaleSetVMListResultIterator struct {
15743	i    int
15744	page VirtualMachineScaleSetVMListResultPage
15745}
15746
15747// NextWithContext advances to the next value.  If there was an error making
15748// the request the iterator does not advance and the error is returned.
15749func (iter *VirtualMachineScaleSetVMListResultIterator) NextWithContext(ctx context.Context) (err error) {
15750	if tracing.IsEnabled() {
15751		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultIterator.NextWithContext")
15752		defer func() {
15753			sc := -1
15754			if iter.Response().Response.Response != nil {
15755				sc = iter.Response().Response.Response.StatusCode
15756			}
15757			tracing.EndSpan(ctx, sc, err)
15758		}()
15759	}
15760	iter.i++
15761	if iter.i < len(iter.page.Values()) {
15762		return nil
15763	}
15764	err = iter.page.NextWithContext(ctx)
15765	if err != nil {
15766		iter.i--
15767		return err
15768	}
15769	iter.i = 0
15770	return nil
15771}
15772
15773// Next advances to the next value.  If there was an error making
15774// the request the iterator does not advance and the error is returned.
15775// Deprecated: Use NextWithContext() instead.
15776func (iter *VirtualMachineScaleSetVMListResultIterator) Next() error {
15777	return iter.NextWithContext(context.Background())
15778}
15779
15780// NotDone returns true if the enumeration should be started or is not yet complete.
15781func (iter VirtualMachineScaleSetVMListResultIterator) NotDone() bool {
15782	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15783}
15784
15785// Response returns the raw server response from the last page request.
15786func (iter VirtualMachineScaleSetVMListResultIterator) Response() VirtualMachineScaleSetVMListResult {
15787	return iter.page.Response()
15788}
15789
15790// Value returns the current value or a zero-initialized value if the
15791// iterator has advanced beyond the end of the collection.
15792func (iter VirtualMachineScaleSetVMListResultIterator) Value() VirtualMachineScaleSetVM {
15793	if !iter.page.NotDone() {
15794		return VirtualMachineScaleSetVM{}
15795	}
15796	return iter.page.Values()[iter.i]
15797}
15798
15799// Creates a new instance of the VirtualMachineScaleSetVMListResultIterator type.
15800func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator {
15801	return VirtualMachineScaleSetVMListResultIterator{page: page}
15802}
15803
15804// IsEmpty returns true if the ListResult contains no values.
15805func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool {
15806	return vmssvlr.Value == nil || len(*vmssvlr.Value) == 0
15807}
15808
15809// hasNextLink returns true if the NextLink is not empty.
15810func (vmssvlr VirtualMachineScaleSetVMListResult) hasNextLink() bool {
15811	return vmssvlr.NextLink != nil && len(*vmssvlr.NextLink) != 0
15812}
15813
15814// virtualMachineScaleSetVMListResultPreparer prepares a request to retrieve the next set of results.
15815// It returns nil if no more results exist.
15816func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer(ctx context.Context) (*http.Request, error) {
15817	if !vmssvlr.hasNextLink() {
15818		return nil, nil
15819	}
15820	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15821		autorest.AsJSON(),
15822		autorest.AsGet(),
15823		autorest.WithBaseURL(to.String(vmssvlr.NextLink)))
15824}
15825
15826// VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values.
15827type VirtualMachineScaleSetVMListResultPage struct {
15828	fn      func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)
15829	vmssvlr VirtualMachineScaleSetVMListResult
15830}
15831
15832// NextWithContext advances to the next page of values.  If there was an error making
15833// the request the page does not advance and the error is returned.
15834func (page *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context.Context) (err error) {
15835	if tracing.IsEnabled() {
15836		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultPage.NextWithContext")
15837		defer func() {
15838			sc := -1
15839			if page.Response().Response.Response != nil {
15840				sc = page.Response().Response.Response.StatusCode
15841			}
15842			tracing.EndSpan(ctx, sc, err)
15843		}()
15844	}
15845	for {
15846		next, err := page.fn(ctx, page.vmssvlr)
15847		if err != nil {
15848			return err
15849		}
15850		page.vmssvlr = next
15851		if !next.hasNextLink() || !next.IsEmpty() {
15852			break
15853		}
15854	}
15855	return nil
15856}
15857
15858// Next advances to the next page of values.  If there was an error making
15859// the request the page does not advance and the error is returned.
15860// Deprecated: Use NextWithContext() instead.
15861func (page *VirtualMachineScaleSetVMListResultPage) Next() error {
15862	return page.NextWithContext(context.Background())
15863}
15864
15865// NotDone returns true if the page enumeration should be started or is not yet complete.
15866func (page VirtualMachineScaleSetVMListResultPage) NotDone() bool {
15867	return !page.vmssvlr.IsEmpty()
15868}
15869
15870// Response returns the raw server response from the last page request.
15871func (page VirtualMachineScaleSetVMListResultPage) Response() VirtualMachineScaleSetVMListResult {
15872	return page.vmssvlr
15873}
15874
15875// Values returns the slice of values for the current page or nil if there are no values.
15876func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScaleSetVM {
15877	if page.vmssvlr.IsEmpty() {
15878		return nil
15879	}
15880	return *page.vmssvlr.Value
15881}
15882
15883// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type.
15884func NewVirtualMachineScaleSetVMListResultPage(cur VirtualMachineScaleSetVMListResult, getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
15885	return VirtualMachineScaleSetVMListResultPage{
15886		fn:      getNextPage,
15887		vmssvlr: cur,
15888	}
15889}
15890
15891// VirtualMachineScaleSetVMNetworkProfileConfiguration describes a virtual machine scale set VM network
15892// profile.
15893type VirtualMachineScaleSetVMNetworkProfileConfiguration struct {
15894	// NetworkInterfaceConfigurations - The list of network configurations.
15895	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
15896}
15897
15898// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile.
15899type VirtualMachineScaleSetVMProfile struct {
15900	// OsProfile - Specifies the operating system settings for the virtual machines in the scale set.
15901	OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"`
15902	// StorageProfile - Specifies the storage settings for the virtual machine disks.
15903	StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"`
15904	// NetworkProfile - Specifies properties of the network interfaces of the virtual machines in the scale set.
15905	NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"`
15906	// SecurityProfile - Specifies the Security related profile settings for the virtual machines in the scale set.
15907	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
15908	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
15909	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
15910	// ExtensionProfile - Specifies a collection of settings for extensions installed on virtual machines in the scale set.
15911	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
15912	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15
15913	LicenseType *string `json:"licenseType,omitempty"`
15914	// Priority - Specifies the priority for the virtual machines in the scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot'
15915	Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
15916	// EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
15917	EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
15918	// BillingProfile - Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01.
15919	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
15920	// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
15921	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
15922}
15923
15924// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual
15925// machine.
15926type VirtualMachineScaleSetVMProperties struct {
15927	// LatestModelApplied - READ-ONLY; Specifies whether the latest model has been applied to the virtual machine.
15928	LatestModelApplied *bool `json:"latestModelApplied,omitempty"`
15929	// VMID - READ-ONLY; Azure VM unique ID.
15930	VMID *string `json:"vmId,omitempty"`
15931	// InstanceView - READ-ONLY; The virtual machine instance view.
15932	InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty"`
15933	// HardwareProfile - Specifies the hardware settings for the virtual machine.
15934	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
15935	// StorageProfile - Specifies the storage settings for the virtual machine disks.
15936	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
15937	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
15938	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
15939	// OsProfile - Specifies the operating system settings for the virtual machine.
15940	OsProfile *OSProfile `json:"osProfile,omitempty"`
15941	// SecurityProfile - Specifies the Security related profile settings for the virtual machine.
15942	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
15943	// NetworkProfile - Specifies the network interfaces of the virtual machine.
15944	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
15945	// NetworkProfileConfiguration - Specifies the network profile configuration of the virtual machine.
15946	NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration `json:"networkProfileConfiguration,omitempty"`
15947	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
15948	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
15949	// 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.
15950	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
15951	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
15952	ProvisioningState *string `json:"provisioningState,omitempty"`
15953	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15
15954	LicenseType *string `json:"licenseType,omitempty"`
15955	// ModelDefinitionApplied - READ-ONLY; Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine.
15956	ModelDefinitionApplied *string `json:"modelDefinitionApplied,omitempty"`
15957	// ProtectionPolicy - Specifies the protection policy of the virtual machine.
15958	ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy `json:"protectionPolicy,omitempty"`
15959}
15960
15961// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMProperties.
15962func (vmssvp VirtualMachineScaleSetVMProperties) MarshalJSON() ([]byte, error) {
15963	objectMap := make(map[string]interface{})
15964	if vmssvp.HardwareProfile != nil {
15965		objectMap["hardwareProfile"] = vmssvp.HardwareProfile
15966	}
15967	if vmssvp.StorageProfile != nil {
15968		objectMap["storageProfile"] = vmssvp.StorageProfile
15969	}
15970	if vmssvp.AdditionalCapabilities != nil {
15971		objectMap["additionalCapabilities"] = vmssvp.AdditionalCapabilities
15972	}
15973	if vmssvp.OsProfile != nil {
15974		objectMap["osProfile"] = vmssvp.OsProfile
15975	}
15976	if vmssvp.SecurityProfile != nil {
15977		objectMap["securityProfile"] = vmssvp.SecurityProfile
15978	}
15979	if vmssvp.NetworkProfile != nil {
15980		objectMap["networkProfile"] = vmssvp.NetworkProfile
15981	}
15982	if vmssvp.NetworkProfileConfiguration != nil {
15983		objectMap["networkProfileConfiguration"] = vmssvp.NetworkProfileConfiguration
15984	}
15985	if vmssvp.DiagnosticsProfile != nil {
15986		objectMap["diagnosticsProfile"] = vmssvp.DiagnosticsProfile
15987	}
15988	if vmssvp.AvailabilitySet != nil {
15989		objectMap["availabilitySet"] = vmssvp.AvailabilitySet
15990	}
15991	if vmssvp.LicenseType != nil {
15992		objectMap["licenseType"] = vmssvp.LicenseType
15993	}
15994	if vmssvp.ProtectionPolicy != nil {
15995		objectMap["protectionPolicy"] = vmssvp.ProtectionPolicy
15996	}
15997	return json.Marshal(objectMap)
15998}
15999
16000// VirtualMachineScaleSetVMProtectionPolicy the protection policy of a virtual machine scale set VM.
16001type VirtualMachineScaleSetVMProtectionPolicy struct {
16002	// ProtectFromScaleIn - Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.
16003	ProtectFromScaleIn *bool `json:"protectFromScaleIn,omitempty"`
16004	// ProtectFromScaleSetActions - Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM.
16005	ProtectFromScaleSetActions *bool `json:"protectFromScaleSetActions,omitempty"`
16006}
16007
16008// VirtualMachineScaleSetVMReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
16009type VirtualMachineScaleSetVMReimageParameters struct {
16010	// TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
16011	TempDisk *bool `json:"tempDisk,omitempty"`
16012}
16013
16014// VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
16015// results of a long-running operation.
16016type VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture struct {
16017	azure.FutureAPI
16018	// Result returns the result of the asynchronous operation.
16019	// If the operation has not completed it will return an error.
16020	Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error)
16021}
16022
16023// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16024func (future *VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16025	var azFuture azure.Future
16026	if err := json.Unmarshal(body, &azFuture); err != nil {
16027		return err
16028	}
16029	future.FutureAPI = &azFuture
16030	future.Result = future.result
16031	return nil
16032}
16033
16034// result is the default implementation for VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture.Result.
16035func (future *VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
16036	var done bool
16037	done, err = future.DoneWithContext(context.Background(), client)
16038	if err != nil {
16039		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16040		return
16041	}
16042	if !done {
16043		vmrc.Response.Response = future.Response()
16044		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture")
16045		return
16046	}
16047	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16048	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
16049		vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response)
16050		if err != nil {
16051			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
16052		}
16053	}
16054	return
16055}
16056
16057// VirtualMachineScaleSetVMRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results
16058// of a long-running operation.
16059type VirtualMachineScaleSetVMRunCommandsDeleteFuture struct {
16060	azure.FutureAPI
16061	// Result returns the result of the asynchronous operation.
16062	// If the operation has not completed it will return an error.
16063	Result func(VirtualMachineScaleSetVMRunCommandsClient) (autorest.Response, error)
16064}
16065
16066// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16067func (future *VirtualMachineScaleSetVMRunCommandsDeleteFuture) UnmarshalJSON(body []byte) error {
16068	var azFuture azure.Future
16069	if err := json.Unmarshal(body, &azFuture); err != nil {
16070		return err
16071	}
16072	future.FutureAPI = &azFuture
16073	future.Result = future.result
16074	return nil
16075}
16076
16077// result is the default implementation for VirtualMachineScaleSetVMRunCommandsDeleteFuture.Result.
16078func (future *VirtualMachineScaleSetVMRunCommandsDeleteFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (ar autorest.Response, err error) {
16079	var done bool
16080	done, err = future.DoneWithContext(context.Background(), client)
16081	if err != nil {
16082		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure")
16083		return
16084	}
16085	if !done {
16086		ar.Response = future.Response()
16087		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture")
16088		return
16089	}
16090	ar.Response = future.Response()
16091	return
16092}
16093
16094// VirtualMachineScaleSetVMRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results
16095// of a long-running operation.
16096type VirtualMachineScaleSetVMRunCommandsUpdateFuture struct {
16097	azure.FutureAPI
16098	// Result returns the result of the asynchronous operation.
16099	// If the operation has not completed it will return an error.
16100	Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error)
16101}
16102
16103// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16104func (future *VirtualMachineScaleSetVMRunCommandsUpdateFuture) UnmarshalJSON(body []byte) error {
16105	var azFuture azure.Future
16106	if err := json.Unmarshal(body, &azFuture); err != nil {
16107		return err
16108	}
16109	future.FutureAPI = &azFuture
16110	future.Result = future.result
16111	return nil
16112}
16113
16114// result is the default implementation for VirtualMachineScaleSetVMRunCommandsUpdateFuture.Result.
16115func (future *VirtualMachineScaleSetVMRunCommandsUpdateFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
16116	var done bool
16117	done, err = future.DoneWithContext(context.Background(), client)
16118	if err != nil {
16119		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure")
16120		return
16121	}
16122	if !done {
16123		vmrc.Response.Response = future.Response()
16124		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture")
16125		return
16126	}
16127	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16128	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
16129		vmrc, err = client.UpdateResponder(vmrc.Response.Response)
16130		if err != nil {
16131			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
16132		}
16133	}
16134	return
16135}
16136
16137// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a
16138// long-running operation.
16139type VirtualMachineScaleSetVMsDeallocateFuture struct {
16140	azure.FutureAPI
16141	// Result returns the result of the asynchronous operation.
16142	// If the operation has not completed it will return an error.
16143	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16144}
16145
16146// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16147func (future *VirtualMachineScaleSetVMsDeallocateFuture) UnmarshalJSON(body []byte) error {
16148	var azFuture azure.Future
16149	if err := json.Unmarshal(body, &azFuture); err != nil {
16150		return err
16151	}
16152	future.FutureAPI = &azFuture
16153	future.Result = future.result
16154	return nil
16155}
16156
16157// result is the default implementation for VirtualMachineScaleSetVMsDeallocateFuture.Result.
16158func (future *VirtualMachineScaleSetVMsDeallocateFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16159	var done bool
16160	done, err = future.DoneWithContext(context.Background(), client)
16161	if err != nil {
16162		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Polling failure")
16163		return
16164	}
16165	if !done {
16166		ar.Response = future.Response()
16167		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
16168		return
16169	}
16170	ar.Response = future.Response()
16171	return
16172}
16173
16174// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
16175// long-running operation.
16176type VirtualMachineScaleSetVMsDeleteFuture struct {
16177	azure.FutureAPI
16178	// Result returns the result of the asynchronous operation.
16179	// If the operation has not completed it will return an error.
16180	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16181}
16182
16183// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16184func (future *VirtualMachineScaleSetVMsDeleteFuture) UnmarshalJSON(body []byte) error {
16185	var azFuture azure.Future
16186	if err := json.Unmarshal(body, &azFuture); err != nil {
16187		return err
16188	}
16189	future.FutureAPI = &azFuture
16190	future.Result = future.result
16191	return nil
16192}
16193
16194// result is the default implementation for VirtualMachineScaleSetVMsDeleteFuture.Result.
16195func (future *VirtualMachineScaleSetVMsDeleteFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16196	var done bool
16197	done, err = future.DoneWithContext(context.Background(), client)
16198	if err != nil {
16199		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Polling failure")
16200		return
16201	}
16202	if !done {
16203		ar.Response = future.Response()
16204		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
16205		return
16206	}
16207	ar.Response = future.Response()
16208	return
16209}
16210
16211// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the
16212// results of a long-running operation.
16213type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
16214	azure.FutureAPI
16215	// Result returns the result of the asynchronous operation.
16216	// If the operation has not completed it will return an error.
16217	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16218}
16219
16220// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16221func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
16222	var azFuture azure.Future
16223	if err := json.Unmarshal(body, &azFuture); err != nil {
16224		return err
16225	}
16226	future.FutureAPI = &azFuture
16227	future.Result = future.result
16228	return nil
16229}
16230
16231// result is the default implementation for VirtualMachineScaleSetVMsPerformMaintenanceFuture.Result.
16232func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16233	var done bool
16234	done, err = future.DoneWithContext(context.Background(), client)
16235	if err != nil {
16236		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
16237		return
16238	}
16239	if !done {
16240		ar.Response = future.Response()
16241		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
16242		return
16243	}
16244	ar.Response = future.Response()
16245	return
16246}
16247
16248// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a
16249// long-running operation.
16250type VirtualMachineScaleSetVMsPowerOffFuture struct {
16251	azure.FutureAPI
16252	// Result returns the result of the asynchronous operation.
16253	// If the operation has not completed it will return an error.
16254	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16255}
16256
16257// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16258func (future *VirtualMachineScaleSetVMsPowerOffFuture) UnmarshalJSON(body []byte) error {
16259	var azFuture azure.Future
16260	if err := json.Unmarshal(body, &azFuture); err != nil {
16261		return err
16262	}
16263	future.FutureAPI = &azFuture
16264	future.Result = future.result
16265	return nil
16266}
16267
16268// result is the default implementation for VirtualMachineScaleSetVMsPowerOffFuture.Result.
16269func (future *VirtualMachineScaleSetVMsPowerOffFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16270	var done bool
16271	done, err = future.DoneWithContext(context.Background(), client)
16272	if err != nil {
16273		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Polling failure")
16274		return
16275	}
16276	if !done {
16277		ar.Response = future.Response()
16278		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
16279		return
16280	}
16281	ar.Response = future.Response()
16282	return
16283}
16284
16285// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a
16286// long-running operation.
16287type VirtualMachineScaleSetVMsRedeployFuture struct {
16288	azure.FutureAPI
16289	// Result returns the result of the asynchronous operation.
16290	// If the operation has not completed it will return an error.
16291	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16292}
16293
16294// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16295func (future *VirtualMachineScaleSetVMsRedeployFuture) UnmarshalJSON(body []byte) error {
16296	var azFuture azure.Future
16297	if err := json.Unmarshal(body, &azFuture); err != nil {
16298		return err
16299	}
16300	future.FutureAPI = &azFuture
16301	future.Result = future.result
16302	return nil
16303}
16304
16305// result is the default implementation for VirtualMachineScaleSetVMsRedeployFuture.Result.
16306func (future *VirtualMachineScaleSetVMsRedeployFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16307	var done bool
16308	done, err = future.DoneWithContext(context.Background(), client)
16309	if err != nil {
16310		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Polling failure")
16311		return
16312	}
16313	if !done {
16314		ar.Response = future.Response()
16315		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
16316		return
16317	}
16318	ar.Response = future.Response()
16319	return
16320}
16321
16322// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a
16323// long-running operation.
16324type VirtualMachineScaleSetVMsReimageAllFuture struct {
16325	azure.FutureAPI
16326	// Result returns the result of the asynchronous operation.
16327	// If the operation has not completed it will return an error.
16328	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16329}
16330
16331// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16332func (future *VirtualMachineScaleSetVMsReimageAllFuture) UnmarshalJSON(body []byte) error {
16333	var azFuture azure.Future
16334	if err := json.Unmarshal(body, &azFuture); err != nil {
16335		return err
16336	}
16337	future.FutureAPI = &azFuture
16338	future.Result = future.result
16339	return nil
16340}
16341
16342// result is the default implementation for VirtualMachineScaleSetVMsReimageAllFuture.Result.
16343func (future *VirtualMachineScaleSetVMsReimageAllFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16344	var done bool
16345	done, err = future.DoneWithContext(context.Background(), client)
16346	if err != nil {
16347		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Polling failure")
16348		return
16349	}
16350	if !done {
16351		ar.Response = future.Response()
16352		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
16353		return
16354	}
16355	ar.Response = future.Response()
16356	return
16357}
16358
16359// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a
16360// long-running operation.
16361type VirtualMachineScaleSetVMsReimageFuture struct {
16362	azure.FutureAPI
16363	// Result returns the result of the asynchronous operation.
16364	// If the operation has not completed it will return an error.
16365	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16366}
16367
16368// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16369func (future *VirtualMachineScaleSetVMsReimageFuture) UnmarshalJSON(body []byte) error {
16370	var azFuture azure.Future
16371	if err := json.Unmarshal(body, &azFuture); err != nil {
16372		return err
16373	}
16374	future.FutureAPI = &azFuture
16375	future.Result = future.result
16376	return nil
16377}
16378
16379// result is the default implementation for VirtualMachineScaleSetVMsReimageFuture.Result.
16380func (future *VirtualMachineScaleSetVMsReimageFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16381	var done bool
16382	done, err = future.DoneWithContext(context.Background(), client)
16383	if err != nil {
16384		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Polling failure")
16385		return
16386	}
16387	if !done {
16388		ar.Response = future.Response()
16389		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
16390		return
16391	}
16392	ar.Response = future.Response()
16393	return
16394}
16395
16396// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a
16397// long-running operation.
16398type VirtualMachineScaleSetVMsRestartFuture struct {
16399	azure.FutureAPI
16400	// Result returns the result of the asynchronous operation.
16401	// If the operation has not completed it will return an error.
16402	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16403}
16404
16405// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16406func (future *VirtualMachineScaleSetVMsRestartFuture) UnmarshalJSON(body []byte) error {
16407	var azFuture azure.Future
16408	if err := json.Unmarshal(body, &azFuture); err != nil {
16409		return err
16410	}
16411	future.FutureAPI = &azFuture
16412	future.Result = future.result
16413	return nil
16414}
16415
16416// result is the default implementation for VirtualMachineScaleSetVMsRestartFuture.Result.
16417func (future *VirtualMachineScaleSetVMsRestartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16418	var done bool
16419	done, err = future.DoneWithContext(context.Background(), client)
16420	if err != nil {
16421		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Polling failure")
16422		return
16423	}
16424	if !done {
16425		ar.Response = future.Response()
16426		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
16427		return
16428	}
16429	ar.Response = future.Response()
16430	return
16431}
16432
16433// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a
16434// long-running operation.
16435type VirtualMachineScaleSetVMsRunCommandFuture struct {
16436	azure.FutureAPI
16437	// Result returns the result of the asynchronous operation.
16438	// If the operation has not completed it will return an error.
16439	Result func(VirtualMachineScaleSetVMsClient) (RunCommandResult, error)
16440}
16441
16442// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16443func (future *VirtualMachineScaleSetVMsRunCommandFuture) UnmarshalJSON(body []byte) error {
16444	var azFuture azure.Future
16445	if err := json.Unmarshal(body, &azFuture); err != nil {
16446		return err
16447	}
16448	future.FutureAPI = &azFuture
16449	future.Result = future.result
16450	return nil
16451}
16452
16453// result is the default implementation for VirtualMachineScaleSetVMsRunCommandFuture.Result.
16454func (future *VirtualMachineScaleSetVMsRunCommandFuture) result(client VirtualMachineScaleSetVMsClient) (rcr RunCommandResult, err error) {
16455	var done bool
16456	done, err = future.DoneWithContext(context.Background(), client)
16457	if err != nil {
16458		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", future.Response(), "Polling failure")
16459		return
16460	}
16461	if !done {
16462		rcr.Response.Response = future.Response()
16463		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture")
16464		return
16465	}
16466	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16467	if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
16468		rcr, err = client.RunCommandResponder(rcr.Response.Response)
16469		if err != nil {
16470			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
16471		}
16472	}
16473	return
16474}
16475
16476// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a
16477// long-running operation.
16478type VirtualMachineScaleSetVMsStartFuture struct {
16479	azure.FutureAPI
16480	// Result returns the result of the asynchronous operation.
16481	// If the operation has not completed it will return an error.
16482	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
16483}
16484
16485// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16486func (future *VirtualMachineScaleSetVMsStartFuture) UnmarshalJSON(body []byte) error {
16487	var azFuture azure.Future
16488	if err := json.Unmarshal(body, &azFuture); err != nil {
16489		return err
16490	}
16491	future.FutureAPI = &azFuture
16492	future.Result = future.result
16493	return nil
16494}
16495
16496// result is the default implementation for VirtualMachineScaleSetVMsStartFuture.Result.
16497func (future *VirtualMachineScaleSetVMsStartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
16498	var done bool
16499	done, err = future.DoneWithContext(context.Background(), client)
16500	if err != nil {
16501		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Polling failure")
16502		return
16503	}
16504	if !done {
16505		ar.Response = future.Response()
16506		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
16507		return
16508	}
16509	ar.Response = future.Response()
16510	return
16511}
16512
16513// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a
16514// long-running operation.
16515type VirtualMachineScaleSetVMsUpdateFuture struct {
16516	azure.FutureAPI
16517	// Result returns the result of the asynchronous operation.
16518	// If the operation has not completed it will return an error.
16519	Result func(VirtualMachineScaleSetVMsClient) (VirtualMachineScaleSetVM, error)
16520}
16521
16522// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16523func (future *VirtualMachineScaleSetVMsUpdateFuture) UnmarshalJSON(body []byte) error {
16524	var azFuture azure.Future
16525	if err := json.Unmarshal(body, &azFuture); err != nil {
16526		return err
16527	}
16528	future.FutureAPI = &azFuture
16529	future.Result = future.result
16530	return nil
16531}
16532
16533// result is the default implementation for VirtualMachineScaleSetVMsUpdateFuture.Result.
16534func (future *VirtualMachineScaleSetVMsUpdateFuture) result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) {
16535	var done bool
16536	done, err = future.DoneWithContext(context.Background(), client)
16537	if err != nil {
16538		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Polling failure")
16539		return
16540	}
16541	if !done {
16542		vmssv.Response.Response = future.Response()
16543		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
16544		return
16545	}
16546	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16547	if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent {
16548		vmssv, err = client.UpdateResponder(vmssv.Response.Response)
16549		if err != nil {
16550			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request")
16551		}
16552	}
16553	return
16554}
16555
16556// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running
16557// operation.
16558type VirtualMachinesCaptureFuture struct {
16559	azure.FutureAPI
16560	// Result returns the result of the asynchronous operation.
16561	// If the operation has not completed it will return an error.
16562	Result func(VirtualMachinesClient) (VirtualMachineCaptureResult, error)
16563}
16564
16565// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16566func (future *VirtualMachinesCaptureFuture) UnmarshalJSON(body []byte) error {
16567	var azFuture azure.Future
16568	if err := json.Unmarshal(body, &azFuture); err != nil {
16569		return err
16570	}
16571	future.FutureAPI = &azFuture
16572	future.Result = future.result
16573	return nil
16574}
16575
16576// result is the default implementation for VirtualMachinesCaptureFuture.Result.
16577func (future *VirtualMachinesCaptureFuture) result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
16578	var done bool
16579	done, err = future.DoneWithContext(context.Background(), client)
16580	if err != nil {
16581		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Polling failure")
16582		return
16583	}
16584	if !done {
16585		vmcr.Response.Response = future.Response()
16586		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
16587		return
16588	}
16589	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16590	if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
16591		vmcr, err = client.CaptureResponder(vmcr.Response.Response)
16592		if err != nil {
16593			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
16594		}
16595	}
16596	return
16597}
16598
16599// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a
16600// long-running operation.
16601type VirtualMachinesConvertToManagedDisksFuture struct {
16602	azure.FutureAPI
16603	// Result returns the result of the asynchronous operation.
16604	// If the operation has not completed it will return an error.
16605	Result func(VirtualMachinesClient) (autorest.Response, error)
16606}
16607
16608// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16609func (future *VirtualMachinesConvertToManagedDisksFuture) UnmarshalJSON(body []byte) error {
16610	var azFuture azure.Future
16611	if err := json.Unmarshal(body, &azFuture); err != nil {
16612		return err
16613	}
16614	future.FutureAPI = &azFuture
16615	future.Result = future.result
16616	return nil
16617}
16618
16619// result is the default implementation for VirtualMachinesConvertToManagedDisksFuture.Result.
16620func (future *VirtualMachinesConvertToManagedDisksFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
16621	var done bool
16622	done, err = future.DoneWithContext(context.Background(), client)
16623	if err != nil {
16624		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Polling failure")
16625		return
16626	}
16627	if !done {
16628		ar.Response = future.Response()
16629		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
16630		return
16631	}
16632	ar.Response = future.Response()
16633	return
16634}
16635
16636// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16637// long-running operation.
16638type VirtualMachinesCreateOrUpdateFuture struct {
16639	azure.FutureAPI
16640	// Result returns the result of the asynchronous operation.
16641	// If the operation has not completed it will return an error.
16642	Result func(VirtualMachinesClient) (VirtualMachine, error)
16643}
16644
16645// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16646func (future *VirtualMachinesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16647	var azFuture azure.Future
16648	if err := json.Unmarshal(body, &azFuture); err != nil {
16649		return err
16650	}
16651	future.FutureAPI = &azFuture
16652	future.Result = future.result
16653	return nil
16654}
16655
16656// result is the default implementation for VirtualMachinesCreateOrUpdateFuture.Result.
16657func (future *VirtualMachinesCreateOrUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
16658	var done bool
16659	done, err = future.DoneWithContext(context.Background(), client)
16660	if err != nil {
16661		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16662		return
16663	}
16664	if !done {
16665		VM.Response.Response = future.Response()
16666		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
16667		return
16668	}
16669	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16670	if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
16671		VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
16672		if err != nil {
16673			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
16674		}
16675	}
16676	return
16677}
16678
16679// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a
16680// long-running operation.
16681type VirtualMachinesDeallocateFuture struct {
16682	azure.FutureAPI
16683	// Result returns the result of the asynchronous operation.
16684	// If the operation has not completed it will return an error.
16685	Result func(VirtualMachinesClient) (autorest.Response, error)
16686}
16687
16688// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16689func (future *VirtualMachinesDeallocateFuture) UnmarshalJSON(body []byte) error {
16690	var azFuture azure.Future
16691	if err := json.Unmarshal(body, &azFuture); err != nil {
16692		return err
16693	}
16694	future.FutureAPI = &azFuture
16695	future.Result = future.result
16696	return nil
16697}
16698
16699// result is the default implementation for VirtualMachinesDeallocateFuture.Result.
16700func (future *VirtualMachinesDeallocateFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
16701	var done bool
16702	done, err = future.DoneWithContext(context.Background(), client)
16703	if err != nil {
16704		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Polling failure")
16705		return
16706	}
16707	if !done {
16708		ar.Response = future.Response()
16709		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
16710		return
16711	}
16712	ar.Response = future.Response()
16713	return
16714}
16715
16716// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16717// operation.
16718type VirtualMachinesDeleteFuture struct {
16719	azure.FutureAPI
16720	// Result returns the result of the asynchronous operation.
16721	// If the operation has not completed it will return an error.
16722	Result func(VirtualMachinesClient) (autorest.Response, error)
16723}
16724
16725// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16726func (future *VirtualMachinesDeleteFuture) UnmarshalJSON(body []byte) error {
16727	var azFuture azure.Future
16728	if err := json.Unmarshal(body, &azFuture); err != nil {
16729		return err
16730	}
16731	future.FutureAPI = &azFuture
16732	future.Result = future.result
16733	return nil
16734}
16735
16736// result is the default implementation for VirtualMachinesDeleteFuture.Result.
16737func (future *VirtualMachinesDeleteFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
16738	var done bool
16739	done, err = future.DoneWithContext(context.Background(), client)
16740	if err != nil {
16741		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure")
16742		return
16743	}
16744	if !done {
16745		ar.Response = future.Response()
16746		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
16747		return
16748	}
16749	ar.Response = future.Response()
16750	return
16751}
16752
16753// VirtualMachineSize describes the properties of a VM size.
16754type VirtualMachineSize struct {
16755	// Name - The name of the virtual machine size.
16756	Name *string `json:"name,omitempty"`
16757	// NumberOfCores - The number of cores supported by the virtual machine size.
16758	NumberOfCores *int32 `json:"numberOfCores,omitempty"`
16759	// OsDiskSizeInMB - The OS disk size, in MB, allowed by the virtual machine size.
16760	OsDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"`
16761	// ResourceDiskSizeInMB - The resource disk size, in MB, allowed by the virtual machine size.
16762	ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"`
16763	// MemoryInMB - The amount of memory, in MB, supported by the virtual machine size.
16764	MemoryInMB *int32 `json:"memoryInMB,omitempty"`
16765	// MaxDataDiskCount - The maximum number of data disks that can be attached to the virtual machine size.
16766	MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"`
16767}
16768
16769// VirtualMachineSizeListResult the List Virtual Machine operation response.
16770type VirtualMachineSizeListResult struct {
16771	autorest.Response `json:"-"`
16772	// Value - The list of virtual machine sizes.
16773	Value *[]VirtualMachineSize `json:"value,omitempty"`
16774}
16775
16776// VirtualMachineSoftwarePatchProperties describes the properties of a Virtual Machine software patch.
16777type VirtualMachineSoftwarePatchProperties struct {
16778	// PatchID - READ-ONLY; A unique identifier for the patch.
16779	PatchID *string `json:"patchId,omitempty"`
16780	// Name - READ-ONLY; The friendly name of the patch.
16781	Name *string `json:"name,omitempty"`
16782	// Version - READ-ONLY; The version number of the patch. This property applies only to Linux patches.
16783	Version *string `json:"version,omitempty"`
16784	// Kbid - READ-ONLY; The KBID of the patch. Only applies to Windows patches.
16785	Kbid *string `json:"kbid,omitempty"`
16786	// Classifications - READ-ONLY; The classification(s) of the patch as provided by the patch publisher.
16787	Classifications *[]string `json:"classifications,omitempty"`
16788	// RebootBehavior - READ-ONLY; Describes the reboot requirements of the patch. Possible values include: 'NeverReboots', 'AlwaysRequiresReboot', 'CanRequestReboot'
16789	RebootBehavior SoftwareUpdateRebootBehavior `json:"rebootBehavior,omitempty"`
16790	// ActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
16791	ActivityID *string `json:"activityId,omitempty"`
16792	// PublishedDate - READ-ONLY; The UTC timestamp when the repository published this patch.
16793	PublishedDate *date.Time `json:"publishedDate,omitempty"`
16794	// LastModifiedDateTime - READ-ONLY; The UTC timestamp of the last update to this patch record.
16795	LastModifiedDateTime *date.Time `json:"lastModifiedDateTime,omitempty"`
16796	// AssessmentState - READ-ONLY; Describes the outcome of an install operation for a given patch. Possible values include: 'PatchAssessmentStateInstalled', 'PatchAssessmentStateFailed', 'PatchAssessmentStateExcluded', 'PatchAssessmentStateNotSelected', 'PatchAssessmentStatePending', 'PatchAssessmentStateAvailable'
16797	AssessmentState PatchAssessmentState `json:"assessmentState,omitempty"`
16798}
16799
16800// MarshalJSON is the custom marshaler for VirtualMachineSoftwarePatchProperties.
16801func (vmspp VirtualMachineSoftwarePatchProperties) MarshalJSON() ([]byte, error) {
16802	objectMap := make(map[string]interface{})
16803	return json.Marshal(objectMap)
16804}
16805
16806// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a
16807// long-running operation.
16808type VirtualMachinesPerformMaintenanceFuture struct {
16809	azure.FutureAPI
16810	// Result returns the result of the asynchronous operation.
16811	// If the operation has not completed it will return an error.
16812	Result func(VirtualMachinesClient) (autorest.Response, error)
16813}
16814
16815// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16816func (future *VirtualMachinesPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
16817	var azFuture azure.Future
16818	if err := json.Unmarshal(body, &azFuture); err != nil {
16819		return err
16820	}
16821	future.FutureAPI = &azFuture
16822	future.Result = future.result
16823	return nil
16824}
16825
16826// result is the default implementation for VirtualMachinesPerformMaintenanceFuture.Result.
16827func (future *VirtualMachinesPerformMaintenanceFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
16828	var done bool
16829	done, err = future.DoneWithContext(context.Background(), client)
16830	if err != nil {
16831		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
16832		return
16833	}
16834	if !done {
16835		ar.Response = future.Response()
16836		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
16837		return
16838	}
16839	ar.Response = future.Response()
16840	return
16841}
16842
16843// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
16844// operation.
16845type VirtualMachinesPowerOffFuture struct {
16846	azure.FutureAPI
16847	// Result returns the result of the asynchronous operation.
16848	// If the operation has not completed it will return an error.
16849	Result func(VirtualMachinesClient) (autorest.Response, error)
16850}
16851
16852// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16853func (future *VirtualMachinesPowerOffFuture) UnmarshalJSON(body []byte) error {
16854	var azFuture azure.Future
16855	if err := json.Unmarshal(body, &azFuture); err != nil {
16856		return err
16857	}
16858	future.FutureAPI = &azFuture
16859	future.Result = future.result
16860	return nil
16861}
16862
16863// result is the default implementation for VirtualMachinesPowerOffFuture.Result.
16864func (future *VirtualMachinesPowerOffFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
16865	var done bool
16866	done, err = future.DoneWithContext(context.Background(), client)
16867	if err != nil {
16868		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Polling failure")
16869		return
16870	}
16871	if !done {
16872		ar.Response = future.Response()
16873		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
16874		return
16875	}
16876	ar.Response = future.Response()
16877	return
16878}
16879
16880// VirtualMachinesReapplyFuture an abstraction for monitoring and retrieving the results of a long-running
16881// operation.
16882type VirtualMachinesReapplyFuture struct {
16883	azure.FutureAPI
16884	// Result returns the result of the asynchronous operation.
16885	// If the operation has not completed it will return an error.
16886	Result func(VirtualMachinesClient) (autorest.Response, error)
16887}
16888
16889// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16890func (future *VirtualMachinesReapplyFuture) UnmarshalJSON(body []byte) error {
16891	var azFuture azure.Future
16892	if err := json.Unmarshal(body, &azFuture); err != nil {
16893		return err
16894	}
16895	future.FutureAPI = &azFuture
16896	future.Result = future.result
16897	return nil
16898}
16899
16900// result is the default implementation for VirtualMachinesReapplyFuture.Result.
16901func (future *VirtualMachinesReapplyFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
16902	var done bool
16903	done, err = future.DoneWithContext(context.Background(), client)
16904	if err != nil {
16905		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReapplyFuture", "Result", future.Response(), "Polling failure")
16906		return
16907	}
16908	if !done {
16909		ar.Response = future.Response()
16910		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReapplyFuture")
16911		return
16912	}
16913	ar.Response = future.Response()
16914	return
16915}
16916
16917// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running
16918// operation.
16919type VirtualMachinesRedeployFuture struct {
16920	azure.FutureAPI
16921	// Result returns the result of the asynchronous operation.
16922	// If the operation has not completed it will return an error.
16923	Result func(VirtualMachinesClient) (autorest.Response, error)
16924}
16925
16926// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16927func (future *VirtualMachinesRedeployFuture) UnmarshalJSON(body []byte) error {
16928	var azFuture azure.Future
16929	if err := json.Unmarshal(body, &azFuture); err != nil {
16930		return err
16931	}
16932	future.FutureAPI = &azFuture
16933	future.Result = future.result
16934	return nil
16935}
16936
16937// result is the default implementation for VirtualMachinesRedeployFuture.Result.
16938func (future *VirtualMachinesRedeployFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
16939	var done bool
16940	done, err = future.DoneWithContext(context.Background(), client)
16941	if err != nil {
16942		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Polling failure")
16943		return
16944	}
16945	if !done {
16946		ar.Response = future.Response()
16947		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
16948		return
16949	}
16950	ar.Response = future.Response()
16951	return
16952}
16953
16954// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
16955// operation.
16956type VirtualMachinesReimageFuture struct {
16957	azure.FutureAPI
16958	// Result returns the result of the asynchronous operation.
16959	// If the operation has not completed it will return an error.
16960	Result func(VirtualMachinesClient) (autorest.Response, error)
16961}
16962
16963// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16964func (future *VirtualMachinesReimageFuture) UnmarshalJSON(body []byte) error {
16965	var azFuture azure.Future
16966	if err := json.Unmarshal(body, &azFuture); err != nil {
16967		return err
16968	}
16969	future.FutureAPI = &azFuture
16970	future.Result = future.result
16971	return nil
16972}
16973
16974// result is the default implementation for VirtualMachinesReimageFuture.Result.
16975func (future *VirtualMachinesReimageFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
16976	var done bool
16977	done, err = future.DoneWithContext(context.Background(), client)
16978	if err != nil {
16979		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReimageFuture", "Result", future.Response(), "Polling failure")
16980		return
16981	}
16982	if !done {
16983		ar.Response = future.Response()
16984		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
16985		return
16986	}
16987	ar.Response = future.Response()
16988	return
16989}
16990
16991// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
16992// operation.
16993type VirtualMachinesRestartFuture struct {
16994	azure.FutureAPI
16995	// Result returns the result of the asynchronous operation.
16996	// If the operation has not completed it will return an error.
16997	Result func(VirtualMachinesClient) (autorest.Response, error)
16998}
16999
17000// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17001func (future *VirtualMachinesRestartFuture) UnmarshalJSON(body []byte) error {
17002	var azFuture azure.Future
17003	if err := json.Unmarshal(body, &azFuture); err != nil {
17004		return err
17005	}
17006	future.FutureAPI = &azFuture
17007	future.Result = future.result
17008	return nil
17009}
17010
17011// result is the default implementation for VirtualMachinesRestartFuture.Result.
17012func (future *VirtualMachinesRestartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17013	var done bool
17014	done, err = future.DoneWithContext(context.Background(), client)
17015	if err != nil {
17016		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Polling failure")
17017		return
17018	}
17019	if !done {
17020		ar.Response = future.Response()
17021		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
17022		return
17023	}
17024	ar.Response = future.Response()
17025	return
17026}
17027
17028// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a
17029// long-running operation.
17030type VirtualMachinesRunCommandFuture struct {
17031	azure.FutureAPI
17032	// Result returns the result of the asynchronous operation.
17033	// If the operation has not completed it will return an error.
17034	Result func(VirtualMachinesClient) (RunCommandResult, error)
17035}
17036
17037// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17038func (future *VirtualMachinesRunCommandFuture) UnmarshalJSON(body []byte) error {
17039	var azFuture azure.Future
17040	if err := json.Unmarshal(body, &azFuture); err != nil {
17041		return err
17042	}
17043	future.FutureAPI = &azFuture
17044	future.Result = future.result
17045	return nil
17046}
17047
17048// result is the default implementation for VirtualMachinesRunCommandFuture.Result.
17049func (future *VirtualMachinesRunCommandFuture) result(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
17050	var done bool
17051	done, err = future.DoneWithContext(context.Background(), client)
17052	if err != nil {
17053		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Polling failure")
17054		return
17055	}
17056	if !done {
17057		rcr.Response.Response = future.Response()
17058		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
17059		return
17060	}
17061	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17062	if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
17063		rcr, err = client.RunCommandResponder(rcr.Response.Response)
17064		if err != nil {
17065			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
17066		}
17067	}
17068	return
17069}
17070
17071// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
17072// operation.
17073type VirtualMachinesStartFuture struct {
17074	azure.FutureAPI
17075	// Result returns the result of the asynchronous operation.
17076	// If the operation has not completed it will return an error.
17077	Result func(VirtualMachinesClient) (autorest.Response, error)
17078}
17079
17080// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17081func (future *VirtualMachinesStartFuture) UnmarshalJSON(body []byte) error {
17082	var azFuture azure.Future
17083	if err := json.Unmarshal(body, &azFuture); err != nil {
17084		return err
17085	}
17086	future.FutureAPI = &azFuture
17087	future.Result = future.result
17088	return nil
17089}
17090
17091// result is the default implementation for VirtualMachinesStartFuture.Result.
17092func (future *VirtualMachinesStartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
17093	var done bool
17094	done, err = future.DoneWithContext(context.Background(), client)
17095	if err != nil {
17096		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure")
17097		return
17098	}
17099	if !done {
17100		ar.Response = future.Response()
17101		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
17102		return
17103	}
17104	ar.Response = future.Response()
17105	return
17106}
17107
17108// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view
17109// status summary.
17110type VirtualMachineStatusCodeCount struct {
17111	// Code - READ-ONLY; The instance view status code.
17112	Code *string `json:"code,omitempty"`
17113	// Count - READ-ONLY; The number of instances having a particular status code.
17114	Count *int32 `json:"count,omitempty"`
17115}
17116
17117// MarshalJSON is the custom marshaler for VirtualMachineStatusCodeCount.
17118func (vmscc VirtualMachineStatusCodeCount) MarshalJSON() ([]byte, error) {
17119	objectMap := make(map[string]interface{})
17120	return json.Marshal(objectMap)
17121}
17122
17123// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
17124// operation.
17125type VirtualMachinesUpdateFuture struct {
17126	azure.FutureAPI
17127	// Result returns the result of the asynchronous operation.
17128	// If the operation has not completed it will return an error.
17129	Result func(VirtualMachinesClient) (VirtualMachine, error)
17130}
17131
17132// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17133func (future *VirtualMachinesUpdateFuture) UnmarshalJSON(body []byte) error {
17134	var azFuture azure.Future
17135	if err := json.Unmarshal(body, &azFuture); err != nil {
17136		return err
17137	}
17138	future.FutureAPI = &azFuture
17139	future.Result = future.result
17140	return nil
17141}
17142
17143// result is the default implementation for VirtualMachinesUpdateFuture.Result.
17144func (future *VirtualMachinesUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
17145	var done bool
17146	done, err = future.DoneWithContext(context.Background(), client)
17147	if err != nil {
17148		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Polling failure")
17149		return
17150	}
17151	if !done {
17152		VM.Response.Response = future.Response()
17153		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
17154		return
17155	}
17156	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17157	if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
17158		VM, err = client.UpdateResponder(VM.Response.Response)
17159		if err != nil {
17160			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
17161		}
17162	}
17163	return
17164}
17165
17166// VirtualMachineUpdate describes a Virtual Machine Update.
17167type VirtualMachineUpdate struct {
17168	// 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**.
17169	Plan                      *Plan `json:"plan,omitempty"`
17170	*VirtualMachineProperties `json:"properties,omitempty"`
17171	// Identity - The identity of the virtual machine, if configured.
17172	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
17173	// Zones - The virtual machine zones.
17174	Zones *[]string `json:"zones,omitempty"`
17175	// Tags - Resource tags
17176	Tags map[string]*string `json:"tags"`
17177}
17178
17179// MarshalJSON is the custom marshaler for VirtualMachineUpdate.
17180func (vmu VirtualMachineUpdate) MarshalJSON() ([]byte, error) {
17181	objectMap := make(map[string]interface{})
17182	if vmu.Plan != nil {
17183		objectMap["plan"] = vmu.Plan
17184	}
17185	if vmu.VirtualMachineProperties != nil {
17186		objectMap["properties"] = vmu.VirtualMachineProperties
17187	}
17188	if vmu.Identity != nil {
17189		objectMap["identity"] = vmu.Identity
17190	}
17191	if vmu.Zones != nil {
17192		objectMap["zones"] = vmu.Zones
17193	}
17194	if vmu.Tags != nil {
17195		objectMap["tags"] = vmu.Tags
17196	}
17197	return json.Marshal(objectMap)
17198}
17199
17200// UnmarshalJSON is the custom unmarshaler for VirtualMachineUpdate struct.
17201func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error {
17202	var m map[string]*json.RawMessage
17203	err := json.Unmarshal(body, &m)
17204	if err != nil {
17205		return err
17206	}
17207	for k, v := range m {
17208		switch k {
17209		case "plan":
17210			if v != nil {
17211				var plan Plan
17212				err = json.Unmarshal(*v, &plan)
17213				if err != nil {
17214					return err
17215				}
17216				vmu.Plan = &plan
17217			}
17218		case "properties":
17219			if v != nil {
17220				var virtualMachineProperties VirtualMachineProperties
17221				err = json.Unmarshal(*v, &virtualMachineProperties)
17222				if err != nil {
17223					return err
17224				}
17225				vmu.VirtualMachineProperties = &virtualMachineProperties
17226			}
17227		case "identity":
17228			if v != nil {
17229				var identity VirtualMachineIdentity
17230				err = json.Unmarshal(*v, &identity)
17231				if err != nil {
17232					return err
17233				}
17234				vmu.Identity = &identity
17235			}
17236		case "zones":
17237			if v != nil {
17238				var zones []string
17239				err = json.Unmarshal(*v, &zones)
17240				if err != nil {
17241					return err
17242				}
17243				vmu.Zones = &zones
17244			}
17245		case "tags":
17246			if v != nil {
17247				var tags map[string]*string
17248				err = json.Unmarshal(*v, &tags)
17249				if err != nil {
17250					return err
17251				}
17252				vmu.Tags = tags
17253			}
17254		}
17255	}
17256
17257	return nil
17258}
17259
17260// VMScaleSetConvertToSinglePlacementGroupInput ...
17261type VMScaleSetConvertToSinglePlacementGroupInput struct {
17262	// ActivePlacementGroupID - Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances.
17263	ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"`
17264}
17265
17266// WindowsConfiguration specifies Windows operating system settings on the virtual machine.
17267type WindowsConfiguration struct {
17268	// 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.
17269	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
17270	// EnableAutomaticUpdates - Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. <br><br> For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.
17271	EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
17272	// TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". <br><br> Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.getsystemtimezones).
17273	TimeZone *string `json:"timeZone,omitempty"`
17274	// AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.
17275	AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"`
17276	// PatchSettings - Specifies settings related to in-guest patching (KBs).
17277	PatchSettings *PatchSettings `json:"patchSettings,omitempty"`
17278	// WinRM - Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.
17279	WinRM *WinRMConfiguration `json:"winRM,omitempty"`
17280}
17281
17282// WinRMConfiguration describes Windows Remote Management configuration of the VM
17283type WinRMConfiguration struct {
17284	// Listeners - The list of Windows Remote Management listeners
17285	Listeners *[]WinRMListener `json:"listeners,omitempty"`
17286}
17287
17288// WinRMListener describes Protocol and thumbprint of Windows Remote Management listener
17289type WinRMListener struct {
17290	// Protocol - Specifies the protocol of WinRM listener. <br><br> Possible values are: <br>**http** <br><br> **https**. Possible values include: 'HTTP', 'HTTPS'
17291	Protocol ProtocolTypes `json:"protocol,omitempty"`
17292	// 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>}
17293	CertificateURL *string `json:"certificateUrl,omitempty"`
17294}
17295