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	"io"
18	"net/http"
19)
20
21// The package's fully qualified name.
22const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2020-10-01-preview/compute"
23
24// AccessURI a disk access SAS uri.
25type AccessURI struct {
26	autorest.Response `json:"-"`
27	// AccessSAS - READ-ONLY; A SAS uri for accessing a disk.
28	AccessSAS *string `json:"accessSAS,omitempty"`
29}
30
31// MarshalJSON is the custom marshaler for AccessURI.
32func (au AccessURI) MarshalJSON() ([]byte, error) {
33	objectMap := make(map[string]interface{})
34	return json.Marshal(objectMap)
35}
36
37// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale
38// set.
39type AdditionalCapabilities struct {
40	// 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.
41	UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`
42}
43
44// AdditionalUnattendContent specifies additional XML formatted information that can be included in the
45// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name,
46// and the pass in which the content is applied.
47type AdditionalUnattendContent struct {
48	// PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem'
49	PassName PassNames `json:"passName,omitempty"`
50	// ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'MicrosoftWindowsShellSetup'
51	ComponentName ComponentNames `json:"componentName,omitempty"`
52	// SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands'
53	SettingName SettingNames `json:"settingName,omitempty"`
54	// 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.
55	Content *string `json:"content,omitempty"`
56}
57
58// APIEntityReference the API entity reference.
59type APIEntityReference struct {
60	// ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
61	ID *string `json:"id,omitempty"`
62}
63
64// APIError api error.
65type APIError struct {
66	// Details - The Api error details
67	Details *[]APIErrorBase `json:"details,omitempty"`
68	// Innererror - The Api inner error
69	Innererror *InnerError `json:"innererror,omitempty"`
70	// Code - The error code.
71	Code *string `json:"code,omitempty"`
72	// Target - The target of the particular error.
73	Target *string `json:"target,omitempty"`
74	// Message - The error message.
75	Message *string `json:"message,omitempty"`
76}
77
78// APIErrorBase api error base.
79type APIErrorBase struct {
80	// Code - The error code.
81	Code *string `json:"code,omitempty"`
82	// Target - The target of the particular error.
83	Target *string `json:"target,omitempty"`
84	// Message - The error message.
85	Message *string `json:"message,omitempty"`
86}
87
88// AutomaticOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade.
89type AutomaticOSUpgradePolicy struct {
90	// 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.
91	EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"`
92	// DisableAutomaticRollback - Whether OS image rollback feature should be disabled. Default value is false.
93	DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"`
94}
95
96// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image.
97type AutomaticOSUpgradeProperties struct {
98	// AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image.
99	AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"`
100}
101
102// AutomaticRepairsPolicy specifies the configuration parameters for automatic repairs on the virtual
103// machine scale set.
104type AutomaticRepairsPolicy struct {
105	// Enabled - Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
106	Enabled *bool `json:"enabled,omitempty"`
107	// 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).
108	GracePeriod *string `json:"gracePeriod,omitempty"`
109}
110
111// AvailabilitySet specifies information about the availability set that the virtual machine should be
112// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to
113// maximize availability. For more information about availability sets, see [Manage the availability of
114// virtual
115// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
116// <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual
117// machines in
118// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
119// <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot
120// be added to an availability set.
121type AvailabilitySet struct {
122	autorest.Response          `json:"-"`
123	*AvailabilitySetProperties `json:"properties,omitempty"`
124	// 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'.
125	Sku *Sku `json:"sku,omitempty"`
126	// ID - READ-ONLY; Resource Id
127	ID *string `json:"id,omitempty"`
128	// Name - READ-ONLY; Resource name
129	Name *string `json:"name,omitempty"`
130	// Type - READ-ONLY; Resource type
131	Type *string `json:"type,omitempty"`
132	// Location - Resource location
133	Location *string `json:"location,omitempty"`
134	// Tags - Resource tags
135	Tags map[string]*string `json:"tags"`
136}
137
138// MarshalJSON is the custom marshaler for AvailabilitySet.
139func (as AvailabilitySet) MarshalJSON() ([]byte, error) {
140	objectMap := make(map[string]interface{})
141	if as.AvailabilitySetProperties != nil {
142		objectMap["properties"] = as.AvailabilitySetProperties
143	}
144	if as.Sku != nil {
145		objectMap["sku"] = as.Sku
146	}
147	if as.Location != nil {
148		objectMap["location"] = as.Location
149	}
150	if as.Tags != nil {
151		objectMap["tags"] = as.Tags
152	}
153	return json.Marshal(objectMap)
154}
155
156// UnmarshalJSON is the custom unmarshaler for AvailabilitySet struct.
157func (as *AvailabilitySet) UnmarshalJSON(body []byte) error {
158	var m map[string]*json.RawMessage
159	err := json.Unmarshal(body, &m)
160	if err != nil {
161		return err
162	}
163	for k, v := range m {
164		switch k {
165		case "properties":
166			if v != nil {
167				var availabilitySetProperties AvailabilitySetProperties
168				err = json.Unmarshal(*v, &availabilitySetProperties)
169				if err != nil {
170					return err
171				}
172				as.AvailabilitySetProperties = &availabilitySetProperties
173			}
174		case "sku":
175			if v != nil {
176				var sku Sku
177				err = json.Unmarshal(*v, &sku)
178				if err != nil {
179					return err
180				}
181				as.Sku = &sku
182			}
183		case "id":
184			if v != nil {
185				var ID string
186				err = json.Unmarshal(*v, &ID)
187				if err != nil {
188					return err
189				}
190				as.ID = &ID
191			}
192		case "name":
193			if v != nil {
194				var name string
195				err = json.Unmarshal(*v, &name)
196				if err != nil {
197					return err
198				}
199				as.Name = &name
200			}
201		case "type":
202			if v != nil {
203				var typeVar string
204				err = json.Unmarshal(*v, &typeVar)
205				if err != nil {
206					return err
207				}
208				as.Type = &typeVar
209			}
210		case "location":
211			if v != nil {
212				var location string
213				err = json.Unmarshal(*v, &location)
214				if err != nil {
215					return err
216				}
217				as.Location = &location
218			}
219		case "tags":
220			if v != nil {
221				var tags map[string]*string
222				err = json.Unmarshal(*v, &tags)
223				if err != nil {
224					return err
225				}
226				as.Tags = tags
227			}
228		}
229	}
230
231	return nil
232}
233
234// AvailabilitySetListResult the List Availability Set operation response.
235type AvailabilitySetListResult struct {
236	autorest.Response `json:"-"`
237	// Value - The list of availability sets
238	Value *[]AvailabilitySet `json:"value,omitempty"`
239	// NextLink - The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets.
240	NextLink *string `json:"nextLink,omitempty"`
241}
242
243// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values.
244type AvailabilitySetListResultIterator struct {
245	i    int
246	page AvailabilitySetListResultPage
247}
248
249// NextWithContext advances to the next value.  If there was an error making
250// the request the iterator does not advance and the error is returned.
251func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) {
252	if tracing.IsEnabled() {
253		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.NextWithContext")
254		defer func() {
255			sc := -1
256			if iter.Response().Response.Response != nil {
257				sc = iter.Response().Response.Response.StatusCode
258			}
259			tracing.EndSpan(ctx, sc, err)
260		}()
261	}
262	iter.i++
263	if iter.i < len(iter.page.Values()) {
264		return nil
265	}
266	err = iter.page.NextWithContext(ctx)
267	if err != nil {
268		iter.i--
269		return err
270	}
271	iter.i = 0
272	return nil
273}
274
275// Next advances to the next value.  If there was an error making
276// the request the iterator does not advance and the error is returned.
277// Deprecated: Use NextWithContext() instead.
278func (iter *AvailabilitySetListResultIterator) Next() error {
279	return iter.NextWithContext(context.Background())
280}
281
282// NotDone returns true if the enumeration should be started or is not yet complete.
283func (iter AvailabilitySetListResultIterator) NotDone() bool {
284	return iter.page.NotDone() && iter.i < len(iter.page.Values())
285}
286
287// Response returns the raw server response from the last page request.
288func (iter AvailabilitySetListResultIterator) Response() AvailabilitySetListResult {
289	return iter.page.Response()
290}
291
292// Value returns the current value or a zero-initialized value if the
293// iterator has advanced beyond the end of the collection.
294func (iter AvailabilitySetListResultIterator) Value() AvailabilitySet {
295	if !iter.page.NotDone() {
296		return AvailabilitySet{}
297	}
298	return iter.page.Values()[iter.i]
299}
300
301// Creates a new instance of the AvailabilitySetListResultIterator type.
302func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator {
303	return AvailabilitySetListResultIterator{page: page}
304}
305
306// IsEmpty returns true if the ListResult contains no values.
307func (aslr AvailabilitySetListResult) IsEmpty() bool {
308	return aslr.Value == nil || len(*aslr.Value) == 0
309}
310
311// hasNextLink returns true if the NextLink is not empty.
312func (aslr AvailabilitySetListResult) hasNextLink() bool {
313	return aslr.NextLink != nil && len(*aslr.NextLink) != 0
314}
315
316// availabilitySetListResultPreparer prepares a request to retrieve the next set of results.
317// It returns nil if no more results exist.
318func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer(ctx context.Context) (*http.Request, error) {
319	if !aslr.hasNextLink() {
320		return nil, nil
321	}
322	return autorest.Prepare((&http.Request{}).WithContext(ctx),
323		autorest.AsJSON(),
324		autorest.AsGet(),
325		autorest.WithBaseURL(to.String(aslr.NextLink)))
326}
327
328// AvailabilitySetListResultPage contains a page of AvailabilitySet values.
329type AvailabilitySetListResultPage struct {
330	fn   func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)
331	aslr AvailabilitySetListResult
332}
333
334// NextWithContext advances to the next page of values.  If there was an error making
335// the request the page does not advance and the error is returned.
336func (page *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) (err error) {
337	if tracing.IsEnabled() {
338		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultPage.NextWithContext")
339		defer func() {
340			sc := -1
341			if page.Response().Response.Response != nil {
342				sc = page.Response().Response.Response.StatusCode
343			}
344			tracing.EndSpan(ctx, sc, err)
345		}()
346	}
347	for {
348		next, err := page.fn(ctx, page.aslr)
349		if err != nil {
350			return err
351		}
352		page.aslr = next
353		if !next.hasNextLink() || !next.IsEmpty() {
354			break
355		}
356	}
357	return nil
358}
359
360// Next advances to the next page of values.  If there was an error making
361// the request the page does not advance and the error is returned.
362// Deprecated: Use NextWithContext() instead.
363func (page *AvailabilitySetListResultPage) Next() error {
364	return page.NextWithContext(context.Background())
365}
366
367// NotDone returns true if the page enumeration should be started or is not yet complete.
368func (page AvailabilitySetListResultPage) NotDone() bool {
369	return !page.aslr.IsEmpty()
370}
371
372// Response returns the raw server response from the last page request.
373func (page AvailabilitySetListResultPage) Response() AvailabilitySetListResult {
374	return page.aslr
375}
376
377// Values returns the slice of values for the current page or nil if there are no values.
378func (page AvailabilitySetListResultPage) Values() []AvailabilitySet {
379	if page.aslr.IsEmpty() {
380		return nil
381	}
382	return *page.aslr.Value
383}
384
385// Creates a new instance of the AvailabilitySetListResultPage type.
386func NewAvailabilitySetListResultPage(cur AvailabilitySetListResult, getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage {
387	return AvailabilitySetListResultPage{
388		fn:   getNextPage,
389		aslr: cur,
390	}
391}
392
393// AvailabilitySetProperties the instance view of a resource.
394type AvailabilitySetProperties struct {
395	// PlatformUpdateDomainCount - Update Domain count.
396	PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"`
397	// PlatformFaultDomainCount - Fault Domain count.
398	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
399	// VirtualMachines - A list of references to all virtual machines in the availability set.
400	VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"`
401	// ProximityPlacementGroup - Specifies information about the proximity placement group that the availability set should be assigned to. <br><br>Minimum api-version: 2018-04-01.
402	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
403	// Statuses - READ-ONLY; The resource status information.
404	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
405}
406
407// MarshalJSON is the custom marshaler for AvailabilitySetProperties.
408func (asp AvailabilitySetProperties) MarshalJSON() ([]byte, error) {
409	objectMap := make(map[string]interface{})
410	if asp.PlatformUpdateDomainCount != nil {
411		objectMap["platformUpdateDomainCount"] = asp.PlatformUpdateDomainCount
412	}
413	if asp.PlatformFaultDomainCount != nil {
414		objectMap["platformFaultDomainCount"] = asp.PlatformFaultDomainCount
415	}
416	if asp.VirtualMachines != nil {
417		objectMap["virtualMachines"] = asp.VirtualMachines
418	}
419	if asp.ProximityPlacementGroup != nil {
420		objectMap["proximityPlacementGroup"] = asp.ProximityPlacementGroup
421	}
422	return json.Marshal(objectMap)
423}
424
425// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should
426// be assigned to. Only tags may be updated.
427type AvailabilitySetUpdate struct {
428	*AvailabilitySetProperties `json:"properties,omitempty"`
429	// Sku - Sku of the availability set
430	Sku *Sku `json:"sku,omitempty"`
431	// Tags - Resource tags
432	Tags map[string]*string `json:"tags"`
433}
434
435// MarshalJSON is the custom marshaler for AvailabilitySetUpdate.
436func (asu AvailabilitySetUpdate) MarshalJSON() ([]byte, error) {
437	objectMap := make(map[string]interface{})
438	if asu.AvailabilitySetProperties != nil {
439		objectMap["properties"] = asu.AvailabilitySetProperties
440	}
441	if asu.Sku != nil {
442		objectMap["sku"] = asu.Sku
443	}
444	if asu.Tags != nil {
445		objectMap["tags"] = asu.Tags
446	}
447	return json.Marshal(objectMap)
448}
449
450// UnmarshalJSON is the custom unmarshaler for AvailabilitySetUpdate struct.
451func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
452	var m map[string]*json.RawMessage
453	err := json.Unmarshal(body, &m)
454	if err != nil {
455		return err
456	}
457	for k, v := range m {
458		switch k {
459		case "properties":
460			if v != nil {
461				var availabilitySetProperties AvailabilitySetProperties
462				err = json.Unmarshal(*v, &availabilitySetProperties)
463				if err != nil {
464					return err
465				}
466				asu.AvailabilitySetProperties = &availabilitySetProperties
467			}
468		case "sku":
469			if v != nil {
470				var sku Sku
471				err = json.Unmarshal(*v, &sku)
472				if err != nil {
473					return err
474				}
475				asu.Sku = &sku
476			}
477		case "tags":
478			if v != nil {
479				var tags map[string]*string
480				err = json.Unmarshal(*v, &tags)
481				if err != nil {
482					return err
483				}
484				asu.Tags = tags
485			}
486		}
487	}
488
489	return nil
490}
491
492// AvailablePatchSummary describes the properties of an virtual machine instance view for available patch
493// summary.
494type AvailablePatchSummary struct {
495	// 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'
496	Status PatchOperationStatus `json:"status,omitempty"`
497	// AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
498	AssessmentActivityID *string `json:"assessmentActivityId,omitempty"`
499	// 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.
500	RebootPending *bool `json:"rebootPending,omitempty"`
501	// CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
502	CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"`
503	// OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security.
504	OtherPatchCount *int32 `json:"otherPatchCount,omitempty"`
505	// StartTime - READ-ONLY; The UTC timestamp when the operation began.
506	StartTime *date.Time `json:"startTime,omitempty"`
507	// LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began.
508	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
509	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
510	Error *APIError `json:"error,omitempty"`
511}
512
513// MarshalJSON is the custom marshaler for AvailablePatchSummary.
514func (aps AvailablePatchSummary) MarshalJSON() ([]byte, error) {
515	objectMap := make(map[string]interface{})
516	return json.Marshal(objectMap)
517}
518
519// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS. <br><br>Minimum
520// api-version: 2019-03-01.
521type BillingProfile struct {
522	// 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.
523	MaxPrice *float64 `json:"maxPrice,omitempty"`
524}
525
526// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and
527// Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br>
528// Azure also enables you to see a screenshot of the VM from the hypervisor.
529type BootDiagnostics struct {
530	// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
531	Enabled *bool `json:"enabled,omitempty"`
532	// 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.
533	StorageURI *string `json:"storageUri,omitempty"`
534}
535
536// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics.
537type BootDiagnosticsInstanceView struct {
538	// 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.
539	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
540	// 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.
541	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
542	// 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.
543	Status *InstanceViewStatus `json:"status,omitempty"`
544}
545
546// MarshalJSON is the custom marshaler for BootDiagnosticsInstanceView.
547func (bdiv BootDiagnosticsInstanceView) MarshalJSON() ([]byte, error) {
548	objectMap := make(map[string]interface{})
549	return json.Marshal(objectMap)
550}
551
552// CloudError an error response from the Compute service.
553type CloudError struct {
554	Error *APIError `json:"error,omitempty"`
555}
556
557// CloudService describes the cloud service.
558type CloudService struct {
559	autorest.Response `json:"-"`
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	Properties *CloudServiceProperties `json:"properties,omitempty"`
571}
572
573// MarshalJSON is the custom marshaler for CloudService.
574func (cs CloudService) MarshalJSON() ([]byte, error) {
575	objectMap := make(map[string]interface{})
576	if cs.Location != nil {
577		objectMap["location"] = cs.Location
578	}
579	if cs.Tags != nil {
580		objectMap["tags"] = cs.Tags
581	}
582	if cs.Properties != nil {
583		objectMap["properties"] = cs.Properties
584	}
585	return json.Marshal(objectMap)
586}
587
588// CloudServiceExtensionProfile describes a cloud service extension profile.
589type CloudServiceExtensionProfile struct {
590	// Extensions - List of extensions for the cloud service.
591	Extensions *[]Extension `json:"extensions,omitempty"`
592}
593
594// CloudServiceExtensionProperties extension Properties.
595type CloudServiceExtensionProperties struct {
596	// Publisher - The name of the extension handler publisher.
597	Publisher *string `json:"publisher,omitempty"`
598	// Type - Specifies the type of the extension.
599	Type *string `json:"type,omitempty"`
600	// TypeHandlerVersion - Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance.
601	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
602	// AutoUpgradeMinorVersion - Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available.
603	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
604	// Settings - Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension.
605	Settings *string `json:"settings,omitempty"`
606	// ProtectedSettings - Protected settings for the extension which are encrypted before sent to the role instance.
607	ProtectedSettings             *string                              `json:"protectedSettings,omitempty"`
608	ProtectedSettingsFromKeyVault *CloudServiceVaultAndSecretReference `json:"protectedSettingsFromKeyVault,omitempty"`
609	// ForceUpdateTag - Tag to force apply the provided public and protected settings.
610	// Changing the tag value allows for re-running the extension without changing any of the public or protected settings.
611	// If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler.
612	// If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and
613	// it is up to handler implementation whether to re-run it or not
614	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
615	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
616	ProvisioningState *string `json:"provisioningState,omitempty"`
617	// RolesAppliedTo - Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service.
618	RolesAppliedTo *[]string `json:"rolesAppliedTo,omitempty"`
619}
620
621// MarshalJSON is the custom marshaler for CloudServiceExtensionProperties.
622func (csep CloudServiceExtensionProperties) MarshalJSON() ([]byte, error) {
623	objectMap := make(map[string]interface{})
624	if csep.Publisher != nil {
625		objectMap["publisher"] = csep.Publisher
626	}
627	if csep.Type != nil {
628		objectMap["type"] = csep.Type
629	}
630	if csep.TypeHandlerVersion != nil {
631		objectMap["typeHandlerVersion"] = csep.TypeHandlerVersion
632	}
633	if csep.AutoUpgradeMinorVersion != nil {
634		objectMap["autoUpgradeMinorVersion"] = csep.AutoUpgradeMinorVersion
635	}
636	if csep.Settings != nil {
637		objectMap["settings"] = csep.Settings
638	}
639	if csep.ProtectedSettings != nil {
640		objectMap["protectedSettings"] = csep.ProtectedSettings
641	}
642	if csep.ProtectedSettingsFromKeyVault != nil {
643		objectMap["protectedSettingsFromKeyVault"] = csep.ProtectedSettingsFromKeyVault
644	}
645	if csep.ForceUpdateTag != nil {
646		objectMap["forceUpdateTag"] = csep.ForceUpdateTag
647	}
648	if csep.RolesAppliedTo != nil {
649		objectMap["rolesAppliedTo"] = csep.RolesAppliedTo
650	}
651	return json.Marshal(objectMap)
652}
653
654// CloudServiceInstanceView instanceView of CloudService as a whole
655type CloudServiceInstanceView struct {
656	autorest.Response `json:"-"`
657	RoleInstance      *InstanceViewStatusesSummary `json:"roleInstance,omitempty"`
658	// SdkVersion - READ-ONLY; The version of the SDK that was used to generate the package for the cloud service.
659	SdkVersion *string `json:"sdkVersion,omitempty"`
660	// Statuses - READ-ONLY
661	Statuses *[]ResourceInstanceViewStatus `json:"statuses,omitempty"`
662}
663
664// MarshalJSON is the custom marshaler for CloudServiceInstanceView.
665func (csiv CloudServiceInstanceView) MarshalJSON() ([]byte, error) {
666	objectMap := make(map[string]interface{})
667	if csiv.RoleInstance != nil {
668		objectMap["roleInstance"] = csiv.RoleInstance
669	}
670	return json.Marshal(objectMap)
671}
672
673// CloudServiceListResult ...
674type CloudServiceListResult struct {
675	autorest.Response `json:"-"`
676	Value             *[]CloudService `json:"value,omitempty"`
677	NextLink          *string         `json:"nextLink,omitempty"`
678}
679
680// CloudServiceListResultIterator provides access to a complete listing of CloudService values.
681type CloudServiceListResultIterator struct {
682	i    int
683	page CloudServiceListResultPage
684}
685
686// NextWithContext advances to the next value.  If there was an error making
687// the request the iterator does not advance and the error is returned.
688func (iter *CloudServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
689	if tracing.IsEnabled() {
690		ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceListResultIterator.NextWithContext")
691		defer func() {
692			sc := -1
693			if iter.Response().Response.Response != nil {
694				sc = iter.Response().Response.Response.StatusCode
695			}
696			tracing.EndSpan(ctx, sc, err)
697		}()
698	}
699	iter.i++
700	if iter.i < len(iter.page.Values()) {
701		return nil
702	}
703	err = iter.page.NextWithContext(ctx)
704	if err != nil {
705		iter.i--
706		return err
707	}
708	iter.i = 0
709	return nil
710}
711
712// Next advances to the next value.  If there was an error making
713// the request the iterator does not advance and the error is returned.
714// Deprecated: Use NextWithContext() instead.
715func (iter *CloudServiceListResultIterator) Next() error {
716	return iter.NextWithContext(context.Background())
717}
718
719// NotDone returns true if the enumeration should be started or is not yet complete.
720func (iter CloudServiceListResultIterator) NotDone() bool {
721	return iter.page.NotDone() && iter.i < len(iter.page.Values())
722}
723
724// Response returns the raw server response from the last page request.
725func (iter CloudServiceListResultIterator) Response() CloudServiceListResult {
726	return iter.page.Response()
727}
728
729// Value returns the current value or a zero-initialized value if the
730// iterator has advanced beyond the end of the collection.
731func (iter CloudServiceListResultIterator) Value() CloudService {
732	if !iter.page.NotDone() {
733		return CloudService{}
734	}
735	return iter.page.Values()[iter.i]
736}
737
738// Creates a new instance of the CloudServiceListResultIterator type.
739func NewCloudServiceListResultIterator(page CloudServiceListResultPage) CloudServiceListResultIterator {
740	return CloudServiceListResultIterator{page: page}
741}
742
743// IsEmpty returns true if the ListResult contains no values.
744func (cslr CloudServiceListResult) IsEmpty() bool {
745	return cslr.Value == nil || len(*cslr.Value) == 0
746}
747
748// hasNextLink returns true if the NextLink is not empty.
749func (cslr CloudServiceListResult) hasNextLink() bool {
750	return cslr.NextLink != nil && len(*cslr.NextLink) != 0
751}
752
753// cloudServiceListResultPreparer prepares a request to retrieve the next set of results.
754// It returns nil if no more results exist.
755func (cslr CloudServiceListResult) cloudServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
756	if !cslr.hasNextLink() {
757		return nil, nil
758	}
759	return autorest.Prepare((&http.Request{}).WithContext(ctx),
760		autorest.AsJSON(),
761		autorest.AsGet(),
762		autorest.WithBaseURL(to.String(cslr.NextLink)))
763}
764
765// CloudServiceListResultPage contains a page of CloudService values.
766type CloudServiceListResultPage struct {
767	fn   func(context.Context, CloudServiceListResult) (CloudServiceListResult, error)
768	cslr CloudServiceListResult
769}
770
771// NextWithContext advances to the next page of values.  If there was an error making
772// the request the page does not advance and the error is returned.
773func (page *CloudServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
774	if tracing.IsEnabled() {
775		ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceListResultPage.NextWithContext")
776		defer func() {
777			sc := -1
778			if page.Response().Response.Response != nil {
779				sc = page.Response().Response.Response.StatusCode
780			}
781			tracing.EndSpan(ctx, sc, err)
782		}()
783	}
784	for {
785		next, err := page.fn(ctx, page.cslr)
786		if err != nil {
787			return err
788		}
789		page.cslr = next
790		if !next.hasNextLink() || !next.IsEmpty() {
791			break
792		}
793	}
794	return nil
795}
796
797// Next advances to the next page of values.  If there was an error making
798// the request the page does not advance and the error is returned.
799// Deprecated: Use NextWithContext() instead.
800func (page *CloudServiceListResultPage) Next() error {
801	return page.NextWithContext(context.Background())
802}
803
804// NotDone returns true if the page enumeration should be started or is not yet complete.
805func (page CloudServiceListResultPage) NotDone() bool {
806	return !page.cslr.IsEmpty()
807}
808
809// Response returns the raw server response from the last page request.
810func (page CloudServiceListResultPage) Response() CloudServiceListResult {
811	return page.cslr
812}
813
814// Values returns the slice of values for the current page or nil if there are no values.
815func (page CloudServiceListResultPage) Values() []CloudService {
816	if page.cslr.IsEmpty() {
817		return nil
818	}
819	return *page.cslr.Value
820}
821
822// Creates a new instance of the CloudServiceListResultPage type.
823func NewCloudServiceListResultPage(cur CloudServiceListResult, getNextPage func(context.Context, CloudServiceListResult) (CloudServiceListResult, error)) CloudServiceListResultPage {
824	return CloudServiceListResultPage{
825		fn:   getNextPage,
826		cslr: cur,
827	}
828}
829
830// CloudServiceNetworkProfile network Profile for the cloud service.
831type CloudServiceNetworkProfile struct {
832	// LoadBalancerConfigurations - The list of load balancer configurations for the cloud service.
833	LoadBalancerConfigurations *[]LoadBalancerConfiguration `json:"loadBalancerConfigurations,omitempty"`
834	SwappableCloudService      *SubResource                 `json:"swappableCloudService,omitempty"`
835}
836
837// CloudServiceOsProfile describes the OS profile for the cloud service.
838type CloudServiceOsProfile struct {
839	// Secrets - Specifies set of certificates that should be installed onto the role instances.
840	Secrets *[]CloudServiceVaultSecretGroup `json:"secrets,omitempty"`
841}
842
843// CloudServiceProperties cloud service properties
844type CloudServiceProperties struct {
845	// PackageURL - Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account.
846	// This is a write-only property and is not returned in GET calls.
847	PackageURL *string `json:"packageUrl,omitempty"`
848	// Configuration - Specifies the XML service configuration (.cscfg) for the cloud service.
849	Configuration *string `json:"configuration,omitempty"`
850	// ConfigurationURL - Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL  can be Shared Access Signature (SAS) URI from any storage account.
851	// This is a write-only property and is not returned in GET calls.
852	ConfigurationURL *string `json:"configurationUrl,omitempty"`
853	// StartCloudService - (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`.
854	// If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff.
855	StartCloudService *bool `json:"startCloudService,omitempty"`
856	// UpgradeMode - Possible values include: 'Auto', 'Manual', 'Simultaneous'
857	UpgradeMode      CloudServiceUpgradeMode       `json:"upgradeMode,omitempty"`
858	RoleProfile      *CloudServiceRoleProfile      `json:"roleProfile,omitempty"`
859	OsProfile        *CloudServiceOsProfile        `json:"osProfile,omitempty"`
860	NetworkProfile   *CloudServiceNetworkProfile   `json:"networkProfile,omitempty"`
861	ExtensionProfile *CloudServiceExtensionProfile `json:"extensionProfile,omitempty"`
862	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
863	ProvisioningState *string `json:"provisioningState,omitempty"`
864	// UniqueID - READ-ONLY; The unique identifier for the cloud service.
865	UniqueID *string `json:"uniqueId,omitempty"`
866}
867
868// MarshalJSON is the custom marshaler for CloudServiceProperties.
869func (csp CloudServiceProperties) MarshalJSON() ([]byte, error) {
870	objectMap := make(map[string]interface{})
871	if csp.PackageURL != nil {
872		objectMap["packageUrl"] = csp.PackageURL
873	}
874	if csp.Configuration != nil {
875		objectMap["configuration"] = csp.Configuration
876	}
877	if csp.ConfigurationURL != nil {
878		objectMap["configurationUrl"] = csp.ConfigurationURL
879	}
880	if csp.StartCloudService != nil {
881		objectMap["startCloudService"] = csp.StartCloudService
882	}
883	if csp.UpgradeMode != "" {
884		objectMap["upgradeMode"] = csp.UpgradeMode
885	}
886	if csp.RoleProfile != nil {
887		objectMap["roleProfile"] = csp.RoleProfile
888	}
889	if csp.OsProfile != nil {
890		objectMap["osProfile"] = csp.OsProfile
891	}
892	if csp.NetworkProfile != nil {
893		objectMap["networkProfile"] = csp.NetworkProfile
894	}
895	if csp.ExtensionProfile != nil {
896		objectMap["extensionProfile"] = csp.ExtensionProfile
897	}
898	return json.Marshal(objectMap)
899}
900
901// CloudServiceRole describes a role of the cloud service.
902type CloudServiceRole struct {
903	autorest.Response `json:"-"`
904	// ID - READ-ONLY; Resource id
905	ID *string `json:"id,omitempty"`
906	// Name - READ-ONLY; Resource name
907	Name *string `json:"name,omitempty"`
908	// Type - READ-ONLY; Resource type
909	Type *string `json:"type,omitempty"`
910	// Location - READ-ONLY; Resource location
911	Location   *string                     `json:"location,omitempty"`
912	Sku        *CloudServiceRoleSku        `json:"sku,omitempty"`
913	Properties *CloudServiceRoleProperties `json:"properties,omitempty"`
914}
915
916// MarshalJSON is the custom marshaler for CloudServiceRole.
917func (csr CloudServiceRole) MarshalJSON() ([]byte, error) {
918	objectMap := make(map[string]interface{})
919	if csr.Sku != nil {
920		objectMap["sku"] = csr.Sku
921	}
922	if csr.Properties != nil {
923		objectMap["properties"] = csr.Properties
924	}
925	return json.Marshal(objectMap)
926}
927
928// CloudServiceRoleInstancesDeleteFuture an abstraction for monitoring and retrieving the results of a
929// long-running operation.
930type CloudServiceRoleInstancesDeleteFuture struct {
931	azure.FutureAPI
932	// Result returns the result of the asynchronous operation.
933	// If the operation has not completed it will return an error.
934	Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
935}
936
937// UnmarshalJSON is the custom unmarshaller for CreateFuture.
938func (future *CloudServiceRoleInstancesDeleteFuture) UnmarshalJSON(body []byte) error {
939	var azFuture azure.Future
940	if err := json.Unmarshal(body, &azFuture); err != nil {
941		return err
942	}
943	future.FutureAPI = &azFuture
944	future.Result = future.result
945	return nil
946}
947
948// result is the default implementation for CloudServiceRoleInstancesDeleteFuture.Result.
949func (future *CloudServiceRoleInstancesDeleteFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) {
950	var done bool
951	done, err = future.DoneWithContext(context.Background(), client)
952	if err != nil {
953		err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesDeleteFuture", "Result", future.Response(), "Polling failure")
954		return
955	}
956	if !done {
957		ar.Response = future.Response()
958		err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesDeleteFuture")
959		return
960	}
961	ar.Response = future.Response()
962	return
963}
964
965// CloudServiceRoleInstancesRebuildFuture an abstraction for monitoring and retrieving the results of a
966// long-running operation.
967type CloudServiceRoleInstancesRebuildFuture struct {
968	azure.FutureAPI
969	// Result returns the result of the asynchronous operation.
970	// If the operation has not completed it will return an error.
971	Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
972}
973
974// UnmarshalJSON is the custom unmarshaller for CreateFuture.
975func (future *CloudServiceRoleInstancesRebuildFuture) UnmarshalJSON(body []byte) error {
976	var azFuture azure.Future
977	if err := json.Unmarshal(body, &azFuture); err != nil {
978		return err
979	}
980	future.FutureAPI = &azFuture
981	future.Result = future.result
982	return nil
983}
984
985// result is the default implementation for CloudServiceRoleInstancesRebuildFuture.Result.
986func (future *CloudServiceRoleInstancesRebuildFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) {
987	var done bool
988	done, err = future.DoneWithContext(context.Background(), client)
989	if err != nil {
990		err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesRebuildFuture", "Result", future.Response(), "Polling failure")
991		return
992	}
993	if !done {
994		ar.Response = future.Response()
995		err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesRebuildFuture")
996		return
997	}
998	ar.Response = future.Response()
999	return
1000}
1001
1002// CloudServiceRoleInstancesReimageFuture an abstraction for monitoring and retrieving the results of a
1003// long-running operation.
1004type CloudServiceRoleInstancesReimageFuture struct {
1005	azure.FutureAPI
1006	// Result returns the result of the asynchronous operation.
1007	// If the operation has not completed it will return an error.
1008	Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
1009}
1010
1011// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1012func (future *CloudServiceRoleInstancesReimageFuture) UnmarshalJSON(body []byte) error {
1013	var azFuture azure.Future
1014	if err := json.Unmarshal(body, &azFuture); err != nil {
1015		return err
1016	}
1017	future.FutureAPI = &azFuture
1018	future.Result = future.result
1019	return nil
1020}
1021
1022// result is the default implementation for CloudServiceRoleInstancesReimageFuture.Result.
1023func (future *CloudServiceRoleInstancesReimageFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) {
1024	var done bool
1025	done, err = future.DoneWithContext(context.Background(), client)
1026	if err != nil {
1027		err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesReimageFuture", "Result", future.Response(), "Polling failure")
1028		return
1029	}
1030	if !done {
1031		ar.Response = future.Response()
1032		err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesReimageFuture")
1033		return
1034	}
1035	ar.Response = future.Response()
1036	return
1037}
1038
1039// CloudServiceRoleInstancesRestartFuture an abstraction for monitoring and retrieving the results of a
1040// long-running operation.
1041type CloudServiceRoleInstancesRestartFuture struct {
1042	azure.FutureAPI
1043	// Result returns the result of the asynchronous operation.
1044	// If the operation has not completed it will return an error.
1045	Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
1046}
1047
1048// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1049func (future *CloudServiceRoleInstancesRestartFuture) UnmarshalJSON(body []byte) error {
1050	var azFuture azure.Future
1051	if err := json.Unmarshal(body, &azFuture); err != nil {
1052		return err
1053	}
1054	future.FutureAPI = &azFuture
1055	future.Result = future.result
1056	return nil
1057}
1058
1059// result is the default implementation for CloudServiceRoleInstancesRestartFuture.Result.
1060func (future *CloudServiceRoleInstancesRestartFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) {
1061	var done bool
1062	done, err = future.DoneWithContext(context.Background(), client)
1063	if err != nil {
1064		err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesRestartFuture", "Result", future.Response(), "Polling failure")
1065		return
1066	}
1067	if !done {
1068		ar.Response = future.Response()
1069		err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesRestartFuture")
1070		return
1071	}
1072	ar.Response = future.Response()
1073	return
1074}
1075
1076// CloudServiceRoleListResult ...
1077type CloudServiceRoleListResult struct {
1078	autorest.Response `json:"-"`
1079	Value             *[]CloudServiceRole `json:"value,omitempty"`
1080	NextLink          *string             `json:"nextLink,omitempty"`
1081}
1082
1083// CloudServiceRoleListResultIterator provides access to a complete listing of CloudServiceRole values.
1084type CloudServiceRoleListResultIterator struct {
1085	i    int
1086	page CloudServiceRoleListResultPage
1087}
1088
1089// NextWithContext advances to the next value.  If there was an error making
1090// the request the iterator does not advance and the error is returned.
1091func (iter *CloudServiceRoleListResultIterator) NextWithContext(ctx context.Context) (err error) {
1092	if tracing.IsEnabled() {
1093		ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleListResultIterator.NextWithContext")
1094		defer func() {
1095			sc := -1
1096			if iter.Response().Response.Response != nil {
1097				sc = iter.Response().Response.Response.StatusCode
1098			}
1099			tracing.EndSpan(ctx, sc, err)
1100		}()
1101	}
1102	iter.i++
1103	if iter.i < len(iter.page.Values()) {
1104		return nil
1105	}
1106	err = iter.page.NextWithContext(ctx)
1107	if err != nil {
1108		iter.i--
1109		return err
1110	}
1111	iter.i = 0
1112	return nil
1113}
1114
1115// Next advances to the next value.  If there was an error making
1116// the request the iterator does not advance and the error is returned.
1117// Deprecated: Use NextWithContext() instead.
1118func (iter *CloudServiceRoleListResultIterator) Next() error {
1119	return iter.NextWithContext(context.Background())
1120}
1121
1122// NotDone returns true if the enumeration should be started or is not yet complete.
1123func (iter CloudServiceRoleListResultIterator) NotDone() bool {
1124	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1125}
1126
1127// Response returns the raw server response from the last page request.
1128func (iter CloudServiceRoleListResultIterator) Response() CloudServiceRoleListResult {
1129	return iter.page.Response()
1130}
1131
1132// Value returns the current value or a zero-initialized value if the
1133// iterator has advanced beyond the end of the collection.
1134func (iter CloudServiceRoleListResultIterator) Value() CloudServiceRole {
1135	if !iter.page.NotDone() {
1136		return CloudServiceRole{}
1137	}
1138	return iter.page.Values()[iter.i]
1139}
1140
1141// Creates a new instance of the CloudServiceRoleListResultIterator type.
1142func NewCloudServiceRoleListResultIterator(page CloudServiceRoleListResultPage) CloudServiceRoleListResultIterator {
1143	return CloudServiceRoleListResultIterator{page: page}
1144}
1145
1146// IsEmpty returns true if the ListResult contains no values.
1147func (csrlr CloudServiceRoleListResult) IsEmpty() bool {
1148	return csrlr.Value == nil || len(*csrlr.Value) == 0
1149}
1150
1151// hasNextLink returns true if the NextLink is not empty.
1152func (csrlr CloudServiceRoleListResult) hasNextLink() bool {
1153	return csrlr.NextLink != nil && len(*csrlr.NextLink) != 0
1154}
1155
1156// cloudServiceRoleListResultPreparer prepares a request to retrieve the next set of results.
1157// It returns nil if no more results exist.
1158func (csrlr CloudServiceRoleListResult) cloudServiceRoleListResultPreparer(ctx context.Context) (*http.Request, error) {
1159	if !csrlr.hasNextLink() {
1160		return nil, nil
1161	}
1162	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1163		autorest.AsJSON(),
1164		autorest.AsGet(),
1165		autorest.WithBaseURL(to.String(csrlr.NextLink)))
1166}
1167
1168// CloudServiceRoleListResultPage contains a page of CloudServiceRole values.
1169type CloudServiceRoleListResultPage struct {
1170	fn    func(context.Context, CloudServiceRoleListResult) (CloudServiceRoleListResult, error)
1171	csrlr CloudServiceRoleListResult
1172}
1173
1174// NextWithContext advances to the next page of values.  If there was an error making
1175// the request the page does not advance and the error is returned.
1176func (page *CloudServiceRoleListResultPage) NextWithContext(ctx context.Context) (err error) {
1177	if tracing.IsEnabled() {
1178		ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleListResultPage.NextWithContext")
1179		defer func() {
1180			sc := -1
1181			if page.Response().Response.Response != nil {
1182				sc = page.Response().Response.Response.StatusCode
1183			}
1184			tracing.EndSpan(ctx, sc, err)
1185		}()
1186	}
1187	for {
1188		next, err := page.fn(ctx, page.csrlr)
1189		if err != nil {
1190			return err
1191		}
1192		page.csrlr = next
1193		if !next.hasNextLink() || !next.IsEmpty() {
1194			break
1195		}
1196	}
1197	return nil
1198}
1199
1200// Next advances to the next page of values.  If there was an error making
1201// the request the page does not advance and the error is returned.
1202// Deprecated: Use NextWithContext() instead.
1203func (page *CloudServiceRoleListResultPage) Next() error {
1204	return page.NextWithContext(context.Background())
1205}
1206
1207// NotDone returns true if the page enumeration should be started or is not yet complete.
1208func (page CloudServiceRoleListResultPage) NotDone() bool {
1209	return !page.csrlr.IsEmpty()
1210}
1211
1212// Response returns the raw server response from the last page request.
1213func (page CloudServiceRoleListResultPage) Response() CloudServiceRoleListResult {
1214	return page.csrlr
1215}
1216
1217// Values returns the slice of values for the current page or nil if there are no values.
1218func (page CloudServiceRoleListResultPage) Values() []CloudServiceRole {
1219	if page.csrlr.IsEmpty() {
1220		return nil
1221	}
1222	return *page.csrlr.Value
1223}
1224
1225// Creates a new instance of the CloudServiceRoleListResultPage type.
1226func NewCloudServiceRoleListResultPage(cur CloudServiceRoleListResult, getNextPage func(context.Context, CloudServiceRoleListResult) (CloudServiceRoleListResult, error)) CloudServiceRoleListResultPage {
1227	return CloudServiceRoleListResultPage{
1228		fn:    getNextPage,
1229		csrlr: cur,
1230	}
1231}
1232
1233// CloudServiceRoleProfile describes the role profile for the cloud service.
1234type CloudServiceRoleProfile struct {
1235	// Roles - List of roles for the cloud service.
1236	Roles *[]CloudServiceRoleProfileProperties `json:"roles,omitempty"`
1237}
1238
1239// CloudServiceRoleProfileProperties describes the role properties.
1240type CloudServiceRoleProfileProperties struct {
1241	// Name - Resource name.
1242	Name *string              `json:"name,omitempty"`
1243	Sku  *CloudServiceRoleSku `json:"sku,omitempty"`
1244}
1245
1246// CloudServiceRoleProperties ...
1247type CloudServiceRoleProperties struct {
1248	// UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a cloud service role.
1249	UniqueID *string `json:"uniqueId,omitempty"`
1250}
1251
1252// MarshalJSON is the custom marshaler for CloudServiceRoleProperties.
1253func (csrp CloudServiceRoleProperties) MarshalJSON() ([]byte, error) {
1254	objectMap := make(map[string]interface{})
1255	return json.Marshal(objectMap)
1256}
1257
1258// CloudServiceRoleSku describes the cloud service role sku.
1259type CloudServiceRoleSku struct {
1260	// Name - The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku.
1261	Name *string `json:"name,omitempty"`
1262	// Tier - Specifies the tier of the cloud service. Possible Values are <br /><br /> **Standard** <br /><br /> **Basic**
1263	Tier *string `json:"tier,omitempty"`
1264	// Capacity - Specifies the number of role instances in the cloud service.
1265	Capacity *int64 `json:"capacity,omitempty"`
1266}
1267
1268// CloudServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1269// long-running operation.
1270type CloudServicesCreateOrUpdateFuture struct {
1271	azure.FutureAPI
1272	// Result returns the result of the asynchronous operation.
1273	// If the operation has not completed it will return an error.
1274	Result func(CloudServicesClient) (CloudService, error)
1275}
1276
1277// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1278func (future *CloudServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
1279	var azFuture azure.Future
1280	if err := json.Unmarshal(body, &azFuture); err != nil {
1281		return err
1282	}
1283	future.FutureAPI = &azFuture
1284	future.Result = future.result
1285	return nil
1286}
1287
1288// result is the default implementation for CloudServicesCreateOrUpdateFuture.Result.
1289func (future *CloudServicesCreateOrUpdateFuture) result(client CloudServicesClient) (cs CloudService, err error) {
1290	var done bool
1291	done, err = future.DoneWithContext(context.Background(), client)
1292	if err != nil {
1293		err = autorest.NewErrorWithError(err, "compute.CloudServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1294		return
1295	}
1296	if !done {
1297		cs.Response.Response = future.Response()
1298		err = azure.NewAsyncOpIncompleteError("compute.CloudServicesCreateOrUpdateFuture")
1299		return
1300	}
1301	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1302	if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
1303		cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
1304		if err != nil {
1305			err = autorest.NewErrorWithError(err, "compute.CloudServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
1306		}
1307	}
1308	return
1309}
1310
1311// CloudServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1312// operation.
1313type CloudServicesDeleteFuture struct {
1314	azure.FutureAPI
1315	// Result returns the result of the asynchronous operation.
1316	// If the operation has not completed it will return an error.
1317	Result func(CloudServicesClient) (autorest.Response, error)
1318}
1319
1320// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1321func (future *CloudServicesDeleteFuture) UnmarshalJSON(body []byte) error {
1322	var azFuture azure.Future
1323	if err := json.Unmarshal(body, &azFuture); err != nil {
1324		return err
1325	}
1326	future.FutureAPI = &azFuture
1327	future.Result = future.result
1328	return nil
1329}
1330
1331// result is the default implementation for CloudServicesDeleteFuture.Result.
1332func (future *CloudServicesDeleteFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
1333	var done bool
1334	done, err = future.DoneWithContext(context.Background(), client)
1335	if err != nil {
1336		err = autorest.NewErrorWithError(err, "compute.CloudServicesDeleteFuture", "Result", future.Response(), "Polling failure")
1337		return
1338	}
1339	if !done {
1340		ar.Response = future.Response()
1341		err = azure.NewAsyncOpIncompleteError("compute.CloudServicesDeleteFuture")
1342		return
1343	}
1344	ar.Response = future.Response()
1345	return
1346}
1347
1348// CloudServicesDeleteInstancesFuture an abstraction for monitoring and retrieving the results of a
1349// long-running operation.
1350type CloudServicesDeleteInstancesFuture struct {
1351	azure.FutureAPI
1352	// Result returns the result of the asynchronous operation.
1353	// If the operation has not completed it will return an error.
1354	Result func(CloudServicesClient) (autorest.Response, error)
1355}
1356
1357// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1358func (future *CloudServicesDeleteInstancesFuture) UnmarshalJSON(body []byte) error {
1359	var azFuture azure.Future
1360	if err := json.Unmarshal(body, &azFuture); err != nil {
1361		return err
1362	}
1363	future.FutureAPI = &azFuture
1364	future.Result = future.result
1365	return nil
1366}
1367
1368// result is the default implementation for CloudServicesDeleteInstancesFuture.Result.
1369func (future *CloudServicesDeleteInstancesFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
1370	var done bool
1371	done, err = future.DoneWithContext(context.Background(), client)
1372	if err != nil {
1373		err = autorest.NewErrorWithError(err, "compute.CloudServicesDeleteInstancesFuture", "Result", future.Response(), "Polling failure")
1374		return
1375	}
1376	if !done {
1377		ar.Response = future.Response()
1378		err = azure.NewAsyncOpIncompleteError("compute.CloudServicesDeleteInstancesFuture")
1379		return
1380	}
1381	ar.Response = future.Response()
1382	return
1383}
1384
1385// CloudServicesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
1386// operation.
1387type CloudServicesPowerOffFuture struct {
1388	azure.FutureAPI
1389	// Result returns the result of the asynchronous operation.
1390	// If the operation has not completed it will return an error.
1391	Result func(CloudServicesClient) (autorest.Response, error)
1392}
1393
1394// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1395func (future *CloudServicesPowerOffFuture) UnmarshalJSON(body []byte) error {
1396	var azFuture azure.Future
1397	if err := json.Unmarshal(body, &azFuture); err != nil {
1398		return err
1399	}
1400	future.FutureAPI = &azFuture
1401	future.Result = future.result
1402	return nil
1403}
1404
1405// result is the default implementation for CloudServicesPowerOffFuture.Result.
1406func (future *CloudServicesPowerOffFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
1407	var done bool
1408	done, err = future.DoneWithContext(context.Background(), client)
1409	if err != nil {
1410		err = autorest.NewErrorWithError(err, "compute.CloudServicesPowerOffFuture", "Result", future.Response(), "Polling failure")
1411		return
1412	}
1413	if !done {
1414		ar.Response = future.Response()
1415		err = azure.NewAsyncOpIncompleteError("compute.CloudServicesPowerOffFuture")
1416		return
1417	}
1418	ar.Response = future.Response()
1419	return
1420}
1421
1422// CloudServicesRebuildFuture an abstraction for monitoring and retrieving the results of a long-running
1423// operation.
1424type CloudServicesRebuildFuture struct {
1425	azure.FutureAPI
1426	// Result returns the result of the asynchronous operation.
1427	// If the operation has not completed it will return an error.
1428	Result func(CloudServicesClient) (autorest.Response, error)
1429}
1430
1431// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1432func (future *CloudServicesRebuildFuture) UnmarshalJSON(body []byte) error {
1433	var azFuture azure.Future
1434	if err := json.Unmarshal(body, &azFuture); err != nil {
1435		return err
1436	}
1437	future.FutureAPI = &azFuture
1438	future.Result = future.result
1439	return nil
1440}
1441
1442// result is the default implementation for CloudServicesRebuildFuture.Result.
1443func (future *CloudServicesRebuildFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
1444	var done bool
1445	done, err = future.DoneWithContext(context.Background(), client)
1446	if err != nil {
1447		err = autorest.NewErrorWithError(err, "compute.CloudServicesRebuildFuture", "Result", future.Response(), "Polling failure")
1448		return
1449	}
1450	if !done {
1451		ar.Response = future.Response()
1452		err = azure.NewAsyncOpIncompleteError("compute.CloudServicesRebuildFuture")
1453		return
1454	}
1455	ar.Response = future.Response()
1456	return
1457}
1458
1459// CloudServicesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
1460// operation.
1461type CloudServicesReimageFuture struct {
1462	azure.FutureAPI
1463	// Result returns the result of the asynchronous operation.
1464	// If the operation has not completed it will return an error.
1465	Result func(CloudServicesClient) (autorest.Response, error)
1466}
1467
1468// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1469func (future *CloudServicesReimageFuture) UnmarshalJSON(body []byte) error {
1470	var azFuture azure.Future
1471	if err := json.Unmarshal(body, &azFuture); err != nil {
1472		return err
1473	}
1474	future.FutureAPI = &azFuture
1475	future.Result = future.result
1476	return nil
1477}
1478
1479// result is the default implementation for CloudServicesReimageFuture.Result.
1480func (future *CloudServicesReimageFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
1481	var done bool
1482	done, err = future.DoneWithContext(context.Background(), client)
1483	if err != nil {
1484		err = autorest.NewErrorWithError(err, "compute.CloudServicesReimageFuture", "Result", future.Response(), "Polling failure")
1485		return
1486	}
1487	if !done {
1488		ar.Response = future.Response()
1489		err = azure.NewAsyncOpIncompleteError("compute.CloudServicesReimageFuture")
1490		return
1491	}
1492	ar.Response = future.Response()
1493	return
1494}
1495
1496// CloudServicesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
1497// operation.
1498type CloudServicesRestartFuture struct {
1499	azure.FutureAPI
1500	// Result returns the result of the asynchronous operation.
1501	// If the operation has not completed it will return an error.
1502	Result func(CloudServicesClient) (autorest.Response, error)
1503}
1504
1505// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1506func (future *CloudServicesRestartFuture) UnmarshalJSON(body []byte) error {
1507	var azFuture azure.Future
1508	if err := json.Unmarshal(body, &azFuture); err != nil {
1509		return err
1510	}
1511	future.FutureAPI = &azFuture
1512	future.Result = future.result
1513	return nil
1514}
1515
1516// result is the default implementation for CloudServicesRestartFuture.Result.
1517func (future *CloudServicesRestartFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
1518	var done bool
1519	done, err = future.DoneWithContext(context.Background(), client)
1520	if err != nil {
1521		err = autorest.NewErrorWithError(err, "compute.CloudServicesRestartFuture", "Result", future.Response(), "Polling failure")
1522		return
1523	}
1524	if !done {
1525		ar.Response = future.Response()
1526		err = azure.NewAsyncOpIncompleteError("compute.CloudServicesRestartFuture")
1527		return
1528	}
1529	ar.Response = future.Response()
1530	return
1531}
1532
1533// CloudServicesStartFuture an abstraction for monitoring and retrieving the results of a long-running
1534// operation.
1535type CloudServicesStartFuture struct {
1536	azure.FutureAPI
1537	// Result returns the result of the asynchronous operation.
1538	// If the operation has not completed it will return an error.
1539	Result func(CloudServicesClient) (autorest.Response, error)
1540}
1541
1542// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1543func (future *CloudServicesStartFuture) UnmarshalJSON(body []byte) error {
1544	var azFuture azure.Future
1545	if err := json.Unmarshal(body, &azFuture); err != nil {
1546		return err
1547	}
1548	future.FutureAPI = &azFuture
1549	future.Result = future.result
1550	return nil
1551}
1552
1553// result is the default implementation for CloudServicesStartFuture.Result.
1554func (future *CloudServicesStartFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
1555	var done bool
1556	done, err = future.DoneWithContext(context.Background(), client)
1557	if err != nil {
1558		err = autorest.NewErrorWithError(err, "compute.CloudServicesStartFuture", "Result", future.Response(), "Polling failure")
1559		return
1560	}
1561	if !done {
1562		ar.Response = future.Response()
1563		err = azure.NewAsyncOpIncompleteError("compute.CloudServicesStartFuture")
1564		return
1565	}
1566	ar.Response = future.Response()
1567	return
1568}
1569
1570// CloudServicesUpdateDomainWalkUpdateDomainFuture an abstraction for monitoring and retrieving the results
1571// of a long-running operation.
1572type CloudServicesUpdateDomainWalkUpdateDomainFuture struct {
1573	azure.FutureAPI
1574	// Result returns the result of the asynchronous operation.
1575	// If the operation has not completed it will return an error.
1576	Result func(CloudServicesUpdateDomainClient) (autorest.Response, error)
1577}
1578
1579// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1580func (future *CloudServicesUpdateDomainWalkUpdateDomainFuture) UnmarshalJSON(body []byte) error {
1581	var azFuture azure.Future
1582	if err := json.Unmarshal(body, &azFuture); err != nil {
1583		return err
1584	}
1585	future.FutureAPI = &azFuture
1586	future.Result = future.result
1587	return nil
1588}
1589
1590// result is the default implementation for CloudServicesUpdateDomainWalkUpdateDomainFuture.Result.
1591func (future *CloudServicesUpdateDomainWalkUpdateDomainFuture) result(client CloudServicesUpdateDomainClient) (ar autorest.Response, err error) {
1592	var done bool
1593	done, err = future.DoneWithContext(context.Background(), client)
1594	if err != nil {
1595		err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainWalkUpdateDomainFuture", "Result", future.Response(), "Polling failure")
1596		return
1597	}
1598	if !done {
1599		ar.Response = future.Response()
1600		err = azure.NewAsyncOpIncompleteError("compute.CloudServicesUpdateDomainWalkUpdateDomainFuture")
1601		return
1602	}
1603	ar.Response = future.Response()
1604	return
1605}
1606
1607// CloudServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1608// operation.
1609type CloudServicesUpdateFuture struct {
1610	azure.FutureAPI
1611	// Result returns the result of the asynchronous operation.
1612	// If the operation has not completed it will return an error.
1613	Result func(CloudServicesClient) (CloudService, error)
1614}
1615
1616// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1617func (future *CloudServicesUpdateFuture) UnmarshalJSON(body []byte) error {
1618	var azFuture azure.Future
1619	if err := json.Unmarshal(body, &azFuture); err != nil {
1620		return err
1621	}
1622	future.FutureAPI = &azFuture
1623	future.Result = future.result
1624	return nil
1625}
1626
1627// result is the default implementation for CloudServicesUpdateFuture.Result.
1628func (future *CloudServicesUpdateFuture) result(client CloudServicesClient) (cs CloudService, err error) {
1629	var done bool
1630	done, err = future.DoneWithContext(context.Background(), client)
1631	if err != nil {
1632		err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateFuture", "Result", future.Response(), "Polling failure")
1633		return
1634	}
1635	if !done {
1636		cs.Response.Response = future.Response()
1637		err = azure.NewAsyncOpIncompleteError("compute.CloudServicesUpdateFuture")
1638		return
1639	}
1640	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1641	if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
1642		cs, err = client.UpdateResponder(cs.Response.Response)
1643		if err != nil {
1644			err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
1645		}
1646	}
1647	return
1648}
1649
1650// CloudServiceUpdate ...
1651type CloudServiceUpdate struct {
1652	// Tags - Resource tags
1653	Tags map[string]*string `json:"tags"`
1654}
1655
1656// MarshalJSON is the custom marshaler for CloudServiceUpdate.
1657func (csu CloudServiceUpdate) MarshalJSON() ([]byte, error) {
1658	objectMap := make(map[string]interface{})
1659	if csu.Tags != nil {
1660		objectMap["tags"] = csu.Tags
1661	}
1662	return json.Marshal(objectMap)
1663}
1664
1665// CloudServiceVaultAndSecretReference ...
1666type CloudServiceVaultAndSecretReference struct {
1667	SourceVault *SubResource `json:"sourceVault,omitempty"`
1668	SecretURL   *string      `json:"secretUrl,omitempty"`
1669}
1670
1671// CloudServiceVaultCertificate describes a single certificate reference in a Key Vault, and where the
1672// certificate should reside on the role instance.
1673type CloudServiceVaultCertificate struct {
1674	// CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret.
1675	CertificateURL *string `json:"certificateUrl,omitempty"`
1676}
1677
1678// CloudServiceVaultSecretGroup describes a set of certificates which are all in the same Key Vault.
1679type CloudServiceVaultSecretGroup struct {
1680	// SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
1681	SourceVault *SubResource `json:"sourceVault,omitempty"`
1682	// VaultCertificates - The list of key vault references in SourceVault which contain certificates.
1683	VaultCertificates *[]CloudServiceVaultCertificate `json:"vaultCertificates,omitempty"`
1684}
1685
1686// ContainerService container service.
1687type ContainerService struct {
1688	autorest.Response           `json:"-"`
1689	*ContainerServiceProperties `json:"properties,omitempty"`
1690	// ID - READ-ONLY; Resource Id
1691	ID *string `json:"id,omitempty"`
1692	// Name - READ-ONLY; Resource name
1693	Name *string `json:"name,omitempty"`
1694	// Type - READ-ONLY; Resource type
1695	Type *string `json:"type,omitempty"`
1696	// Location - Resource location
1697	Location *string `json:"location,omitempty"`
1698	// Tags - Resource tags
1699	Tags map[string]*string `json:"tags"`
1700}
1701
1702// MarshalJSON is the custom marshaler for ContainerService.
1703func (cs ContainerService) MarshalJSON() ([]byte, error) {
1704	objectMap := make(map[string]interface{})
1705	if cs.ContainerServiceProperties != nil {
1706		objectMap["properties"] = cs.ContainerServiceProperties
1707	}
1708	if cs.Location != nil {
1709		objectMap["location"] = cs.Location
1710	}
1711	if cs.Tags != nil {
1712		objectMap["tags"] = cs.Tags
1713	}
1714	return json.Marshal(objectMap)
1715}
1716
1717// UnmarshalJSON is the custom unmarshaler for ContainerService struct.
1718func (cs *ContainerService) UnmarshalJSON(body []byte) error {
1719	var m map[string]*json.RawMessage
1720	err := json.Unmarshal(body, &m)
1721	if err != nil {
1722		return err
1723	}
1724	for k, v := range m {
1725		switch k {
1726		case "properties":
1727			if v != nil {
1728				var containerServiceProperties ContainerServiceProperties
1729				err = json.Unmarshal(*v, &containerServiceProperties)
1730				if err != nil {
1731					return err
1732				}
1733				cs.ContainerServiceProperties = &containerServiceProperties
1734			}
1735		case "id":
1736			if v != nil {
1737				var ID string
1738				err = json.Unmarshal(*v, &ID)
1739				if err != nil {
1740					return err
1741				}
1742				cs.ID = &ID
1743			}
1744		case "name":
1745			if v != nil {
1746				var name string
1747				err = json.Unmarshal(*v, &name)
1748				if err != nil {
1749					return err
1750				}
1751				cs.Name = &name
1752			}
1753		case "type":
1754			if v != nil {
1755				var typeVar string
1756				err = json.Unmarshal(*v, &typeVar)
1757				if err != nil {
1758					return err
1759				}
1760				cs.Type = &typeVar
1761			}
1762		case "location":
1763			if v != nil {
1764				var location string
1765				err = json.Unmarshal(*v, &location)
1766				if err != nil {
1767					return err
1768				}
1769				cs.Location = &location
1770			}
1771		case "tags":
1772			if v != nil {
1773				var tags map[string]*string
1774				err = json.Unmarshal(*v, &tags)
1775				if err != nil {
1776					return err
1777				}
1778				cs.Tags = tags
1779			}
1780		}
1781	}
1782
1783	return nil
1784}
1785
1786// ContainerServiceAgentPoolProfile profile for the container service agent pool.
1787type ContainerServiceAgentPoolProfile struct {
1788	// Name - Unique name of the agent pool profile in the context of the subscription and resource group.
1789	Name *string `json:"name,omitempty"`
1790	// 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.
1791	Count *int32 `json:"count,omitempty"`
1792	// 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'
1793	VMSize ContainerServiceVMSizeTypes `json:"vmSize,omitempty"`
1794	// DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool.
1795	DNSPrefix *string `json:"dnsPrefix,omitempty"`
1796	// Fqdn - READ-ONLY; FQDN for the agent pool.
1797	Fqdn *string `json:"fqdn,omitempty"`
1798}
1799
1800// MarshalJSON is the custom marshaler for ContainerServiceAgentPoolProfile.
1801func (csapp ContainerServiceAgentPoolProfile) MarshalJSON() ([]byte, error) {
1802	objectMap := make(map[string]interface{})
1803	if csapp.Name != nil {
1804		objectMap["name"] = csapp.Name
1805	}
1806	if csapp.Count != nil {
1807		objectMap["count"] = csapp.Count
1808	}
1809	if csapp.VMSize != "" {
1810		objectMap["vmSize"] = csapp.VMSize
1811	}
1812	if csapp.DNSPrefix != nil {
1813		objectMap["dnsPrefix"] = csapp.DNSPrefix
1814	}
1815	return json.Marshal(objectMap)
1816}
1817
1818// ContainerServiceCustomProfile properties to configure a custom container service cluster.
1819type ContainerServiceCustomProfile struct {
1820	// Orchestrator - The name of the custom orchestrator to use.
1821	Orchestrator *string `json:"orchestrator,omitempty"`
1822}
1823
1824// ContainerServiceDiagnosticsProfile ...
1825type ContainerServiceDiagnosticsProfile struct {
1826	// VMDiagnostics - Profile for the container service VM diagnostic agent.
1827	VMDiagnostics *ContainerServiceVMDiagnostics `json:"vmDiagnostics,omitempty"`
1828}
1829
1830// ContainerServiceLinuxProfile profile for Linux VMs in the container service cluster.
1831type ContainerServiceLinuxProfile struct {
1832	// AdminUsername - The administrator username to use for Linux VMs.
1833	AdminUsername *string `json:"adminUsername,omitempty"`
1834	// SSH - The ssh key configuration for Linux VMs.
1835	SSH *ContainerServiceSSHConfiguration `json:"ssh,omitempty"`
1836}
1837
1838// ContainerServiceListResult the response from the List Container Services operation.
1839type ContainerServiceListResult struct {
1840	autorest.Response `json:"-"`
1841	// Value - the list of container services.
1842	Value *[]ContainerService `json:"value,omitempty"`
1843	// NextLink - The URL to get the next set of container service results.
1844	NextLink *string `json:"nextLink,omitempty"`
1845}
1846
1847// ContainerServiceListResultIterator provides access to a complete listing of ContainerService values.
1848type ContainerServiceListResultIterator struct {
1849	i    int
1850	page ContainerServiceListResultPage
1851}
1852
1853// NextWithContext advances to the next value.  If there was an error making
1854// the request the iterator does not advance and the error is returned.
1855func (iter *ContainerServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
1856	if tracing.IsEnabled() {
1857		ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultIterator.NextWithContext")
1858		defer func() {
1859			sc := -1
1860			if iter.Response().Response.Response != nil {
1861				sc = iter.Response().Response.Response.StatusCode
1862			}
1863			tracing.EndSpan(ctx, sc, err)
1864		}()
1865	}
1866	iter.i++
1867	if iter.i < len(iter.page.Values()) {
1868		return nil
1869	}
1870	err = iter.page.NextWithContext(ctx)
1871	if err != nil {
1872		iter.i--
1873		return err
1874	}
1875	iter.i = 0
1876	return nil
1877}
1878
1879// Next advances to the next value.  If there was an error making
1880// the request the iterator does not advance and the error is returned.
1881// Deprecated: Use NextWithContext() instead.
1882func (iter *ContainerServiceListResultIterator) Next() error {
1883	return iter.NextWithContext(context.Background())
1884}
1885
1886// NotDone returns true if the enumeration should be started or is not yet complete.
1887func (iter ContainerServiceListResultIterator) NotDone() bool {
1888	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1889}
1890
1891// Response returns the raw server response from the last page request.
1892func (iter ContainerServiceListResultIterator) Response() ContainerServiceListResult {
1893	return iter.page.Response()
1894}
1895
1896// Value returns the current value or a zero-initialized value if the
1897// iterator has advanced beyond the end of the collection.
1898func (iter ContainerServiceListResultIterator) Value() ContainerService {
1899	if !iter.page.NotDone() {
1900		return ContainerService{}
1901	}
1902	return iter.page.Values()[iter.i]
1903}
1904
1905// Creates a new instance of the ContainerServiceListResultIterator type.
1906func NewContainerServiceListResultIterator(page ContainerServiceListResultPage) ContainerServiceListResultIterator {
1907	return ContainerServiceListResultIterator{page: page}
1908}
1909
1910// IsEmpty returns true if the ListResult contains no values.
1911func (cslr ContainerServiceListResult) IsEmpty() bool {
1912	return cslr.Value == nil || len(*cslr.Value) == 0
1913}
1914
1915// hasNextLink returns true if the NextLink is not empty.
1916func (cslr ContainerServiceListResult) hasNextLink() bool {
1917	return cslr.NextLink != nil && len(*cslr.NextLink) != 0
1918}
1919
1920// containerServiceListResultPreparer prepares a request to retrieve the next set of results.
1921// It returns nil if no more results exist.
1922func (cslr ContainerServiceListResult) containerServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
1923	if !cslr.hasNextLink() {
1924		return nil, nil
1925	}
1926	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1927		autorest.AsJSON(),
1928		autorest.AsGet(),
1929		autorest.WithBaseURL(to.String(cslr.NextLink)))
1930}
1931
1932// ContainerServiceListResultPage contains a page of ContainerService values.
1933type ContainerServiceListResultPage struct {
1934	fn   func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)
1935	cslr ContainerServiceListResult
1936}
1937
1938// NextWithContext advances to the next page of values.  If there was an error making
1939// the request the page does not advance and the error is returned.
1940func (page *ContainerServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
1941	if tracing.IsEnabled() {
1942		ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultPage.NextWithContext")
1943		defer func() {
1944			sc := -1
1945			if page.Response().Response.Response != nil {
1946				sc = page.Response().Response.Response.StatusCode
1947			}
1948			tracing.EndSpan(ctx, sc, err)
1949		}()
1950	}
1951	for {
1952		next, err := page.fn(ctx, page.cslr)
1953		if err != nil {
1954			return err
1955		}
1956		page.cslr = next
1957		if !next.hasNextLink() || !next.IsEmpty() {
1958			break
1959		}
1960	}
1961	return nil
1962}
1963
1964// Next advances to the next page of values.  If there was an error making
1965// the request the page does not advance and the error is returned.
1966// Deprecated: Use NextWithContext() instead.
1967func (page *ContainerServiceListResultPage) Next() error {
1968	return page.NextWithContext(context.Background())
1969}
1970
1971// NotDone returns true if the page enumeration should be started or is not yet complete.
1972func (page ContainerServiceListResultPage) NotDone() bool {
1973	return !page.cslr.IsEmpty()
1974}
1975
1976// Response returns the raw server response from the last page request.
1977func (page ContainerServiceListResultPage) Response() ContainerServiceListResult {
1978	return page.cslr
1979}
1980
1981// Values returns the slice of values for the current page or nil if there are no values.
1982func (page ContainerServiceListResultPage) Values() []ContainerService {
1983	if page.cslr.IsEmpty() {
1984		return nil
1985	}
1986	return *page.cslr.Value
1987}
1988
1989// Creates a new instance of the ContainerServiceListResultPage type.
1990func NewContainerServiceListResultPage(cur ContainerServiceListResult, getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage {
1991	return ContainerServiceListResultPage{
1992		fn:   getNextPage,
1993		cslr: cur,
1994	}
1995}
1996
1997// ContainerServiceMasterProfile profile for the container service master.
1998type ContainerServiceMasterProfile struct {
1999	// Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.
2000	Count *int32 `json:"count,omitempty"`
2001	// DNSPrefix - DNS prefix to be used to create the FQDN for master.
2002	DNSPrefix *string `json:"dnsPrefix,omitempty"`
2003	// Fqdn - READ-ONLY; FQDN for the master.
2004	Fqdn *string `json:"fqdn,omitempty"`
2005}
2006
2007// MarshalJSON is the custom marshaler for ContainerServiceMasterProfile.
2008func (csmp ContainerServiceMasterProfile) MarshalJSON() ([]byte, error) {
2009	objectMap := make(map[string]interface{})
2010	if csmp.Count != nil {
2011		objectMap["count"] = csmp.Count
2012	}
2013	if csmp.DNSPrefix != nil {
2014		objectMap["dnsPrefix"] = csmp.DNSPrefix
2015	}
2016	return json.Marshal(objectMap)
2017}
2018
2019// ContainerServiceOrchestratorProfile profile for the container service orchestrator.
2020type ContainerServiceOrchestratorProfile struct {
2021	// 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'
2022	OrchestratorType ContainerServiceOrchestratorTypes `json:"orchestratorType,omitempty"`
2023}
2024
2025// ContainerServiceProperties properties of the container service.
2026type ContainerServiceProperties struct {
2027	// ProvisioningState - READ-ONLY; the current deployment or provisioning state, which only appears in the response.
2028	ProvisioningState *string `json:"provisioningState,omitempty"`
2029	// OrchestratorProfile - Properties of the orchestrator.
2030	OrchestratorProfile *ContainerServiceOrchestratorProfile `json:"orchestratorProfile,omitempty"`
2031	// CustomProfile - Properties for custom clusters.
2032	CustomProfile *ContainerServiceCustomProfile `json:"customProfile,omitempty"`
2033	// ServicePrincipalProfile - Properties for cluster service principals.
2034	ServicePrincipalProfile *ContainerServiceServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
2035	// MasterProfile - Properties of master agents.
2036	MasterProfile *ContainerServiceMasterProfile `json:"masterProfile,omitempty"`
2037	// AgentPoolProfiles - Properties of the agent pool.
2038	AgentPoolProfiles *[]ContainerServiceAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
2039	// WindowsProfile - Properties of Windows VMs.
2040	WindowsProfile *ContainerServiceWindowsProfile `json:"windowsProfile,omitempty"`
2041	// LinuxProfile - Properties of Linux VMs.
2042	LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"`
2043	// DiagnosticsProfile - Properties of the diagnostic agent.
2044	DiagnosticsProfile *ContainerServiceDiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
2045}
2046
2047// MarshalJSON is the custom marshaler for ContainerServiceProperties.
2048func (csp ContainerServiceProperties) MarshalJSON() ([]byte, error) {
2049	objectMap := make(map[string]interface{})
2050	if csp.OrchestratorProfile != nil {
2051		objectMap["orchestratorProfile"] = csp.OrchestratorProfile
2052	}
2053	if csp.CustomProfile != nil {
2054		objectMap["customProfile"] = csp.CustomProfile
2055	}
2056	if csp.ServicePrincipalProfile != nil {
2057		objectMap["servicePrincipalProfile"] = csp.ServicePrincipalProfile
2058	}
2059	if csp.MasterProfile != nil {
2060		objectMap["masterProfile"] = csp.MasterProfile
2061	}
2062	if csp.AgentPoolProfiles != nil {
2063		objectMap["agentPoolProfiles"] = csp.AgentPoolProfiles
2064	}
2065	if csp.WindowsProfile != nil {
2066		objectMap["windowsProfile"] = csp.WindowsProfile
2067	}
2068	if csp.LinuxProfile != nil {
2069		objectMap["linuxProfile"] = csp.LinuxProfile
2070	}
2071	if csp.DiagnosticsProfile != nil {
2072		objectMap["diagnosticsProfile"] = csp.DiagnosticsProfile
2073	}
2074	return json.Marshal(objectMap)
2075}
2076
2077// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2078// long-running operation.
2079type ContainerServicesCreateOrUpdateFuture struct {
2080	azure.FutureAPI
2081	// Result returns the result of the asynchronous operation.
2082	// If the operation has not completed it will return an error.
2083	Result func(ContainerServicesClient) (ContainerService, error)
2084}
2085
2086// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2087func (future *ContainerServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2088	var azFuture azure.Future
2089	if err := json.Unmarshal(body, &azFuture); err != nil {
2090		return err
2091	}
2092	future.FutureAPI = &azFuture
2093	future.Result = future.result
2094	return nil
2095}
2096
2097// result is the default implementation for ContainerServicesCreateOrUpdateFuture.Result.
2098func (future *ContainerServicesCreateOrUpdateFuture) result(client ContainerServicesClient) (cs ContainerService, err error) {
2099	var done bool
2100	done, err = future.DoneWithContext(context.Background(), client)
2101	if err != nil {
2102		err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2103		return
2104	}
2105	if !done {
2106		cs.Response.Response = future.Response()
2107		err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
2108		return
2109	}
2110	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2111	if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
2112		cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
2113		if err != nil {
2114			err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
2115		}
2116	}
2117	return
2118}
2119
2120// ContainerServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
2121// operation.
2122type ContainerServicesDeleteFuture struct {
2123	azure.FutureAPI
2124	// Result returns the result of the asynchronous operation.
2125	// If the operation has not completed it will return an error.
2126	Result func(ContainerServicesClient) (autorest.Response, error)
2127}
2128
2129// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2130func (future *ContainerServicesDeleteFuture) UnmarshalJSON(body []byte) error {
2131	var azFuture azure.Future
2132	if err := json.Unmarshal(body, &azFuture); err != nil {
2133		return err
2134	}
2135	future.FutureAPI = &azFuture
2136	future.Result = future.result
2137	return nil
2138}
2139
2140// result is the default implementation for ContainerServicesDeleteFuture.Result.
2141func (future *ContainerServicesDeleteFuture) result(client ContainerServicesClient) (ar autorest.Response, err error) {
2142	var done bool
2143	done, err = future.DoneWithContext(context.Background(), client)
2144	if err != nil {
2145		err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Polling failure")
2146		return
2147	}
2148	if !done {
2149		ar.Response = future.Response()
2150		err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
2151		return
2152	}
2153	ar.Response = future.Response()
2154	return
2155}
2156
2157// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster
2158// to use for manipulating Azure APIs.
2159type ContainerServiceServicePrincipalProfile struct {
2160	// ClientID - The ID for the service principal.
2161	ClientID *string `json:"clientId,omitempty"`
2162	// Secret - The secret password associated with the service principal.
2163	Secret *string `json:"secret,omitempty"`
2164}
2165
2166// ContainerServiceSSHConfiguration SSH configuration for Linux-based VMs running on Azure.
2167type ContainerServiceSSHConfiguration struct {
2168	// PublicKeys - the list of SSH public keys used to authenticate with Linux-based VMs.
2169	PublicKeys *[]ContainerServiceSSHPublicKey `json:"publicKeys,omitempty"`
2170}
2171
2172// ContainerServiceSSHPublicKey contains information about SSH certificate public key data.
2173type ContainerServiceSSHPublicKey struct {
2174	// KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers.
2175	KeyData *string `json:"keyData,omitempty"`
2176}
2177
2178// ContainerServiceVMDiagnostics profile for diagnostics on the container service VMs.
2179type ContainerServiceVMDiagnostics struct {
2180	// Enabled - Whether the VM diagnostic agent is provisioned on the VM.
2181	Enabled *bool `json:"enabled,omitempty"`
2182	// StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored.
2183	StorageURI *string `json:"storageUri,omitempty"`
2184}
2185
2186// MarshalJSON is the custom marshaler for ContainerServiceVMDiagnostics.
2187func (csvd ContainerServiceVMDiagnostics) MarshalJSON() ([]byte, error) {
2188	objectMap := make(map[string]interface{})
2189	if csvd.Enabled != nil {
2190		objectMap["enabled"] = csvd.Enabled
2191	}
2192	return json.Marshal(objectMap)
2193}
2194
2195// ContainerServiceWindowsProfile profile for Windows VMs in the container service cluster.
2196type ContainerServiceWindowsProfile struct {
2197	// AdminUsername - The administrator username to use for Windows VMs.
2198	AdminUsername *string `json:"adminUsername,omitempty"`
2199	// AdminPassword - The administrator password to use for Windows VMs.
2200	AdminPassword *string `json:"adminPassword,omitempty"`
2201}
2202
2203// CreationData data used when creating a disk.
2204type CreationData struct {
2205	// CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload'
2206	CreateOption DiskCreateOption `json:"createOption,omitempty"`
2207	// StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
2208	StorageAccountID *string `json:"storageAccountId,omitempty"`
2209	// ImageReference - Disk source information.
2210	ImageReference *ImageDiskReference `json:"imageReference,omitempty"`
2211	// 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.
2212	GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"`
2213	// SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk.
2214	SourceURI *string `json:"sourceUri,omitempty"`
2215	// SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk.
2216	SourceResourceID *string `json:"sourceResourceId,omitempty"`
2217	// SourceUniqueID - READ-ONLY; If this field is set, this is the unique id identifying the source of this resource.
2218	SourceUniqueID *string `json:"sourceUniqueId,omitempty"`
2219	// 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).
2220	UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"`
2221	// LogicalSectorSize - Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
2222	LogicalSectorSize *int32 `json:"logicalSectorSize,omitempty"`
2223}
2224
2225// MarshalJSON is the custom marshaler for CreationData.
2226func (cd CreationData) MarshalJSON() ([]byte, error) {
2227	objectMap := make(map[string]interface{})
2228	if cd.CreateOption != "" {
2229		objectMap["createOption"] = cd.CreateOption
2230	}
2231	if cd.StorageAccountID != nil {
2232		objectMap["storageAccountId"] = cd.StorageAccountID
2233	}
2234	if cd.ImageReference != nil {
2235		objectMap["imageReference"] = cd.ImageReference
2236	}
2237	if cd.GalleryImageReference != nil {
2238		objectMap["galleryImageReference"] = cd.GalleryImageReference
2239	}
2240	if cd.SourceURI != nil {
2241		objectMap["sourceUri"] = cd.SourceURI
2242	}
2243	if cd.SourceResourceID != nil {
2244		objectMap["sourceResourceId"] = cd.SourceResourceID
2245	}
2246	if cd.UploadSizeBytes != nil {
2247		objectMap["uploadSizeBytes"] = cd.UploadSizeBytes
2248	}
2249	if cd.LogicalSectorSize != nil {
2250		objectMap["logicalSectorSize"] = cd.LogicalSectorSize
2251	}
2252	return json.Marshal(objectMap)
2253}
2254
2255// DataDisk describes a data disk.
2256type DataDisk struct {
2257	// 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.
2258	Lun *int32 `json:"lun,omitempty"`
2259	// Name - The disk name.
2260	Name *string `json:"name,omitempty"`
2261	// Vhd - The virtual hard disk.
2262	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
2263	// 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.
2264	Image *VirtualHardDisk `json:"image,omitempty"`
2265	// 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'
2266	Caching CachingTypes `json:"caching,omitempty"`
2267	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
2268	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
2269	// 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'
2270	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
2271	// 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
2272	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
2273	// ManagedDisk - The managed disk parameters.
2274	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
2275	// ToBeDetached - Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
2276	ToBeDetached *bool `json:"toBeDetached,omitempty"`
2277	// 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.
2278	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
2279	// 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.
2280	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
2281}
2282
2283// MarshalJSON is the custom marshaler for DataDisk.
2284func (dd DataDisk) MarshalJSON() ([]byte, error) {
2285	objectMap := make(map[string]interface{})
2286	if dd.Lun != nil {
2287		objectMap["lun"] = dd.Lun
2288	}
2289	if dd.Name != nil {
2290		objectMap["name"] = dd.Name
2291	}
2292	if dd.Vhd != nil {
2293		objectMap["vhd"] = dd.Vhd
2294	}
2295	if dd.Image != nil {
2296		objectMap["image"] = dd.Image
2297	}
2298	if dd.Caching != "" {
2299		objectMap["caching"] = dd.Caching
2300	}
2301	if dd.WriteAcceleratorEnabled != nil {
2302		objectMap["writeAcceleratorEnabled"] = dd.WriteAcceleratorEnabled
2303	}
2304	if dd.CreateOption != "" {
2305		objectMap["createOption"] = dd.CreateOption
2306	}
2307	if dd.DiskSizeGB != nil {
2308		objectMap["diskSizeGB"] = dd.DiskSizeGB
2309	}
2310	if dd.ManagedDisk != nil {
2311		objectMap["managedDisk"] = dd.ManagedDisk
2312	}
2313	if dd.ToBeDetached != nil {
2314		objectMap["toBeDetached"] = dd.ToBeDetached
2315	}
2316	return json.Marshal(objectMap)
2317}
2318
2319// DataDiskImage contains the data disk images information.
2320type DataDiskImage struct {
2321	// 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.
2322	Lun *int32 `json:"lun,omitempty"`
2323}
2324
2325// MarshalJSON is the custom marshaler for DataDiskImage.
2326func (ddi DataDiskImage) MarshalJSON() ([]byte, error) {
2327	objectMap := make(map[string]interface{})
2328	return json.Marshal(objectMap)
2329}
2330
2331// DataDiskImageEncryption contains encryption settings for a data disk image.
2332type DataDiskImageEncryption struct {
2333	// 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.
2334	Lun *int32 `json:"lun,omitempty"`
2335	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
2336	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
2337}
2338
2339// DedicatedHost specifies information about the Dedicated host.
2340type DedicatedHost struct {
2341	autorest.Response        `json:"-"`
2342	*DedicatedHostProperties `json:"properties,omitempty"`
2343	// 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.
2344	Sku *Sku `json:"sku,omitempty"`
2345	// ID - READ-ONLY; Resource Id
2346	ID *string `json:"id,omitempty"`
2347	// Name - READ-ONLY; Resource name
2348	Name *string `json:"name,omitempty"`
2349	// Type - READ-ONLY; Resource type
2350	Type *string `json:"type,omitempty"`
2351	// Location - Resource location
2352	Location *string `json:"location,omitempty"`
2353	// Tags - Resource tags
2354	Tags map[string]*string `json:"tags"`
2355}
2356
2357// MarshalJSON is the custom marshaler for DedicatedHost.
2358func (dh DedicatedHost) MarshalJSON() ([]byte, error) {
2359	objectMap := make(map[string]interface{})
2360	if dh.DedicatedHostProperties != nil {
2361		objectMap["properties"] = dh.DedicatedHostProperties
2362	}
2363	if dh.Sku != nil {
2364		objectMap["sku"] = dh.Sku
2365	}
2366	if dh.Location != nil {
2367		objectMap["location"] = dh.Location
2368	}
2369	if dh.Tags != nil {
2370		objectMap["tags"] = dh.Tags
2371	}
2372	return json.Marshal(objectMap)
2373}
2374
2375// UnmarshalJSON is the custom unmarshaler for DedicatedHost struct.
2376func (dh *DedicatedHost) UnmarshalJSON(body []byte) error {
2377	var m map[string]*json.RawMessage
2378	err := json.Unmarshal(body, &m)
2379	if err != nil {
2380		return err
2381	}
2382	for k, v := range m {
2383		switch k {
2384		case "properties":
2385			if v != nil {
2386				var dedicatedHostProperties DedicatedHostProperties
2387				err = json.Unmarshal(*v, &dedicatedHostProperties)
2388				if err != nil {
2389					return err
2390				}
2391				dh.DedicatedHostProperties = &dedicatedHostProperties
2392			}
2393		case "sku":
2394			if v != nil {
2395				var sku Sku
2396				err = json.Unmarshal(*v, &sku)
2397				if err != nil {
2398					return err
2399				}
2400				dh.Sku = &sku
2401			}
2402		case "id":
2403			if v != nil {
2404				var ID string
2405				err = json.Unmarshal(*v, &ID)
2406				if err != nil {
2407					return err
2408				}
2409				dh.ID = &ID
2410			}
2411		case "name":
2412			if v != nil {
2413				var name string
2414				err = json.Unmarshal(*v, &name)
2415				if err != nil {
2416					return err
2417				}
2418				dh.Name = &name
2419			}
2420		case "type":
2421			if v != nil {
2422				var typeVar string
2423				err = json.Unmarshal(*v, &typeVar)
2424				if err != nil {
2425					return err
2426				}
2427				dh.Type = &typeVar
2428			}
2429		case "location":
2430			if v != nil {
2431				var location string
2432				err = json.Unmarshal(*v, &location)
2433				if err != nil {
2434					return err
2435				}
2436				dh.Location = &location
2437			}
2438		case "tags":
2439			if v != nil {
2440				var tags map[string]*string
2441				err = json.Unmarshal(*v, &tags)
2442				if err != nil {
2443					return err
2444				}
2445				dh.Tags = tags
2446			}
2447		}
2448	}
2449
2450	return nil
2451}
2452
2453// DedicatedHostAllocatableVM represents the dedicated host unutilized capacity in terms of a specific VM
2454// size.
2455type DedicatedHostAllocatableVM struct {
2456	// VMSize - VM size in terms of which the unutilized capacity is represented.
2457	VMSize *string `json:"vmSize,omitempty"`
2458	// Count - Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.
2459	Count *float64 `json:"count,omitempty"`
2460}
2461
2462// DedicatedHostAvailableCapacity dedicated host unutilized capacity.
2463type DedicatedHostAvailableCapacity struct {
2464	// 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.
2465	AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"`
2466}
2467
2468// DedicatedHostGroup specifies information about the dedicated host group that the dedicated hosts should
2469// be assigned to. <br><br> Currently, a dedicated host can only be added to a dedicated host group at
2470// creation time. An existing dedicated host cannot be added to another dedicated host group.
2471type DedicatedHostGroup struct {
2472	autorest.Response             `json:"-"`
2473	*DedicatedHostGroupProperties `json:"properties,omitempty"`
2474	// 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.
2475	Zones *[]string `json:"zones,omitempty"`
2476	// ID - READ-ONLY; Resource Id
2477	ID *string `json:"id,omitempty"`
2478	// Name - READ-ONLY; Resource name
2479	Name *string `json:"name,omitempty"`
2480	// Type - READ-ONLY; Resource type
2481	Type *string `json:"type,omitempty"`
2482	// Location - Resource location
2483	Location *string `json:"location,omitempty"`
2484	// Tags - Resource tags
2485	Tags map[string]*string `json:"tags"`
2486}
2487
2488// MarshalJSON is the custom marshaler for DedicatedHostGroup.
2489func (dhg DedicatedHostGroup) MarshalJSON() ([]byte, error) {
2490	objectMap := make(map[string]interface{})
2491	if dhg.DedicatedHostGroupProperties != nil {
2492		objectMap["properties"] = dhg.DedicatedHostGroupProperties
2493	}
2494	if dhg.Zones != nil {
2495		objectMap["zones"] = dhg.Zones
2496	}
2497	if dhg.Location != nil {
2498		objectMap["location"] = dhg.Location
2499	}
2500	if dhg.Tags != nil {
2501		objectMap["tags"] = dhg.Tags
2502	}
2503	return json.Marshal(objectMap)
2504}
2505
2506// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroup struct.
2507func (dhg *DedicatedHostGroup) UnmarshalJSON(body []byte) error {
2508	var m map[string]*json.RawMessage
2509	err := json.Unmarshal(body, &m)
2510	if err != nil {
2511		return err
2512	}
2513	for k, v := range m {
2514		switch k {
2515		case "properties":
2516			if v != nil {
2517				var dedicatedHostGroupProperties DedicatedHostGroupProperties
2518				err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
2519				if err != nil {
2520					return err
2521				}
2522				dhg.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
2523			}
2524		case "zones":
2525			if v != nil {
2526				var zones []string
2527				err = json.Unmarshal(*v, &zones)
2528				if err != nil {
2529					return err
2530				}
2531				dhg.Zones = &zones
2532			}
2533		case "id":
2534			if v != nil {
2535				var ID string
2536				err = json.Unmarshal(*v, &ID)
2537				if err != nil {
2538					return err
2539				}
2540				dhg.ID = &ID
2541			}
2542		case "name":
2543			if v != nil {
2544				var name string
2545				err = json.Unmarshal(*v, &name)
2546				if err != nil {
2547					return err
2548				}
2549				dhg.Name = &name
2550			}
2551		case "type":
2552			if v != nil {
2553				var typeVar string
2554				err = json.Unmarshal(*v, &typeVar)
2555				if err != nil {
2556					return err
2557				}
2558				dhg.Type = &typeVar
2559			}
2560		case "location":
2561			if v != nil {
2562				var location string
2563				err = json.Unmarshal(*v, &location)
2564				if err != nil {
2565					return err
2566				}
2567				dhg.Location = &location
2568			}
2569		case "tags":
2570			if v != nil {
2571				var tags map[string]*string
2572				err = json.Unmarshal(*v, &tags)
2573				if err != nil {
2574					return err
2575				}
2576				dhg.Tags = tags
2577			}
2578		}
2579	}
2580
2581	return nil
2582}
2583
2584// DedicatedHostGroupInstanceView ...
2585type DedicatedHostGroupInstanceView struct {
2586	// Hosts - List of instance view of the dedicated hosts under the dedicated host group.
2587	Hosts *[]DedicatedHostInstanceViewWithName `json:"hosts,omitempty"`
2588}
2589
2590// DedicatedHostGroupListResult the List Dedicated Host Group with resource group response.
2591type DedicatedHostGroupListResult struct {
2592	autorest.Response `json:"-"`
2593	// Value - The list of dedicated host groups
2594	Value *[]DedicatedHostGroup `json:"value,omitempty"`
2595	// 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.
2596	NextLink *string `json:"nextLink,omitempty"`
2597}
2598
2599// DedicatedHostGroupListResultIterator provides access to a complete listing of DedicatedHostGroup values.
2600type DedicatedHostGroupListResultIterator struct {
2601	i    int
2602	page DedicatedHostGroupListResultPage
2603}
2604
2605// NextWithContext advances to the next value.  If there was an error making
2606// the request the iterator does not advance and the error is returned.
2607func (iter *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
2608	if tracing.IsEnabled() {
2609		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultIterator.NextWithContext")
2610		defer func() {
2611			sc := -1
2612			if iter.Response().Response.Response != nil {
2613				sc = iter.Response().Response.Response.StatusCode
2614			}
2615			tracing.EndSpan(ctx, sc, err)
2616		}()
2617	}
2618	iter.i++
2619	if iter.i < len(iter.page.Values()) {
2620		return nil
2621	}
2622	err = iter.page.NextWithContext(ctx)
2623	if err != nil {
2624		iter.i--
2625		return err
2626	}
2627	iter.i = 0
2628	return nil
2629}
2630
2631// Next advances to the next value.  If there was an error making
2632// the request the iterator does not advance and the error is returned.
2633// Deprecated: Use NextWithContext() instead.
2634func (iter *DedicatedHostGroupListResultIterator) Next() error {
2635	return iter.NextWithContext(context.Background())
2636}
2637
2638// NotDone returns true if the enumeration should be started or is not yet complete.
2639func (iter DedicatedHostGroupListResultIterator) NotDone() bool {
2640	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2641}
2642
2643// Response returns the raw server response from the last page request.
2644func (iter DedicatedHostGroupListResultIterator) Response() DedicatedHostGroupListResult {
2645	return iter.page.Response()
2646}
2647
2648// Value returns the current value or a zero-initialized value if the
2649// iterator has advanced beyond the end of the collection.
2650func (iter DedicatedHostGroupListResultIterator) Value() DedicatedHostGroup {
2651	if !iter.page.NotDone() {
2652		return DedicatedHostGroup{}
2653	}
2654	return iter.page.Values()[iter.i]
2655}
2656
2657// Creates a new instance of the DedicatedHostGroupListResultIterator type.
2658func NewDedicatedHostGroupListResultIterator(page DedicatedHostGroupListResultPage) DedicatedHostGroupListResultIterator {
2659	return DedicatedHostGroupListResultIterator{page: page}
2660}
2661
2662// IsEmpty returns true if the ListResult contains no values.
2663func (dhglr DedicatedHostGroupListResult) IsEmpty() bool {
2664	return dhglr.Value == nil || len(*dhglr.Value) == 0
2665}
2666
2667// hasNextLink returns true if the NextLink is not empty.
2668func (dhglr DedicatedHostGroupListResult) hasNextLink() bool {
2669	return dhglr.NextLink != nil && len(*dhglr.NextLink) != 0
2670}
2671
2672// dedicatedHostGroupListResultPreparer prepares a request to retrieve the next set of results.
2673// It returns nil if no more results exist.
2674func (dhglr DedicatedHostGroupListResult) dedicatedHostGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
2675	if !dhglr.hasNextLink() {
2676		return nil, nil
2677	}
2678	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2679		autorest.AsJSON(),
2680		autorest.AsGet(),
2681		autorest.WithBaseURL(to.String(dhglr.NextLink)))
2682}
2683
2684// DedicatedHostGroupListResultPage contains a page of DedicatedHostGroup values.
2685type DedicatedHostGroupListResultPage struct {
2686	fn    func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)
2687	dhglr DedicatedHostGroupListResult
2688}
2689
2690// NextWithContext advances to the next page of values.  If there was an error making
2691// the request the page does not advance and the error is returned.
2692func (page *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
2693	if tracing.IsEnabled() {
2694		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultPage.NextWithContext")
2695		defer func() {
2696			sc := -1
2697			if page.Response().Response.Response != nil {
2698				sc = page.Response().Response.Response.StatusCode
2699			}
2700			tracing.EndSpan(ctx, sc, err)
2701		}()
2702	}
2703	for {
2704		next, err := page.fn(ctx, page.dhglr)
2705		if err != nil {
2706			return err
2707		}
2708		page.dhglr = next
2709		if !next.hasNextLink() || !next.IsEmpty() {
2710			break
2711		}
2712	}
2713	return nil
2714}
2715
2716// Next advances to the next page of values.  If there was an error making
2717// the request the page does not advance and the error is returned.
2718// Deprecated: Use NextWithContext() instead.
2719func (page *DedicatedHostGroupListResultPage) Next() error {
2720	return page.NextWithContext(context.Background())
2721}
2722
2723// NotDone returns true if the page enumeration should be started or is not yet complete.
2724func (page DedicatedHostGroupListResultPage) NotDone() bool {
2725	return !page.dhglr.IsEmpty()
2726}
2727
2728// Response returns the raw server response from the last page request.
2729func (page DedicatedHostGroupListResultPage) Response() DedicatedHostGroupListResult {
2730	return page.dhglr
2731}
2732
2733// Values returns the slice of values for the current page or nil if there are no values.
2734func (page DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup {
2735	if page.dhglr.IsEmpty() {
2736		return nil
2737	}
2738	return *page.dhglr.Value
2739}
2740
2741// Creates a new instance of the DedicatedHostGroupListResultPage type.
2742func NewDedicatedHostGroupListResultPage(cur DedicatedHostGroupListResult, getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage {
2743	return DedicatedHostGroupListResultPage{
2744		fn:    getNextPage,
2745		dhglr: cur,
2746	}
2747}
2748
2749// DedicatedHostGroupProperties dedicated Host Group Properties.
2750type DedicatedHostGroupProperties struct {
2751	// PlatformFaultDomainCount - Number of fault domains that the host group can span.
2752	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
2753	// Hosts - READ-ONLY; A list of references to all dedicated hosts in the dedicated host group.
2754	Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"`
2755	// 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.
2756	InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty"`
2757	// 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.
2758	SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"`
2759}
2760
2761// MarshalJSON is the custom marshaler for DedicatedHostGroupProperties.
2762func (dhgp DedicatedHostGroupProperties) MarshalJSON() ([]byte, error) {
2763	objectMap := make(map[string]interface{})
2764	if dhgp.PlatformFaultDomainCount != nil {
2765		objectMap["platformFaultDomainCount"] = dhgp.PlatformFaultDomainCount
2766	}
2767	if dhgp.SupportAutomaticPlacement != nil {
2768		objectMap["supportAutomaticPlacement"] = dhgp.SupportAutomaticPlacement
2769	}
2770	return json.Marshal(objectMap)
2771}
2772
2773// DedicatedHostGroupUpdate specifies information about the dedicated host group that the dedicated host
2774// should be assigned to. Only tags may be updated.
2775type DedicatedHostGroupUpdate struct {
2776	*DedicatedHostGroupProperties `json:"properties,omitempty"`
2777	// 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.
2778	Zones *[]string `json:"zones,omitempty"`
2779	// Tags - Resource tags
2780	Tags map[string]*string `json:"tags"`
2781}
2782
2783// MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate.
2784func (dhgu DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) {
2785	objectMap := make(map[string]interface{})
2786	if dhgu.DedicatedHostGroupProperties != nil {
2787		objectMap["properties"] = dhgu.DedicatedHostGroupProperties
2788	}
2789	if dhgu.Zones != nil {
2790		objectMap["zones"] = dhgu.Zones
2791	}
2792	if dhgu.Tags != nil {
2793		objectMap["tags"] = dhgu.Tags
2794	}
2795	return json.Marshal(objectMap)
2796}
2797
2798// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroupUpdate struct.
2799func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error {
2800	var m map[string]*json.RawMessage
2801	err := json.Unmarshal(body, &m)
2802	if err != nil {
2803		return err
2804	}
2805	for k, v := range m {
2806		switch k {
2807		case "properties":
2808			if v != nil {
2809				var dedicatedHostGroupProperties DedicatedHostGroupProperties
2810				err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
2811				if err != nil {
2812					return err
2813				}
2814				dhgu.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
2815			}
2816		case "zones":
2817			if v != nil {
2818				var zones []string
2819				err = json.Unmarshal(*v, &zones)
2820				if err != nil {
2821					return err
2822				}
2823				dhgu.Zones = &zones
2824			}
2825		case "tags":
2826			if v != nil {
2827				var tags map[string]*string
2828				err = json.Unmarshal(*v, &tags)
2829				if err != nil {
2830					return err
2831				}
2832				dhgu.Tags = tags
2833			}
2834		}
2835	}
2836
2837	return nil
2838}
2839
2840// DedicatedHostInstanceView the instance view of a dedicated host.
2841type DedicatedHostInstanceView struct {
2842	// AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
2843	AssetID *string `json:"assetId,omitempty"`
2844	// AvailableCapacity - Unutilized capacity of the dedicated host.
2845	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
2846	// Statuses - The resource status information.
2847	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
2848}
2849
2850// MarshalJSON is the custom marshaler for DedicatedHostInstanceView.
2851func (dhiv DedicatedHostInstanceView) MarshalJSON() ([]byte, error) {
2852	objectMap := make(map[string]interface{})
2853	if dhiv.AvailableCapacity != nil {
2854		objectMap["availableCapacity"] = dhiv.AvailableCapacity
2855	}
2856	if dhiv.Statuses != nil {
2857		objectMap["statuses"] = dhiv.Statuses
2858	}
2859	return json.Marshal(objectMap)
2860}
2861
2862// DedicatedHostInstanceViewWithName the instance view of a dedicated host that includes the name of the
2863// dedicated host. It is used for the response to the instance view of a dedicated host group.
2864type DedicatedHostInstanceViewWithName struct {
2865	// Name - READ-ONLY; The name of the dedicated host.
2866	Name *string `json:"name,omitempty"`
2867	// AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
2868	AssetID *string `json:"assetId,omitempty"`
2869	// AvailableCapacity - Unutilized capacity of the dedicated host.
2870	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
2871	// Statuses - The resource status information.
2872	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
2873}
2874
2875// MarshalJSON is the custom marshaler for DedicatedHostInstanceViewWithName.
2876func (dhivwn DedicatedHostInstanceViewWithName) MarshalJSON() ([]byte, error) {
2877	objectMap := make(map[string]interface{})
2878	if dhivwn.AvailableCapacity != nil {
2879		objectMap["availableCapacity"] = dhivwn.AvailableCapacity
2880	}
2881	if dhivwn.Statuses != nil {
2882		objectMap["statuses"] = dhivwn.Statuses
2883	}
2884	return json.Marshal(objectMap)
2885}
2886
2887// DedicatedHostListResult the list dedicated host operation response.
2888type DedicatedHostListResult struct {
2889	autorest.Response `json:"-"`
2890	// Value - The list of dedicated hosts
2891	Value *[]DedicatedHost `json:"value,omitempty"`
2892	// NextLink - The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts.
2893	NextLink *string `json:"nextLink,omitempty"`
2894}
2895
2896// DedicatedHostListResultIterator provides access to a complete listing of DedicatedHost values.
2897type DedicatedHostListResultIterator struct {
2898	i    int
2899	page DedicatedHostListResultPage
2900}
2901
2902// NextWithContext advances to the next value.  If there was an error making
2903// the request the iterator does not advance and the error is returned.
2904func (iter *DedicatedHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
2905	if tracing.IsEnabled() {
2906		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultIterator.NextWithContext")
2907		defer func() {
2908			sc := -1
2909			if iter.Response().Response.Response != nil {
2910				sc = iter.Response().Response.Response.StatusCode
2911			}
2912			tracing.EndSpan(ctx, sc, err)
2913		}()
2914	}
2915	iter.i++
2916	if iter.i < len(iter.page.Values()) {
2917		return nil
2918	}
2919	err = iter.page.NextWithContext(ctx)
2920	if err != nil {
2921		iter.i--
2922		return err
2923	}
2924	iter.i = 0
2925	return nil
2926}
2927
2928// Next advances to the next value.  If there was an error making
2929// the request the iterator does not advance and the error is returned.
2930// Deprecated: Use NextWithContext() instead.
2931func (iter *DedicatedHostListResultIterator) Next() error {
2932	return iter.NextWithContext(context.Background())
2933}
2934
2935// NotDone returns true if the enumeration should be started or is not yet complete.
2936func (iter DedicatedHostListResultIterator) NotDone() bool {
2937	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2938}
2939
2940// Response returns the raw server response from the last page request.
2941func (iter DedicatedHostListResultIterator) Response() DedicatedHostListResult {
2942	return iter.page.Response()
2943}
2944
2945// Value returns the current value or a zero-initialized value if the
2946// iterator has advanced beyond the end of the collection.
2947func (iter DedicatedHostListResultIterator) Value() DedicatedHost {
2948	if !iter.page.NotDone() {
2949		return DedicatedHost{}
2950	}
2951	return iter.page.Values()[iter.i]
2952}
2953
2954// Creates a new instance of the DedicatedHostListResultIterator type.
2955func NewDedicatedHostListResultIterator(page DedicatedHostListResultPage) DedicatedHostListResultIterator {
2956	return DedicatedHostListResultIterator{page: page}
2957}
2958
2959// IsEmpty returns true if the ListResult contains no values.
2960func (dhlr DedicatedHostListResult) IsEmpty() bool {
2961	return dhlr.Value == nil || len(*dhlr.Value) == 0
2962}
2963
2964// hasNextLink returns true if the NextLink is not empty.
2965func (dhlr DedicatedHostListResult) hasNextLink() bool {
2966	return dhlr.NextLink != nil && len(*dhlr.NextLink) != 0
2967}
2968
2969// dedicatedHostListResultPreparer prepares a request to retrieve the next set of results.
2970// It returns nil if no more results exist.
2971func (dhlr DedicatedHostListResult) dedicatedHostListResultPreparer(ctx context.Context) (*http.Request, error) {
2972	if !dhlr.hasNextLink() {
2973		return nil, nil
2974	}
2975	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2976		autorest.AsJSON(),
2977		autorest.AsGet(),
2978		autorest.WithBaseURL(to.String(dhlr.NextLink)))
2979}
2980
2981// DedicatedHostListResultPage contains a page of DedicatedHost values.
2982type DedicatedHostListResultPage struct {
2983	fn   func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)
2984	dhlr DedicatedHostListResult
2985}
2986
2987// NextWithContext advances to the next page of values.  If there was an error making
2988// the request the page does not advance and the error is returned.
2989func (page *DedicatedHostListResultPage) NextWithContext(ctx context.Context) (err error) {
2990	if tracing.IsEnabled() {
2991		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultPage.NextWithContext")
2992		defer func() {
2993			sc := -1
2994			if page.Response().Response.Response != nil {
2995				sc = page.Response().Response.Response.StatusCode
2996			}
2997			tracing.EndSpan(ctx, sc, err)
2998		}()
2999	}
3000	for {
3001		next, err := page.fn(ctx, page.dhlr)
3002		if err != nil {
3003			return err
3004		}
3005		page.dhlr = next
3006		if !next.hasNextLink() || !next.IsEmpty() {
3007			break
3008		}
3009	}
3010	return nil
3011}
3012
3013// Next advances to the next page of values.  If there was an error making
3014// the request the page does not advance and the error is returned.
3015// Deprecated: Use NextWithContext() instead.
3016func (page *DedicatedHostListResultPage) Next() error {
3017	return page.NextWithContext(context.Background())
3018}
3019
3020// NotDone returns true if the page enumeration should be started or is not yet complete.
3021func (page DedicatedHostListResultPage) NotDone() bool {
3022	return !page.dhlr.IsEmpty()
3023}
3024
3025// Response returns the raw server response from the last page request.
3026func (page DedicatedHostListResultPage) Response() DedicatedHostListResult {
3027	return page.dhlr
3028}
3029
3030// Values returns the slice of values for the current page or nil if there are no values.
3031func (page DedicatedHostListResultPage) Values() []DedicatedHost {
3032	if page.dhlr.IsEmpty() {
3033		return nil
3034	}
3035	return *page.dhlr.Value
3036}
3037
3038// Creates a new instance of the DedicatedHostListResultPage type.
3039func NewDedicatedHostListResultPage(cur DedicatedHostListResult, getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage {
3040	return DedicatedHostListResultPage{
3041		fn:   getNextPage,
3042		dhlr: cur,
3043	}
3044}
3045
3046// DedicatedHostProperties properties of the dedicated host.
3047type DedicatedHostProperties struct {
3048	// PlatformFaultDomain - Fault domain of the dedicated host within a dedicated host group.
3049	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
3050	// AutoReplaceOnFailure - Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided.
3051	AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"`
3052	// 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.
3053	HostID *string `json:"hostId,omitempty"`
3054	// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the Dedicated Host.
3055	VirtualMachines *[]SubResourceReadOnly `json:"virtualMachines,omitempty"`
3056	// 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'
3057	LicenseType DedicatedHostLicenseTypes `json:"licenseType,omitempty"`
3058	// ProvisioningTime - READ-ONLY; The date when the host was first provisioned.
3059	ProvisioningTime *date.Time `json:"provisioningTime,omitempty"`
3060	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
3061	ProvisioningState *string `json:"provisioningState,omitempty"`
3062	// InstanceView - READ-ONLY; The dedicated host instance view.
3063	InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty"`
3064}
3065
3066// MarshalJSON is the custom marshaler for DedicatedHostProperties.
3067func (dhp DedicatedHostProperties) MarshalJSON() ([]byte, error) {
3068	objectMap := make(map[string]interface{})
3069	if dhp.PlatformFaultDomain != nil {
3070		objectMap["platformFaultDomain"] = dhp.PlatformFaultDomain
3071	}
3072	if dhp.AutoReplaceOnFailure != nil {
3073		objectMap["autoReplaceOnFailure"] = dhp.AutoReplaceOnFailure
3074	}
3075	if dhp.LicenseType != "" {
3076		objectMap["licenseType"] = dhp.LicenseType
3077	}
3078	return json.Marshal(objectMap)
3079}
3080
3081// DedicatedHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3082// long-running operation.
3083type DedicatedHostsCreateOrUpdateFuture struct {
3084	azure.FutureAPI
3085	// Result returns the result of the asynchronous operation.
3086	// If the operation has not completed it will return an error.
3087	Result func(DedicatedHostsClient) (DedicatedHost, error)
3088}
3089
3090// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3091func (future *DedicatedHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3092	var azFuture azure.Future
3093	if err := json.Unmarshal(body, &azFuture); err != nil {
3094		return err
3095	}
3096	future.FutureAPI = &azFuture
3097	future.Result = future.result
3098	return nil
3099}
3100
3101// result is the default implementation for DedicatedHostsCreateOrUpdateFuture.Result.
3102func (future *DedicatedHostsCreateOrUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
3103	var done bool
3104	done, err = future.DoneWithContext(context.Background(), client)
3105	if err != nil {
3106		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3107		return
3108	}
3109	if !done {
3110		dh.Response.Response = future.Response()
3111		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsCreateOrUpdateFuture")
3112		return
3113	}
3114	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3115	if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
3116		dh, err = client.CreateOrUpdateResponder(dh.Response.Response)
3117		if err != nil {
3118			err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
3119		}
3120	}
3121	return
3122}
3123
3124// DedicatedHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
3125// operation.
3126type DedicatedHostsDeleteFuture struct {
3127	azure.FutureAPI
3128	// Result returns the result of the asynchronous operation.
3129	// If the operation has not completed it will return an error.
3130	Result func(DedicatedHostsClient) (autorest.Response, error)
3131}
3132
3133// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3134func (future *DedicatedHostsDeleteFuture) UnmarshalJSON(body []byte) error {
3135	var azFuture azure.Future
3136	if err := json.Unmarshal(body, &azFuture); err != nil {
3137		return err
3138	}
3139	future.FutureAPI = &azFuture
3140	future.Result = future.result
3141	return nil
3142}
3143
3144// result is the default implementation for DedicatedHostsDeleteFuture.Result.
3145func (future *DedicatedHostsDeleteFuture) result(client DedicatedHostsClient) (ar autorest.Response, err error) {
3146	var done bool
3147	done, err = future.DoneWithContext(context.Background(), client)
3148	if err != nil {
3149		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsDeleteFuture", "Result", future.Response(), "Polling failure")
3150		return
3151	}
3152	if !done {
3153		ar.Response = future.Response()
3154		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsDeleteFuture")
3155		return
3156	}
3157	ar.Response = future.Response()
3158	return
3159}
3160
3161// DedicatedHostsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3162// operation.
3163type DedicatedHostsUpdateFuture struct {
3164	azure.FutureAPI
3165	// Result returns the result of the asynchronous operation.
3166	// If the operation has not completed it will return an error.
3167	Result func(DedicatedHostsClient) (DedicatedHost, error)
3168}
3169
3170// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3171func (future *DedicatedHostsUpdateFuture) UnmarshalJSON(body []byte) error {
3172	var azFuture azure.Future
3173	if err := json.Unmarshal(body, &azFuture); err != nil {
3174		return err
3175	}
3176	future.FutureAPI = &azFuture
3177	future.Result = future.result
3178	return nil
3179}
3180
3181// result is the default implementation for DedicatedHostsUpdateFuture.Result.
3182func (future *DedicatedHostsUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
3183	var done bool
3184	done, err = future.DoneWithContext(context.Background(), client)
3185	if err != nil {
3186		err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", future.Response(), "Polling failure")
3187		return
3188	}
3189	if !done {
3190		dh.Response.Response = future.Response()
3191		err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsUpdateFuture")
3192		return
3193	}
3194	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3195	if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
3196		dh, err = client.UpdateResponder(dh.Response.Response)
3197		if err != nil {
3198			err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
3199		}
3200	}
3201	return
3202}
3203
3204// DedicatedHostUpdate specifies information about the dedicated host. Only tags, autoReplaceOnFailure and
3205// licenseType may be updated.
3206type DedicatedHostUpdate struct {
3207	*DedicatedHostProperties `json:"properties,omitempty"`
3208	// Tags - Resource tags
3209	Tags map[string]*string `json:"tags"`
3210}
3211
3212// MarshalJSON is the custom marshaler for DedicatedHostUpdate.
3213func (dhu DedicatedHostUpdate) MarshalJSON() ([]byte, error) {
3214	objectMap := make(map[string]interface{})
3215	if dhu.DedicatedHostProperties != nil {
3216		objectMap["properties"] = dhu.DedicatedHostProperties
3217	}
3218	if dhu.Tags != nil {
3219		objectMap["tags"] = dhu.Tags
3220	}
3221	return json.Marshal(objectMap)
3222}
3223
3224// UnmarshalJSON is the custom unmarshaler for DedicatedHostUpdate struct.
3225func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error {
3226	var m map[string]*json.RawMessage
3227	err := json.Unmarshal(body, &m)
3228	if err != nil {
3229		return err
3230	}
3231	for k, v := range m {
3232		switch k {
3233		case "properties":
3234			if v != nil {
3235				var dedicatedHostProperties DedicatedHostProperties
3236				err = json.Unmarshal(*v, &dedicatedHostProperties)
3237				if err != nil {
3238					return err
3239				}
3240				dhu.DedicatedHostProperties = &dedicatedHostProperties
3241			}
3242		case "tags":
3243			if v != nil {
3244				var tags map[string]*string
3245				err = json.Unmarshal(*v, &tags)
3246				if err != nil {
3247					return err
3248				}
3249				dhu.Tags = tags
3250			}
3251		}
3252	}
3253
3254	return nil
3255}
3256
3257// DiagnosticsProfile specifies the boot diagnostic settings state. <br><br>Minimum api-version:
3258// 2015-06-15.
3259type DiagnosticsProfile struct {
3260	// 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.
3261	BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
3262}
3263
3264// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating
3265// system disk. <br><br> NOTE: The ephemeral disk settings can only be specified for managed disk.
3266type DiffDiskSettings struct {
3267	// Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local'
3268	Option DiffDiskOptions `json:"option,omitempty"`
3269	// 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'
3270	Placement DiffDiskPlacement `json:"placement,omitempty"`
3271}
3272
3273// Disallowed describes the disallowed disk types.
3274type Disallowed struct {
3275	// DiskTypes - A list of disk types.
3276	DiskTypes *[]string `json:"diskTypes,omitempty"`
3277}
3278
3279// DisallowedConfiguration specifies the disallowed configuration for a virtual machine image.
3280type DisallowedConfiguration struct {
3281	// VMDiskType - VM disk types which are disallowed. Possible values include: 'VMDiskTypesNone', 'VMDiskTypesUnmanaged'
3282	VMDiskType VMDiskTypes `json:"vmDiskType,omitempty"`
3283}
3284
3285// Disk disk resource.
3286type Disk struct {
3287	autorest.Response `json:"-"`
3288	// ManagedBy - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
3289	ManagedBy *string `json:"managedBy,omitempty"`
3290	// 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.
3291	ManagedByExtended *[]string `json:"managedByExtended,omitempty"`
3292	Sku               *DiskSku  `json:"sku,omitempty"`
3293	// Zones - The Logical zone list for Disk.
3294	Zones *[]string `json:"zones,omitempty"`
3295	// ExtendedLocation - The extended location where the disk will be created. Extended location cannot be changed.
3296	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
3297	*DiskProperties  `json:"properties,omitempty"`
3298	// ID - READ-ONLY; Resource Id
3299	ID *string `json:"id,omitempty"`
3300	// Name - READ-ONLY; Resource name
3301	Name *string `json:"name,omitempty"`
3302	// Type - READ-ONLY; Resource type
3303	Type *string `json:"type,omitempty"`
3304	// Location - Resource location
3305	Location *string `json:"location,omitempty"`
3306	// Tags - Resource tags
3307	Tags map[string]*string `json:"tags"`
3308}
3309
3310// MarshalJSON is the custom marshaler for Disk.
3311func (d Disk) MarshalJSON() ([]byte, error) {
3312	objectMap := make(map[string]interface{})
3313	if d.Sku != nil {
3314		objectMap["sku"] = d.Sku
3315	}
3316	if d.Zones != nil {
3317		objectMap["zones"] = d.Zones
3318	}
3319	if d.ExtendedLocation != nil {
3320		objectMap["extendedLocation"] = d.ExtendedLocation
3321	}
3322	if d.DiskProperties != nil {
3323		objectMap["properties"] = d.DiskProperties
3324	}
3325	if d.Location != nil {
3326		objectMap["location"] = d.Location
3327	}
3328	if d.Tags != nil {
3329		objectMap["tags"] = d.Tags
3330	}
3331	return json.Marshal(objectMap)
3332}
3333
3334// UnmarshalJSON is the custom unmarshaler for Disk struct.
3335func (d *Disk) UnmarshalJSON(body []byte) error {
3336	var m map[string]*json.RawMessage
3337	err := json.Unmarshal(body, &m)
3338	if err != nil {
3339		return err
3340	}
3341	for k, v := range m {
3342		switch k {
3343		case "managedBy":
3344			if v != nil {
3345				var managedBy string
3346				err = json.Unmarshal(*v, &managedBy)
3347				if err != nil {
3348					return err
3349				}
3350				d.ManagedBy = &managedBy
3351			}
3352		case "managedByExtended":
3353			if v != nil {
3354				var managedByExtended []string
3355				err = json.Unmarshal(*v, &managedByExtended)
3356				if err != nil {
3357					return err
3358				}
3359				d.ManagedByExtended = &managedByExtended
3360			}
3361		case "sku":
3362			if v != nil {
3363				var sku DiskSku
3364				err = json.Unmarshal(*v, &sku)
3365				if err != nil {
3366					return err
3367				}
3368				d.Sku = &sku
3369			}
3370		case "zones":
3371			if v != nil {
3372				var zones []string
3373				err = json.Unmarshal(*v, &zones)
3374				if err != nil {
3375					return err
3376				}
3377				d.Zones = &zones
3378			}
3379		case "extendedLocation":
3380			if v != nil {
3381				var extendedLocation ExtendedLocation
3382				err = json.Unmarshal(*v, &extendedLocation)
3383				if err != nil {
3384					return err
3385				}
3386				d.ExtendedLocation = &extendedLocation
3387			}
3388		case "properties":
3389			if v != nil {
3390				var diskProperties DiskProperties
3391				err = json.Unmarshal(*v, &diskProperties)
3392				if err != nil {
3393					return err
3394				}
3395				d.DiskProperties = &diskProperties
3396			}
3397		case "id":
3398			if v != nil {
3399				var ID string
3400				err = json.Unmarshal(*v, &ID)
3401				if err != nil {
3402					return err
3403				}
3404				d.ID = &ID
3405			}
3406		case "name":
3407			if v != nil {
3408				var name string
3409				err = json.Unmarshal(*v, &name)
3410				if err != nil {
3411					return err
3412				}
3413				d.Name = &name
3414			}
3415		case "type":
3416			if v != nil {
3417				var typeVar string
3418				err = json.Unmarshal(*v, &typeVar)
3419				if err != nil {
3420					return err
3421				}
3422				d.Type = &typeVar
3423			}
3424		case "location":
3425			if v != nil {
3426				var location string
3427				err = json.Unmarshal(*v, &location)
3428				if err != nil {
3429					return err
3430				}
3431				d.Location = &location
3432			}
3433		case "tags":
3434			if v != nil {
3435				var tags map[string]*string
3436				err = json.Unmarshal(*v, &tags)
3437				if err != nil {
3438					return err
3439				}
3440				d.Tags = tags
3441			}
3442		}
3443	}
3444
3445	return nil
3446}
3447
3448// DiskAccess disk access resource.
3449type DiskAccess struct {
3450	autorest.Response     `json:"-"`
3451	*DiskAccessProperties `json:"properties,omitempty"`
3452	// ID - READ-ONLY; Resource Id
3453	ID *string `json:"id,omitempty"`
3454	// Name - READ-ONLY; Resource name
3455	Name *string `json:"name,omitempty"`
3456	// Type - READ-ONLY; Resource type
3457	Type *string `json:"type,omitempty"`
3458	// Location - Resource location
3459	Location *string `json:"location,omitempty"`
3460	// Tags - Resource tags
3461	Tags map[string]*string `json:"tags"`
3462}
3463
3464// MarshalJSON is the custom marshaler for DiskAccess.
3465func (da DiskAccess) MarshalJSON() ([]byte, error) {
3466	objectMap := make(map[string]interface{})
3467	if da.DiskAccessProperties != nil {
3468		objectMap["properties"] = da.DiskAccessProperties
3469	}
3470	if da.Location != nil {
3471		objectMap["location"] = da.Location
3472	}
3473	if da.Tags != nil {
3474		objectMap["tags"] = da.Tags
3475	}
3476	return json.Marshal(objectMap)
3477}
3478
3479// UnmarshalJSON is the custom unmarshaler for DiskAccess struct.
3480func (da *DiskAccess) UnmarshalJSON(body []byte) error {
3481	var m map[string]*json.RawMessage
3482	err := json.Unmarshal(body, &m)
3483	if err != nil {
3484		return err
3485	}
3486	for k, v := range m {
3487		switch k {
3488		case "properties":
3489			if v != nil {
3490				var diskAccessProperties DiskAccessProperties
3491				err = json.Unmarshal(*v, &diskAccessProperties)
3492				if err != nil {
3493					return err
3494				}
3495				da.DiskAccessProperties = &diskAccessProperties
3496			}
3497		case "id":
3498			if v != nil {
3499				var ID string
3500				err = json.Unmarshal(*v, &ID)
3501				if err != nil {
3502					return err
3503				}
3504				da.ID = &ID
3505			}
3506		case "name":
3507			if v != nil {
3508				var name string
3509				err = json.Unmarshal(*v, &name)
3510				if err != nil {
3511					return err
3512				}
3513				da.Name = &name
3514			}
3515		case "type":
3516			if v != nil {
3517				var typeVar string
3518				err = json.Unmarshal(*v, &typeVar)
3519				if err != nil {
3520					return err
3521				}
3522				da.Type = &typeVar
3523			}
3524		case "location":
3525			if v != nil {
3526				var location string
3527				err = json.Unmarshal(*v, &location)
3528				if err != nil {
3529					return err
3530				}
3531				da.Location = &location
3532			}
3533		case "tags":
3534			if v != nil {
3535				var tags map[string]*string
3536				err = json.Unmarshal(*v, &tags)
3537				if err != nil {
3538					return err
3539				}
3540				da.Tags = tags
3541			}
3542		}
3543	}
3544
3545	return nil
3546}
3547
3548// DiskAccessesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3549// long-running operation.
3550type DiskAccessesCreateOrUpdateFuture struct {
3551	azure.FutureAPI
3552	// Result returns the result of the asynchronous operation.
3553	// If the operation has not completed it will return an error.
3554	Result func(DiskAccessesClient) (DiskAccess, error)
3555}
3556
3557// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3558func (future *DiskAccessesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3559	var azFuture azure.Future
3560	if err := json.Unmarshal(body, &azFuture); err != nil {
3561		return err
3562	}
3563	future.FutureAPI = &azFuture
3564	future.Result = future.result
3565	return nil
3566}
3567
3568// result is the default implementation for DiskAccessesCreateOrUpdateFuture.Result.
3569func (future *DiskAccessesCreateOrUpdateFuture) result(client DiskAccessesClient) (da DiskAccess, err error) {
3570	var done bool
3571	done, err = future.DoneWithContext(context.Background(), client)
3572	if err != nil {
3573		err = autorest.NewErrorWithError(err, "compute.DiskAccessesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3574		return
3575	}
3576	if !done {
3577		da.Response.Response = future.Response()
3578		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesCreateOrUpdateFuture")
3579		return
3580	}
3581	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3582	if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
3583		da, err = client.CreateOrUpdateResponder(da.Response.Response)
3584		if err != nil {
3585			err = autorest.NewErrorWithError(err, "compute.DiskAccessesCreateOrUpdateFuture", "Result", da.Response.Response, "Failure responding to request")
3586		}
3587	}
3588	return
3589}
3590
3591// DiskAccessesDeleteAPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the
3592// results of a long-running operation.
3593type DiskAccessesDeleteAPrivateEndpointConnectionFuture struct {
3594	azure.FutureAPI
3595	// Result returns the result of the asynchronous operation.
3596	// If the operation has not completed it will return an error.
3597	Result func(DiskAccessesClient) (autorest.Response, error)
3598}
3599
3600// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3601func (future *DiskAccessesDeleteAPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
3602	var azFuture azure.Future
3603	if err := json.Unmarshal(body, &azFuture); err != nil {
3604		return err
3605	}
3606	future.FutureAPI = &azFuture
3607	future.Result = future.result
3608	return nil
3609}
3610
3611// result is the default implementation for DiskAccessesDeleteAPrivateEndpointConnectionFuture.Result.
3612func (future *DiskAccessesDeleteAPrivateEndpointConnectionFuture) result(client DiskAccessesClient) (ar autorest.Response, err error) {
3613	var done bool
3614	done, err = future.DoneWithContext(context.Background(), client)
3615	if err != nil {
3616		err = autorest.NewErrorWithError(err, "compute.DiskAccessesDeleteAPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
3617		return
3618	}
3619	if !done {
3620		ar.Response = future.Response()
3621		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesDeleteAPrivateEndpointConnectionFuture")
3622		return
3623	}
3624	ar.Response = future.Response()
3625	return
3626}
3627
3628// DiskAccessesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
3629// operation.
3630type DiskAccessesDeleteFuture struct {
3631	azure.FutureAPI
3632	// Result returns the result of the asynchronous operation.
3633	// If the operation has not completed it will return an error.
3634	Result func(DiskAccessesClient) (autorest.Response, error)
3635}
3636
3637// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3638func (future *DiskAccessesDeleteFuture) UnmarshalJSON(body []byte) error {
3639	var azFuture azure.Future
3640	if err := json.Unmarshal(body, &azFuture); err != nil {
3641		return err
3642	}
3643	future.FutureAPI = &azFuture
3644	future.Result = future.result
3645	return nil
3646}
3647
3648// result is the default implementation for DiskAccessesDeleteFuture.Result.
3649func (future *DiskAccessesDeleteFuture) result(client DiskAccessesClient) (ar autorest.Response, err error) {
3650	var done bool
3651	done, err = future.DoneWithContext(context.Background(), client)
3652	if err != nil {
3653		err = autorest.NewErrorWithError(err, "compute.DiskAccessesDeleteFuture", "Result", future.Response(), "Polling failure")
3654		return
3655	}
3656	if !done {
3657		ar.Response = future.Response()
3658		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesDeleteFuture")
3659		return
3660	}
3661	ar.Response = future.Response()
3662	return
3663}
3664
3665// DiskAccessesUpdateAPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the
3666// results of a long-running operation.
3667type DiskAccessesUpdateAPrivateEndpointConnectionFuture struct {
3668	azure.FutureAPI
3669	// Result returns the result of the asynchronous operation.
3670	// If the operation has not completed it will return an error.
3671	Result func(DiskAccessesClient) (PrivateEndpointConnection, error)
3672}
3673
3674// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3675func (future *DiskAccessesUpdateAPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
3676	var azFuture azure.Future
3677	if err := json.Unmarshal(body, &azFuture); err != nil {
3678		return err
3679	}
3680	future.FutureAPI = &azFuture
3681	future.Result = future.result
3682	return nil
3683}
3684
3685// result is the default implementation for DiskAccessesUpdateAPrivateEndpointConnectionFuture.Result.
3686func (future *DiskAccessesUpdateAPrivateEndpointConnectionFuture) result(client DiskAccessesClient) (pec PrivateEndpointConnection, err error) {
3687	var done bool
3688	done, err = future.DoneWithContext(context.Background(), client)
3689	if err != nil {
3690		err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
3691		return
3692	}
3693	if !done {
3694		pec.Response.Response = future.Response()
3695		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture")
3696		return
3697	}
3698	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3699	if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent {
3700		pec, err = client.UpdateAPrivateEndpointConnectionResponder(pec.Response.Response)
3701		if err != nil {
3702			err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture", "Result", pec.Response.Response, "Failure responding to request")
3703		}
3704	}
3705	return
3706}
3707
3708// DiskAccessesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3709// operation.
3710type DiskAccessesUpdateFuture struct {
3711	azure.FutureAPI
3712	// Result returns the result of the asynchronous operation.
3713	// If the operation has not completed it will return an error.
3714	Result func(DiskAccessesClient) (DiskAccess, error)
3715}
3716
3717// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3718func (future *DiskAccessesUpdateFuture) UnmarshalJSON(body []byte) error {
3719	var azFuture azure.Future
3720	if err := json.Unmarshal(body, &azFuture); err != nil {
3721		return err
3722	}
3723	future.FutureAPI = &azFuture
3724	future.Result = future.result
3725	return nil
3726}
3727
3728// result is the default implementation for DiskAccessesUpdateFuture.Result.
3729func (future *DiskAccessesUpdateFuture) result(client DiskAccessesClient) (da DiskAccess, err error) {
3730	var done bool
3731	done, err = future.DoneWithContext(context.Background(), client)
3732	if err != nil {
3733		err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateFuture", "Result", future.Response(), "Polling failure")
3734		return
3735	}
3736	if !done {
3737		da.Response.Response = future.Response()
3738		err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesUpdateFuture")
3739		return
3740	}
3741	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3742	if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
3743		da, err = client.UpdateResponder(da.Response.Response)
3744		if err != nil {
3745			err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateFuture", "Result", da.Response.Response, "Failure responding to request")
3746		}
3747	}
3748	return
3749}
3750
3751// DiskAccessList the List disk access operation response.
3752type DiskAccessList struct {
3753	autorest.Response `json:"-"`
3754	// Value - A list of disk access resources.
3755	Value *[]DiskAccess `json:"value,omitempty"`
3756	// 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.
3757	NextLink *string `json:"nextLink,omitempty"`
3758}
3759
3760// DiskAccessListIterator provides access to a complete listing of DiskAccess values.
3761type DiskAccessListIterator struct {
3762	i    int
3763	page DiskAccessListPage
3764}
3765
3766// NextWithContext advances to the next value.  If there was an error making
3767// the request the iterator does not advance and the error is returned.
3768func (iter *DiskAccessListIterator) NextWithContext(ctx context.Context) (err error) {
3769	if tracing.IsEnabled() {
3770		ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListIterator.NextWithContext")
3771		defer func() {
3772			sc := -1
3773			if iter.Response().Response.Response != nil {
3774				sc = iter.Response().Response.Response.StatusCode
3775			}
3776			tracing.EndSpan(ctx, sc, err)
3777		}()
3778	}
3779	iter.i++
3780	if iter.i < len(iter.page.Values()) {
3781		return nil
3782	}
3783	err = iter.page.NextWithContext(ctx)
3784	if err != nil {
3785		iter.i--
3786		return err
3787	}
3788	iter.i = 0
3789	return nil
3790}
3791
3792// Next advances to the next value.  If there was an error making
3793// the request the iterator does not advance and the error is returned.
3794// Deprecated: Use NextWithContext() instead.
3795func (iter *DiskAccessListIterator) Next() error {
3796	return iter.NextWithContext(context.Background())
3797}
3798
3799// NotDone returns true if the enumeration should be started or is not yet complete.
3800func (iter DiskAccessListIterator) NotDone() bool {
3801	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3802}
3803
3804// Response returns the raw server response from the last page request.
3805func (iter DiskAccessListIterator) Response() DiskAccessList {
3806	return iter.page.Response()
3807}
3808
3809// Value returns the current value or a zero-initialized value if the
3810// iterator has advanced beyond the end of the collection.
3811func (iter DiskAccessListIterator) Value() DiskAccess {
3812	if !iter.page.NotDone() {
3813		return DiskAccess{}
3814	}
3815	return iter.page.Values()[iter.i]
3816}
3817
3818// Creates a new instance of the DiskAccessListIterator type.
3819func NewDiskAccessListIterator(page DiskAccessListPage) DiskAccessListIterator {
3820	return DiskAccessListIterator{page: page}
3821}
3822
3823// IsEmpty returns true if the ListResult contains no values.
3824func (dal DiskAccessList) IsEmpty() bool {
3825	return dal.Value == nil || len(*dal.Value) == 0
3826}
3827
3828// hasNextLink returns true if the NextLink is not empty.
3829func (dal DiskAccessList) hasNextLink() bool {
3830	return dal.NextLink != nil && len(*dal.NextLink) != 0
3831}
3832
3833// diskAccessListPreparer prepares a request to retrieve the next set of results.
3834// It returns nil if no more results exist.
3835func (dal DiskAccessList) diskAccessListPreparer(ctx context.Context) (*http.Request, error) {
3836	if !dal.hasNextLink() {
3837		return nil, nil
3838	}
3839	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3840		autorest.AsJSON(),
3841		autorest.AsGet(),
3842		autorest.WithBaseURL(to.String(dal.NextLink)))
3843}
3844
3845// DiskAccessListPage contains a page of DiskAccess values.
3846type DiskAccessListPage struct {
3847	fn  func(context.Context, DiskAccessList) (DiskAccessList, error)
3848	dal DiskAccessList
3849}
3850
3851// NextWithContext advances to the next page of values.  If there was an error making
3852// the request the page does not advance and the error is returned.
3853func (page *DiskAccessListPage) NextWithContext(ctx context.Context) (err error) {
3854	if tracing.IsEnabled() {
3855		ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListPage.NextWithContext")
3856		defer func() {
3857			sc := -1
3858			if page.Response().Response.Response != nil {
3859				sc = page.Response().Response.Response.StatusCode
3860			}
3861			tracing.EndSpan(ctx, sc, err)
3862		}()
3863	}
3864	for {
3865		next, err := page.fn(ctx, page.dal)
3866		if err != nil {
3867			return err
3868		}
3869		page.dal = next
3870		if !next.hasNextLink() || !next.IsEmpty() {
3871			break
3872		}
3873	}
3874	return nil
3875}
3876
3877// Next advances to the next page of values.  If there was an error making
3878// the request the page does not advance and the error is returned.
3879// Deprecated: Use NextWithContext() instead.
3880func (page *DiskAccessListPage) Next() error {
3881	return page.NextWithContext(context.Background())
3882}
3883
3884// NotDone returns true if the page enumeration should be started or is not yet complete.
3885func (page DiskAccessListPage) NotDone() bool {
3886	return !page.dal.IsEmpty()
3887}
3888
3889// Response returns the raw server response from the last page request.
3890func (page DiskAccessListPage) Response() DiskAccessList {
3891	return page.dal
3892}
3893
3894// Values returns the slice of values for the current page or nil if there are no values.
3895func (page DiskAccessListPage) Values() []DiskAccess {
3896	if page.dal.IsEmpty() {
3897		return nil
3898	}
3899	return *page.dal.Value
3900}
3901
3902// Creates a new instance of the DiskAccessListPage type.
3903func NewDiskAccessListPage(cur DiskAccessList, getNextPage func(context.Context, DiskAccessList) (DiskAccessList, error)) DiskAccessListPage {
3904	return DiskAccessListPage{
3905		fn:  getNextPage,
3906		dal: cur,
3907	}
3908}
3909
3910// DiskAccessProperties ...
3911type DiskAccessProperties struct {
3912	// PrivateEndpointConnections - READ-ONLY; A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection is supported.
3913	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
3914	// ProvisioningState - READ-ONLY; The disk access resource provisioning state.
3915	ProvisioningState *string `json:"provisioningState,omitempty"`
3916	// TimeCreated - READ-ONLY; The time when the disk access was created.
3917	TimeCreated *date.Time `json:"timeCreated,omitempty"`
3918}
3919
3920// MarshalJSON is the custom marshaler for DiskAccessProperties.
3921func (dap DiskAccessProperties) MarshalJSON() ([]byte, error) {
3922	objectMap := make(map[string]interface{})
3923	return json.Marshal(objectMap)
3924}
3925
3926// DiskAccessUpdate used for updating a disk access resource.
3927type DiskAccessUpdate struct {
3928	// Tags - Resource tags
3929	Tags map[string]*string `json:"tags"`
3930}
3931
3932// MarshalJSON is the custom marshaler for DiskAccessUpdate.
3933func (dau DiskAccessUpdate) MarshalJSON() ([]byte, error) {
3934	objectMap := make(map[string]interface{})
3935	if dau.Tags != nil {
3936		objectMap["tags"] = dau.Tags
3937	}
3938	return json.Marshal(objectMap)
3939}
3940
3941// DiskEncryptionSet disk encryption set resource.
3942type DiskEncryptionSet struct {
3943	autorest.Response        `json:"-"`
3944	Identity                 *EncryptionSetIdentity `json:"identity,omitempty"`
3945	*EncryptionSetProperties `json:"properties,omitempty"`
3946	// ID - READ-ONLY; Resource Id
3947	ID *string `json:"id,omitempty"`
3948	// Name - READ-ONLY; Resource name
3949	Name *string `json:"name,omitempty"`
3950	// Type - READ-ONLY; Resource type
3951	Type *string `json:"type,omitempty"`
3952	// Location - Resource location
3953	Location *string `json:"location,omitempty"`
3954	// Tags - Resource tags
3955	Tags map[string]*string `json:"tags"`
3956}
3957
3958// MarshalJSON is the custom marshaler for DiskEncryptionSet.
3959func (desVar DiskEncryptionSet) MarshalJSON() ([]byte, error) {
3960	objectMap := make(map[string]interface{})
3961	if desVar.Identity != nil {
3962		objectMap["identity"] = desVar.Identity
3963	}
3964	if desVar.EncryptionSetProperties != nil {
3965		objectMap["properties"] = desVar.EncryptionSetProperties
3966	}
3967	if desVar.Location != nil {
3968		objectMap["location"] = desVar.Location
3969	}
3970	if desVar.Tags != nil {
3971		objectMap["tags"] = desVar.Tags
3972	}
3973	return json.Marshal(objectMap)
3974}
3975
3976// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSet struct.
3977func (desVar *DiskEncryptionSet) UnmarshalJSON(body []byte) error {
3978	var m map[string]*json.RawMessage
3979	err := json.Unmarshal(body, &m)
3980	if err != nil {
3981		return err
3982	}
3983	for k, v := range m {
3984		switch k {
3985		case "identity":
3986			if v != nil {
3987				var identity EncryptionSetIdentity
3988				err = json.Unmarshal(*v, &identity)
3989				if err != nil {
3990					return err
3991				}
3992				desVar.Identity = &identity
3993			}
3994		case "properties":
3995			if v != nil {
3996				var encryptionSetProperties EncryptionSetProperties
3997				err = json.Unmarshal(*v, &encryptionSetProperties)
3998				if err != nil {
3999					return err
4000				}
4001				desVar.EncryptionSetProperties = &encryptionSetProperties
4002			}
4003		case "id":
4004			if v != nil {
4005				var ID string
4006				err = json.Unmarshal(*v, &ID)
4007				if err != nil {
4008					return err
4009				}
4010				desVar.ID = &ID
4011			}
4012		case "name":
4013			if v != nil {
4014				var name string
4015				err = json.Unmarshal(*v, &name)
4016				if err != nil {
4017					return err
4018				}
4019				desVar.Name = &name
4020			}
4021		case "type":
4022			if v != nil {
4023				var typeVar string
4024				err = json.Unmarshal(*v, &typeVar)
4025				if err != nil {
4026					return err
4027				}
4028				desVar.Type = &typeVar
4029			}
4030		case "location":
4031			if v != nil {
4032				var location string
4033				err = json.Unmarshal(*v, &location)
4034				if err != nil {
4035					return err
4036				}
4037				desVar.Location = &location
4038			}
4039		case "tags":
4040			if v != nil {
4041				var tags map[string]*string
4042				err = json.Unmarshal(*v, &tags)
4043				if err != nil {
4044					return err
4045				}
4046				desVar.Tags = tags
4047			}
4048		}
4049	}
4050
4051	return nil
4052}
4053
4054// DiskEncryptionSetList the List disk encryption set operation response.
4055type DiskEncryptionSetList struct {
4056	autorest.Response `json:"-"`
4057	// Value - A list of disk encryption sets.
4058	Value *[]DiskEncryptionSet `json:"value,omitempty"`
4059	// 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.
4060	NextLink *string `json:"nextLink,omitempty"`
4061}
4062
4063// DiskEncryptionSetListIterator provides access to a complete listing of DiskEncryptionSet values.
4064type DiskEncryptionSetListIterator struct {
4065	i    int
4066	page DiskEncryptionSetListPage
4067}
4068
4069// NextWithContext advances to the next value.  If there was an error making
4070// the request the iterator does not advance and the error is returned.
4071func (iter *DiskEncryptionSetListIterator) NextWithContext(ctx context.Context) (err error) {
4072	if tracing.IsEnabled() {
4073		ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListIterator.NextWithContext")
4074		defer func() {
4075			sc := -1
4076			if iter.Response().Response.Response != nil {
4077				sc = iter.Response().Response.Response.StatusCode
4078			}
4079			tracing.EndSpan(ctx, sc, err)
4080		}()
4081	}
4082	iter.i++
4083	if iter.i < len(iter.page.Values()) {
4084		return nil
4085	}
4086	err = iter.page.NextWithContext(ctx)
4087	if err != nil {
4088		iter.i--
4089		return err
4090	}
4091	iter.i = 0
4092	return nil
4093}
4094
4095// Next advances to the next value.  If there was an error making
4096// the request the iterator does not advance and the error is returned.
4097// Deprecated: Use NextWithContext() instead.
4098func (iter *DiskEncryptionSetListIterator) Next() error {
4099	return iter.NextWithContext(context.Background())
4100}
4101
4102// NotDone returns true if the enumeration should be started or is not yet complete.
4103func (iter DiskEncryptionSetListIterator) NotDone() bool {
4104	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4105}
4106
4107// Response returns the raw server response from the last page request.
4108func (iter DiskEncryptionSetListIterator) Response() DiskEncryptionSetList {
4109	return iter.page.Response()
4110}
4111
4112// Value returns the current value or a zero-initialized value if the
4113// iterator has advanced beyond the end of the collection.
4114func (iter DiskEncryptionSetListIterator) Value() DiskEncryptionSet {
4115	if !iter.page.NotDone() {
4116		return DiskEncryptionSet{}
4117	}
4118	return iter.page.Values()[iter.i]
4119}
4120
4121// Creates a new instance of the DiskEncryptionSetListIterator type.
4122func NewDiskEncryptionSetListIterator(page DiskEncryptionSetListPage) DiskEncryptionSetListIterator {
4123	return DiskEncryptionSetListIterator{page: page}
4124}
4125
4126// IsEmpty returns true if the ListResult contains no values.
4127func (desl DiskEncryptionSetList) IsEmpty() bool {
4128	return desl.Value == nil || len(*desl.Value) == 0
4129}
4130
4131// hasNextLink returns true if the NextLink is not empty.
4132func (desl DiskEncryptionSetList) hasNextLink() bool {
4133	return desl.NextLink != nil && len(*desl.NextLink) != 0
4134}
4135
4136// diskEncryptionSetListPreparer prepares a request to retrieve the next set of results.
4137// It returns nil if no more results exist.
4138func (desl DiskEncryptionSetList) diskEncryptionSetListPreparer(ctx context.Context) (*http.Request, error) {
4139	if !desl.hasNextLink() {
4140		return nil, nil
4141	}
4142	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4143		autorest.AsJSON(),
4144		autorest.AsGet(),
4145		autorest.WithBaseURL(to.String(desl.NextLink)))
4146}
4147
4148// DiskEncryptionSetListPage contains a page of DiskEncryptionSet values.
4149type DiskEncryptionSetListPage struct {
4150	fn   func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)
4151	desl DiskEncryptionSetList
4152}
4153
4154// NextWithContext advances to the next page of values.  If there was an error making
4155// the request the page does not advance and the error is returned.
4156func (page *DiskEncryptionSetListPage) NextWithContext(ctx context.Context) (err error) {
4157	if tracing.IsEnabled() {
4158		ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListPage.NextWithContext")
4159		defer func() {
4160			sc := -1
4161			if page.Response().Response.Response != nil {
4162				sc = page.Response().Response.Response.StatusCode
4163			}
4164			tracing.EndSpan(ctx, sc, err)
4165		}()
4166	}
4167	for {
4168		next, err := page.fn(ctx, page.desl)
4169		if err != nil {
4170			return err
4171		}
4172		page.desl = next
4173		if !next.hasNextLink() || !next.IsEmpty() {
4174			break
4175		}
4176	}
4177	return nil
4178}
4179
4180// Next advances to the next page of values.  If there was an error making
4181// the request the page does not advance and the error is returned.
4182// Deprecated: Use NextWithContext() instead.
4183func (page *DiskEncryptionSetListPage) Next() error {
4184	return page.NextWithContext(context.Background())
4185}
4186
4187// NotDone returns true if the page enumeration should be started or is not yet complete.
4188func (page DiskEncryptionSetListPage) NotDone() bool {
4189	return !page.desl.IsEmpty()
4190}
4191
4192// Response returns the raw server response from the last page request.
4193func (page DiskEncryptionSetListPage) Response() DiskEncryptionSetList {
4194	return page.desl
4195}
4196
4197// Values returns the slice of values for the current page or nil if there are no values.
4198func (page DiskEncryptionSetListPage) Values() []DiskEncryptionSet {
4199	if page.desl.IsEmpty() {
4200		return nil
4201	}
4202	return *page.desl.Value
4203}
4204
4205// Creates a new instance of the DiskEncryptionSetListPage type.
4206func NewDiskEncryptionSetListPage(cur DiskEncryptionSetList, getNextPage func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)) DiskEncryptionSetListPage {
4207	return DiskEncryptionSetListPage{
4208		fn:   getNextPage,
4209		desl: cur,
4210	}
4211}
4212
4213// DiskEncryptionSetParameters describes the parameter of customer managed disk encryption set resource id
4214// that can be specified for disk. <br><br> NOTE: The disk encryption set resource id can only be specified
4215// for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.
4216type DiskEncryptionSetParameters struct {
4217	// ID - Resource Id
4218	ID *string `json:"id,omitempty"`
4219}
4220
4221// DiskEncryptionSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4222// long-running operation.
4223type DiskEncryptionSetsCreateOrUpdateFuture struct {
4224	azure.FutureAPI
4225	// Result returns the result of the asynchronous operation.
4226	// If the operation has not completed it will return an error.
4227	Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
4228}
4229
4230// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4231func (future *DiskEncryptionSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4232	var azFuture azure.Future
4233	if err := json.Unmarshal(body, &azFuture); err != nil {
4234		return err
4235	}
4236	future.FutureAPI = &azFuture
4237	future.Result = future.result
4238	return nil
4239}
4240
4241// result is the default implementation for DiskEncryptionSetsCreateOrUpdateFuture.Result.
4242func (future *DiskEncryptionSetsCreateOrUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
4243	var done bool
4244	done, err = future.DoneWithContext(context.Background(), client)
4245	if err != nil {
4246		err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4247		return
4248	}
4249	if !done {
4250		desVar.Response.Response = future.Response()
4251		err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsCreateOrUpdateFuture")
4252		return
4253	}
4254	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4255	if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
4256		desVar, err = client.CreateOrUpdateResponder(desVar.Response.Response)
4257		if err != nil {
4258			err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
4259		}
4260	}
4261	return
4262}
4263
4264// DiskEncryptionSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
4265// long-running operation.
4266type DiskEncryptionSetsDeleteFuture struct {
4267	azure.FutureAPI
4268	// Result returns the result of the asynchronous operation.
4269	// If the operation has not completed it will return an error.
4270	Result func(DiskEncryptionSetsClient) (autorest.Response, error)
4271}
4272
4273// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4274func (future *DiskEncryptionSetsDeleteFuture) UnmarshalJSON(body []byte) error {
4275	var azFuture azure.Future
4276	if err := json.Unmarshal(body, &azFuture); err != nil {
4277		return err
4278	}
4279	future.FutureAPI = &azFuture
4280	future.Result = future.result
4281	return nil
4282}
4283
4284// result is the default implementation for DiskEncryptionSetsDeleteFuture.Result.
4285func (future *DiskEncryptionSetsDeleteFuture) result(client DiskEncryptionSetsClient) (ar autorest.Response, err error) {
4286	var done bool
4287	done, err = future.DoneWithContext(context.Background(), client)
4288	if err != nil {
4289		err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsDeleteFuture", "Result", future.Response(), "Polling failure")
4290		return
4291	}
4292	if !done {
4293		ar.Response = future.Response()
4294		err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsDeleteFuture")
4295		return
4296	}
4297	ar.Response = future.Response()
4298	return
4299}
4300
4301// DiskEncryptionSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
4302// long-running operation.
4303type DiskEncryptionSetsUpdateFuture struct {
4304	azure.FutureAPI
4305	// Result returns the result of the asynchronous operation.
4306	// If the operation has not completed it will return an error.
4307	Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
4308}
4309
4310// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4311func (future *DiskEncryptionSetsUpdateFuture) UnmarshalJSON(body []byte) error {
4312	var azFuture azure.Future
4313	if err := json.Unmarshal(body, &azFuture); err != nil {
4314		return err
4315	}
4316	future.FutureAPI = &azFuture
4317	future.Result = future.result
4318	return nil
4319}
4320
4321// result is the default implementation for DiskEncryptionSetsUpdateFuture.Result.
4322func (future *DiskEncryptionSetsUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
4323	var done bool
4324	done, err = future.DoneWithContext(context.Background(), client)
4325	if err != nil {
4326		err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", future.Response(), "Polling failure")
4327		return
4328	}
4329	if !done {
4330		desVar.Response.Response = future.Response()
4331		err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsUpdateFuture")
4332		return
4333	}
4334	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4335	if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
4336		desVar, err = client.UpdateResponder(desVar.Response.Response)
4337		if err != nil {
4338			err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
4339		}
4340	}
4341	return
4342}
4343
4344// DiskEncryptionSettings describes a Encryption Settings for a Disk
4345type DiskEncryptionSettings struct {
4346	// DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret.
4347	DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"`
4348	// KeyEncryptionKey - Specifies the location of the key encryption key in Key Vault.
4349	KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"`
4350	// Enabled - Specifies whether disk encryption should be enabled on the virtual machine.
4351	Enabled *bool `json:"enabled,omitempty"`
4352}
4353
4354// DiskEncryptionSetUpdate disk encryption set update resource.
4355type DiskEncryptionSetUpdate struct {
4356	*DiskEncryptionSetUpdateProperties `json:"properties,omitempty"`
4357	// Tags - Resource tags
4358	Tags map[string]*string `json:"tags"`
4359}
4360
4361// MarshalJSON is the custom marshaler for DiskEncryptionSetUpdate.
4362func (desu DiskEncryptionSetUpdate) MarshalJSON() ([]byte, error) {
4363	objectMap := make(map[string]interface{})
4364	if desu.DiskEncryptionSetUpdateProperties != nil {
4365		objectMap["properties"] = desu.DiskEncryptionSetUpdateProperties
4366	}
4367	if desu.Tags != nil {
4368		objectMap["tags"] = desu.Tags
4369	}
4370	return json.Marshal(objectMap)
4371}
4372
4373// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSetUpdate struct.
4374func (desu *DiskEncryptionSetUpdate) UnmarshalJSON(body []byte) error {
4375	var m map[string]*json.RawMessage
4376	err := json.Unmarshal(body, &m)
4377	if err != nil {
4378		return err
4379	}
4380	for k, v := range m {
4381		switch k {
4382		case "properties":
4383			if v != nil {
4384				var diskEncryptionSetUpdateProperties DiskEncryptionSetUpdateProperties
4385				err = json.Unmarshal(*v, &diskEncryptionSetUpdateProperties)
4386				if err != nil {
4387					return err
4388				}
4389				desu.DiskEncryptionSetUpdateProperties = &diskEncryptionSetUpdateProperties
4390			}
4391		case "tags":
4392			if v != nil {
4393				var tags map[string]*string
4394				err = json.Unmarshal(*v, &tags)
4395				if err != nil {
4396					return err
4397				}
4398				desu.Tags = tags
4399			}
4400		}
4401	}
4402
4403	return nil
4404}
4405
4406// DiskEncryptionSetUpdateProperties disk encryption set resource update properties.
4407type DiskEncryptionSetUpdateProperties struct {
4408	// EncryptionType - Possible values include: 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys'
4409	EncryptionType DiskEncryptionSetType    `json:"encryptionType,omitempty"`
4410	ActiveKey      *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`
4411}
4412
4413// DiskImageEncryption this is the disk image encryption base class.
4414type DiskImageEncryption struct {
4415	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
4416	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
4417}
4418
4419// DiskInstanceView the instance view of the disk.
4420type DiskInstanceView struct {
4421	// Name - The disk name.
4422	Name *string `json:"name,omitempty"`
4423	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
4424	EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
4425	// Statuses - The resource status information.
4426	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
4427}
4428
4429// DiskList the List Disks operation response.
4430type DiskList struct {
4431	autorest.Response `json:"-"`
4432	// Value - A list of disks.
4433	Value *[]Disk `json:"value,omitempty"`
4434	// NextLink - The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks.
4435	NextLink *string `json:"nextLink,omitempty"`
4436}
4437
4438// DiskListIterator provides access to a complete listing of Disk values.
4439type DiskListIterator struct {
4440	i    int
4441	page DiskListPage
4442}
4443
4444// NextWithContext advances to the next value.  If there was an error making
4445// the request the iterator does not advance and the error is returned.
4446func (iter *DiskListIterator) NextWithContext(ctx context.Context) (err error) {
4447	if tracing.IsEnabled() {
4448		ctx = tracing.StartSpan(ctx, fqdn+"/DiskListIterator.NextWithContext")
4449		defer func() {
4450			sc := -1
4451			if iter.Response().Response.Response != nil {
4452				sc = iter.Response().Response.Response.StatusCode
4453			}
4454			tracing.EndSpan(ctx, sc, err)
4455		}()
4456	}
4457	iter.i++
4458	if iter.i < len(iter.page.Values()) {
4459		return nil
4460	}
4461	err = iter.page.NextWithContext(ctx)
4462	if err != nil {
4463		iter.i--
4464		return err
4465	}
4466	iter.i = 0
4467	return nil
4468}
4469
4470// Next advances to the next value.  If there was an error making
4471// the request the iterator does not advance and the error is returned.
4472// Deprecated: Use NextWithContext() instead.
4473func (iter *DiskListIterator) Next() error {
4474	return iter.NextWithContext(context.Background())
4475}
4476
4477// NotDone returns true if the enumeration should be started or is not yet complete.
4478func (iter DiskListIterator) NotDone() bool {
4479	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4480}
4481
4482// Response returns the raw server response from the last page request.
4483func (iter DiskListIterator) Response() DiskList {
4484	return iter.page.Response()
4485}
4486
4487// Value returns the current value or a zero-initialized value if the
4488// iterator has advanced beyond the end of the collection.
4489func (iter DiskListIterator) Value() Disk {
4490	if !iter.page.NotDone() {
4491		return Disk{}
4492	}
4493	return iter.page.Values()[iter.i]
4494}
4495
4496// Creates a new instance of the DiskListIterator type.
4497func NewDiskListIterator(page DiskListPage) DiskListIterator {
4498	return DiskListIterator{page: page}
4499}
4500
4501// IsEmpty returns true if the ListResult contains no values.
4502func (dl DiskList) IsEmpty() bool {
4503	return dl.Value == nil || len(*dl.Value) == 0
4504}
4505
4506// hasNextLink returns true if the NextLink is not empty.
4507func (dl DiskList) hasNextLink() bool {
4508	return dl.NextLink != nil && len(*dl.NextLink) != 0
4509}
4510
4511// diskListPreparer prepares a request to retrieve the next set of results.
4512// It returns nil if no more results exist.
4513func (dl DiskList) diskListPreparer(ctx context.Context) (*http.Request, error) {
4514	if !dl.hasNextLink() {
4515		return nil, nil
4516	}
4517	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4518		autorest.AsJSON(),
4519		autorest.AsGet(),
4520		autorest.WithBaseURL(to.String(dl.NextLink)))
4521}
4522
4523// DiskListPage contains a page of Disk values.
4524type DiskListPage struct {
4525	fn func(context.Context, DiskList) (DiskList, error)
4526	dl DiskList
4527}
4528
4529// NextWithContext advances to the next page of values.  If there was an error making
4530// the request the page does not advance and the error is returned.
4531func (page *DiskListPage) NextWithContext(ctx context.Context) (err error) {
4532	if tracing.IsEnabled() {
4533		ctx = tracing.StartSpan(ctx, fqdn+"/DiskListPage.NextWithContext")
4534		defer func() {
4535			sc := -1
4536			if page.Response().Response.Response != nil {
4537				sc = page.Response().Response.Response.StatusCode
4538			}
4539			tracing.EndSpan(ctx, sc, err)
4540		}()
4541	}
4542	for {
4543		next, err := page.fn(ctx, page.dl)
4544		if err != nil {
4545			return err
4546		}
4547		page.dl = next
4548		if !next.hasNextLink() || !next.IsEmpty() {
4549			break
4550		}
4551	}
4552	return nil
4553}
4554
4555// Next advances to the next page of values.  If there was an error making
4556// the request the page does not advance and the error is returned.
4557// Deprecated: Use NextWithContext() instead.
4558func (page *DiskListPage) Next() error {
4559	return page.NextWithContext(context.Background())
4560}
4561
4562// NotDone returns true if the page enumeration should be started or is not yet complete.
4563func (page DiskListPage) NotDone() bool {
4564	return !page.dl.IsEmpty()
4565}
4566
4567// Response returns the raw server response from the last page request.
4568func (page DiskListPage) Response() DiskList {
4569	return page.dl
4570}
4571
4572// Values returns the slice of values for the current page or nil if there are no values.
4573func (page DiskListPage) Values() []Disk {
4574	if page.dl.IsEmpty() {
4575		return nil
4576	}
4577	return *page.dl.Value
4578}
4579
4580// Creates a new instance of the DiskListPage type.
4581func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
4582	return DiskListPage{
4583		fn: getNextPage,
4584		dl: cur,
4585	}
4586}
4587
4588// DiskProperties disk resource properties.
4589type DiskProperties struct {
4590	// TimeCreated - READ-ONLY; The time when the disk was created.
4591	TimeCreated *date.Time `json:"timeCreated,omitempty"`
4592	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
4593	OsType OperatingSystemTypes `json:"osType,omitempty"`
4594	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
4595	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
4596	// PurchasePlan - Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}
4597	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
4598	// CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
4599	CreationData *CreationData `json:"creationData,omitempty"`
4600	// 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.
4601	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
4602	// DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
4603	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
4604	// UniqueID - READ-ONLY; Unique Guid identifying the resource.
4605	UniqueID *string `json:"uniqueId,omitempty"`
4606	// EncryptionSettingsCollection - Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
4607	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
4608	// ProvisioningState - READ-ONLY; The disk provisioning state.
4609	ProvisioningState *string `json:"provisioningState,omitempty"`
4610	// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
4611	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
4612	// 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.
4613	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
4614	// 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.
4615	DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
4616	// 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.
4617	DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
4618	// DiskState - The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
4619	DiskState DiskState `json:"diskState,omitempty"`
4620	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
4621	Encryption *Encryption `json:"encryption,omitempty"`
4622	// 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.
4623	MaxShares *int32 `json:"maxShares,omitempty"`
4624	// 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.
4625	ShareInfo *[]ShareInfoElement `json:"shareInfo,omitempty"`
4626	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
4627	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
4628	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
4629	DiskAccessID *string `json:"diskAccessId,omitempty"`
4630	// Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.
4631	Tier *string `json:"tier,omitempty"`
4632	// BurstingEnabled - Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
4633	BurstingEnabled *bool `json:"burstingEnabled,omitempty"`
4634}
4635
4636// MarshalJSON is the custom marshaler for DiskProperties.
4637func (dp DiskProperties) MarshalJSON() ([]byte, error) {
4638	objectMap := make(map[string]interface{})
4639	if dp.OsType != "" {
4640		objectMap["osType"] = dp.OsType
4641	}
4642	if dp.HyperVGeneration != "" {
4643		objectMap["hyperVGeneration"] = dp.HyperVGeneration
4644	}
4645	if dp.PurchasePlan != nil {
4646		objectMap["purchasePlan"] = dp.PurchasePlan
4647	}
4648	if dp.CreationData != nil {
4649		objectMap["creationData"] = dp.CreationData
4650	}
4651	if dp.DiskSizeGB != nil {
4652		objectMap["diskSizeGB"] = dp.DiskSizeGB
4653	}
4654	if dp.EncryptionSettingsCollection != nil {
4655		objectMap["encryptionSettingsCollection"] = dp.EncryptionSettingsCollection
4656	}
4657	if dp.DiskIOPSReadWrite != nil {
4658		objectMap["diskIOPSReadWrite"] = dp.DiskIOPSReadWrite
4659	}
4660	if dp.DiskMBpsReadWrite != nil {
4661		objectMap["diskMBpsReadWrite"] = dp.DiskMBpsReadWrite
4662	}
4663	if dp.DiskIOPSReadOnly != nil {
4664		objectMap["diskIOPSReadOnly"] = dp.DiskIOPSReadOnly
4665	}
4666	if dp.DiskMBpsReadOnly != nil {
4667		objectMap["diskMBpsReadOnly"] = dp.DiskMBpsReadOnly
4668	}
4669	if dp.DiskState != "" {
4670		objectMap["diskState"] = dp.DiskState
4671	}
4672	if dp.Encryption != nil {
4673		objectMap["encryption"] = dp.Encryption
4674	}
4675	if dp.MaxShares != nil {
4676		objectMap["maxShares"] = dp.MaxShares
4677	}
4678	if dp.NetworkAccessPolicy != "" {
4679		objectMap["networkAccessPolicy"] = dp.NetworkAccessPolicy
4680	}
4681	if dp.DiskAccessID != nil {
4682		objectMap["diskAccessId"] = dp.DiskAccessID
4683	}
4684	if dp.Tier != nil {
4685		objectMap["tier"] = dp.Tier
4686	}
4687	if dp.BurstingEnabled != nil {
4688		objectMap["burstingEnabled"] = dp.BurstingEnabled
4689	}
4690	return json.Marshal(objectMap)
4691}
4692
4693// DiskRestorePoint properties of disk restore point
4694type DiskRestorePoint struct {
4695	autorest.Response           `json:"-"`
4696	*DiskRestorePointProperties `json:"properties,omitempty"`
4697	// ID - READ-ONLY; Resource Id
4698	ID *string `json:"id,omitempty"`
4699	// Name - READ-ONLY; Resource name
4700	Name *string `json:"name,omitempty"`
4701	// Type - READ-ONLY; Resource type
4702	Type *string `json:"type,omitempty"`
4703}
4704
4705// MarshalJSON is the custom marshaler for DiskRestorePoint.
4706func (drp DiskRestorePoint) MarshalJSON() ([]byte, error) {
4707	objectMap := make(map[string]interface{})
4708	if drp.DiskRestorePointProperties != nil {
4709		objectMap["properties"] = drp.DiskRestorePointProperties
4710	}
4711	return json.Marshal(objectMap)
4712}
4713
4714// UnmarshalJSON is the custom unmarshaler for DiskRestorePoint struct.
4715func (drp *DiskRestorePoint) UnmarshalJSON(body []byte) error {
4716	var m map[string]*json.RawMessage
4717	err := json.Unmarshal(body, &m)
4718	if err != nil {
4719		return err
4720	}
4721	for k, v := range m {
4722		switch k {
4723		case "properties":
4724			if v != nil {
4725				var diskRestorePointProperties DiskRestorePointProperties
4726				err = json.Unmarshal(*v, &diskRestorePointProperties)
4727				if err != nil {
4728					return err
4729				}
4730				drp.DiskRestorePointProperties = &diskRestorePointProperties
4731			}
4732		case "id":
4733			if v != nil {
4734				var ID string
4735				err = json.Unmarshal(*v, &ID)
4736				if err != nil {
4737					return err
4738				}
4739				drp.ID = &ID
4740			}
4741		case "name":
4742			if v != nil {
4743				var name string
4744				err = json.Unmarshal(*v, &name)
4745				if err != nil {
4746					return err
4747				}
4748				drp.Name = &name
4749			}
4750		case "type":
4751			if v != nil {
4752				var typeVar string
4753				err = json.Unmarshal(*v, &typeVar)
4754				if err != nil {
4755					return err
4756				}
4757				drp.Type = &typeVar
4758			}
4759		}
4760	}
4761
4762	return nil
4763}
4764
4765// DiskRestorePointList the List Disk Restore Points operation response.
4766type DiskRestorePointList struct {
4767	autorest.Response `json:"-"`
4768	// Value - A list of disk restore points.
4769	Value *[]DiskRestorePoint `json:"value,omitempty"`
4770	// NextLink - The uri to fetch the next page of disk restore points. Call ListNext() with this to fetch the next page of disk restore points.
4771	NextLink *string `json:"nextLink,omitempty"`
4772}
4773
4774// DiskRestorePointListIterator provides access to a complete listing of DiskRestorePoint values.
4775type DiskRestorePointListIterator struct {
4776	i    int
4777	page DiskRestorePointListPage
4778}
4779
4780// NextWithContext advances to the next value.  If there was an error making
4781// the request the iterator does not advance and the error is returned.
4782func (iter *DiskRestorePointListIterator) NextWithContext(ctx context.Context) (err error) {
4783	if tracing.IsEnabled() {
4784		ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointListIterator.NextWithContext")
4785		defer func() {
4786			sc := -1
4787			if iter.Response().Response.Response != nil {
4788				sc = iter.Response().Response.Response.StatusCode
4789			}
4790			tracing.EndSpan(ctx, sc, err)
4791		}()
4792	}
4793	iter.i++
4794	if iter.i < len(iter.page.Values()) {
4795		return nil
4796	}
4797	err = iter.page.NextWithContext(ctx)
4798	if err != nil {
4799		iter.i--
4800		return err
4801	}
4802	iter.i = 0
4803	return nil
4804}
4805
4806// Next advances to the next value.  If there was an error making
4807// the request the iterator does not advance and the error is returned.
4808// Deprecated: Use NextWithContext() instead.
4809func (iter *DiskRestorePointListIterator) Next() error {
4810	return iter.NextWithContext(context.Background())
4811}
4812
4813// NotDone returns true if the enumeration should be started or is not yet complete.
4814func (iter DiskRestorePointListIterator) NotDone() bool {
4815	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4816}
4817
4818// Response returns the raw server response from the last page request.
4819func (iter DiskRestorePointListIterator) Response() DiskRestorePointList {
4820	return iter.page.Response()
4821}
4822
4823// Value returns the current value or a zero-initialized value if the
4824// iterator has advanced beyond the end of the collection.
4825func (iter DiskRestorePointListIterator) Value() DiskRestorePoint {
4826	if !iter.page.NotDone() {
4827		return DiskRestorePoint{}
4828	}
4829	return iter.page.Values()[iter.i]
4830}
4831
4832// Creates a new instance of the DiskRestorePointListIterator type.
4833func NewDiskRestorePointListIterator(page DiskRestorePointListPage) DiskRestorePointListIterator {
4834	return DiskRestorePointListIterator{page: page}
4835}
4836
4837// IsEmpty returns true if the ListResult contains no values.
4838func (drpl DiskRestorePointList) IsEmpty() bool {
4839	return drpl.Value == nil || len(*drpl.Value) == 0
4840}
4841
4842// hasNextLink returns true if the NextLink is not empty.
4843func (drpl DiskRestorePointList) hasNextLink() bool {
4844	return drpl.NextLink != nil && len(*drpl.NextLink) != 0
4845}
4846
4847// diskRestorePointListPreparer prepares a request to retrieve the next set of results.
4848// It returns nil if no more results exist.
4849func (drpl DiskRestorePointList) diskRestorePointListPreparer(ctx context.Context) (*http.Request, error) {
4850	if !drpl.hasNextLink() {
4851		return nil, nil
4852	}
4853	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4854		autorest.AsJSON(),
4855		autorest.AsGet(),
4856		autorest.WithBaseURL(to.String(drpl.NextLink)))
4857}
4858
4859// DiskRestorePointListPage contains a page of DiskRestorePoint values.
4860type DiskRestorePointListPage struct {
4861	fn   func(context.Context, DiskRestorePointList) (DiskRestorePointList, error)
4862	drpl DiskRestorePointList
4863}
4864
4865// NextWithContext advances to the next page of values.  If there was an error making
4866// the request the page does not advance and the error is returned.
4867func (page *DiskRestorePointListPage) NextWithContext(ctx context.Context) (err error) {
4868	if tracing.IsEnabled() {
4869		ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointListPage.NextWithContext")
4870		defer func() {
4871			sc := -1
4872			if page.Response().Response.Response != nil {
4873				sc = page.Response().Response.Response.StatusCode
4874			}
4875			tracing.EndSpan(ctx, sc, err)
4876		}()
4877	}
4878	for {
4879		next, err := page.fn(ctx, page.drpl)
4880		if err != nil {
4881			return err
4882		}
4883		page.drpl = next
4884		if !next.hasNextLink() || !next.IsEmpty() {
4885			break
4886		}
4887	}
4888	return nil
4889}
4890
4891// Next advances to the next page of values.  If there was an error making
4892// the request the page does not advance and the error is returned.
4893// Deprecated: Use NextWithContext() instead.
4894func (page *DiskRestorePointListPage) Next() error {
4895	return page.NextWithContext(context.Background())
4896}
4897
4898// NotDone returns true if the page enumeration should be started or is not yet complete.
4899func (page DiskRestorePointListPage) NotDone() bool {
4900	return !page.drpl.IsEmpty()
4901}
4902
4903// Response returns the raw server response from the last page request.
4904func (page DiskRestorePointListPage) Response() DiskRestorePointList {
4905	return page.drpl
4906}
4907
4908// Values returns the slice of values for the current page or nil if there are no values.
4909func (page DiskRestorePointListPage) Values() []DiskRestorePoint {
4910	if page.drpl.IsEmpty() {
4911		return nil
4912	}
4913	return *page.drpl.Value
4914}
4915
4916// Creates a new instance of the DiskRestorePointListPage type.
4917func NewDiskRestorePointListPage(cur DiskRestorePointList, getNextPage func(context.Context, DiskRestorePointList) (DiskRestorePointList, error)) DiskRestorePointListPage {
4918	return DiskRestorePointListPage{
4919		fn:   getNextPage,
4920		drpl: cur,
4921	}
4922}
4923
4924// DiskRestorePointProperties properties of an incremental disk restore point
4925type DiskRestorePointProperties struct {
4926	// TimeCreated - READ-ONLY; The timestamp of restorePoint creation
4927	TimeCreated *date.Time `json:"timeCreated,omitempty"`
4928	// SourceResourceID - READ-ONLY; arm id of source disk
4929	SourceResourceID *string `json:"sourceResourceId,omitempty"`
4930	// OsType - READ-ONLY; The Operating System type. Possible values include: 'Windows', 'Linux'
4931	OsType OperatingSystemTypes `json:"osType,omitempty"`
4932	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
4933	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
4934	// PurchasePlan - Purchase plan information for the the image from which the OS disk was created.
4935	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
4936	// FamilyID - READ-ONLY; id of the backing snapshot's MIS family
4937	FamilyID *string `json:"familyId,omitempty"`
4938	// SourceUniqueID - READ-ONLY; unique incarnation id of the source disk
4939	SourceUniqueID *string `json:"sourceUniqueId,omitempty"`
4940	// Encryption - READ-ONLY; Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
4941	Encryption *Encryption `json:"encryption,omitempty"`
4942}
4943
4944// MarshalJSON is the custom marshaler for DiskRestorePointProperties.
4945func (drpp DiskRestorePointProperties) MarshalJSON() ([]byte, error) {
4946	objectMap := make(map[string]interface{})
4947	if drpp.HyperVGeneration != "" {
4948		objectMap["hyperVGeneration"] = drpp.HyperVGeneration
4949	}
4950	if drpp.PurchasePlan != nil {
4951		objectMap["purchasePlan"] = drpp.PurchasePlan
4952	}
4953	return json.Marshal(objectMap)
4954}
4955
4956// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4957// operation.
4958type DisksCreateOrUpdateFuture struct {
4959	azure.FutureAPI
4960	// Result returns the result of the asynchronous operation.
4961	// If the operation has not completed it will return an error.
4962	Result func(DisksClient) (Disk, error)
4963}
4964
4965// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4966func (future *DisksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4967	var azFuture azure.Future
4968	if err := json.Unmarshal(body, &azFuture); err != nil {
4969		return err
4970	}
4971	future.FutureAPI = &azFuture
4972	future.Result = future.result
4973	return nil
4974}
4975
4976// result is the default implementation for DisksCreateOrUpdateFuture.Result.
4977func (future *DisksCreateOrUpdateFuture) result(client DisksClient) (d Disk, err error) {
4978	var done bool
4979	done, err = future.DoneWithContext(context.Background(), client)
4980	if err != nil {
4981		err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4982		return
4983	}
4984	if !done {
4985		d.Response.Response = future.Response()
4986		err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
4987		return
4988	}
4989	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4990	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
4991		d, err = client.CreateOrUpdateResponder(d.Response.Response)
4992		if err != nil {
4993			err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
4994		}
4995	}
4996	return
4997}
4998
4999// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
5000type DisksDeleteFuture struct {
5001	azure.FutureAPI
5002	// Result returns the result of the asynchronous operation.
5003	// If the operation has not completed it will return an error.
5004	Result func(DisksClient) (autorest.Response, error)
5005}
5006
5007// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5008func (future *DisksDeleteFuture) UnmarshalJSON(body []byte) error {
5009	var azFuture azure.Future
5010	if err := json.Unmarshal(body, &azFuture); err != nil {
5011		return err
5012	}
5013	future.FutureAPI = &azFuture
5014	future.Result = future.result
5015	return nil
5016}
5017
5018// result is the default implementation for DisksDeleteFuture.Result.
5019func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Response, err error) {
5020	var done bool
5021	done, err = future.DoneWithContext(context.Background(), client)
5022	if err != nil {
5023		err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Polling failure")
5024		return
5025	}
5026	if !done {
5027		ar.Response = future.Response()
5028		err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
5029		return
5030	}
5031	ar.Response = future.Response()
5032	return
5033}
5034
5035// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
5036// operation.
5037type DisksGrantAccessFuture struct {
5038	azure.FutureAPI
5039	// Result returns the result of the asynchronous operation.
5040	// If the operation has not completed it will return an error.
5041	Result func(DisksClient) (AccessURI, error)
5042}
5043
5044// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5045func (future *DisksGrantAccessFuture) UnmarshalJSON(body []byte) error {
5046	var azFuture azure.Future
5047	if err := json.Unmarshal(body, &azFuture); err != nil {
5048		return err
5049	}
5050	future.FutureAPI = &azFuture
5051	future.Result = future.result
5052	return nil
5053}
5054
5055// result is the default implementation for DisksGrantAccessFuture.Result.
5056func (future *DisksGrantAccessFuture) result(client DisksClient) (au AccessURI, err error) {
5057	var done bool
5058	done, err = future.DoneWithContext(context.Background(), client)
5059	if err != nil {
5060		err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Polling failure")
5061		return
5062	}
5063	if !done {
5064		au.Response.Response = future.Response()
5065		err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
5066		return
5067	}
5068	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5069	if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
5070		au, err = client.GrantAccessResponder(au.Response.Response)
5071		if err != nil {
5072			err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
5073		}
5074	}
5075	return
5076}
5077
5078// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.
5079type DiskSku struct {
5080	// Name - The sku name. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS', 'UltraSSDLRS'
5081	Name DiskStorageAccountTypes `json:"name,omitempty"`
5082	// Tier - READ-ONLY; The sku tier.
5083	Tier *string `json:"tier,omitempty"`
5084}
5085
5086// MarshalJSON is the custom marshaler for DiskSku.
5087func (ds DiskSku) MarshalJSON() ([]byte, error) {
5088	objectMap := make(map[string]interface{})
5089	if ds.Name != "" {
5090		objectMap["name"] = ds.Name
5091	}
5092	return json.Marshal(objectMap)
5093}
5094
5095// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
5096// operation.
5097type DisksRevokeAccessFuture struct {
5098	azure.FutureAPI
5099	// Result returns the result of the asynchronous operation.
5100	// If the operation has not completed it will return an error.
5101	Result func(DisksClient) (autorest.Response, error)
5102}
5103
5104// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5105func (future *DisksRevokeAccessFuture) UnmarshalJSON(body []byte) error {
5106	var azFuture azure.Future
5107	if err := json.Unmarshal(body, &azFuture); err != nil {
5108		return err
5109	}
5110	future.FutureAPI = &azFuture
5111	future.Result = future.result
5112	return nil
5113}
5114
5115// result is the default implementation for DisksRevokeAccessFuture.Result.
5116func (future *DisksRevokeAccessFuture) result(client DisksClient) (ar autorest.Response, err error) {
5117	var done bool
5118	done, err = future.DoneWithContext(context.Background(), client)
5119	if err != nil {
5120		err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Polling failure")
5121		return
5122	}
5123	if !done {
5124		ar.Response = future.Response()
5125		err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
5126		return
5127	}
5128	ar.Response = future.Response()
5129	return
5130}
5131
5132// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
5133type DisksUpdateFuture struct {
5134	azure.FutureAPI
5135	// Result returns the result of the asynchronous operation.
5136	// If the operation has not completed it will return an error.
5137	Result func(DisksClient) (Disk, error)
5138}
5139
5140// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5141func (future *DisksUpdateFuture) UnmarshalJSON(body []byte) error {
5142	var azFuture azure.Future
5143	if err := json.Unmarshal(body, &azFuture); err != nil {
5144		return err
5145	}
5146	future.FutureAPI = &azFuture
5147	future.Result = future.result
5148	return nil
5149}
5150
5151// result is the default implementation for DisksUpdateFuture.Result.
5152func (future *DisksUpdateFuture) result(client DisksClient) (d Disk, err error) {
5153	var done bool
5154	done, err = future.DoneWithContext(context.Background(), client)
5155	if err != nil {
5156		err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Polling failure")
5157		return
5158	}
5159	if !done {
5160		d.Response.Response = future.Response()
5161		err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
5162		return
5163	}
5164	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5165	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
5166		d, err = client.UpdateResponder(d.Response.Response)
5167		if err != nil {
5168			err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
5169		}
5170	}
5171	return
5172}
5173
5174// DiskUpdate disk update resource.
5175type DiskUpdate struct {
5176	*DiskUpdateProperties `json:"properties,omitempty"`
5177	// Tags - Resource tags
5178	Tags map[string]*string `json:"tags"`
5179	Sku  *DiskSku           `json:"sku,omitempty"`
5180}
5181
5182// MarshalJSON is the custom marshaler for DiskUpdate.
5183func (du DiskUpdate) MarshalJSON() ([]byte, error) {
5184	objectMap := make(map[string]interface{})
5185	if du.DiskUpdateProperties != nil {
5186		objectMap["properties"] = du.DiskUpdateProperties
5187	}
5188	if du.Tags != nil {
5189		objectMap["tags"] = du.Tags
5190	}
5191	if du.Sku != nil {
5192		objectMap["sku"] = du.Sku
5193	}
5194	return json.Marshal(objectMap)
5195}
5196
5197// UnmarshalJSON is the custom unmarshaler for DiskUpdate struct.
5198func (du *DiskUpdate) UnmarshalJSON(body []byte) error {
5199	var m map[string]*json.RawMessage
5200	err := json.Unmarshal(body, &m)
5201	if err != nil {
5202		return err
5203	}
5204	for k, v := range m {
5205		switch k {
5206		case "properties":
5207			if v != nil {
5208				var diskUpdateProperties DiskUpdateProperties
5209				err = json.Unmarshal(*v, &diskUpdateProperties)
5210				if err != nil {
5211					return err
5212				}
5213				du.DiskUpdateProperties = &diskUpdateProperties
5214			}
5215		case "tags":
5216			if v != nil {
5217				var tags map[string]*string
5218				err = json.Unmarshal(*v, &tags)
5219				if err != nil {
5220					return err
5221				}
5222				du.Tags = tags
5223			}
5224		case "sku":
5225			if v != nil {
5226				var sku DiskSku
5227				err = json.Unmarshal(*v, &sku)
5228				if err != nil {
5229					return err
5230				}
5231				du.Sku = &sku
5232			}
5233		}
5234	}
5235
5236	return nil
5237}
5238
5239// DiskUpdateProperties disk resource update properties.
5240type DiskUpdateProperties struct {
5241	// OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
5242	OsType OperatingSystemTypes `json:"osType,omitempty"`
5243	// 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.
5244	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
5245	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
5246	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
5247	// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
5248	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
5249	// 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.
5250	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
5251	// 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.
5252	DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
5253	// 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.
5254	DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
5255	// 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.
5256	MaxShares *int32 `json:"maxShares,omitempty"`
5257	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
5258	Encryption *Encryption `json:"encryption,omitempty"`
5259	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
5260	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
5261	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
5262	DiskAccessID *string `json:"diskAccessId,omitempty"`
5263	// Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.
5264	Tier *string `json:"tier,omitempty"`
5265	// BurstingEnabled - Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
5266	BurstingEnabled *bool `json:"burstingEnabled,omitempty"`
5267	// PurchasePlan - Purchase plan information to be added on the OS disk
5268	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
5269}
5270
5271// Encryption encryption at rest settings for disk or snapshot
5272type Encryption struct {
5273	// DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest.
5274	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
5275	// Type - Possible values include: 'EncryptionTypeEncryptionAtRestWithPlatformKey', 'EncryptionTypeEncryptionAtRestWithCustomerKey', 'EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys'
5276	Type EncryptionType `json:"type,omitempty"`
5277}
5278
5279// EncryptionImages optional. Allows users to provide customer managed keys for encrypting the OS and data
5280// disks in the gallery artifact.
5281type EncryptionImages struct {
5282	OsDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"`
5283	// DataDiskImages - A list of encryption specifications for data disk images.
5284	DataDiskImages *[]DataDiskImageEncryption `json:"dataDiskImages,omitempty"`
5285}
5286
5287// EncryptionSetIdentity the managed identity for the disk encryption set. It should be given permission on
5288// the key vault before it can be used to encrypt disks.
5289type EncryptionSetIdentity struct {
5290	// Type - The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys. Possible values include: 'DiskEncryptionSetIdentityTypeSystemAssigned', 'DiskEncryptionSetIdentityTypeNone'
5291	Type DiskEncryptionSetIdentityType `json:"type,omitempty"`
5292	// 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
5293	PrincipalID *string `json:"principalId,omitempty"`
5294	// 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
5295	TenantID *string `json:"tenantId,omitempty"`
5296}
5297
5298// MarshalJSON is the custom marshaler for EncryptionSetIdentity.
5299func (esi EncryptionSetIdentity) MarshalJSON() ([]byte, error) {
5300	objectMap := make(map[string]interface{})
5301	if esi.Type != "" {
5302		objectMap["type"] = esi.Type
5303	}
5304	return json.Marshal(objectMap)
5305}
5306
5307// EncryptionSetProperties ...
5308type EncryptionSetProperties struct {
5309	// EncryptionType - Possible values include: 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys'
5310	EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"`
5311	// ActiveKey - The key vault key which is currently used by this disk encryption set.
5312	ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`
5313	// 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.
5314	PreviousKeys *[]KeyForDiskEncryptionSet `json:"previousKeys,omitempty"`
5315	// ProvisioningState - READ-ONLY; The disk encryption set provisioning state.
5316	ProvisioningState *string `json:"provisioningState,omitempty"`
5317}
5318
5319// MarshalJSON is the custom marshaler for EncryptionSetProperties.
5320func (esp EncryptionSetProperties) MarshalJSON() ([]byte, error) {
5321	objectMap := make(map[string]interface{})
5322	if esp.EncryptionType != "" {
5323		objectMap["encryptionType"] = esp.EncryptionType
5324	}
5325	if esp.ActiveKey != nil {
5326		objectMap["activeKey"] = esp.ActiveKey
5327	}
5328	return json.Marshal(objectMap)
5329}
5330
5331// EncryptionSettingsCollection encryption settings for disk or snapshot
5332type EncryptionSettingsCollection struct {
5333	// 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.
5334	Enabled *bool `json:"enabled,omitempty"`
5335	// EncryptionSettings - A collection of encryption settings, one for each disk volume.
5336	EncryptionSettings *[]EncryptionSettingsElement `json:"encryptionSettings,omitempty"`
5337	// 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.
5338	EncryptionSettingsVersion *string `json:"encryptionSettingsVersion,omitempty"`
5339}
5340
5341// EncryptionSettingsElement encryption settings for one disk volume.
5342type EncryptionSettingsElement struct {
5343	// DiskEncryptionKey - Key Vault Secret Url and vault id of the disk encryption key
5344	DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"`
5345	// 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.
5346	KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"`
5347}
5348
5349// ExtendedLocation the complex type of the extended location.
5350type ExtendedLocation struct {
5351	// Name - The name of the extended location.
5352	Name *string `json:"name,omitempty"`
5353	// Type - The type of the extended location. Possible values include: 'EdgeZone'
5354	Type ExtendedLocationTypes `json:"type,omitempty"`
5355}
5356
5357// Extension describes a cloud service Extension.
5358type Extension struct {
5359	// Name - The name of the extension.
5360	Name       *string                          `json:"name,omitempty"`
5361	Properties *CloudServiceExtensionProperties `json:"properties,omitempty"`
5362}
5363
5364// GalleriesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
5365// operation.
5366type GalleriesCreateOrUpdateFuture struct {
5367	azure.FutureAPI
5368	// Result returns the result of the asynchronous operation.
5369	// If the operation has not completed it will return an error.
5370	Result func(GalleriesClient) (Gallery, error)
5371}
5372
5373// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5374func (future *GalleriesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5375	var azFuture azure.Future
5376	if err := json.Unmarshal(body, &azFuture); err != nil {
5377		return err
5378	}
5379	future.FutureAPI = &azFuture
5380	future.Result = future.result
5381	return nil
5382}
5383
5384// result is the default implementation for GalleriesCreateOrUpdateFuture.Result.
5385func (future *GalleriesCreateOrUpdateFuture) result(client GalleriesClient) (g Gallery, err error) {
5386	var done bool
5387	done, err = future.DoneWithContext(context.Background(), client)
5388	if err != nil {
5389		err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5390		return
5391	}
5392	if !done {
5393		g.Response.Response = future.Response()
5394		err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture")
5395		return
5396	}
5397	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5398	if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
5399		g, err = client.CreateOrUpdateResponder(g.Response.Response)
5400		if err != nil {
5401			err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
5402		}
5403	}
5404	return
5405}
5406
5407// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5408// operation.
5409type GalleriesDeleteFuture struct {
5410	azure.FutureAPI
5411	// Result returns the result of the asynchronous operation.
5412	// If the operation has not completed it will return an error.
5413	Result func(GalleriesClient) (autorest.Response, error)
5414}
5415
5416// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5417func (future *GalleriesDeleteFuture) UnmarshalJSON(body []byte) error {
5418	var azFuture azure.Future
5419	if err := json.Unmarshal(body, &azFuture); err != nil {
5420		return err
5421	}
5422	future.FutureAPI = &azFuture
5423	future.Result = future.result
5424	return nil
5425}
5426
5427// result is the default implementation for GalleriesDeleteFuture.Result.
5428func (future *GalleriesDeleteFuture) result(client GalleriesClient) (ar autorest.Response, err error) {
5429	var done bool
5430	done, err = future.DoneWithContext(context.Background(), client)
5431	if err != nil {
5432		err = autorest.NewErrorWithError(err, "compute.GalleriesDeleteFuture", "Result", future.Response(), "Polling failure")
5433		return
5434	}
5435	if !done {
5436		ar.Response = future.Response()
5437		err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture")
5438		return
5439	}
5440	ar.Response = future.Response()
5441	return
5442}
5443
5444// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
5445// operation.
5446type GalleriesUpdateFuture struct {
5447	azure.FutureAPI
5448	// Result returns the result of the asynchronous operation.
5449	// If the operation has not completed it will return an error.
5450	Result func(GalleriesClient) (Gallery, error)
5451}
5452
5453// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5454func (future *GalleriesUpdateFuture) UnmarshalJSON(body []byte) error {
5455	var azFuture azure.Future
5456	if err := json.Unmarshal(body, &azFuture); err != nil {
5457		return err
5458	}
5459	future.FutureAPI = &azFuture
5460	future.Result = future.result
5461	return nil
5462}
5463
5464// result is the default implementation for GalleriesUpdateFuture.Result.
5465func (future *GalleriesUpdateFuture) result(client GalleriesClient) (g Gallery, err error) {
5466	var done bool
5467	done, err = future.DoneWithContext(context.Background(), client)
5468	if err != nil {
5469		err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", future.Response(), "Polling failure")
5470		return
5471	}
5472	if !done {
5473		g.Response.Response = future.Response()
5474		err = azure.NewAsyncOpIncompleteError("compute.GalleriesUpdateFuture")
5475		return
5476	}
5477	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5478	if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
5479		g, err = client.UpdateResponder(g.Response.Response)
5480		if err != nil {
5481			err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
5482		}
5483	}
5484	return
5485}
5486
5487// Gallery specifies information about the Shared Image Gallery that you want to create or update.
5488type Gallery struct {
5489	autorest.Response  `json:"-"`
5490	*GalleryProperties `json:"properties,omitempty"`
5491	// ID - READ-ONLY; Resource Id
5492	ID *string `json:"id,omitempty"`
5493	// Name - READ-ONLY; Resource name
5494	Name *string `json:"name,omitempty"`
5495	// Type - READ-ONLY; Resource type
5496	Type *string `json:"type,omitempty"`
5497	// Location - Resource location
5498	Location *string `json:"location,omitempty"`
5499	// Tags - Resource tags
5500	Tags map[string]*string `json:"tags"`
5501}
5502
5503// MarshalJSON is the custom marshaler for Gallery.
5504func (g Gallery) MarshalJSON() ([]byte, error) {
5505	objectMap := make(map[string]interface{})
5506	if g.GalleryProperties != nil {
5507		objectMap["properties"] = g.GalleryProperties
5508	}
5509	if g.Location != nil {
5510		objectMap["location"] = g.Location
5511	}
5512	if g.Tags != nil {
5513		objectMap["tags"] = g.Tags
5514	}
5515	return json.Marshal(objectMap)
5516}
5517
5518// UnmarshalJSON is the custom unmarshaler for Gallery struct.
5519func (g *Gallery) UnmarshalJSON(body []byte) error {
5520	var m map[string]*json.RawMessage
5521	err := json.Unmarshal(body, &m)
5522	if err != nil {
5523		return err
5524	}
5525	for k, v := range m {
5526		switch k {
5527		case "properties":
5528			if v != nil {
5529				var galleryProperties GalleryProperties
5530				err = json.Unmarshal(*v, &galleryProperties)
5531				if err != nil {
5532					return err
5533				}
5534				g.GalleryProperties = &galleryProperties
5535			}
5536		case "id":
5537			if v != nil {
5538				var ID string
5539				err = json.Unmarshal(*v, &ID)
5540				if err != nil {
5541					return err
5542				}
5543				g.ID = &ID
5544			}
5545		case "name":
5546			if v != nil {
5547				var name string
5548				err = json.Unmarshal(*v, &name)
5549				if err != nil {
5550					return err
5551				}
5552				g.Name = &name
5553			}
5554		case "type":
5555			if v != nil {
5556				var typeVar string
5557				err = json.Unmarshal(*v, &typeVar)
5558				if err != nil {
5559					return err
5560				}
5561				g.Type = &typeVar
5562			}
5563		case "location":
5564			if v != nil {
5565				var location string
5566				err = json.Unmarshal(*v, &location)
5567				if err != nil {
5568					return err
5569				}
5570				g.Location = &location
5571			}
5572		case "tags":
5573			if v != nil {
5574				var tags map[string]*string
5575				err = json.Unmarshal(*v, &tags)
5576				if err != nil {
5577					return err
5578				}
5579				g.Tags = tags
5580			}
5581		}
5582	}
5583
5584	return nil
5585}
5586
5587// GalleryApplication specifies information about the gallery Application Definition that you want to
5588// create or update.
5589type GalleryApplication struct {
5590	autorest.Response             `json:"-"`
5591	*GalleryApplicationProperties `json:"properties,omitempty"`
5592	// ID - READ-ONLY; Resource Id
5593	ID *string `json:"id,omitempty"`
5594	// Name - READ-ONLY; Resource name
5595	Name *string `json:"name,omitempty"`
5596	// Type - READ-ONLY; Resource type
5597	Type *string `json:"type,omitempty"`
5598	// Location - Resource location
5599	Location *string `json:"location,omitempty"`
5600	// Tags - Resource tags
5601	Tags map[string]*string `json:"tags"`
5602}
5603
5604// MarshalJSON is the custom marshaler for GalleryApplication.
5605func (ga GalleryApplication) MarshalJSON() ([]byte, error) {
5606	objectMap := make(map[string]interface{})
5607	if ga.GalleryApplicationProperties != nil {
5608		objectMap["properties"] = ga.GalleryApplicationProperties
5609	}
5610	if ga.Location != nil {
5611		objectMap["location"] = ga.Location
5612	}
5613	if ga.Tags != nil {
5614		objectMap["tags"] = ga.Tags
5615	}
5616	return json.Marshal(objectMap)
5617}
5618
5619// UnmarshalJSON is the custom unmarshaler for GalleryApplication struct.
5620func (ga *GalleryApplication) UnmarshalJSON(body []byte) error {
5621	var m map[string]*json.RawMessage
5622	err := json.Unmarshal(body, &m)
5623	if err != nil {
5624		return err
5625	}
5626	for k, v := range m {
5627		switch k {
5628		case "properties":
5629			if v != nil {
5630				var galleryApplicationProperties GalleryApplicationProperties
5631				err = json.Unmarshal(*v, &galleryApplicationProperties)
5632				if err != nil {
5633					return err
5634				}
5635				ga.GalleryApplicationProperties = &galleryApplicationProperties
5636			}
5637		case "id":
5638			if v != nil {
5639				var ID string
5640				err = json.Unmarshal(*v, &ID)
5641				if err != nil {
5642					return err
5643				}
5644				ga.ID = &ID
5645			}
5646		case "name":
5647			if v != nil {
5648				var name string
5649				err = json.Unmarshal(*v, &name)
5650				if err != nil {
5651					return err
5652				}
5653				ga.Name = &name
5654			}
5655		case "type":
5656			if v != nil {
5657				var typeVar string
5658				err = json.Unmarshal(*v, &typeVar)
5659				if err != nil {
5660					return err
5661				}
5662				ga.Type = &typeVar
5663			}
5664		case "location":
5665			if v != nil {
5666				var location string
5667				err = json.Unmarshal(*v, &location)
5668				if err != nil {
5669					return err
5670				}
5671				ga.Location = &location
5672			}
5673		case "tags":
5674			if v != nil {
5675				var tags map[string]*string
5676				err = json.Unmarshal(*v, &tags)
5677				if err != nil {
5678					return err
5679				}
5680				ga.Tags = tags
5681			}
5682		}
5683	}
5684
5685	return nil
5686}
5687
5688// GalleryApplicationList the List Gallery Applications operation response.
5689type GalleryApplicationList struct {
5690	autorest.Response `json:"-"`
5691	// Value - A list of Gallery Applications.
5692	Value *[]GalleryApplication `json:"value,omitempty"`
5693	// 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.
5694	NextLink *string `json:"nextLink,omitempty"`
5695}
5696
5697// GalleryApplicationListIterator provides access to a complete listing of GalleryApplication values.
5698type GalleryApplicationListIterator struct {
5699	i    int
5700	page GalleryApplicationListPage
5701}
5702
5703// NextWithContext advances to the next value.  If there was an error making
5704// the request the iterator does not advance and the error is returned.
5705func (iter *GalleryApplicationListIterator) NextWithContext(ctx context.Context) (err error) {
5706	if tracing.IsEnabled() {
5707		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListIterator.NextWithContext")
5708		defer func() {
5709			sc := -1
5710			if iter.Response().Response.Response != nil {
5711				sc = iter.Response().Response.Response.StatusCode
5712			}
5713			tracing.EndSpan(ctx, sc, err)
5714		}()
5715	}
5716	iter.i++
5717	if iter.i < len(iter.page.Values()) {
5718		return nil
5719	}
5720	err = iter.page.NextWithContext(ctx)
5721	if err != nil {
5722		iter.i--
5723		return err
5724	}
5725	iter.i = 0
5726	return nil
5727}
5728
5729// Next advances to the next value.  If there was an error making
5730// the request the iterator does not advance and the error is returned.
5731// Deprecated: Use NextWithContext() instead.
5732func (iter *GalleryApplicationListIterator) Next() error {
5733	return iter.NextWithContext(context.Background())
5734}
5735
5736// NotDone returns true if the enumeration should be started or is not yet complete.
5737func (iter GalleryApplicationListIterator) NotDone() bool {
5738	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5739}
5740
5741// Response returns the raw server response from the last page request.
5742func (iter GalleryApplicationListIterator) Response() GalleryApplicationList {
5743	return iter.page.Response()
5744}
5745
5746// Value returns the current value or a zero-initialized value if the
5747// iterator has advanced beyond the end of the collection.
5748func (iter GalleryApplicationListIterator) Value() GalleryApplication {
5749	if !iter.page.NotDone() {
5750		return GalleryApplication{}
5751	}
5752	return iter.page.Values()[iter.i]
5753}
5754
5755// Creates a new instance of the GalleryApplicationListIterator type.
5756func NewGalleryApplicationListIterator(page GalleryApplicationListPage) GalleryApplicationListIterator {
5757	return GalleryApplicationListIterator{page: page}
5758}
5759
5760// IsEmpty returns true if the ListResult contains no values.
5761func (gal GalleryApplicationList) IsEmpty() bool {
5762	return gal.Value == nil || len(*gal.Value) == 0
5763}
5764
5765// hasNextLink returns true if the NextLink is not empty.
5766func (gal GalleryApplicationList) hasNextLink() bool {
5767	return gal.NextLink != nil && len(*gal.NextLink) != 0
5768}
5769
5770// galleryApplicationListPreparer prepares a request to retrieve the next set of results.
5771// It returns nil if no more results exist.
5772func (gal GalleryApplicationList) galleryApplicationListPreparer(ctx context.Context) (*http.Request, error) {
5773	if !gal.hasNextLink() {
5774		return nil, nil
5775	}
5776	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5777		autorest.AsJSON(),
5778		autorest.AsGet(),
5779		autorest.WithBaseURL(to.String(gal.NextLink)))
5780}
5781
5782// GalleryApplicationListPage contains a page of GalleryApplication values.
5783type GalleryApplicationListPage struct {
5784	fn  func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)
5785	gal GalleryApplicationList
5786}
5787
5788// NextWithContext advances to the next page of values.  If there was an error making
5789// the request the page does not advance and the error is returned.
5790func (page *GalleryApplicationListPage) NextWithContext(ctx context.Context) (err error) {
5791	if tracing.IsEnabled() {
5792		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListPage.NextWithContext")
5793		defer func() {
5794			sc := -1
5795			if page.Response().Response.Response != nil {
5796				sc = page.Response().Response.Response.StatusCode
5797			}
5798			tracing.EndSpan(ctx, sc, err)
5799		}()
5800	}
5801	for {
5802		next, err := page.fn(ctx, page.gal)
5803		if err != nil {
5804			return err
5805		}
5806		page.gal = next
5807		if !next.hasNextLink() || !next.IsEmpty() {
5808			break
5809		}
5810	}
5811	return nil
5812}
5813
5814// Next advances to the next page of values.  If there was an error making
5815// the request the page does not advance and the error is returned.
5816// Deprecated: Use NextWithContext() instead.
5817func (page *GalleryApplicationListPage) Next() error {
5818	return page.NextWithContext(context.Background())
5819}
5820
5821// NotDone returns true if the page enumeration should be started or is not yet complete.
5822func (page GalleryApplicationListPage) NotDone() bool {
5823	return !page.gal.IsEmpty()
5824}
5825
5826// Response returns the raw server response from the last page request.
5827func (page GalleryApplicationListPage) Response() GalleryApplicationList {
5828	return page.gal
5829}
5830
5831// Values returns the slice of values for the current page or nil if there are no values.
5832func (page GalleryApplicationListPage) Values() []GalleryApplication {
5833	if page.gal.IsEmpty() {
5834		return nil
5835	}
5836	return *page.gal.Value
5837}
5838
5839// Creates a new instance of the GalleryApplicationListPage type.
5840func NewGalleryApplicationListPage(cur GalleryApplicationList, getNextPage func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)) GalleryApplicationListPage {
5841	return GalleryApplicationListPage{
5842		fn:  getNextPage,
5843		gal: cur,
5844	}
5845}
5846
5847// GalleryApplicationProperties describes the properties of a gallery Application Definition.
5848type GalleryApplicationProperties struct {
5849	// Description - The description of this gallery Application Definition resource. This property is updatable.
5850	Description *string `json:"description,omitempty"`
5851	// Eula - The Eula agreement for the gallery Application Definition.
5852	Eula *string `json:"eula,omitempty"`
5853	// PrivacyStatementURI - The privacy statement uri.
5854	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
5855	// ReleaseNoteURI - The release note uri.
5856	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
5857	// EndOfLifeDate - The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable.
5858	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
5859	// 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'
5860	SupportedOSType OperatingSystemTypes `json:"supportedOSType,omitempty"`
5861}
5862
5863// GalleryApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5864// long-running operation.
5865type GalleryApplicationsCreateOrUpdateFuture struct {
5866	azure.FutureAPI
5867	// Result returns the result of the asynchronous operation.
5868	// If the operation has not completed it will return an error.
5869	Result func(GalleryApplicationsClient) (GalleryApplication, error)
5870}
5871
5872// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5873func (future *GalleryApplicationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5874	var azFuture azure.Future
5875	if err := json.Unmarshal(body, &azFuture); err != nil {
5876		return err
5877	}
5878	future.FutureAPI = &azFuture
5879	future.Result = future.result
5880	return nil
5881}
5882
5883// result is the default implementation for GalleryApplicationsCreateOrUpdateFuture.Result.
5884func (future *GalleryApplicationsCreateOrUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
5885	var done bool
5886	done, err = future.DoneWithContext(context.Background(), client)
5887	if err != nil {
5888		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5889		return
5890	}
5891	if !done {
5892		ga.Response.Response = future.Response()
5893		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsCreateOrUpdateFuture")
5894		return
5895	}
5896	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5897	if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
5898		ga, err = client.CreateOrUpdateResponder(ga.Response.Response)
5899		if err != nil {
5900			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
5901		}
5902	}
5903	return
5904}
5905
5906// GalleryApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a
5907// long-running operation.
5908type GalleryApplicationsDeleteFuture struct {
5909	azure.FutureAPI
5910	// Result returns the result of the asynchronous operation.
5911	// If the operation has not completed it will return an error.
5912	Result func(GalleryApplicationsClient) (autorest.Response, error)
5913}
5914
5915// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5916func (future *GalleryApplicationsDeleteFuture) UnmarshalJSON(body []byte) error {
5917	var azFuture azure.Future
5918	if err := json.Unmarshal(body, &azFuture); err != nil {
5919		return err
5920	}
5921	future.FutureAPI = &azFuture
5922	future.Result = future.result
5923	return nil
5924}
5925
5926// result is the default implementation for GalleryApplicationsDeleteFuture.Result.
5927func (future *GalleryApplicationsDeleteFuture) result(client GalleryApplicationsClient) (ar autorest.Response, err error) {
5928	var done bool
5929	done, err = future.DoneWithContext(context.Background(), client)
5930	if err != nil {
5931		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsDeleteFuture", "Result", future.Response(), "Polling failure")
5932		return
5933	}
5934	if !done {
5935		ar.Response = future.Response()
5936		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsDeleteFuture")
5937		return
5938	}
5939	ar.Response = future.Response()
5940	return
5941}
5942
5943// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a
5944// long-running operation.
5945type GalleryApplicationsUpdateFuture struct {
5946	azure.FutureAPI
5947	// Result returns the result of the asynchronous operation.
5948	// If the operation has not completed it will return an error.
5949	Result func(GalleryApplicationsClient) (GalleryApplication, error)
5950}
5951
5952// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5953func (future *GalleryApplicationsUpdateFuture) UnmarshalJSON(body []byte) error {
5954	var azFuture azure.Future
5955	if err := json.Unmarshal(body, &azFuture); err != nil {
5956		return err
5957	}
5958	future.FutureAPI = &azFuture
5959	future.Result = future.result
5960	return nil
5961}
5962
5963// result is the default implementation for GalleryApplicationsUpdateFuture.Result.
5964func (future *GalleryApplicationsUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
5965	var done bool
5966	done, err = future.DoneWithContext(context.Background(), client)
5967	if err != nil {
5968		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", future.Response(), "Polling failure")
5969		return
5970	}
5971	if !done {
5972		ga.Response.Response = future.Response()
5973		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsUpdateFuture")
5974		return
5975	}
5976	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5977	if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
5978		ga, err = client.UpdateResponder(ga.Response.Response)
5979		if err != nil {
5980			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
5981		}
5982	}
5983	return
5984}
5985
5986// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to
5987// update.
5988type GalleryApplicationUpdate struct {
5989	*GalleryApplicationProperties `json:"properties,omitempty"`
5990	// ID - READ-ONLY; Resource Id
5991	ID *string `json:"id,omitempty"`
5992	// Name - READ-ONLY; Resource name
5993	Name *string `json:"name,omitempty"`
5994	// Type - READ-ONLY; Resource type
5995	Type *string `json:"type,omitempty"`
5996	// Tags - Resource tags
5997	Tags map[string]*string `json:"tags"`
5998}
5999
6000// MarshalJSON is the custom marshaler for GalleryApplicationUpdate.
6001func (gau GalleryApplicationUpdate) MarshalJSON() ([]byte, error) {
6002	objectMap := make(map[string]interface{})
6003	if gau.GalleryApplicationProperties != nil {
6004		objectMap["properties"] = gau.GalleryApplicationProperties
6005	}
6006	if gau.Tags != nil {
6007		objectMap["tags"] = gau.Tags
6008	}
6009	return json.Marshal(objectMap)
6010}
6011
6012// UnmarshalJSON is the custom unmarshaler for GalleryApplicationUpdate struct.
6013func (gau *GalleryApplicationUpdate) UnmarshalJSON(body []byte) error {
6014	var m map[string]*json.RawMessage
6015	err := json.Unmarshal(body, &m)
6016	if err != nil {
6017		return err
6018	}
6019	for k, v := range m {
6020		switch k {
6021		case "properties":
6022			if v != nil {
6023				var galleryApplicationProperties GalleryApplicationProperties
6024				err = json.Unmarshal(*v, &galleryApplicationProperties)
6025				if err != nil {
6026					return err
6027				}
6028				gau.GalleryApplicationProperties = &galleryApplicationProperties
6029			}
6030		case "id":
6031			if v != nil {
6032				var ID string
6033				err = json.Unmarshal(*v, &ID)
6034				if err != nil {
6035					return err
6036				}
6037				gau.ID = &ID
6038			}
6039		case "name":
6040			if v != nil {
6041				var name string
6042				err = json.Unmarshal(*v, &name)
6043				if err != nil {
6044					return err
6045				}
6046				gau.Name = &name
6047			}
6048		case "type":
6049			if v != nil {
6050				var typeVar string
6051				err = json.Unmarshal(*v, &typeVar)
6052				if err != nil {
6053					return err
6054				}
6055				gau.Type = &typeVar
6056			}
6057		case "tags":
6058			if v != nil {
6059				var tags map[string]*string
6060				err = json.Unmarshal(*v, &tags)
6061				if err != nil {
6062					return err
6063				}
6064				gau.Tags = tags
6065			}
6066		}
6067	}
6068
6069	return nil
6070}
6071
6072// GalleryApplicationVersion specifies information about the gallery Application Version that you want to
6073// create or update.
6074type GalleryApplicationVersion struct {
6075	autorest.Response                    `json:"-"`
6076	*GalleryApplicationVersionProperties `json:"properties,omitempty"`
6077	// ID - READ-ONLY; Resource Id
6078	ID *string `json:"id,omitempty"`
6079	// Name - READ-ONLY; Resource name
6080	Name *string `json:"name,omitempty"`
6081	// Type - READ-ONLY; Resource type
6082	Type *string `json:"type,omitempty"`
6083	// Location - Resource location
6084	Location *string `json:"location,omitempty"`
6085	// Tags - Resource tags
6086	Tags map[string]*string `json:"tags"`
6087}
6088
6089// MarshalJSON is the custom marshaler for GalleryApplicationVersion.
6090func (gav GalleryApplicationVersion) MarshalJSON() ([]byte, error) {
6091	objectMap := make(map[string]interface{})
6092	if gav.GalleryApplicationVersionProperties != nil {
6093		objectMap["properties"] = gav.GalleryApplicationVersionProperties
6094	}
6095	if gav.Location != nil {
6096		objectMap["location"] = gav.Location
6097	}
6098	if gav.Tags != nil {
6099		objectMap["tags"] = gav.Tags
6100	}
6101	return json.Marshal(objectMap)
6102}
6103
6104// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersion struct.
6105func (gav *GalleryApplicationVersion) UnmarshalJSON(body []byte) error {
6106	var m map[string]*json.RawMessage
6107	err := json.Unmarshal(body, &m)
6108	if err != nil {
6109		return err
6110	}
6111	for k, v := range m {
6112		switch k {
6113		case "properties":
6114			if v != nil {
6115				var galleryApplicationVersionProperties GalleryApplicationVersionProperties
6116				err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
6117				if err != nil {
6118					return err
6119				}
6120				gav.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
6121			}
6122		case "id":
6123			if v != nil {
6124				var ID string
6125				err = json.Unmarshal(*v, &ID)
6126				if err != nil {
6127					return err
6128				}
6129				gav.ID = &ID
6130			}
6131		case "name":
6132			if v != nil {
6133				var name string
6134				err = json.Unmarshal(*v, &name)
6135				if err != nil {
6136					return err
6137				}
6138				gav.Name = &name
6139			}
6140		case "type":
6141			if v != nil {
6142				var typeVar string
6143				err = json.Unmarshal(*v, &typeVar)
6144				if err != nil {
6145					return err
6146				}
6147				gav.Type = &typeVar
6148			}
6149		case "location":
6150			if v != nil {
6151				var location string
6152				err = json.Unmarshal(*v, &location)
6153				if err != nil {
6154					return err
6155				}
6156				gav.Location = &location
6157			}
6158		case "tags":
6159			if v != nil {
6160				var tags map[string]*string
6161				err = json.Unmarshal(*v, &tags)
6162				if err != nil {
6163					return err
6164				}
6165				gav.Tags = tags
6166			}
6167		}
6168	}
6169
6170	return nil
6171}
6172
6173// GalleryApplicationVersionList the List Gallery Application version operation response.
6174type GalleryApplicationVersionList struct {
6175	autorest.Response `json:"-"`
6176	// Value - A list of gallery Application Versions.
6177	Value *[]GalleryApplicationVersion `json:"value,omitempty"`
6178	// 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.
6179	NextLink *string `json:"nextLink,omitempty"`
6180}
6181
6182// GalleryApplicationVersionListIterator provides access to a complete listing of GalleryApplicationVersion
6183// values.
6184type GalleryApplicationVersionListIterator struct {
6185	i    int
6186	page GalleryApplicationVersionListPage
6187}
6188
6189// NextWithContext advances to the next value.  If there was an error making
6190// the request the iterator does not advance and the error is returned.
6191func (iter *GalleryApplicationVersionListIterator) NextWithContext(ctx context.Context) (err error) {
6192	if tracing.IsEnabled() {
6193		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListIterator.NextWithContext")
6194		defer func() {
6195			sc := -1
6196			if iter.Response().Response.Response != nil {
6197				sc = iter.Response().Response.Response.StatusCode
6198			}
6199			tracing.EndSpan(ctx, sc, err)
6200		}()
6201	}
6202	iter.i++
6203	if iter.i < len(iter.page.Values()) {
6204		return nil
6205	}
6206	err = iter.page.NextWithContext(ctx)
6207	if err != nil {
6208		iter.i--
6209		return err
6210	}
6211	iter.i = 0
6212	return nil
6213}
6214
6215// Next advances to the next value.  If there was an error making
6216// the request the iterator does not advance and the error is returned.
6217// Deprecated: Use NextWithContext() instead.
6218func (iter *GalleryApplicationVersionListIterator) Next() error {
6219	return iter.NextWithContext(context.Background())
6220}
6221
6222// NotDone returns true if the enumeration should be started or is not yet complete.
6223func (iter GalleryApplicationVersionListIterator) NotDone() bool {
6224	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6225}
6226
6227// Response returns the raw server response from the last page request.
6228func (iter GalleryApplicationVersionListIterator) Response() GalleryApplicationVersionList {
6229	return iter.page.Response()
6230}
6231
6232// Value returns the current value or a zero-initialized value if the
6233// iterator has advanced beyond the end of the collection.
6234func (iter GalleryApplicationVersionListIterator) Value() GalleryApplicationVersion {
6235	if !iter.page.NotDone() {
6236		return GalleryApplicationVersion{}
6237	}
6238	return iter.page.Values()[iter.i]
6239}
6240
6241// Creates a new instance of the GalleryApplicationVersionListIterator type.
6242func NewGalleryApplicationVersionListIterator(page GalleryApplicationVersionListPage) GalleryApplicationVersionListIterator {
6243	return GalleryApplicationVersionListIterator{page: page}
6244}
6245
6246// IsEmpty returns true if the ListResult contains no values.
6247func (gavl GalleryApplicationVersionList) IsEmpty() bool {
6248	return gavl.Value == nil || len(*gavl.Value) == 0
6249}
6250
6251// hasNextLink returns true if the NextLink is not empty.
6252func (gavl GalleryApplicationVersionList) hasNextLink() bool {
6253	return gavl.NextLink != nil && len(*gavl.NextLink) != 0
6254}
6255
6256// galleryApplicationVersionListPreparer prepares a request to retrieve the next set of results.
6257// It returns nil if no more results exist.
6258func (gavl GalleryApplicationVersionList) galleryApplicationVersionListPreparer(ctx context.Context) (*http.Request, error) {
6259	if !gavl.hasNextLink() {
6260		return nil, nil
6261	}
6262	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6263		autorest.AsJSON(),
6264		autorest.AsGet(),
6265		autorest.WithBaseURL(to.String(gavl.NextLink)))
6266}
6267
6268// GalleryApplicationVersionListPage contains a page of GalleryApplicationVersion values.
6269type GalleryApplicationVersionListPage struct {
6270	fn   func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)
6271	gavl GalleryApplicationVersionList
6272}
6273
6274// NextWithContext advances to the next page of values.  If there was an error making
6275// the request the page does not advance and the error is returned.
6276func (page *GalleryApplicationVersionListPage) NextWithContext(ctx context.Context) (err error) {
6277	if tracing.IsEnabled() {
6278		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListPage.NextWithContext")
6279		defer func() {
6280			sc := -1
6281			if page.Response().Response.Response != nil {
6282				sc = page.Response().Response.Response.StatusCode
6283			}
6284			tracing.EndSpan(ctx, sc, err)
6285		}()
6286	}
6287	for {
6288		next, err := page.fn(ctx, page.gavl)
6289		if err != nil {
6290			return err
6291		}
6292		page.gavl = next
6293		if !next.hasNextLink() || !next.IsEmpty() {
6294			break
6295		}
6296	}
6297	return nil
6298}
6299
6300// Next advances to the next page of values.  If there was an error making
6301// the request the page does not advance and the error is returned.
6302// Deprecated: Use NextWithContext() instead.
6303func (page *GalleryApplicationVersionListPage) Next() error {
6304	return page.NextWithContext(context.Background())
6305}
6306
6307// NotDone returns true if the page enumeration should be started or is not yet complete.
6308func (page GalleryApplicationVersionListPage) NotDone() bool {
6309	return !page.gavl.IsEmpty()
6310}
6311
6312// Response returns the raw server response from the last page request.
6313func (page GalleryApplicationVersionListPage) Response() GalleryApplicationVersionList {
6314	return page.gavl
6315}
6316
6317// Values returns the slice of values for the current page or nil if there are no values.
6318func (page GalleryApplicationVersionListPage) Values() []GalleryApplicationVersion {
6319	if page.gavl.IsEmpty() {
6320		return nil
6321	}
6322	return *page.gavl.Value
6323}
6324
6325// Creates a new instance of the GalleryApplicationVersionListPage type.
6326func NewGalleryApplicationVersionListPage(cur GalleryApplicationVersionList, getNextPage func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)) GalleryApplicationVersionListPage {
6327	return GalleryApplicationVersionListPage{
6328		fn:   getNextPage,
6329		gavl: cur,
6330	}
6331}
6332
6333// GalleryApplicationVersionProperties describes the properties of a gallery Image Version.
6334type GalleryApplicationVersionProperties struct {
6335	PublishingProfile *GalleryApplicationVersionPublishingProfile `json:"publishingProfile,omitempty"`
6336	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1Updating', 'ProvisioningState1Failed', 'ProvisioningState1Succeeded', 'ProvisioningState1Deleting', 'ProvisioningState1Migrating'
6337	ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"`
6338	// ReplicationStatus - READ-ONLY
6339	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
6340}
6341
6342// MarshalJSON is the custom marshaler for GalleryApplicationVersionProperties.
6343func (gavp GalleryApplicationVersionProperties) MarshalJSON() ([]byte, error) {
6344	objectMap := make(map[string]interface{})
6345	if gavp.PublishingProfile != nil {
6346		objectMap["publishingProfile"] = gavp.PublishingProfile
6347	}
6348	return json.Marshal(objectMap)
6349}
6350
6351// GalleryApplicationVersionPublishingProfile the publishing profile of a gallery image version.
6352type GalleryApplicationVersionPublishingProfile struct {
6353	Source        *UserArtifactSource `json:"source,omitempty"`
6354	ManageActions *UserArtifactManage `json:"manageActions,omitempty"`
6355	// EnableHealthCheck - Optional. Whether or not this application reports health.
6356	EnableHealthCheck *bool `json:"enableHealthCheck,omitempty"`
6357	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
6358	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
6359	// 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.
6360	ReplicaCount *int32 `json:"replicaCount,omitempty"`
6361	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
6362	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
6363	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
6364	PublishedDate *date.Time `json:"publishedDate,omitempty"`
6365	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
6366	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
6367	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
6368	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
6369}
6370
6371// MarshalJSON is the custom marshaler for GalleryApplicationVersionPublishingProfile.
6372func (gavpp GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, error) {
6373	objectMap := make(map[string]interface{})
6374	if gavpp.Source != nil {
6375		objectMap["source"] = gavpp.Source
6376	}
6377	if gavpp.ManageActions != nil {
6378		objectMap["manageActions"] = gavpp.ManageActions
6379	}
6380	if gavpp.EnableHealthCheck != nil {
6381		objectMap["enableHealthCheck"] = gavpp.EnableHealthCheck
6382	}
6383	if gavpp.TargetRegions != nil {
6384		objectMap["targetRegions"] = gavpp.TargetRegions
6385	}
6386	if gavpp.ReplicaCount != nil {
6387		objectMap["replicaCount"] = gavpp.ReplicaCount
6388	}
6389	if gavpp.ExcludeFromLatest != nil {
6390		objectMap["excludeFromLatest"] = gavpp.ExcludeFromLatest
6391	}
6392	if gavpp.EndOfLifeDate != nil {
6393		objectMap["endOfLifeDate"] = gavpp.EndOfLifeDate
6394	}
6395	if gavpp.StorageAccountType != "" {
6396		objectMap["storageAccountType"] = gavpp.StorageAccountType
6397	}
6398	return json.Marshal(objectMap)
6399}
6400
6401// GalleryApplicationVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
6402// of a long-running operation.
6403type GalleryApplicationVersionsCreateOrUpdateFuture struct {
6404	azure.FutureAPI
6405	// Result returns the result of the asynchronous operation.
6406	// If the operation has not completed it will return an error.
6407	Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
6408}
6409
6410// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6411func (future *GalleryApplicationVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6412	var azFuture azure.Future
6413	if err := json.Unmarshal(body, &azFuture); err != nil {
6414		return err
6415	}
6416	future.FutureAPI = &azFuture
6417	future.Result = future.result
6418	return nil
6419}
6420
6421// result is the default implementation for GalleryApplicationVersionsCreateOrUpdateFuture.Result.
6422func (future *GalleryApplicationVersionsCreateOrUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
6423	var done bool
6424	done, err = future.DoneWithContext(context.Background(), client)
6425	if err != nil {
6426		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6427		return
6428	}
6429	if !done {
6430		gav.Response.Response = future.Response()
6431		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsCreateOrUpdateFuture")
6432		return
6433	}
6434	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6435	if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
6436		gav, err = client.CreateOrUpdateResponder(gav.Response.Response)
6437		if err != nil {
6438			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
6439		}
6440	}
6441	return
6442}
6443
6444// GalleryApplicationVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
6445// long-running operation.
6446type GalleryApplicationVersionsDeleteFuture struct {
6447	azure.FutureAPI
6448	// Result returns the result of the asynchronous operation.
6449	// If the operation has not completed it will return an error.
6450	Result func(GalleryApplicationVersionsClient) (autorest.Response, error)
6451}
6452
6453// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6454func (future *GalleryApplicationVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
6455	var azFuture azure.Future
6456	if err := json.Unmarshal(body, &azFuture); err != nil {
6457		return err
6458	}
6459	future.FutureAPI = &azFuture
6460	future.Result = future.result
6461	return nil
6462}
6463
6464// result is the default implementation for GalleryApplicationVersionsDeleteFuture.Result.
6465func (future *GalleryApplicationVersionsDeleteFuture) result(client GalleryApplicationVersionsClient) (ar autorest.Response, err error) {
6466	var done bool
6467	done, err = future.DoneWithContext(context.Background(), client)
6468	if err != nil {
6469		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
6470		return
6471	}
6472	if !done {
6473		ar.Response = future.Response()
6474		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsDeleteFuture")
6475		return
6476	}
6477	ar.Response = future.Response()
6478	return
6479}
6480
6481// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
6482// long-running operation.
6483type GalleryApplicationVersionsUpdateFuture struct {
6484	azure.FutureAPI
6485	// Result returns the result of the asynchronous operation.
6486	// If the operation has not completed it will return an error.
6487	Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
6488}
6489
6490// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6491func (future *GalleryApplicationVersionsUpdateFuture) UnmarshalJSON(body []byte) error {
6492	var azFuture azure.Future
6493	if err := json.Unmarshal(body, &azFuture); err != nil {
6494		return err
6495	}
6496	future.FutureAPI = &azFuture
6497	future.Result = future.result
6498	return nil
6499}
6500
6501// result is the default implementation for GalleryApplicationVersionsUpdateFuture.Result.
6502func (future *GalleryApplicationVersionsUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
6503	var done bool
6504	done, err = future.DoneWithContext(context.Background(), client)
6505	if err != nil {
6506		err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
6507		return
6508	}
6509	if !done {
6510		gav.Response.Response = future.Response()
6511		err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsUpdateFuture")
6512		return
6513	}
6514	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6515	if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
6516		gav, err = client.UpdateResponder(gav.Response.Response)
6517		if err != nil {
6518			err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
6519		}
6520	}
6521	return
6522}
6523
6524// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you
6525// want to update.
6526type GalleryApplicationVersionUpdate struct {
6527	*GalleryApplicationVersionProperties `json:"properties,omitempty"`
6528	// ID - READ-ONLY; Resource Id
6529	ID *string `json:"id,omitempty"`
6530	// Name - READ-ONLY; Resource name
6531	Name *string `json:"name,omitempty"`
6532	// Type - READ-ONLY; Resource type
6533	Type *string `json:"type,omitempty"`
6534	// Tags - Resource tags
6535	Tags map[string]*string `json:"tags"`
6536}
6537
6538// MarshalJSON is the custom marshaler for GalleryApplicationVersionUpdate.
6539func (gavu GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) {
6540	objectMap := make(map[string]interface{})
6541	if gavu.GalleryApplicationVersionProperties != nil {
6542		objectMap["properties"] = gavu.GalleryApplicationVersionProperties
6543	}
6544	if gavu.Tags != nil {
6545		objectMap["tags"] = gavu.Tags
6546	}
6547	return json.Marshal(objectMap)
6548}
6549
6550// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersionUpdate struct.
6551func (gavu *GalleryApplicationVersionUpdate) UnmarshalJSON(body []byte) error {
6552	var m map[string]*json.RawMessage
6553	err := json.Unmarshal(body, &m)
6554	if err != nil {
6555		return err
6556	}
6557	for k, v := range m {
6558		switch k {
6559		case "properties":
6560			if v != nil {
6561				var galleryApplicationVersionProperties GalleryApplicationVersionProperties
6562				err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
6563				if err != nil {
6564					return err
6565				}
6566				gavu.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
6567			}
6568		case "id":
6569			if v != nil {
6570				var ID string
6571				err = json.Unmarshal(*v, &ID)
6572				if err != nil {
6573					return err
6574				}
6575				gavu.ID = &ID
6576			}
6577		case "name":
6578			if v != nil {
6579				var name string
6580				err = json.Unmarshal(*v, &name)
6581				if err != nil {
6582					return err
6583				}
6584				gavu.Name = &name
6585			}
6586		case "type":
6587			if v != nil {
6588				var typeVar string
6589				err = json.Unmarshal(*v, &typeVar)
6590				if err != nil {
6591					return err
6592				}
6593				gavu.Type = &typeVar
6594			}
6595		case "tags":
6596			if v != nil {
6597				var tags map[string]*string
6598				err = json.Unmarshal(*v, &tags)
6599				if err != nil {
6600					return err
6601				}
6602				gavu.Tags = tags
6603			}
6604		}
6605	}
6606
6607	return nil
6608}
6609
6610// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile.
6611type GalleryArtifactPublishingProfileBase struct {
6612	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
6613	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
6614	// 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.
6615	ReplicaCount *int32 `json:"replicaCount,omitempty"`
6616	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
6617	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
6618	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
6619	PublishedDate *date.Time `json:"publishedDate,omitempty"`
6620	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
6621	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
6622	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
6623	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
6624}
6625
6626// MarshalJSON is the custom marshaler for GalleryArtifactPublishingProfileBase.
6627func (gappb GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error) {
6628	objectMap := make(map[string]interface{})
6629	if gappb.TargetRegions != nil {
6630		objectMap["targetRegions"] = gappb.TargetRegions
6631	}
6632	if gappb.ReplicaCount != nil {
6633		objectMap["replicaCount"] = gappb.ReplicaCount
6634	}
6635	if gappb.ExcludeFromLatest != nil {
6636		objectMap["excludeFromLatest"] = gappb.ExcludeFromLatest
6637	}
6638	if gappb.EndOfLifeDate != nil {
6639		objectMap["endOfLifeDate"] = gappb.EndOfLifeDate
6640	}
6641	if gappb.StorageAccountType != "" {
6642		objectMap["storageAccountType"] = gappb.StorageAccountType
6643	}
6644	return json.Marshal(objectMap)
6645}
6646
6647// GalleryArtifactSource the source image from which the Image Version is going to be created.
6648type GalleryArtifactSource struct {
6649	ManagedImage *ManagedArtifact `json:"managedImage,omitempty"`
6650}
6651
6652// GalleryArtifactVersionSource the gallery artifact version source.
6653type GalleryArtifactVersionSource struct {
6654	// ID - The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, or user image.
6655	ID *string `json:"id,omitempty"`
6656}
6657
6658// GalleryDataDiskImage this is the data disk image.
6659type GalleryDataDiskImage struct {
6660	// 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.
6661	Lun *int32 `json:"lun,omitempty"`
6662	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
6663	SizeInGB *int32 `json:"sizeInGB,omitempty"`
6664	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
6665	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
6666	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
6667}
6668
6669// MarshalJSON is the custom marshaler for GalleryDataDiskImage.
6670func (gddi GalleryDataDiskImage) MarshalJSON() ([]byte, error) {
6671	objectMap := make(map[string]interface{})
6672	if gddi.Lun != nil {
6673		objectMap["lun"] = gddi.Lun
6674	}
6675	if gddi.HostCaching != "" {
6676		objectMap["hostCaching"] = gddi.HostCaching
6677	}
6678	if gddi.Source != nil {
6679		objectMap["source"] = gddi.Source
6680	}
6681	return json.Marshal(objectMap)
6682}
6683
6684// GalleryDiskImage this is the disk image base class.
6685type GalleryDiskImage struct {
6686	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
6687	SizeInGB *int32 `json:"sizeInGB,omitempty"`
6688	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
6689	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
6690	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
6691}
6692
6693// MarshalJSON is the custom marshaler for GalleryDiskImage.
6694func (gdi GalleryDiskImage) MarshalJSON() ([]byte, error) {
6695	objectMap := make(map[string]interface{})
6696	if gdi.HostCaching != "" {
6697		objectMap["hostCaching"] = gdi.HostCaching
6698	}
6699	if gdi.Source != nil {
6700		objectMap["source"] = gdi.Source
6701	}
6702	return json.Marshal(objectMap)
6703}
6704
6705// GalleryIdentifier describes the gallery unique name.
6706type GalleryIdentifier struct {
6707	// UniqueName - READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure.
6708	UniqueName *string `json:"uniqueName,omitempty"`
6709}
6710
6711// MarshalJSON is the custom marshaler for GalleryIdentifier.
6712func (gi GalleryIdentifier) MarshalJSON() ([]byte, error) {
6713	objectMap := make(map[string]interface{})
6714	return json.Marshal(objectMap)
6715}
6716
6717// GalleryImage specifies information about the gallery Image Definition that you want to create or update.
6718type GalleryImage struct {
6719	autorest.Response       `json:"-"`
6720	*GalleryImageProperties `json:"properties,omitempty"`
6721	// ID - READ-ONLY; Resource Id
6722	ID *string `json:"id,omitempty"`
6723	// Name - READ-ONLY; Resource name
6724	Name *string `json:"name,omitempty"`
6725	// Type - READ-ONLY; Resource type
6726	Type *string `json:"type,omitempty"`
6727	// Location - Resource location
6728	Location *string `json:"location,omitempty"`
6729	// Tags - Resource tags
6730	Tags map[string]*string `json:"tags"`
6731}
6732
6733// MarshalJSON is the custom marshaler for GalleryImage.
6734func (gi GalleryImage) MarshalJSON() ([]byte, error) {
6735	objectMap := make(map[string]interface{})
6736	if gi.GalleryImageProperties != nil {
6737		objectMap["properties"] = gi.GalleryImageProperties
6738	}
6739	if gi.Location != nil {
6740		objectMap["location"] = gi.Location
6741	}
6742	if gi.Tags != nil {
6743		objectMap["tags"] = gi.Tags
6744	}
6745	return json.Marshal(objectMap)
6746}
6747
6748// UnmarshalJSON is the custom unmarshaler for GalleryImage struct.
6749func (gi *GalleryImage) UnmarshalJSON(body []byte) error {
6750	var m map[string]*json.RawMessage
6751	err := json.Unmarshal(body, &m)
6752	if err != nil {
6753		return err
6754	}
6755	for k, v := range m {
6756		switch k {
6757		case "properties":
6758			if v != nil {
6759				var galleryImageProperties GalleryImageProperties
6760				err = json.Unmarshal(*v, &galleryImageProperties)
6761				if err != nil {
6762					return err
6763				}
6764				gi.GalleryImageProperties = &galleryImageProperties
6765			}
6766		case "id":
6767			if v != nil {
6768				var ID string
6769				err = json.Unmarshal(*v, &ID)
6770				if err != nil {
6771					return err
6772				}
6773				gi.ID = &ID
6774			}
6775		case "name":
6776			if v != nil {
6777				var name string
6778				err = json.Unmarshal(*v, &name)
6779				if err != nil {
6780					return err
6781				}
6782				gi.Name = &name
6783			}
6784		case "type":
6785			if v != nil {
6786				var typeVar string
6787				err = json.Unmarshal(*v, &typeVar)
6788				if err != nil {
6789					return err
6790				}
6791				gi.Type = &typeVar
6792			}
6793		case "location":
6794			if v != nil {
6795				var location string
6796				err = json.Unmarshal(*v, &location)
6797				if err != nil {
6798					return err
6799				}
6800				gi.Location = &location
6801			}
6802		case "tags":
6803			if v != nil {
6804				var tags map[string]*string
6805				err = json.Unmarshal(*v, &tags)
6806				if err != nil {
6807					return err
6808				}
6809				gi.Tags = tags
6810			}
6811		}
6812	}
6813
6814	return nil
6815}
6816
6817// GalleryImageIdentifier this is the gallery Image Definition identifier.
6818type GalleryImageIdentifier struct {
6819	// Publisher - The name of the gallery Image Definition publisher.
6820	Publisher *string `json:"publisher,omitempty"`
6821	// Offer - The name of the gallery Image Definition offer.
6822	Offer *string `json:"offer,omitempty"`
6823	// Sku - The name of the gallery Image Definition SKU.
6824	Sku *string `json:"sku,omitempty"`
6825}
6826
6827// GalleryImageList the List Gallery Images operation response.
6828type GalleryImageList struct {
6829	autorest.Response `json:"-"`
6830	// Value - A list of Shared Image Gallery images.
6831	Value *[]GalleryImage `json:"value,omitempty"`
6832	// 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.
6833	NextLink *string `json:"nextLink,omitempty"`
6834}
6835
6836// GalleryImageListIterator provides access to a complete listing of GalleryImage values.
6837type GalleryImageListIterator struct {
6838	i    int
6839	page GalleryImageListPage
6840}
6841
6842// NextWithContext advances to the next value.  If there was an error making
6843// the request the iterator does not advance and the error is returned.
6844func (iter *GalleryImageListIterator) NextWithContext(ctx context.Context) (err error) {
6845	if tracing.IsEnabled() {
6846		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListIterator.NextWithContext")
6847		defer func() {
6848			sc := -1
6849			if iter.Response().Response.Response != nil {
6850				sc = iter.Response().Response.Response.StatusCode
6851			}
6852			tracing.EndSpan(ctx, sc, err)
6853		}()
6854	}
6855	iter.i++
6856	if iter.i < len(iter.page.Values()) {
6857		return nil
6858	}
6859	err = iter.page.NextWithContext(ctx)
6860	if err != nil {
6861		iter.i--
6862		return err
6863	}
6864	iter.i = 0
6865	return nil
6866}
6867
6868// Next advances to the next value.  If there was an error making
6869// the request the iterator does not advance and the error is returned.
6870// Deprecated: Use NextWithContext() instead.
6871func (iter *GalleryImageListIterator) Next() error {
6872	return iter.NextWithContext(context.Background())
6873}
6874
6875// NotDone returns true if the enumeration should be started or is not yet complete.
6876func (iter GalleryImageListIterator) NotDone() bool {
6877	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6878}
6879
6880// Response returns the raw server response from the last page request.
6881func (iter GalleryImageListIterator) Response() GalleryImageList {
6882	return iter.page.Response()
6883}
6884
6885// Value returns the current value or a zero-initialized value if the
6886// iterator has advanced beyond the end of the collection.
6887func (iter GalleryImageListIterator) Value() GalleryImage {
6888	if !iter.page.NotDone() {
6889		return GalleryImage{}
6890	}
6891	return iter.page.Values()[iter.i]
6892}
6893
6894// Creates a new instance of the GalleryImageListIterator type.
6895func NewGalleryImageListIterator(page GalleryImageListPage) GalleryImageListIterator {
6896	return GalleryImageListIterator{page: page}
6897}
6898
6899// IsEmpty returns true if the ListResult contains no values.
6900func (gil GalleryImageList) IsEmpty() bool {
6901	return gil.Value == nil || len(*gil.Value) == 0
6902}
6903
6904// hasNextLink returns true if the NextLink is not empty.
6905func (gil GalleryImageList) hasNextLink() bool {
6906	return gil.NextLink != nil && len(*gil.NextLink) != 0
6907}
6908
6909// galleryImageListPreparer prepares a request to retrieve the next set of results.
6910// It returns nil if no more results exist.
6911func (gil GalleryImageList) galleryImageListPreparer(ctx context.Context) (*http.Request, error) {
6912	if !gil.hasNextLink() {
6913		return nil, nil
6914	}
6915	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6916		autorest.AsJSON(),
6917		autorest.AsGet(),
6918		autorest.WithBaseURL(to.String(gil.NextLink)))
6919}
6920
6921// GalleryImageListPage contains a page of GalleryImage values.
6922type GalleryImageListPage struct {
6923	fn  func(context.Context, GalleryImageList) (GalleryImageList, error)
6924	gil GalleryImageList
6925}
6926
6927// NextWithContext advances to the next page of values.  If there was an error making
6928// the request the page does not advance and the error is returned.
6929func (page *GalleryImageListPage) NextWithContext(ctx context.Context) (err error) {
6930	if tracing.IsEnabled() {
6931		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListPage.NextWithContext")
6932		defer func() {
6933			sc := -1
6934			if page.Response().Response.Response != nil {
6935				sc = page.Response().Response.Response.StatusCode
6936			}
6937			tracing.EndSpan(ctx, sc, err)
6938		}()
6939	}
6940	for {
6941		next, err := page.fn(ctx, page.gil)
6942		if err != nil {
6943			return err
6944		}
6945		page.gil = next
6946		if !next.hasNextLink() || !next.IsEmpty() {
6947			break
6948		}
6949	}
6950	return nil
6951}
6952
6953// Next advances to the next page of values.  If there was an error making
6954// the request the page does not advance and the error is returned.
6955// Deprecated: Use NextWithContext() instead.
6956func (page *GalleryImageListPage) Next() error {
6957	return page.NextWithContext(context.Background())
6958}
6959
6960// NotDone returns true if the page enumeration should be started or is not yet complete.
6961func (page GalleryImageListPage) NotDone() bool {
6962	return !page.gil.IsEmpty()
6963}
6964
6965// Response returns the raw server response from the last page request.
6966func (page GalleryImageListPage) Response() GalleryImageList {
6967	return page.gil
6968}
6969
6970// Values returns the slice of values for the current page or nil if there are no values.
6971func (page GalleryImageListPage) Values() []GalleryImage {
6972	if page.gil.IsEmpty() {
6973		return nil
6974	}
6975	return *page.gil.Value
6976}
6977
6978// Creates a new instance of the GalleryImageListPage type.
6979func NewGalleryImageListPage(cur GalleryImageList, getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage {
6980	return GalleryImageListPage{
6981		fn:  getNextPage,
6982		gil: cur,
6983	}
6984}
6985
6986// GalleryImageProperties describes the properties of a gallery Image Definition.
6987type GalleryImageProperties struct {
6988	// Description - The description of this gallery Image Definition resource. This property is updatable.
6989	Description *string `json:"description,omitempty"`
6990	// Eula - The Eula agreement for the gallery Image Definition.
6991	Eula *string `json:"eula,omitempty"`
6992	// PrivacyStatementURI - The privacy statement uri.
6993	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
6994	// ReleaseNoteURI - The release note uri.
6995	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
6996	// 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'
6997	OsType OperatingSystemTypes `json:"osType,omitempty"`
6998	// 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'
6999	OsState OperatingSystemStateTypes `json:"osState,omitempty"`
7000	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
7001	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
7002	// EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable.
7003	EndOfLifeDate *date.Time                       `json:"endOfLifeDate,omitempty"`
7004	Identifier    *GalleryImageIdentifier          `json:"identifier,omitempty"`
7005	Recommended   *RecommendedMachineConfiguration `json:"recommended,omitempty"`
7006	Disallowed    *Disallowed                      `json:"disallowed,omitempty"`
7007	PurchasePlan  *ImagePurchasePlan               `json:"purchasePlan,omitempty"`
7008	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState2Creating', 'ProvisioningState2Updating', 'ProvisioningState2Failed', 'ProvisioningState2Succeeded', 'ProvisioningState2Deleting', 'ProvisioningState2Migrating'
7009	ProvisioningState ProvisioningState2 `json:"provisioningState,omitempty"`
7010}
7011
7012// MarshalJSON is the custom marshaler for GalleryImageProperties.
7013func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) {
7014	objectMap := make(map[string]interface{})
7015	if gip.Description != nil {
7016		objectMap["description"] = gip.Description
7017	}
7018	if gip.Eula != nil {
7019		objectMap["eula"] = gip.Eula
7020	}
7021	if gip.PrivacyStatementURI != nil {
7022		objectMap["privacyStatementUri"] = gip.PrivacyStatementURI
7023	}
7024	if gip.ReleaseNoteURI != nil {
7025		objectMap["releaseNoteUri"] = gip.ReleaseNoteURI
7026	}
7027	if gip.OsType != "" {
7028		objectMap["osType"] = gip.OsType
7029	}
7030	if gip.OsState != "" {
7031		objectMap["osState"] = gip.OsState
7032	}
7033	if gip.HyperVGeneration != "" {
7034		objectMap["hyperVGeneration"] = gip.HyperVGeneration
7035	}
7036	if gip.EndOfLifeDate != nil {
7037		objectMap["endOfLifeDate"] = gip.EndOfLifeDate
7038	}
7039	if gip.Identifier != nil {
7040		objectMap["identifier"] = gip.Identifier
7041	}
7042	if gip.Recommended != nil {
7043		objectMap["recommended"] = gip.Recommended
7044	}
7045	if gip.Disallowed != nil {
7046		objectMap["disallowed"] = gip.Disallowed
7047	}
7048	if gip.PurchasePlan != nil {
7049		objectMap["purchasePlan"] = gip.PurchasePlan
7050	}
7051	return json.Marshal(objectMap)
7052}
7053
7054// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7055// long-running operation.
7056type GalleryImagesCreateOrUpdateFuture struct {
7057	azure.FutureAPI
7058	// Result returns the result of the asynchronous operation.
7059	// If the operation has not completed it will return an error.
7060	Result func(GalleryImagesClient) (GalleryImage, error)
7061}
7062
7063// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7064func (future *GalleryImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7065	var azFuture azure.Future
7066	if err := json.Unmarshal(body, &azFuture); err != nil {
7067		return err
7068	}
7069	future.FutureAPI = &azFuture
7070	future.Result = future.result
7071	return nil
7072}
7073
7074// result is the default implementation for GalleryImagesCreateOrUpdateFuture.Result.
7075func (future *GalleryImagesCreateOrUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) {
7076	var done bool
7077	done, err = future.DoneWithContext(context.Background(), client)
7078	if err != nil {
7079		err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7080		return
7081	}
7082	if !done {
7083		gi.Response.Response = future.Response()
7084		err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture")
7085		return
7086	}
7087	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7088	if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
7089		gi, err = client.CreateOrUpdateResponder(gi.Response.Response)
7090		if err != nil {
7091			err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
7092		}
7093	}
7094	return
7095}
7096
7097// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7098// operation.
7099type GalleryImagesDeleteFuture struct {
7100	azure.FutureAPI
7101	// Result returns the result of the asynchronous operation.
7102	// If the operation has not completed it will return an error.
7103	Result func(GalleryImagesClient) (autorest.Response, error)
7104}
7105
7106// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7107func (future *GalleryImagesDeleteFuture) UnmarshalJSON(body []byte) error {
7108	var azFuture azure.Future
7109	if err := json.Unmarshal(body, &azFuture); err != nil {
7110		return err
7111	}
7112	future.FutureAPI = &azFuture
7113	future.Result = future.result
7114	return nil
7115}
7116
7117// result is the default implementation for GalleryImagesDeleteFuture.Result.
7118func (future *GalleryImagesDeleteFuture) result(client GalleryImagesClient) (ar autorest.Response, err error) {
7119	var done bool
7120	done, err = future.DoneWithContext(context.Background(), client)
7121	if err != nil {
7122		err = autorest.NewErrorWithError(err, "compute.GalleryImagesDeleteFuture", "Result", future.Response(), "Polling failure")
7123		return
7124	}
7125	if !done {
7126		ar.Response = future.Response()
7127		err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture")
7128		return
7129	}
7130	ar.Response = future.Response()
7131	return
7132}
7133
7134// GalleryImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
7135// operation.
7136type GalleryImagesUpdateFuture struct {
7137	azure.FutureAPI
7138	// Result returns the result of the asynchronous operation.
7139	// If the operation has not completed it will return an error.
7140	Result func(GalleryImagesClient) (GalleryImage, error)
7141}
7142
7143// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7144func (future *GalleryImagesUpdateFuture) UnmarshalJSON(body []byte) error {
7145	var azFuture azure.Future
7146	if err := json.Unmarshal(body, &azFuture); err != nil {
7147		return err
7148	}
7149	future.FutureAPI = &azFuture
7150	future.Result = future.result
7151	return nil
7152}
7153
7154// result is the default implementation for GalleryImagesUpdateFuture.Result.
7155func (future *GalleryImagesUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) {
7156	var done bool
7157	done, err = future.DoneWithContext(context.Background(), client)
7158	if err != nil {
7159		err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", future.Response(), "Polling failure")
7160		return
7161	}
7162	if !done {
7163		gi.Response.Response = future.Response()
7164		err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesUpdateFuture")
7165		return
7166	}
7167	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7168	if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
7169		gi, err = client.UpdateResponder(gi.Response.Response)
7170		if err != nil {
7171			err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
7172		}
7173	}
7174	return
7175}
7176
7177// GalleryImageUpdate specifies information about the gallery Image Definition that you want to update.
7178type GalleryImageUpdate struct {
7179	*GalleryImageProperties `json:"properties,omitempty"`
7180	// ID - READ-ONLY; Resource Id
7181	ID *string `json:"id,omitempty"`
7182	// Name - READ-ONLY; Resource name
7183	Name *string `json:"name,omitempty"`
7184	// Type - READ-ONLY; Resource type
7185	Type *string `json:"type,omitempty"`
7186	// Tags - Resource tags
7187	Tags map[string]*string `json:"tags"`
7188}
7189
7190// MarshalJSON is the custom marshaler for GalleryImageUpdate.
7191func (giu GalleryImageUpdate) MarshalJSON() ([]byte, error) {
7192	objectMap := make(map[string]interface{})
7193	if giu.GalleryImageProperties != nil {
7194		objectMap["properties"] = giu.GalleryImageProperties
7195	}
7196	if giu.Tags != nil {
7197		objectMap["tags"] = giu.Tags
7198	}
7199	return json.Marshal(objectMap)
7200}
7201
7202// UnmarshalJSON is the custom unmarshaler for GalleryImageUpdate struct.
7203func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error {
7204	var m map[string]*json.RawMessage
7205	err := json.Unmarshal(body, &m)
7206	if err != nil {
7207		return err
7208	}
7209	for k, v := range m {
7210		switch k {
7211		case "properties":
7212			if v != nil {
7213				var galleryImageProperties GalleryImageProperties
7214				err = json.Unmarshal(*v, &galleryImageProperties)
7215				if err != nil {
7216					return err
7217				}
7218				giu.GalleryImageProperties = &galleryImageProperties
7219			}
7220		case "id":
7221			if v != nil {
7222				var ID string
7223				err = json.Unmarshal(*v, &ID)
7224				if err != nil {
7225					return err
7226				}
7227				giu.ID = &ID
7228			}
7229		case "name":
7230			if v != nil {
7231				var name string
7232				err = json.Unmarshal(*v, &name)
7233				if err != nil {
7234					return err
7235				}
7236				giu.Name = &name
7237			}
7238		case "type":
7239			if v != nil {
7240				var typeVar string
7241				err = json.Unmarshal(*v, &typeVar)
7242				if err != nil {
7243					return err
7244				}
7245				giu.Type = &typeVar
7246			}
7247		case "tags":
7248			if v != nil {
7249				var tags map[string]*string
7250				err = json.Unmarshal(*v, &tags)
7251				if err != nil {
7252					return err
7253				}
7254				giu.Tags = tags
7255			}
7256		}
7257	}
7258
7259	return nil
7260}
7261
7262// GalleryImageVersion specifies information about the gallery Image Version that you want to create or
7263// update.
7264type GalleryImageVersion struct {
7265	autorest.Response              `json:"-"`
7266	*GalleryImageVersionProperties `json:"properties,omitempty"`
7267	// ID - READ-ONLY; Resource Id
7268	ID *string `json:"id,omitempty"`
7269	// Name - READ-ONLY; Resource name
7270	Name *string `json:"name,omitempty"`
7271	// Type - READ-ONLY; Resource type
7272	Type *string `json:"type,omitempty"`
7273	// Location - Resource location
7274	Location *string `json:"location,omitempty"`
7275	// Tags - Resource tags
7276	Tags map[string]*string `json:"tags"`
7277}
7278
7279// MarshalJSON is the custom marshaler for GalleryImageVersion.
7280func (giv GalleryImageVersion) MarshalJSON() ([]byte, error) {
7281	objectMap := make(map[string]interface{})
7282	if giv.GalleryImageVersionProperties != nil {
7283		objectMap["properties"] = giv.GalleryImageVersionProperties
7284	}
7285	if giv.Location != nil {
7286		objectMap["location"] = giv.Location
7287	}
7288	if giv.Tags != nil {
7289		objectMap["tags"] = giv.Tags
7290	}
7291	return json.Marshal(objectMap)
7292}
7293
7294// UnmarshalJSON is the custom unmarshaler for GalleryImageVersion struct.
7295func (giv *GalleryImageVersion) UnmarshalJSON(body []byte) error {
7296	var m map[string]*json.RawMessage
7297	err := json.Unmarshal(body, &m)
7298	if err != nil {
7299		return err
7300	}
7301	for k, v := range m {
7302		switch k {
7303		case "properties":
7304			if v != nil {
7305				var galleryImageVersionProperties GalleryImageVersionProperties
7306				err = json.Unmarshal(*v, &galleryImageVersionProperties)
7307				if err != nil {
7308					return err
7309				}
7310				giv.GalleryImageVersionProperties = &galleryImageVersionProperties
7311			}
7312		case "id":
7313			if v != nil {
7314				var ID string
7315				err = json.Unmarshal(*v, &ID)
7316				if err != nil {
7317					return err
7318				}
7319				giv.ID = &ID
7320			}
7321		case "name":
7322			if v != nil {
7323				var name string
7324				err = json.Unmarshal(*v, &name)
7325				if err != nil {
7326					return err
7327				}
7328				giv.Name = &name
7329			}
7330		case "type":
7331			if v != nil {
7332				var typeVar string
7333				err = json.Unmarshal(*v, &typeVar)
7334				if err != nil {
7335					return err
7336				}
7337				giv.Type = &typeVar
7338			}
7339		case "location":
7340			if v != nil {
7341				var location string
7342				err = json.Unmarshal(*v, &location)
7343				if err != nil {
7344					return err
7345				}
7346				giv.Location = &location
7347			}
7348		case "tags":
7349			if v != nil {
7350				var tags map[string]*string
7351				err = json.Unmarshal(*v, &tags)
7352				if err != nil {
7353					return err
7354				}
7355				giv.Tags = tags
7356			}
7357		}
7358	}
7359
7360	return nil
7361}
7362
7363// GalleryImageVersionList the List Gallery Image version operation response.
7364type GalleryImageVersionList struct {
7365	autorest.Response `json:"-"`
7366	// Value - A list of gallery Image Versions.
7367	Value *[]GalleryImageVersion `json:"value,omitempty"`
7368	// 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.
7369	NextLink *string `json:"nextLink,omitempty"`
7370}
7371
7372// GalleryImageVersionListIterator provides access to a complete listing of GalleryImageVersion values.
7373type GalleryImageVersionListIterator struct {
7374	i    int
7375	page GalleryImageVersionListPage
7376}
7377
7378// NextWithContext advances to the next value.  If there was an error making
7379// the request the iterator does not advance and the error is returned.
7380func (iter *GalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) {
7381	if tracing.IsEnabled() {
7382		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListIterator.NextWithContext")
7383		defer func() {
7384			sc := -1
7385			if iter.Response().Response.Response != nil {
7386				sc = iter.Response().Response.Response.StatusCode
7387			}
7388			tracing.EndSpan(ctx, sc, err)
7389		}()
7390	}
7391	iter.i++
7392	if iter.i < len(iter.page.Values()) {
7393		return nil
7394	}
7395	err = iter.page.NextWithContext(ctx)
7396	if err != nil {
7397		iter.i--
7398		return err
7399	}
7400	iter.i = 0
7401	return nil
7402}
7403
7404// Next advances to the next value.  If there was an error making
7405// the request the iterator does not advance and the error is returned.
7406// Deprecated: Use NextWithContext() instead.
7407func (iter *GalleryImageVersionListIterator) Next() error {
7408	return iter.NextWithContext(context.Background())
7409}
7410
7411// NotDone returns true if the enumeration should be started or is not yet complete.
7412func (iter GalleryImageVersionListIterator) NotDone() bool {
7413	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7414}
7415
7416// Response returns the raw server response from the last page request.
7417func (iter GalleryImageVersionListIterator) Response() GalleryImageVersionList {
7418	return iter.page.Response()
7419}
7420
7421// Value returns the current value or a zero-initialized value if the
7422// iterator has advanced beyond the end of the collection.
7423func (iter GalleryImageVersionListIterator) Value() GalleryImageVersion {
7424	if !iter.page.NotDone() {
7425		return GalleryImageVersion{}
7426	}
7427	return iter.page.Values()[iter.i]
7428}
7429
7430// Creates a new instance of the GalleryImageVersionListIterator type.
7431func NewGalleryImageVersionListIterator(page GalleryImageVersionListPage) GalleryImageVersionListIterator {
7432	return GalleryImageVersionListIterator{page: page}
7433}
7434
7435// IsEmpty returns true if the ListResult contains no values.
7436func (givl GalleryImageVersionList) IsEmpty() bool {
7437	return givl.Value == nil || len(*givl.Value) == 0
7438}
7439
7440// hasNextLink returns true if the NextLink is not empty.
7441func (givl GalleryImageVersionList) hasNextLink() bool {
7442	return givl.NextLink != nil && len(*givl.NextLink) != 0
7443}
7444
7445// galleryImageVersionListPreparer prepares a request to retrieve the next set of results.
7446// It returns nil if no more results exist.
7447func (givl GalleryImageVersionList) galleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) {
7448	if !givl.hasNextLink() {
7449		return nil, nil
7450	}
7451	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7452		autorest.AsJSON(),
7453		autorest.AsGet(),
7454		autorest.WithBaseURL(to.String(givl.NextLink)))
7455}
7456
7457// GalleryImageVersionListPage contains a page of GalleryImageVersion values.
7458type GalleryImageVersionListPage struct {
7459	fn   func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)
7460	givl GalleryImageVersionList
7461}
7462
7463// NextWithContext advances to the next page of values.  If there was an error making
7464// the request the page does not advance and the error is returned.
7465func (page *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) {
7466	if tracing.IsEnabled() {
7467		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListPage.NextWithContext")
7468		defer func() {
7469			sc := -1
7470			if page.Response().Response.Response != nil {
7471				sc = page.Response().Response.Response.StatusCode
7472			}
7473			tracing.EndSpan(ctx, sc, err)
7474		}()
7475	}
7476	for {
7477		next, err := page.fn(ctx, page.givl)
7478		if err != nil {
7479			return err
7480		}
7481		page.givl = next
7482		if !next.hasNextLink() || !next.IsEmpty() {
7483			break
7484		}
7485	}
7486	return nil
7487}
7488
7489// Next advances to the next page of values.  If there was an error making
7490// the request the page does not advance and the error is returned.
7491// Deprecated: Use NextWithContext() instead.
7492func (page *GalleryImageVersionListPage) Next() error {
7493	return page.NextWithContext(context.Background())
7494}
7495
7496// NotDone returns true if the page enumeration should be started or is not yet complete.
7497func (page GalleryImageVersionListPage) NotDone() bool {
7498	return !page.givl.IsEmpty()
7499}
7500
7501// Response returns the raw server response from the last page request.
7502func (page GalleryImageVersionListPage) Response() GalleryImageVersionList {
7503	return page.givl
7504}
7505
7506// Values returns the slice of values for the current page or nil if there are no values.
7507func (page GalleryImageVersionListPage) Values() []GalleryImageVersion {
7508	if page.givl.IsEmpty() {
7509		return nil
7510	}
7511	return *page.givl.Value
7512}
7513
7514// Creates a new instance of the GalleryImageVersionListPage type.
7515func NewGalleryImageVersionListPage(cur GalleryImageVersionList, getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage {
7516	return GalleryImageVersionListPage{
7517		fn:   getNextPage,
7518		givl: cur,
7519	}
7520}
7521
7522// GalleryImageVersionProperties describes the properties of a gallery Image Version.
7523type GalleryImageVersionProperties struct {
7524	PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"`
7525	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState3Creating', 'ProvisioningState3Updating', 'ProvisioningState3Failed', 'ProvisioningState3Succeeded', 'ProvisioningState3Deleting', 'ProvisioningState3Migrating'
7526	ProvisioningState ProvisioningState3                 `json:"provisioningState,omitempty"`
7527	StorageProfile    *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"`
7528	// ReplicationStatus - READ-ONLY
7529	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
7530}
7531
7532// MarshalJSON is the custom marshaler for GalleryImageVersionProperties.
7533func (givp GalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
7534	objectMap := make(map[string]interface{})
7535	if givp.PublishingProfile != nil {
7536		objectMap["publishingProfile"] = givp.PublishingProfile
7537	}
7538	if givp.StorageProfile != nil {
7539		objectMap["storageProfile"] = givp.StorageProfile
7540	}
7541	return json.Marshal(objectMap)
7542}
7543
7544// GalleryImageVersionPublishingProfile the publishing profile of a gallery Image Version.
7545type GalleryImageVersionPublishingProfile struct {
7546	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
7547	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
7548	// 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.
7549	ReplicaCount *int32 `json:"replicaCount,omitempty"`
7550	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
7551	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
7552	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
7553	PublishedDate *date.Time `json:"publishedDate,omitempty"`
7554	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
7555	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
7556	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
7557	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
7558}
7559
7560// MarshalJSON is the custom marshaler for GalleryImageVersionPublishingProfile.
7561func (givpp GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error) {
7562	objectMap := make(map[string]interface{})
7563	if givpp.TargetRegions != nil {
7564		objectMap["targetRegions"] = givpp.TargetRegions
7565	}
7566	if givpp.ReplicaCount != nil {
7567		objectMap["replicaCount"] = givpp.ReplicaCount
7568	}
7569	if givpp.ExcludeFromLatest != nil {
7570		objectMap["excludeFromLatest"] = givpp.ExcludeFromLatest
7571	}
7572	if givpp.EndOfLifeDate != nil {
7573		objectMap["endOfLifeDate"] = givpp.EndOfLifeDate
7574	}
7575	if givpp.StorageAccountType != "" {
7576		objectMap["storageAccountType"] = givpp.StorageAccountType
7577	}
7578	return json.Marshal(objectMap)
7579}
7580
7581// GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7582// long-running operation.
7583type GalleryImageVersionsCreateOrUpdateFuture struct {
7584	azure.FutureAPI
7585	// Result returns the result of the asynchronous operation.
7586	// If the operation has not completed it will return an error.
7587	Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
7588}
7589
7590// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7591func (future *GalleryImageVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7592	var azFuture azure.Future
7593	if err := json.Unmarshal(body, &azFuture); err != nil {
7594		return err
7595	}
7596	future.FutureAPI = &azFuture
7597	future.Result = future.result
7598	return nil
7599}
7600
7601// result is the default implementation for GalleryImageVersionsCreateOrUpdateFuture.Result.
7602func (future *GalleryImageVersionsCreateOrUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
7603	var done bool
7604	done, err = future.DoneWithContext(context.Background(), client)
7605	if err != nil {
7606		err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7607		return
7608	}
7609	if !done {
7610		giv.Response.Response = future.Response()
7611		err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture")
7612		return
7613	}
7614	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7615	if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
7616		giv, err = client.CreateOrUpdateResponder(giv.Response.Response)
7617		if err != nil {
7618			err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
7619		}
7620	}
7621	return
7622}
7623
7624// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
7625// long-running operation.
7626type GalleryImageVersionsDeleteFuture struct {
7627	azure.FutureAPI
7628	// Result returns the result of the asynchronous operation.
7629	// If the operation has not completed it will return an error.
7630	Result func(GalleryImageVersionsClient) (autorest.Response, error)
7631}
7632
7633// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7634func (future *GalleryImageVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
7635	var azFuture azure.Future
7636	if err := json.Unmarshal(body, &azFuture); err != nil {
7637		return err
7638	}
7639	future.FutureAPI = &azFuture
7640	future.Result = future.result
7641	return nil
7642}
7643
7644// result is the default implementation for GalleryImageVersionsDeleteFuture.Result.
7645func (future *GalleryImageVersionsDeleteFuture) result(client GalleryImageVersionsClient) (ar autorest.Response, err error) {
7646	var done bool
7647	done, err = future.DoneWithContext(context.Background(), client)
7648	if err != nil {
7649		err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
7650		return
7651	}
7652	if !done {
7653		ar.Response = future.Response()
7654		err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture")
7655		return
7656	}
7657	ar.Response = future.Response()
7658	return
7659}
7660
7661// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version.
7662type GalleryImageVersionStorageProfile struct {
7663	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
7664	OsDiskImage *GalleryOSDiskImage           `json:"osDiskImage,omitempty"`
7665	// DataDiskImages - A list of data disk images.
7666	DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"`
7667}
7668
7669// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
7670// long-running operation.
7671type GalleryImageVersionsUpdateFuture struct {
7672	azure.FutureAPI
7673	// Result returns the result of the asynchronous operation.
7674	// If the operation has not completed it will return an error.
7675	Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
7676}
7677
7678// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7679func (future *GalleryImageVersionsUpdateFuture) UnmarshalJSON(body []byte) error {
7680	var azFuture azure.Future
7681	if err := json.Unmarshal(body, &azFuture); err != nil {
7682		return err
7683	}
7684	future.FutureAPI = &azFuture
7685	future.Result = future.result
7686	return nil
7687}
7688
7689// result is the default implementation for GalleryImageVersionsUpdateFuture.Result.
7690func (future *GalleryImageVersionsUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
7691	var done bool
7692	done, err = future.DoneWithContext(context.Background(), client)
7693	if err != nil {
7694		err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
7695		return
7696	}
7697	if !done {
7698		giv.Response.Response = future.Response()
7699		err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsUpdateFuture")
7700		return
7701	}
7702	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7703	if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
7704		giv, err = client.UpdateResponder(giv.Response.Response)
7705		if err != nil {
7706			err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
7707		}
7708	}
7709	return
7710}
7711
7712// GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update.
7713type GalleryImageVersionUpdate struct {
7714	*GalleryImageVersionProperties `json:"properties,omitempty"`
7715	// ID - READ-ONLY; Resource Id
7716	ID *string `json:"id,omitempty"`
7717	// Name - READ-ONLY; Resource name
7718	Name *string `json:"name,omitempty"`
7719	// Type - READ-ONLY; Resource type
7720	Type *string `json:"type,omitempty"`
7721	// Tags - Resource tags
7722	Tags map[string]*string `json:"tags"`
7723}
7724
7725// MarshalJSON is the custom marshaler for GalleryImageVersionUpdate.
7726func (givu GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) {
7727	objectMap := make(map[string]interface{})
7728	if givu.GalleryImageVersionProperties != nil {
7729		objectMap["properties"] = givu.GalleryImageVersionProperties
7730	}
7731	if givu.Tags != nil {
7732		objectMap["tags"] = givu.Tags
7733	}
7734	return json.Marshal(objectMap)
7735}
7736
7737// UnmarshalJSON is the custom unmarshaler for GalleryImageVersionUpdate struct.
7738func (givu *GalleryImageVersionUpdate) UnmarshalJSON(body []byte) error {
7739	var m map[string]*json.RawMessage
7740	err := json.Unmarshal(body, &m)
7741	if err != nil {
7742		return err
7743	}
7744	for k, v := range m {
7745		switch k {
7746		case "properties":
7747			if v != nil {
7748				var galleryImageVersionProperties GalleryImageVersionProperties
7749				err = json.Unmarshal(*v, &galleryImageVersionProperties)
7750				if err != nil {
7751					return err
7752				}
7753				givu.GalleryImageVersionProperties = &galleryImageVersionProperties
7754			}
7755		case "id":
7756			if v != nil {
7757				var ID string
7758				err = json.Unmarshal(*v, &ID)
7759				if err != nil {
7760					return err
7761				}
7762				givu.ID = &ID
7763			}
7764		case "name":
7765			if v != nil {
7766				var name string
7767				err = json.Unmarshal(*v, &name)
7768				if err != nil {
7769					return err
7770				}
7771				givu.Name = &name
7772			}
7773		case "type":
7774			if v != nil {
7775				var typeVar string
7776				err = json.Unmarshal(*v, &typeVar)
7777				if err != nil {
7778					return err
7779				}
7780				givu.Type = &typeVar
7781			}
7782		case "tags":
7783			if v != nil {
7784				var tags map[string]*string
7785				err = json.Unmarshal(*v, &tags)
7786				if err != nil {
7787					return err
7788				}
7789				givu.Tags = tags
7790			}
7791		}
7792	}
7793
7794	return nil
7795}
7796
7797// GalleryList the List Galleries operation response.
7798type GalleryList struct {
7799	autorest.Response `json:"-"`
7800	// Value - A list of galleries.
7801	Value *[]Gallery `json:"value,omitempty"`
7802	// NextLink - The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries.
7803	NextLink *string `json:"nextLink,omitempty"`
7804}
7805
7806// GalleryListIterator provides access to a complete listing of Gallery values.
7807type GalleryListIterator struct {
7808	i    int
7809	page GalleryListPage
7810}
7811
7812// NextWithContext advances to the next value.  If there was an error making
7813// the request the iterator does not advance and the error is returned.
7814func (iter *GalleryListIterator) NextWithContext(ctx context.Context) (err error) {
7815	if tracing.IsEnabled() {
7816		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListIterator.NextWithContext")
7817		defer func() {
7818			sc := -1
7819			if iter.Response().Response.Response != nil {
7820				sc = iter.Response().Response.Response.StatusCode
7821			}
7822			tracing.EndSpan(ctx, sc, err)
7823		}()
7824	}
7825	iter.i++
7826	if iter.i < len(iter.page.Values()) {
7827		return nil
7828	}
7829	err = iter.page.NextWithContext(ctx)
7830	if err != nil {
7831		iter.i--
7832		return err
7833	}
7834	iter.i = 0
7835	return nil
7836}
7837
7838// Next advances to the next value.  If there was an error making
7839// the request the iterator does not advance and the error is returned.
7840// Deprecated: Use NextWithContext() instead.
7841func (iter *GalleryListIterator) Next() error {
7842	return iter.NextWithContext(context.Background())
7843}
7844
7845// NotDone returns true if the enumeration should be started or is not yet complete.
7846func (iter GalleryListIterator) NotDone() bool {
7847	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7848}
7849
7850// Response returns the raw server response from the last page request.
7851func (iter GalleryListIterator) Response() GalleryList {
7852	return iter.page.Response()
7853}
7854
7855// Value returns the current value or a zero-initialized value if the
7856// iterator has advanced beyond the end of the collection.
7857func (iter GalleryListIterator) Value() Gallery {
7858	if !iter.page.NotDone() {
7859		return Gallery{}
7860	}
7861	return iter.page.Values()[iter.i]
7862}
7863
7864// Creates a new instance of the GalleryListIterator type.
7865func NewGalleryListIterator(page GalleryListPage) GalleryListIterator {
7866	return GalleryListIterator{page: page}
7867}
7868
7869// IsEmpty returns true if the ListResult contains no values.
7870func (gl GalleryList) IsEmpty() bool {
7871	return gl.Value == nil || len(*gl.Value) == 0
7872}
7873
7874// hasNextLink returns true if the NextLink is not empty.
7875func (gl GalleryList) hasNextLink() bool {
7876	return gl.NextLink != nil && len(*gl.NextLink) != 0
7877}
7878
7879// galleryListPreparer prepares a request to retrieve the next set of results.
7880// It returns nil if no more results exist.
7881func (gl GalleryList) galleryListPreparer(ctx context.Context) (*http.Request, error) {
7882	if !gl.hasNextLink() {
7883		return nil, nil
7884	}
7885	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7886		autorest.AsJSON(),
7887		autorest.AsGet(),
7888		autorest.WithBaseURL(to.String(gl.NextLink)))
7889}
7890
7891// GalleryListPage contains a page of Gallery values.
7892type GalleryListPage struct {
7893	fn func(context.Context, GalleryList) (GalleryList, error)
7894	gl GalleryList
7895}
7896
7897// NextWithContext advances to the next page of values.  If there was an error making
7898// the request the page does not advance and the error is returned.
7899func (page *GalleryListPage) NextWithContext(ctx context.Context) (err error) {
7900	if tracing.IsEnabled() {
7901		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListPage.NextWithContext")
7902		defer func() {
7903			sc := -1
7904			if page.Response().Response.Response != nil {
7905				sc = page.Response().Response.Response.StatusCode
7906			}
7907			tracing.EndSpan(ctx, sc, err)
7908		}()
7909	}
7910	for {
7911		next, err := page.fn(ctx, page.gl)
7912		if err != nil {
7913			return err
7914		}
7915		page.gl = next
7916		if !next.hasNextLink() || !next.IsEmpty() {
7917			break
7918		}
7919	}
7920	return nil
7921}
7922
7923// Next advances to the next page of values.  If there was an error making
7924// the request the page does not advance and the error is returned.
7925// Deprecated: Use NextWithContext() instead.
7926func (page *GalleryListPage) Next() error {
7927	return page.NextWithContext(context.Background())
7928}
7929
7930// NotDone returns true if the page enumeration should be started or is not yet complete.
7931func (page GalleryListPage) NotDone() bool {
7932	return !page.gl.IsEmpty()
7933}
7934
7935// Response returns the raw server response from the last page request.
7936func (page GalleryListPage) Response() GalleryList {
7937	return page.gl
7938}
7939
7940// Values returns the slice of values for the current page or nil if there are no values.
7941func (page GalleryListPage) Values() []Gallery {
7942	if page.gl.IsEmpty() {
7943		return nil
7944	}
7945	return *page.gl.Value
7946}
7947
7948// Creates a new instance of the GalleryListPage type.
7949func NewGalleryListPage(cur GalleryList, getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage {
7950	return GalleryListPage{
7951		fn: getNextPage,
7952		gl: cur,
7953	}
7954}
7955
7956// GalleryOSDiskImage this is the OS disk image.
7957type GalleryOSDiskImage struct {
7958	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
7959	SizeInGB *int32 `json:"sizeInGB,omitempty"`
7960	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
7961	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
7962	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
7963}
7964
7965// MarshalJSON is the custom marshaler for GalleryOSDiskImage.
7966func (godi GalleryOSDiskImage) MarshalJSON() ([]byte, error) {
7967	objectMap := make(map[string]interface{})
7968	if godi.HostCaching != "" {
7969		objectMap["hostCaching"] = godi.HostCaching
7970	}
7971	if godi.Source != nil {
7972		objectMap["source"] = godi.Source
7973	}
7974	return json.Marshal(objectMap)
7975}
7976
7977// GalleryProperties describes the properties of a Shared Image Gallery.
7978type GalleryProperties struct {
7979	// Description - The description of this Shared Image Gallery resource. This property is updatable.
7980	Description *string            `json:"description,omitempty"`
7981	Identifier  *GalleryIdentifier `json:"identifier,omitempty"`
7982	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating'
7983	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7984}
7985
7986// MarshalJSON is the custom marshaler for GalleryProperties.
7987func (gp GalleryProperties) MarshalJSON() ([]byte, error) {
7988	objectMap := make(map[string]interface{})
7989	if gp.Description != nil {
7990		objectMap["description"] = gp.Description
7991	}
7992	if gp.Identifier != nil {
7993		objectMap["identifier"] = gp.Identifier
7994	}
7995	return json.Marshal(objectMap)
7996}
7997
7998// GalleryUpdate specifies information about the Shared Image Gallery that you want to update.
7999type GalleryUpdate struct {
8000	*GalleryProperties `json:"properties,omitempty"`
8001	// ID - READ-ONLY; Resource Id
8002	ID *string `json:"id,omitempty"`
8003	// Name - READ-ONLY; Resource name
8004	Name *string `json:"name,omitempty"`
8005	// Type - READ-ONLY; Resource type
8006	Type *string `json:"type,omitempty"`
8007	// Tags - Resource tags
8008	Tags map[string]*string `json:"tags"`
8009}
8010
8011// MarshalJSON is the custom marshaler for GalleryUpdate.
8012func (gu GalleryUpdate) MarshalJSON() ([]byte, error) {
8013	objectMap := make(map[string]interface{})
8014	if gu.GalleryProperties != nil {
8015		objectMap["properties"] = gu.GalleryProperties
8016	}
8017	if gu.Tags != nil {
8018		objectMap["tags"] = gu.Tags
8019	}
8020	return json.Marshal(objectMap)
8021}
8022
8023// UnmarshalJSON is the custom unmarshaler for GalleryUpdate struct.
8024func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error {
8025	var m map[string]*json.RawMessage
8026	err := json.Unmarshal(body, &m)
8027	if err != nil {
8028		return err
8029	}
8030	for k, v := range m {
8031		switch k {
8032		case "properties":
8033			if v != nil {
8034				var galleryProperties GalleryProperties
8035				err = json.Unmarshal(*v, &galleryProperties)
8036				if err != nil {
8037					return err
8038				}
8039				gu.GalleryProperties = &galleryProperties
8040			}
8041		case "id":
8042			if v != nil {
8043				var ID string
8044				err = json.Unmarshal(*v, &ID)
8045				if err != nil {
8046					return err
8047				}
8048				gu.ID = &ID
8049			}
8050		case "name":
8051			if v != nil {
8052				var name string
8053				err = json.Unmarshal(*v, &name)
8054				if err != nil {
8055					return err
8056				}
8057				gu.Name = &name
8058			}
8059		case "type":
8060			if v != nil {
8061				var typeVar string
8062				err = json.Unmarshal(*v, &typeVar)
8063				if err != nil {
8064					return err
8065				}
8066				gu.Type = &typeVar
8067			}
8068		case "tags":
8069			if v != nil {
8070				var tags map[string]*string
8071				err = json.Unmarshal(*v, &tags)
8072				if err != nil {
8073					return err
8074				}
8075				gu.Tags = tags
8076			}
8077		}
8078	}
8079
8080	return nil
8081}
8082
8083// GrantAccessData data used for requesting a SAS.
8084type GrantAccessData struct {
8085	// Access - Possible values include: 'None', 'Read', 'Write'
8086	Access AccessLevel `json:"access,omitempty"`
8087	// DurationInSeconds - Time duration in seconds until the SAS access expires.
8088	DurationInSeconds *int32 `json:"durationInSeconds,omitempty"`
8089}
8090
8091// HardwareProfile specifies the hardware settings for the virtual machine.
8092type HardwareProfile struct {
8093	// 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'
8094	VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"`
8095}
8096
8097// Image the source user image virtual hard disk. The virtual hard disk will be copied before being
8098// attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not
8099// exist.
8100type Image struct {
8101	autorest.Response `json:"-"`
8102	*ImageProperties  `json:"properties,omitempty"`
8103	// ID - READ-ONLY; Resource Id
8104	ID *string `json:"id,omitempty"`
8105	// Name - READ-ONLY; Resource name
8106	Name *string `json:"name,omitempty"`
8107	// Type - READ-ONLY; Resource type
8108	Type *string `json:"type,omitempty"`
8109	// Location - Resource location
8110	Location *string `json:"location,omitempty"`
8111	// Tags - Resource tags
8112	Tags map[string]*string `json:"tags"`
8113}
8114
8115// MarshalJSON is the custom marshaler for Image.
8116func (i Image) MarshalJSON() ([]byte, error) {
8117	objectMap := make(map[string]interface{})
8118	if i.ImageProperties != nil {
8119		objectMap["properties"] = i.ImageProperties
8120	}
8121	if i.Location != nil {
8122		objectMap["location"] = i.Location
8123	}
8124	if i.Tags != nil {
8125		objectMap["tags"] = i.Tags
8126	}
8127	return json.Marshal(objectMap)
8128}
8129
8130// UnmarshalJSON is the custom unmarshaler for Image struct.
8131func (i *Image) UnmarshalJSON(body []byte) error {
8132	var m map[string]*json.RawMessage
8133	err := json.Unmarshal(body, &m)
8134	if err != nil {
8135		return err
8136	}
8137	for k, v := range m {
8138		switch k {
8139		case "properties":
8140			if v != nil {
8141				var imageProperties ImageProperties
8142				err = json.Unmarshal(*v, &imageProperties)
8143				if err != nil {
8144					return err
8145				}
8146				i.ImageProperties = &imageProperties
8147			}
8148		case "id":
8149			if v != nil {
8150				var ID string
8151				err = json.Unmarshal(*v, &ID)
8152				if err != nil {
8153					return err
8154				}
8155				i.ID = &ID
8156			}
8157		case "name":
8158			if v != nil {
8159				var name string
8160				err = json.Unmarshal(*v, &name)
8161				if err != nil {
8162					return err
8163				}
8164				i.Name = &name
8165			}
8166		case "type":
8167			if v != nil {
8168				var typeVar string
8169				err = json.Unmarshal(*v, &typeVar)
8170				if err != nil {
8171					return err
8172				}
8173				i.Type = &typeVar
8174			}
8175		case "location":
8176			if v != nil {
8177				var location string
8178				err = json.Unmarshal(*v, &location)
8179				if err != nil {
8180					return err
8181				}
8182				i.Location = &location
8183			}
8184		case "tags":
8185			if v != nil {
8186				var tags map[string]*string
8187				err = json.Unmarshal(*v, &tags)
8188				if err != nil {
8189					return err
8190				}
8191				i.Tags = tags
8192			}
8193		}
8194	}
8195
8196	return nil
8197}
8198
8199// ImageDataDisk describes a data disk.
8200type ImageDataDisk struct {
8201	// 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.
8202	Lun *int32 `json:"lun,omitempty"`
8203	// Snapshot - The snapshot.
8204	Snapshot *SubResource `json:"snapshot,omitempty"`
8205	// ManagedDisk - The managedDisk.
8206	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
8207	// BlobURI - The Virtual Hard Disk.
8208	BlobURI *string `json:"blobUri,omitempty"`
8209	// 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'
8210	Caching CachingTypes `json:"caching,omitempty"`
8211	// 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
8212	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
8213	// 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'
8214	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
8215	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
8216	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
8217}
8218
8219// ImageDisk describes a image disk.
8220type ImageDisk struct {
8221	// Snapshot - The snapshot.
8222	Snapshot *SubResource `json:"snapshot,omitempty"`
8223	// ManagedDisk - The managedDisk.
8224	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
8225	// BlobURI - The Virtual Hard Disk.
8226	BlobURI *string `json:"blobUri,omitempty"`
8227	// 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'
8228	Caching CachingTypes `json:"caching,omitempty"`
8229	// 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
8230	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
8231	// 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'
8232	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
8233	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
8234	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
8235}
8236
8237// ImageDiskReference the source image used for creating the disk.
8238type ImageDiskReference struct {
8239	// ID - A relative uri containing either a Platform Image Repository or user image reference.
8240	ID *string `json:"id,omitempty"`
8241	// 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.
8242	Lun *int32 `json:"lun,omitempty"`
8243}
8244
8245// ImageListResult the List Image operation response.
8246type ImageListResult struct {
8247	autorest.Response `json:"-"`
8248	// Value - The list of Images.
8249	Value *[]Image `json:"value,omitempty"`
8250	// NextLink - The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images.
8251	NextLink *string `json:"nextLink,omitempty"`
8252}
8253
8254// ImageListResultIterator provides access to a complete listing of Image values.
8255type ImageListResultIterator struct {
8256	i    int
8257	page ImageListResultPage
8258}
8259
8260// NextWithContext advances to the next value.  If there was an error making
8261// the request the iterator does not advance and the error is returned.
8262func (iter *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) {
8263	if tracing.IsEnabled() {
8264		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.NextWithContext")
8265		defer func() {
8266			sc := -1
8267			if iter.Response().Response.Response != nil {
8268				sc = iter.Response().Response.Response.StatusCode
8269			}
8270			tracing.EndSpan(ctx, sc, err)
8271		}()
8272	}
8273	iter.i++
8274	if iter.i < len(iter.page.Values()) {
8275		return nil
8276	}
8277	err = iter.page.NextWithContext(ctx)
8278	if err != nil {
8279		iter.i--
8280		return err
8281	}
8282	iter.i = 0
8283	return nil
8284}
8285
8286// Next advances to the next value.  If there was an error making
8287// the request the iterator does not advance and the error is returned.
8288// Deprecated: Use NextWithContext() instead.
8289func (iter *ImageListResultIterator) Next() error {
8290	return iter.NextWithContext(context.Background())
8291}
8292
8293// NotDone returns true if the enumeration should be started or is not yet complete.
8294func (iter ImageListResultIterator) NotDone() bool {
8295	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8296}
8297
8298// Response returns the raw server response from the last page request.
8299func (iter ImageListResultIterator) Response() ImageListResult {
8300	return iter.page.Response()
8301}
8302
8303// Value returns the current value or a zero-initialized value if the
8304// iterator has advanced beyond the end of the collection.
8305func (iter ImageListResultIterator) Value() Image {
8306	if !iter.page.NotDone() {
8307		return Image{}
8308	}
8309	return iter.page.Values()[iter.i]
8310}
8311
8312// Creates a new instance of the ImageListResultIterator type.
8313func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator {
8314	return ImageListResultIterator{page: page}
8315}
8316
8317// IsEmpty returns true if the ListResult contains no values.
8318func (ilr ImageListResult) IsEmpty() bool {
8319	return ilr.Value == nil || len(*ilr.Value) == 0
8320}
8321
8322// hasNextLink returns true if the NextLink is not empty.
8323func (ilr ImageListResult) hasNextLink() bool {
8324	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
8325}
8326
8327// imageListResultPreparer prepares a request to retrieve the next set of results.
8328// It returns nil if no more results exist.
8329func (ilr ImageListResult) imageListResultPreparer(ctx context.Context) (*http.Request, error) {
8330	if !ilr.hasNextLink() {
8331		return nil, nil
8332	}
8333	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8334		autorest.AsJSON(),
8335		autorest.AsGet(),
8336		autorest.WithBaseURL(to.String(ilr.NextLink)))
8337}
8338
8339// ImageListResultPage contains a page of Image values.
8340type ImageListResultPage struct {
8341	fn  func(context.Context, ImageListResult) (ImageListResult, error)
8342	ilr ImageListResult
8343}
8344
8345// NextWithContext advances to the next page of values.  If there was an error making
8346// the request the page does not advance and the error is returned.
8347func (page *ImageListResultPage) NextWithContext(ctx context.Context) (err error) {
8348	if tracing.IsEnabled() {
8349		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultPage.NextWithContext")
8350		defer func() {
8351			sc := -1
8352			if page.Response().Response.Response != nil {
8353				sc = page.Response().Response.Response.StatusCode
8354			}
8355			tracing.EndSpan(ctx, sc, err)
8356		}()
8357	}
8358	for {
8359		next, err := page.fn(ctx, page.ilr)
8360		if err != nil {
8361			return err
8362		}
8363		page.ilr = next
8364		if !next.hasNextLink() || !next.IsEmpty() {
8365			break
8366		}
8367	}
8368	return nil
8369}
8370
8371// Next advances to the next page of values.  If there was an error making
8372// the request the page does not advance and the error is returned.
8373// Deprecated: Use NextWithContext() instead.
8374func (page *ImageListResultPage) Next() error {
8375	return page.NextWithContext(context.Background())
8376}
8377
8378// NotDone returns true if the page enumeration should be started or is not yet complete.
8379func (page ImageListResultPage) NotDone() bool {
8380	return !page.ilr.IsEmpty()
8381}
8382
8383// Response returns the raw server response from the last page request.
8384func (page ImageListResultPage) Response() ImageListResult {
8385	return page.ilr
8386}
8387
8388// Values returns the slice of values for the current page or nil if there are no values.
8389func (page ImageListResultPage) Values() []Image {
8390	if page.ilr.IsEmpty() {
8391		return nil
8392	}
8393	return *page.ilr.Value
8394}
8395
8396// Creates a new instance of the ImageListResultPage type.
8397func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
8398	return ImageListResultPage{
8399		fn:  getNextPage,
8400		ilr: cur,
8401	}
8402}
8403
8404// ImageOSDisk describes an Operating System disk.
8405type ImageOSDisk struct {
8406	// 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'
8407	OsType OperatingSystemTypes `json:"osType,omitempty"`
8408	// OsState - The OS State. Possible values include: 'Generalized', 'Specialized'
8409	OsState OperatingSystemStateTypes `json:"osState,omitempty"`
8410	// Snapshot - The snapshot.
8411	Snapshot *SubResource `json:"snapshot,omitempty"`
8412	// ManagedDisk - The managedDisk.
8413	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
8414	// BlobURI - The Virtual Hard Disk.
8415	BlobURI *string `json:"blobUri,omitempty"`
8416	// 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'
8417	Caching CachingTypes `json:"caching,omitempty"`
8418	// 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
8419	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
8420	// 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'
8421	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
8422	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
8423	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
8424}
8425
8426// ImageProperties describes the properties of an Image.
8427type ImageProperties struct {
8428	// SourceVirtualMachine - The source virtual machine from which Image is created.
8429	SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"`
8430	// StorageProfile - Specifies the storage settings for the virtual machine disks.
8431	StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"`
8432	// ProvisioningState - READ-ONLY; The provisioning state.
8433	ProvisioningState *string `json:"provisioningState,omitempty"`
8434	// HyperVGeneration - Gets the HyperVGenerationType of the VirtualMachine created from the image. Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
8435	HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
8436}
8437
8438// MarshalJSON is the custom marshaler for ImageProperties.
8439func (IP ImageProperties) MarshalJSON() ([]byte, error) {
8440	objectMap := make(map[string]interface{})
8441	if IP.SourceVirtualMachine != nil {
8442		objectMap["sourceVirtualMachine"] = IP.SourceVirtualMachine
8443	}
8444	if IP.StorageProfile != nil {
8445		objectMap["storageProfile"] = IP.StorageProfile
8446	}
8447	if IP.HyperVGeneration != "" {
8448		objectMap["hyperVGeneration"] = IP.HyperVGeneration
8449	}
8450	return json.Marshal(objectMap)
8451}
8452
8453// ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace
8454// images.
8455type ImagePurchasePlan struct {
8456	// Name - The plan ID.
8457	Name *string `json:"name,omitempty"`
8458	// Publisher - The publisher ID.
8459	Publisher *string `json:"publisher,omitempty"`
8460	// Product - The product ID.
8461	Product *string `json:"product,omitempty"`
8462}
8463
8464// ImageReference specifies information about the image to use. You can specify information about platform
8465// images, marketplace images, or virtual machine images. This element is required when you want to use a
8466// platform image, marketplace image, or virtual machine image, but is not used in other creation
8467// operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.
8468type ImageReference struct {
8469	// Publisher - The image publisher.
8470	Publisher *string `json:"publisher,omitempty"`
8471	// Offer - Specifies the offer of the platform image or marketplace image used to create the virtual machine.
8472	Offer *string `json:"offer,omitempty"`
8473	// Sku - The image SKU.
8474	Sku *string `json:"sku,omitempty"`
8475	// 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.
8476	Version *string `json:"version,omitempty"`
8477	// 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'.
8478	ExactVersion *string `json:"exactVersion,omitempty"`
8479	// ID - Resource Id
8480	ID *string `json:"id,omitempty"`
8481}
8482
8483// MarshalJSON is the custom marshaler for ImageReference.
8484func (ir ImageReference) MarshalJSON() ([]byte, error) {
8485	objectMap := make(map[string]interface{})
8486	if ir.Publisher != nil {
8487		objectMap["publisher"] = ir.Publisher
8488	}
8489	if ir.Offer != nil {
8490		objectMap["offer"] = ir.Offer
8491	}
8492	if ir.Sku != nil {
8493		objectMap["sku"] = ir.Sku
8494	}
8495	if ir.Version != nil {
8496		objectMap["version"] = ir.Version
8497	}
8498	if ir.ID != nil {
8499		objectMap["id"] = ir.ID
8500	}
8501	return json.Marshal(objectMap)
8502}
8503
8504// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
8505// operation.
8506type ImagesCreateOrUpdateFuture struct {
8507	azure.FutureAPI
8508	// Result returns the result of the asynchronous operation.
8509	// If the operation has not completed it will return an error.
8510	Result func(ImagesClient) (Image, error)
8511}
8512
8513// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8514func (future *ImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8515	var azFuture azure.Future
8516	if err := json.Unmarshal(body, &azFuture); err != nil {
8517		return err
8518	}
8519	future.FutureAPI = &azFuture
8520	future.Result = future.result
8521	return nil
8522}
8523
8524// result is the default implementation for ImagesCreateOrUpdateFuture.Result.
8525func (future *ImagesCreateOrUpdateFuture) result(client ImagesClient) (i Image, err error) {
8526	var done bool
8527	done, err = future.DoneWithContext(context.Background(), client)
8528	if err != nil {
8529		err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8530		return
8531	}
8532	if !done {
8533		i.Response.Response = future.Response()
8534		err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
8535		return
8536	}
8537	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8538	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
8539		i, err = client.CreateOrUpdateResponder(i.Response.Response)
8540		if err != nil {
8541			err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
8542		}
8543	}
8544	return
8545}
8546
8547// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
8548type ImagesDeleteFuture struct {
8549	azure.FutureAPI
8550	// Result returns the result of the asynchronous operation.
8551	// If the operation has not completed it will return an error.
8552	Result func(ImagesClient) (autorest.Response, error)
8553}
8554
8555// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8556func (future *ImagesDeleteFuture) UnmarshalJSON(body []byte) error {
8557	var azFuture azure.Future
8558	if err := json.Unmarshal(body, &azFuture); err != nil {
8559		return err
8560	}
8561	future.FutureAPI = &azFuture
8562	future.Result = future.result
8563	return nil
8564}
8565
8566// result is the default implementation for ImagesDeleteFuture.Result.
8567func (future *ImagesDeleteFuture) result(client ImagesClient) (ar autorest.Response, err error) {
8568	var done bool
8569	done, err = future.DoneWithContext(context.Background(), client)
8570	if err != nil {
8571		err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Polling failure")
8572		return
8573	}
8574	if !done {
8575		ar.Response = future.Response()
8576		err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
8577		return
8578	}
8579	ar.Response = future.Response()
8580	return
8581}
8582
8583// ImageStorageProfile describes a storage profile.
8584type ImageStorageProfile struct {
8585	// 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).
8586	OsDisk *ImageOSDisk `json:"osDisk,omitempty"`
8587	// 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).
8588	DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"`
8589	// 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).
8590	ZoneResilient *bool `json:"zoneResilient,omitempty"`
8591}
8592
8593// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
8594type ImagesUpdateFuture struct {
8595	azure.FutureAPI
8596	// Result returns the result of the asynchronous operation.
8597	// If the operation has not completed it will return an error.
8598	Result func(ImagesClient) (Image, error)
8599}
8600
8601// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8602func (future *ImagesUpdateFuture) UnmarshalJSON(body []byte) error {
8603	var azFuture azure.Future
8604	if err := json.Unmarshal(body, &azFuture); err != nil {
8605		return err
8606	}
8607	future.FutureAPI = &azFuture
8608	future.Result = future.result
8609	return nil
8610}
8611
8612// result is the default implementation for ImagesUpdateFuture.Result.
8613func (future *ImagesUpdateFuture) result(client ImagesClient) (i Image, err error) {
8614	var done bool
8615	done, err = future.DoneWithContext(context.Background(), client)
8616	if err != nil {
8617		err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Polling failure")
8618		return
8619	}
8620	if !done {
8621		i.Response.Response = future.Response()
8622		err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
8623		return
8624	}
8625	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8626	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
8627		i, err = client.UpdateResponder(i.Response.Response)
8628		if err != nil {
8629			err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
8630		}
8631	}
8632	return
8633}
8634
8635// ImageUpdate the source user image virtual hard disk. Only tags may be updated.
8636type ImageUpdate struct {
8637	*ImageProperties `json:"properties,omitempty"`
8638	// Tags - Resource tags
8639	Tags map[string]*string `json:"tags"`
8640}
8641
8642// MarshalJSON is the custom marshaler for ImageUpdate.
8643func (iu ImageUpdate) MarshalJSON() ([]byte, error) {
8644	objectMap := make(map[string]interface{})
8645	if iu.ImageProperties != nil {
8646		objectMap["properties"] = iu.ImageProperties
8647	}
8648	if iu.Tags != nil {
8649		objectMap["tags"] = iu.Tags
8650	}
8651	return json.Marshal(objectMap)
8652}
8653
8654// UnmarshalJSON is the custom unmarshaler for ImageUpdate struct.
8655func (iu *ImageUpdate) UnmarshalJSON(body []byte) error {
8656	var m map[string]*json.RawMessage
8657	err := json.Unmarshal(body, &m)
8658	if err != nil {
8659		return err
8660	}
8661	for k, v := range m {
8662		switch k {
8663		case "properties":
8664			if v != nil {
8665				var imageProperties ImageProperties
8666				err = json.Unmarshal(*v, &imageProperties)
8667				if err != nil {
8668					return err
8669				}
8670				iu.ImageProperties = &imageProperties
8671			}
8672		case "tags":
8673			if v != nil {
8674				var tags map[string]*string
8675				err = json.Unmarshal(*v, &tags)
8676				if err != nil {
8677					return err
8678				}
8679				iu.Tags = tags
8680			}
8681		}
8682	}
8683
8684	return nil
8685}
8686
8687// InnerError inner error details.
8688type InnerError struct {
8689	// Exceptiontype - The exception type.
8690	Exceptiontype *string `json:"exceptiontype,omitempty"`
8691	// Errordetail - The internal error message or exception dump.
8692	Errordetail *string `json:"errordetail,omitempty"`
8693}
8694
8695// InstanceSku ...
8696type InstanceSku struct {
8697	// Name - READ-ONLY; The sku name.
8698	Name *string `json:"name,omitempty"`
8699	// Tier - READ-ONLY; The tier of the cloud service role instance.
8700	Tier *string `json:"tier,omitempty"`
8701}
8702
8703// MarshalJSON is the custom marshaler for InstanceSku.
8704func (is InstanceSku) MarshalJSON() ([]byte, error) {
8705	objectMap := make(map[string]interface{})
8706	return json.Marshal(objectMap)
8707}
8708
8709// InstanceViewStatus instance view status.
8710type InstanceViewStatus struct {
8711	// Code - The status code.
8712	Code *string `json:"code,omitempty"`
8713	// Level - The level code. Possible values include: 'Info', 'Warning', 'Error'
8714	Level StatusLevelTypes `json:"level,omitempty"`
8715	// DisplayStatus - The short localizable label for the status.
8716	DisplayStatus *string `json:"displayStatus,omitempty"`
8717	// Message - The detailed status message, including for alerts and error messages.
8718	Message *string `json:"message,omitempty"`
8719	// Time - The time of the status.
8720	Time *date.Time `json:"time,omitempty"`
8721}
8722
8723// InstanceViewStatusesSummary instance view statuses.
8724type InstanceViewStatusesSummary struct {
8725	// StatusesSummary - READ-ONLY
8726	StatusesSummary *[]StatusCodeCount `json:"statusesSummary,omitempty"`
8727}
8728
8729// MarshalJSON is the custom marshaler for InstanceViewStatusesSummary.
8730func (ivss InstanceViewStatusesSummary) MarshalJSON() ([]byte, error) {
8731	objectMap := make(map[string]interface{})
8732	return json.Marshal(objectMap)
8733}
8734
8735// KeyForDiskEncryptionSet key Vault Key Url to be used for server side encryption of Managed Disks and
8736// Snapshots
8737type KeyForDiskEncryptionSet struct {
8738	// SourceVault - Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription.
8739	SourceVault *SourceVault `json:"sourceVault,omitempty"`
8740	// KeyURL - Fully versioned Key Url pointing to a key in KeyVault
8741	KeyURL *string `json:"keyUrl,omitempty"`
8742}
8743
8744// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used
8745// to unwrap the encryptionKey
8746type KeyVaultAndKeyReference struct {
8747	// SourceVault - Resource id of the KeyVault containing the key or secret
8748	SourceVault *SourceVault `json:"sourceVault,omitempty"`
8749	// KeyURL - Url pointing to a key or secret in KeyVault
8750	KeyURL *string `json:"keyUrl,omitempty"`
8751}
8752
8753// KeyVaultAndSecretReference key Vault Secret Url and vault id of the encryption key
8754type KeyVaultAndSecretReference struct {
8755	// SourceVault - Resource id of the KeyVault containing the key or secret
8756	SourceVault *SourceVault `json:"sourceVault,omitempty"`
8757	// SecretURL - Url pointing to a key or secret in KeyVault
8758	SecretURL *string `json:"secretUrl,omitempty"`
8759}
8760
8761// KeyVaultKeyReference describes a reference to Key Vault Key
8762type KeyVaultKeyReference struct {
8763	// KeyURL - The URL referencing a key encryption key in Key Vault.
8764	KeyURL *string `json:"keyUrl,omitempty"`
8765	// SourceVault - The relative URL of the Key Vault containing the key.
8766	SourceVault *SubResource `json:"sourceVault,omitempty"`
8767}
8768
8769// KeyVaultSecretReference describes a reference to Key Vault Secret
8770type KeyVaultSecretReference struct {
8771	// SecretURL - The URL referencing a secret in a Key Vault.
8772	SecretURL *string `json:"secretUrl,omitempty"`
8773	// SourceVault - The relative URL of the Key Vault containing the secret.
8774	SourceVault *SubResource `json:"sourceVault,omitempty"`
8775}
8776
8777// LastPatchInstallationSummary describes the properties of the last installed patch summary.
8778type LastPatchInstallationSummary struct {
8779	// 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'
8780	Status PatchOperationStatus `json:"status,omitempty"`
8781	// InstallationActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
8782	InstallationActivityID *string `json:"installationActivityId,omitempty"`
8783	// MaintenanceWindowExceeded - READ-ONLY; Describes whether the operation ran out of time before it completed all its intended actions
8784	MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"`
8785	// 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'
8786	RebootStatus RebootStatus `json:"rebootStatus,omitempty"`
8787	// 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.
8788	NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty"`
8789	// ExcludedPatchCount - READ-ONLY; The number of all available patches but excluded explicitly by a customer-specified exclusion list match.
8790	ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty"`
8791	// PendingPatchCount - READ-ONLY; The number of all available patches expected to be installed over the course of the patch installation operation.
8792	PendingPatchCount *int32 `json:"pendingPatchCount,omitempty"`
8793	// InstalledPatchCount - READ-ONLY; The count of patches that successfully installed.
8794	InstalledPatchCount *int32 `json:"installedPatchCount,omitempty"`
8795	// FailedPatchCount - READ-ONLY; The count of patches that failed installation.
8796	FailedPatchCount *int32 `json:"failedPatchCount,omitempty"`
8797	// StartTime - READ-ONLY; The UTC timestamp when the operation began.
8798	StartTime *date.Time `json:"startTime,omitempty"`
8799	// LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began.
8800	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
8801	// StartedBy - READ-ONLY; The person or system account that started the operation
8802	StartedBy *string `json:"startedBy,omitempty"`
8803	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
8804	Error *APIError `json:"error,omitempty"`
8805}
8806
8807// MarshalJSON is the custom marshaler for LastPatchInstallationSummary.
8808func (lpis LastPatchInstallationSummary) MarshalJSON() ([]byte, error) {
8809	objectMap := make(map[string]interface{})
8810	return json.Marshal(objectMap)
8811}
8812
8813// LinuxConfiguration specifies the Linux operating system settings on the virtual machine. <br><br>For a
8814// list of supported Linux distributions, see [Linux on Azure-Endorsed
8815// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
8816// <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed
8817// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
8818type LinuxConfiguration struct {
8819	// DisablePasswordAuthentication - Specifies whether password authentication should be disabled.
8820	DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"`
8821	// SSH - Specifies the ssh key configuration for a Linux OS.
8822	SSH *SSHConfiguration `json:"ssh,omitempty"`
8823	// 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.
8824	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
8825}
8826
8827// ListUsagesResult the List Usages operation response.
8828type ListUsagesResult struct {
8829	autorest.Response `json:"-"`
8830	// Value - The list of compute resource usages.
8831	Value *[]Usage `json:"value,omitempty"`
8832	// 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.
8833	NextLink *string `json:"nextLink,omitempty"`
8834}
8835
8836// ListUsagesResultIterator provides access to a complete listing of Usage values.
8837type ListUsagesResultIterator struct {
8838	i    int
8839	page ListUsagesResultPage
8840}
8841
8842// NextWithContext advances to the next value.  If there was an error making
8843// the request the iterator does not advance and the error is returned.
8844func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
8845	if tracing.IsEnabled() {
8846		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
8847		defer func() {
8848			sc := -1
8849			if iter.Response().Response.Response != nil {
8850				sc = iter.Response().Response.Response.StatusCode
8851			}
8852			tracing.EndSpan(ctx, sc, err)
8853		}()
8854	}
8855	iter.i++
8856	if iter.i < len(iter.page.Values()) {
8857		return nil
8858	}
8859	err = iter.page.NextWithContext(ctx)
8860	if err != nil {
8861		iter.i--
8862		return err
8863	}
8864	iter.i = 0
8865	return nil
8866}
8867
8868// Next advances to the next value.  If there was an error making
8869// the request the iterator does not advance and the error is returned.
8870// Deprecated: Use NextWithContext() instead.
8871func (iter *ListUsagesResultIterator) Next() error {
8872	return iter.NextWithContext(context.Background())
8873}
8874
8875// NotDone returns true if the enumeration should be started or is not yet complete.
8876func (iter ListUsagesResultIterator) NotDone() bool {
8877	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8878}
8879
8880// Response returns the raw server response from the last page request.
8881func (iter ListUsagesResultIterator) Response() ListUsagesResult {
8882	return iter.page.Response()
8883}
8884
8885// Value returns the current value or a zero-initialized value if the
8886// iterator has advanced beyond the end of the collection.
8887func (iter ListUsagesResultIterator) Value() Usage {
8888	if !iter.page.NotDone() {
8889		return Usage{}
8890	}
8891	return iter.page.Values()[iter.i]
8892}
8893
8894// Creates a new instance of the ListUsagesResultIterator type.
8895func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
8896	return ListUsagesResultIterator{page: page}
8897}
8898
8899// IsEmpty returns true if the ListResult contains no values.
8900func (lur ListUsagesResult) IsEmpty() bool {
8901	return lur.Value == nil || len(*lur.Value) == 0
8902}
8903
8904// hasNextLink returns true if the NextLink is not empty.
8905func (lur ListUsagesResult) hasNextLink() bool {
8906	return lur.NextLink != nil && len(*lur.NextLink) != 0
8907}
8908
8909// listUsagesResultPreparer prepares a request to retrieve the next set of results.
8910// It returns nil if no more results exist.
8911func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
8912	if !lur.hasNextLink() {
8913		return nil, nil
8914	}
8915	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8916		autorest.AsJSON(),
8917		autorest.AsGet(),
8918		autorest.WithBaseURL(to.String(lur.NextLink)))
8919}
8920
8921// ListUsagesResultPage contains a page of Usage values.
8922type ListUsagesResultPage struct {
8923	fn  func(context.Context, ListUsagesResult) (ListUsagesResult, error)
8924	lur ListUsagesResult
8925}
8926
8927// NextWithContext advances to the next page of values.  If there was an error making
8928// the request the page does not advance and the error is returned.
8929func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
8930	if tracing.IsEnabled() {
8931		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
8932		defer func() {
8933			sc := -1
8934			if page.Response().Response.Response != nil {
8935				sc = page.Response().Response.Response.StatusCode
8936			}
8937			tracing.EndSpan(ctx, sc, err)
8938		}()
8939	}
8940	for {
8941		next, err := page.fn(ctx, page.lur)
8942		if err != nil {
8943			return err
8944		}
8945		page.lur = next
8946		if !next.hasNextLink() || !next.IsEmpty() {
8947			break
8948		}
8949	}
8950	return nil
8951}
8952
8953// Next advances to the next page of values.  If there was an error making
8954// the request the page does not advance and the error is returned.
8955// Deprecated: Use NextWithContext() instead.
8956func (page *ListUsagesResultPage) Next() error {
8957	return page.NextWithContext(context.Background())
8958}
8959
8960// NotDone returns true if the page enumeration should be started or is not yet complete.
8961func (page ListUsagesResultPage) NotDone() bool {
8962	return !page.lur.IsEmpty()
8963}
8964
8965// Response returns the raw server response from the last page request.
8966func (page ListUsagesResultPage) Response() ListUsagesResult {
8967	return page.lur
8968}
8969
8970// Values returns the slice of values for the current page or nil if there are no values.
8971func (page ListUsagesResultPage) Values() []Usage {
8972	if page.lur.IsEmpty() {
8973		return nil
8974	}
8975	return *page.lur.Value
8976}
8977
8978// Creates a new instance of the ListUsagesResultPage type.
8979func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
8980	return ListUsagesResultPage{
8981		fn:  getNextPage,
8982		lur: cur,
8983	}
8984}
8985
8986// ListVirtualMachineExtensionImage ...
8987type ListVirtualMachineExtensionImage struct {
8988	autorest.Response `json:"-"`
8989	Value             *[]VirtualMachineExtensionImage `json:"value,omitempty"`
8990}
8991
8992// ListVirtualMachineImageResource ...
8993type ListVirtualMachineImageResource struct {
8994	autorest.Response `json:"-"`
8995	Value             *[]VirtualMachineImageResource `json:"value,omitempty"`
8996}
8997
8998// LoadBalancerConfiguration describes the load balancer configuration.
8999type LoadBalancerConfiguration struct {
9000	// Name - Resource Name
9001	Name       *string                              `json:"name,omitempty"`
9002	Properties *LoadBalancerConfigurationProperties `json:"properties,omitempty"`
9003}
9004
9005// LoadBalancerConfigurationProperties ...
9006type LoadBalancerConfigurationProperties struct {
9007	// FrontendIPConfigurations - List of IP
9008	FrontendIPConfigurations *[]LoadBalancerFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
9009}
9010
9011// LoadBalancerFrontendIPConfiguration ...
9012type LoadBalancerFrontendIPConfiguration struct {
9013	Name       *string                                        `json:"name,omitempty"`
9014	Properties *LoadBalancerFrontendIPConfigurationProperties `json:"properties,omitempty"`
9015}
9016
9017// LoadBalancerFrontendIPConfigurationProperties describes a cloud service IP Configuration
9018type LoadBalancerFrontendIPConfigurationProperties struct {
9019	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
9020	Subnet          *SubResource `json:"subnet,omitempty"`
9021	// PrivateIPAddress - The private IP address referenced by the cloud service.
9022	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
9023}
9024
9025// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results
9026// of a long-running operation.
9027type LogAnalyticsExportRequestRateByIntervalFuture struct {
9028	azure.FutureAPI
9029	// Result returns the result of the asynchronous operation.
9030	// If the operation has not completed it will return an error.
9031	Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
9032}
9033
9034// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9035func (future *LogAnalyticsExportRequestRateByIntervalFuture) UnmarshalJSON(body []byte) error {
9036	var azFuture azure.Future
9037	if err := json.Unmarshal(body, &azFuture); err != nil {
9038		return err
9039	}
9040	future.FutureAPI = &azFuture
9041	future.Result = future.result
9042	return nil
9043}
9044
9045// result is the default implementation for LogAnalyticsExportRequestRateByIntervalFuture.Result.
9046func (future *LogAnalyticsExportRequestRateByIntervalFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
9047	var done bool
9048	done, err = future.DoneWithContext(context.Background(), client)
9049	if err != nil {
9050		err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Polling failure")
9051		return
9052	}
9053	if !done {
9054		laor.Response.Response = future.Response()
9055		err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
9056		return
9057	}
9058	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9059	if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
9060		laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response)
9061		if err != nil {
9062			err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request")
9063		}
9064	}
9065	return
9066}
9067
9068// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a
9069// long-running operation.
9070type LogAnalyticsExportThrottledRequestsFuture struct {
9071	azure.FutureAPI
9072	// Result returns the result of the asynchronous operation.
9073	// If the operation has not completed it will return an error.
9074	Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
9075}
9076
9077// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9078func (future *LogAnalyticsExportThrottledRequestsFuture) UnmarshalJSON(body []byte) error {
9079	var azFuture azure.Future
9080	if err := json.Unmarshal(body, &azFuture); err != nil {
9081		return err
9082	}
9083	future.FutureAPI = &azFuture
9084	future.Result = future.result
9085	return nil
9086}
9087
9088// result is the default implementation for LogAnalyticsExportThrottledRequestsFuture.Result.
9089func (future *LogAnalyticsExportThrottledRequestsFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
9090	var done bool
9091	done, err = future.DoneWithContext(context.Background(), client)
9092	if err != nil {
9093		err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Polling failure")
9094		return
9095	}
9096	if !done {
9097		laor.Response.Response = future.Response()
9098		err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
9099		return
9100	}
9101	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9102	if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
9103		laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response)
9104		if err != nil {
9105			err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request")
9106		}
9107	}
9108	return
9109}
9110
9111// LogAnalyticsInputBase api input base class for LogAnalytics Api.
9112type LogAnalyticsInputBase struct {
9113	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
9114	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
9115	// FromTime - From time of the query
9116	FromTime *date.Time `json:"fromTime,omitempty"`
9117	// ToTime - To time of the query
9118	ToTime *date.Time `json:"toTime,omitempty"`
9119	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
9120	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
9121	// GroupByOperationName - Group query result by Operation Name.
9122	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
9123	// GroupByResourceName - Group query result by Resource Name.
9124	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
9125	// GroupByClientApplicationID - Group query result by Client Application ID.
9126	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
9127	// GroupByUserAgent - Group query result by User Agent.
9128	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
9129}
9130
9131// LogAnalyticsOperationResult logAnalytics operation status response
9132type LogAnalyticsOperationResult struct {
9133	autorest.Response `json:"-"`
9134	// Properties - READ-ONLY; LogAnalyticsOutput
9135	Properties *LogAnalyticsOutput `json:"properties,omitempty"`
9136}
9137
9138// MarshalJSON is the custom marshaler for LogAnalyticsOperationResult.
9139func (laor LogAnalyticsOperationResult) MarshalJSON() ([]byte, error) {
9140	objectMap := make(map[string]interface{})
9141	return json.Marshal(objectMap)
9142}
9143
9144// LogAnalyticsOutput logAnalytics output properties
9145type LogAnalyticsOutput struct {
9146	// Output - READ-ONLY; Output file Uri path to blob container.
9147	Output *string `json:"output,omitempty"`
9148}
9149
9150// MarshalJSON is the custom marshaler for LogAnalyticsOutput.
9151func (lao LogAnalyticsOutput) MarshalJSON() ([]byte, error) {
9152	objectMap := make(map[string]interface{})
9153	return json.Marshal(objectMap)
9154}
9155
9156// MaintenanceRedeployStatus maintenance Operation Status.
9157type MaintenanceRedeployStatus struct {
9158	// IsCustomerInitiatedMaintenanceAllowed - True, if customer is allowed to perform Maintenance.
9159	IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"`
9160	// PreMaintenanceWindowStartTime - Start Time for the Pre Maintenance Window.
9161	PreMaintenanceWindowStartTime *date.Time `json:"preMaintenanceWindowStartTime,omitempty"`
9162	// PreMaintenanceWindowEndTime - End Time for the Pre Maintenance Window.
9163	PreMaintenanceWindowEndTime *date.Time `json:"preMaintenanceWindowEndTime,omitempty"`
9164	// MaintenanceWindowStartTime - Start Time for the Maintenance Window.
9165	MaintenanceWindowStartTime *date.Time `json:"maintenanceWindowStartTime,omitempty"`
9166	// MaintenanceWindowEndTime - End Time for the Maintenance Window.
9167	MaintenanceWindowEndTime *date.Time `json:"maintenanceWindowEndTime,omitempty"`
9168	// LastOperationResultCode - The Last Maintenance Operation Result Code. Possible values include: 'MaintenanceOperationResultCodeTypesNone', 'MaintenanceOperationResultCodeTypesRetryLater', 'MaintenanceOperationResultCodeTypesMaintenanceAborted', 'MaintenanceOperationResultCodeTypesMaintenanceCompleted'
9169	LastOperationResultCode MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"`
9170	// LastOperationMessage - Message returned for the last Maintenance Operation.
9171	LastOperationMessage *string `json:"lastOperationMessage,omitempty"`
9172}
9173
9174// ManagedArtifact the managed artifact.
9175type ManagedArtifact struct {
9176	// ID - The managed artifact id.
9177	ID *string `json:"id,omitempty"`
9178}
9179
9180// ManagedDiskParameters the parameters of a managed disk.
9181type ManagedDiskParameters struct {
9182	// 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'
9183	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
9184	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
9185	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
9186	// ID - Resource Id
9187	ID *string `json:"id,omitempty"`
9188}
9189
9190// NetworkInterfaceReference describes a network interface reference.
9191type NetworkInterfaceReference struct {
9192	*NetworkInterfaceReferenceProperties `json:"properties,omitempty"`
9193	// ID - Resource Id
9194	ID *string `json:"id,omitempty"`
9195}
9196
9197// MarshalJSON is the custom marshaler for NetworkInterfaceReference.
9198func (nir NetworkInterfaceReference) MarshalJSON() ([]byte, error) {
9199	objectMap := make(map[string]interface{})
9200	if nir.NetworkInterfaceReferenceProperties != nil {
9201		objectMap["properties"] = nir.NetworkInterfaceReferenceProperties
9202	}
9203	if nir.ID != nil {
9204		objectMap["id"] = nir.ID
9205	}
9206	return json.Marshal(objectMap)
9207}
9208
9209// UnmarshalJSON is the custom unmarshaler for NetworkInterfaceReference struct.
9210func (nir *NetworkInterfaceReference) UnmarshalJSON(body []byte) error {
9211	var m map[string]*json.RawMessage
9212	err := json.Unmarshal(body, &m)
9213	if err != nil {
9214		return err
9215	}
9216	for k, v := range m {
9217		switch k {
9218		case "properties":
9219			if v != nil {
9220				var networkInterfaceReferenceProperties NetworkInterfaceReferenceProperties
9221				err = json.Unmarshal(*v, &networkInterfaceReferenceProperties)
9222				if err != nil {
9223					return err
9224				}
9225				nir.NetworkInterfaceReferenceProperties = &networkInterfaceReferenceProperties
9226			}
9227		case "id":
9228			if v != nil {
9229				var ID string
9230				err = json.Unmarshal(*v, &ID)
9231				if err != nil {
9232					return err
9233				}
9234				nir.ID = &ID
9235			}
9236		}
9237	}
9238
9239	return nil
9240}
9241
9242// NetworkInterfaceReferenceProperties describes a network interface reference properties.
9243type NetworkInterfaceReferenceProperties struct {
9244	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
9245	Primary *bool `json:"primary,omitempty"`
9246}
9247
9248// NetworkProfile specifies the network interfaces of the virtual machine.
9249type NetworkProfile struct {
9250	// NetworkInterfaces - Specifies the list of resource Ids for the network interfaces associated with the virtual machine.
9251	NetworkInterfaces *[]NetworkInterfaceReference `json:"networkInterfaces,omitempty"`
9252}
9253
9254// OperationListResult the List Compute Operation operation response.
9255type OperationListResult struct {
9256	autorest.Response `json:"-"`
9257	// Value - READ-ONLY; The list of compute operations
9258	Value *[]OperationValue `json:"value,omitempty"`
9259}
9260
9261// MarshalJSON is the custom marshaler for OperationListResult.
9262func (olr OperationListResult) MarshalJSON() ([]byte, error) {
9263	objectMap := make(map[string]interface{})
9264	return json.Marshal(objectMap)
9265}
9266
9267// OperationValue describes the properties of a Compute Operation value.
9268type OperationValue struct {
9269	// Origin - READ-ONLY; The origin of the compute operation.
9270	Origin *string `json:"origin,omitempty"`
9271	// Name - READ-ONLY; The name of the compute operation.
9272	Name                   *string `json:"name,omitempty"`
9273	*OperationValueDisplay `json:"display,omitempty"`
9274}
9275
9276// MarshalJSON is the custom marshaler for OperationValue.
9277func (ov OperationValue) MarshalJSON() ([]byte, error) {
9278	objectMap := make(map[string]interface{})
9279	if ov.OperationValueDisplay != nil {
9280		objectMap["display"] = ov.OperationValueDisplay
9281	}
9282	return json.Marshal(objectMap)
9283}
9284
9285// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
9286func (ov *OperationValue) UnmarshalJSON(body []byte) error {
9287	var m map[string]*json.RawMessage
9288	err := json.Unmarshal(body, &m)
9289	if err != nil {
9290		return err
9291	}
9292	for k, v := range m {
9293		switch k {
9294		case "origin":
9295			if v != nil {
9296				var origin string
9297				err = json.Unmarshal(*v, &origin)
9298				if err != nil {
9299					return err
9300				}
9301				ov.Origin = &origin
9302			}
9303		case "name":
9304			if v != nil {
9305				var name string
9306				err = json.Unmarshal(*v, &name)
9307				if err != nil {
9308					return err
9309				}
9310				ov.Name = &name
9311			}
9312		case "display":
9313			if v != nil {
9314				var operationValueDisplay OperationValueDisplay
9315				err = json.Unmarshal(*v, &operationValueDisplay)
9316				if err != nil {
9317					return err
9318				}
9319				ov.OperationValueDisplay = &operationValueDisplay
9320			}
9321		}
9322	}
9323
9324	return nil
9325}
9326
9327// OperationValueDisplay describes the properties of a Compute Operation Value Display.
9328type OperationValueDisplay struct {
9329	// Operation - READ-ONLY; The display name of the compute operation.
9330	Operation *string `json:"operation,omitempty"`
9331	// Resource - READ-ONLY; The display name of the resource the operation applies to.
9332	Resource *string `json:"resource,omitempty"`
9333	// Description - READ-ONLY; The description of the operation.
9334	Description *string `json:"description,omitempty"`
9335	// Provider - READ-ONLY; The resource provider for the operation.
9336	Provider *string `json:"provider,omitempty"`
9337}
9338
9339// MarshalJSON is the custom marshaler for OperationValueDisplay.
9340func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) {
9341	objectMap := make(map[string]interface{})
9342	return json.Marshal(objectMap)
9343}
9344
9345// OrchestrationServiceStateInput the input for OrchestrationServiceState
9346type OrchestrationServiceStateInput struct {
9347	// ServiceName - The name of the service. Possible values include: 'AutomaticRepairs'
9348	ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
9349	// Action - The action to be performed. Possible values include: 'Resume', 'Suspend'
9350	Action OrchestrationServiceStateAction `json:"action,omitempty"`
9351}
9352
9353// OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set.
9354type OrchestrationServiceSummary struct {
9355	// ServiceName - READ-ONLY; The name of the service. Possible values include: 'AutomaticRepairs', 'DummyOrchestrationServiceName'
9356	ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
9357	// ServiceState - READ-ONLY; The current state of the service. Possible values include: 'NotRunning', 'Running', 'Suspended'
9358	ServiceState OrchestrationServiceState `json:"serviceState,omitempty"`
9359}
9360
9361// MarshalJSON is the custom marshaler for OrchestrationServiceSummary.
9362func (oss OrchestrationServiceSummary) MarshalJSON() ([]byte, error) {
9363	objectMap := make(map[string]interface{})
9364	return json.Marshal(objectMap)
9365}
9366
9367// OSDisk specifies information about the operating system disk used by the virtual machine. <br><br> For
9368// more information about disks, see [About disks and VHDs for Azure virtual
9369// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
9370type OSDisk struct {
9371	// 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'
9372	OsType OperatingSystemTypes `json:"osType,omitempty"`
9373	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
9374	EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
9375	// Name - The disk name.
9376	Name *string `json:"name,omitempty"`
9377	// Vhd - The virtual hard disk.
9378	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
9379	// 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.
9380	Image *VirtualHardDisk `json:"image,omitempty"`
9381	// 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'
9382	Caching CachingTypes `json:"caching,omitempty"`
9383	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
9384	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
9385	// DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
9386	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
9387	// 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'
9388	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
9389	// 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
9390	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
9391	// ManagedDisk - The managed disk parameters.
9392	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
9393}
9394
9395// OSDiskImage contains the os disk image information.
9396type OSDiskImage struct {
9397	// OperatingSystem - The operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'
9398	OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"`
9399}
9400
9401// OSDiskImageEncryption contains encryption settings for an OS disk image.
9402type OSDiskImageEncryption struct {
9403	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
9404	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
9405}
9406
9407// OSProfile specifies the operating system settings for the virtual machine. Some of the settings cannot
9408// be changed once VM is provisioned.
9409type OSProfile struct {
9410	// 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).
9411	ComputerName *string `json:"computerName,omitempty"`
9412	// 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)
9413	AdminUsername *string `json:"adminUsername,omitempty"`
9414	// 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)
9415	AdminPassword *string `json:"adminPassword,omitempty"`
9416	// 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)
9417	CustomData *string `json:"customData,omitempty"`
9418	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
9419	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
9420	// 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).
9421	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
9422	// Secrets - Specifies set of certificates that should be installed onto the virtual machine.
9423	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
9424	// 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.
9425	AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"`
9426	// 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.**
9427	RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"`
9428}
9429
9430// PatchSettings ...
9431type PatchSettings struct {
9432	// 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: 'InGuestPatchModeManual', 'InGuestPatchModeAutomaticByOS', 'InGuestPatchModeAutomaticByPlatform'
9433	PatchMode InGuestPatchMode `json:"patchMode,omitempty"`
9434}
9435
9436// Plan specifies information about the marketplace image used to create the virtual machine. This element
9437// is only used for marketplace images. Before you can use a marketplace image from an API, you must enable
9438// the image for programmatic use.  In the Azure portal, find the marketplace image that you want to use
9439// and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and
9440// then click **Save**.
9441type Plan struct {
9442	// Name - The plan ID.
9443	Name *string `json:"name,omitempty"`
9444	// Publisher - The publisher ID.
9445	Publisher *string `json:"publisher,omitempty"`
9446	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
9447	Product *string `json:"product,omitempty"`
9448	// PromotionCode - The promotion code.
9449	PromotionCode *string `json:"promotionCode,omitempty"`
9450}
9451
9452// PrivateEndpoint the Private Endpoint resource.
9453type PrivateEndpoint struct {
9454	// ID - READ-ONLY; The ARM identifier for Private Endpoint
9455	ID *string `json:"id,omitempty"`
9456}
9457
9458// MarshalJSON is the custom marshaler for PrivateEndpoint.
9459func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
9460	objectMap := make(map[string]interface{})
9461	return json.Marshal(objectMap)
9462}
9463
9464// PrivateEndpointConnection the Private Endpoint Connection resource.
9465type PrivateEndpointConnection struct {
9466	autorest.Response `json:"-"`
9467	// PrivateEndpointConnectionProperties - Resource properties.
9468	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
9469	// ID - READ-ONLY; private endpoint connection Id
9470	ID *string `json:"id,omitempty"`
9471	// Name - READ-ONLY; private endpoint connection name
9472	Name *string `json:"name,omitempty"`
9473	// Type - READ-ONLY; private endpoint connection type
9474	Type *string `json:"type,omitempty"`
9475}
9476
9477// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
9478func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
9479	objectMap := make(map[string]interface{})
9480	if pec.PrivateEndpointConnectionProperties != nil {
9481		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
9482	}
9483	return json.Marshal(objectMap)
9484}
9485
9486// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
9487func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
9488	var m map[string]*json.RawMessage
9489	err := json.Unmarshal(body, &m)
9490	if err != nil {
9491		return err
9492	}
9493	for k, v := range m {
9494		switch k {
9495		case "properties":
9496			if v != nil {
9497				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
9498				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
9499				if err != nil {
9500					return err
9501				}
9502				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
9503			}
9504		case "id":
9505			if v != nil {
9506				var ID string
9507				err = json.Unmarshal(*v, &ID)
9508				if err != nil {
9509					return err
9510				}
9511				pec.ID = &ID
9512			}
9513		case "name":
9514			if v != nil {
9515				var name string
9516				err = json.Unmarshal(*v, &name)
9517				if err != nil {
9518					return err
9519				}
9520				pec.Name = &name
9521			}
9522		case "type":
9523			if v != nil {
9524				var typeVar string
9525				err = json.Unmarshal(*v, &typeVar)
9526				if err != nil {
9527					return err
9528				}
9529				pec.Type = &typeVar
9530			}
9531		}
9532	}
9533
9534	return nil
9535}
9536
9537// PrivateEndpointConnectionListResult a list of private link resources
9538type PrivateEndpointConnectionListResult struct {
9539	autorest.Response `json:"-"`
9540	// Value - Array of private endpoint connections
9541	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
9542	// NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
9543	NextLink *string `json:"nextLink,omitempty"`
9544}
9545
9546// PrivateEndpointConnectionListResultIterator provides access to a complete listing of
9547// PrivateEndpointConnection values.
9548type PrivateEndpointConnectionListResultIterator struct {
9549	i    int
9550	page PrivateEndpointConnectionListResultPage
9551}
9552
9553// NextWithContext advances to the next value.  If there was an error making
9554// the request the iterator does not advance and the error is returned.
9555func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
9556	if tracing.IsEnabled() {
9557		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext")
9558		defer func() {
9559			sc := -1
9560			if iter.Response().Response.Response != nil {
9561				sc = iter.Response().Response.Response.StatusCode
9562			}
9563			tracing.EndSpan(ctx, sc, err)
9564		}()
9565	}
9566	iter.i++
9567	if iter.i < len(iter.page.Values()) {
9568		return nil
9569	}
9570	err = iter.page.NextWithContext(ctx)
9571	if err != nil {
9572		iter.i--
9573		return err
9574	}
9575	iter.i = 0
9576	return nil
9577}
9578
9579// Next advances to the next value.  If there was an error making
9580// the request the iterator does not advance and the error is returned.
9581// Deprecated: Use NextWithContext() instead.
9582func (iter *PrivateEndpointConnectionListResultIterator) Next() error {
9583	return iter.NextWithContext(context.Background())
9584}
9585
9586// NotDone returns true if the enumeration should be started or is not yet complete.
9587func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool {
9588	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9589}
9590
9591// Response returns the raw server response from the last page request.
9592func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult {
9593	return iter.page.Response()
9594}
9595
9596// Value returns the current value or a zero-initialized value if the
9597// iterator has advanced beyond the end of the collection.
9598func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection {
9599	if !iter.page.NotDone() {
9600		return PrivateEndpointConnection{}
9601	}
9602	return iter.page.Values()[iter.i]
9603}
9604
9605// Creates a new instance of the PrivateEndpointConnectionListResultIterator type.
9606func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator {
9607	return PrivateEndpointConnectionListResultIterator{page: page}
9608}
9609
9610// IsEmpty returns true if the ListResult contains no values.
9611func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool {
9612	return peclr.Value == nil || len(*peclr.Value) == 0
9613}
9614
9615// hasNextLink returns true if the NextLink is not empty.
9616func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool {
9617	return peclr.NextLink != nil && len(*peclr.NextLink) != 0
9618}
9619
9620// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
9621// It returns nil if no more results exist.
9622func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
9623	if !peclr.hasNextLink() {
9624		return nil, nil
9625	}
9626	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9627		autorest.AsJSON(),
9628		autorest.AsGet(),
9629		autorest.WithBaseURL(to.String(peclr.NextLink)))
9630}
9631
9632// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values.
9633type PrivateEndpointConnectionListResultPage struct {
9634	fn    func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)
9635	peclr PrivateEndpointConnectionListResult
9636}
9637
9638// NextWithContext advances to the next page of values.  If there was an error making
9639// the request the page does not advance and the error is returned.
9640func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
9641	if tracing.IsEnabled() {
9642		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext")
9643		defer func() {
9644			sc := -1
9645			if page.Response().Response.Response != nil {
9646				sc = page.Response().Response.Response.StatusCode
9647			}
9648			tracing.EndSpan(ctx, sc, err)
9649		}()
9650	}
9651	for {
9652		next, err := page.fn(ctx, page.peclr)
9653		if err != nil {
9654			return err
9655		}
9656		page.peclr = next
9657		if !next.hasNextLink() || !next.IsEmpty() {
9658			break
9659		}
9660	}
9661	return nil
9662}
9663
9664// Next advances to the next page of values.  If there was an error making
9665// the request the page does not advance and the error is returned.
9666// Deprecated: Use NextWithContext() instead.
9667func (page *PrivateEndpointConnectionListResultPage) Next() error {
9668	return page.NextWithContext(context.Background())
9669}
9670
9671// NotDone returns true if the page enumeration should be started or is not yet complete.
9672func (page PrivateEndpointConnectionListResultPage) NotDone() bool {
9673	return !page.peclr.IsEmpty()
9674}
9675
9676// Response returns the raw server response from the last page request.
9677func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult {
9678	return page.peclr
9679}
9680
9681// Values returns the slice of values for the current page or nil if there are no values.
9682func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection {
9683	if page.peclr.IsEmpty() {
9684		return nil
9685	}
9686	return *page.peclr.Value
9687}
9688
9689// Creates a new instance of the PrivateEndpointConnectionListResultPage type.
9690func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage {
9691	return PrivateEndpointConnectionListResultPage{
9692		fn:    getNextPage,
9693		peclr: cur,
9694	}
9695}
9696
9697// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
9698type PrivateEndpointConnectionProperties struct {
9699	// PrivateEndpoint - The resource of private end point.
9700	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
9701	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between DiskAccess and Virtual Network.
9702	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
9703	// ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed'
9704	ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
9705}
9706
9707// PrivateLinkResource a private link resource
9708type PrivateLinkResource struct {
9709	// PrivateLinkResourceProperties - Resource properties.
9710	*PrivateLinkResourceProperties `json:"properties,omitempty"`
9711	// ID - READ-ONLY; private link resource Id
9712	ID *string `json:"id,omitempty"`
9713	// Name - READ-ONLY; private link resource name
9714	Name *string `json:"name,omitempty"`
9715	// Type - READ-ONLY; private link resource type
9716	Type *string `json:"type,omitempty"`
9717}
9718
9719// MarshalJSON is the custom marshaler for PrivateLinkResource.
9720func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
9721	objectMap := make(map[string]interface{})
9722	if plr.PrivateLinkResourceProperties != nil {
9723		objectMap["properties"] = plr.PrivateLinkResourceProperties
9724	}
9725	return json.Marshal(objectMap)
9726}
9727
9728// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
9729func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
9730	var m map[string]*json.RawMessage
9731	err := json.Unmarshal(body, &m)
9732	if err != nil {
9733		return err
9734	}
9735	for k, v := range m {
9736		switch k {
9737		case "properties":
9738			if v != nil {
9739				var privateLinkResourceProperties PrivateLinkResourceProperties
9740				err = json.Unmarshal(*v, &privateLinkResourceProperties)
9741				if err != nil {
9742					return err
9743				}
9744				plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
9745			}
9746		case "id":
9747			if v != nil {
9748				var ID string
9749				err = json.Unmarshal(*v, &ID)
9750				if err != nil {
9751					return err
9752				}
9753				plr.ID = &ID
9754			}
9755		case "name":
9756			if v != nil {
9757				var name string
9758				err = json.Unmarshal(*v, &name)
9759				if err != nil {
9760					return err
9761				}
9762				plr.Name = &name
9763			}
9764		case "type":
9765			if v != nil {
9766				var typeVar string
9767				err = json.Unmarshal(*v, &typeVar)
9768				if err != nil {
9769					return err
9770				}
9771				plr.Type = &typeVar
9772			}
9773		}
9774	}
9775
9776	return nil
9777}
9778
9779// PrivateLinkResourceListResult a list of private link resources
9780type PrivateLinkResourceListResult struct {
9781	autorest.Response `json:"-"`
9782	// Value - Array of private link resources
9783	Value *[]PrivateLinkResource `json:"value,omitempty"`
9784}
9785
9786// PrivateLinkResourceProperties properties of a private link resource.
9787type PrivateLinkResourceProperties struct {
9788	// GroupID - READ-ONLY; The private link resource group id.
9789	GroupID *string `json:"groupId,omitempty"`
9790	// RequiredMembers - READ-ONLY; The private link resource required member names.
9791	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
9792	// RequiredZoneNames - The private link resource DNS zone name.
9793	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
9794}
9795
9796// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
9797func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
9798	objectMap := make(map[string]interface{})
9799	if plrp.RequiredZoneNames != nil {
9800		objectMap["requiredZoneNames"] = plrp.RequiredZoneNames
9801	}
9802	return json.Marshal(objectMap)
9803}
9804
9805// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
9806// service consumer and provider.
9807type PrivateLinkServiceConnectionState struct {
9808	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected'
9809	Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
9810	// Description - The reason for approval/rejection of the connection.
9811	Description *string `json:"description,omitempty"`
9812	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
9813	ActionsRequired *string `json:"actionsRequired,omitempty"`
9814}
9815
9816// ProximityPlacementGroup specifies information about the proximity placement group.
9817type ProximityPlacementGroup struct {
9818	autorest.Response `json:"-"`
9819	// ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group.
9820	*ProximityPlacementGroupProperties `json:"properties,omitempty"`
9821	// ID - READ-ONLY; Resource Id
9822	ID *string `json:"id,omitempty"`
9823	// Name - READ-ONLY; Resource name
9824	Name *string `json:"name,omitempty"`
9825	// Type - READ-ONLY; Resource type
9826	Type *string `json:"type,omitempty"`
9827	// Location - Resource location
9828	Location *string `json:"location,omitempty"`
9829	// Tags - Resource tags
9830	Tags map[string]*string `json:"tags"`
9831}
9832
9833// MarshalJSON is the custom marshaler for ProximityPlacementGroup.
9834func (ppg ProximityPlacementGroup) MarshalJSON() ([]byte, error) {
9835	objectMap := make(map[string]interface{})
9836	if ppg.ProximityPlacementGroupProperties != nil {
9837		objectMap["properties"] = ppg.ProximityPlacementGroupProperties
9838	}
9839	if ppg.Location != nil {
9840		objectMap["location"] = ppg.Location
9841	}
9842	if ppg.Tags != nil {
9843		objectMap["tags"] = ppg.Tags
9844	}
9845	return json.Marshal(objectMap)
9846}
9847
9848// UnmarshalJSON is the custom unmarshaler for ProximityPlacementGroup struct.
9849func (ppg *ProximityPlacementGroup) UnmarshalJSON(body []byte) error {
9850	var m map[string]*json.RawMessage
9851	err := json.Unmarshal(body, &m)
9852	if err != nil {
9853		return err
9854	}
9855	for k, v := range m {
9856		switch k {
9857		case "properties":
9858			if v != nil {
9859				var proximityPlacementGroupProperties ProximityPlacementGroupProperties
9860				err = json.Unmarshal(*v, &proximityPlacementGroupProperties)
9861				if err != nil {
9862					return err
9863				}
9864				ppg.ProximityPlacementGroupProperties = &proximityPlacementGroupProperties
9865			}
9866		case "id":
9867			if v != nil {
9868				var ID string
9869				err = json.Unmarshal(*v, &ID)
9870				if err != nil {
9871					return err
9872				}
9873				ppg.ID = &ID
9874			}
9875		case "name":
9876			if v != nil {
9877				var name string
9878				err = json.Unmarshal(*v, &name)
9879				if err != nil {
9880					return err
9881				}
9882				ppg.Name = &name
9883			}
9884		case "type":
9885			if v != nil {
9886				var typeVar string
9887				err = json.Unmarshal(*v, &typeVar)
9888				if err != nil {
9889					return err
9890				}
9891				ppg.Type = &typeVar
9892			}
9893		case "location":
9894			if v != nil {
9895				var location string
9896				err = json.Unmarshal(*v, &location)
9897				if err != nil {
9898					return err
9899				}
9900				ppg.Location = &location
9901			}
9902		case "tags":
9903			if v != nil {
9904				var tags map[string]*string
9905				err = json.Unmarshal(*v, &tags)
9906				if err != nil {
9907					return err
9908				}
9909				ppg.Tags = tags
9910			}
9911		}
9912	}
9913
9914	return nil
9915}
9916
9917// ProximityPlacementGroupListResult the List Proximity Placement Group operation response.
9918type ProximityPlacementGroupListResult struct {
9919	autorest.Response `json:"-"`
9920	// Value - The list of proximity placement groups
9921	Value *[]ProximityPlacementGroup `json:"value,omitempty"`
9922	// NextLink - The URI to fetch the next page of proximity placement groups.
9923	NextLink *string `json:"nextLink,omitempty"`
9924}
9925
9926// ProximityPlacementGroupListResultIterator provides access to a complete listing of
9927// ProximityPlacementGroup values.
9928type ProximityPlacementGroupListResultIterator struct {
9929	i    int
9930	page ProximityPlacementGroupListResultPage
9931}
9932
9933// NextWithContext advances to the next value.  If there was an error making
9934// the request the iterator does not advance and the error is returned.
9935func (iter *ProximityPlacementGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
9936	if tracing.IsEnabled() {
9937		ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultIterator.NextWithContext")
9938		defer func() {
9939			sc := -1
9940			if iter.Response().Response.Response != nil {
9941				sc = iter.Response().Response.Response.StatusCode
9942			}
9943			tracing.EndSpan(ctx, sc, err)
9944		}()
9945	}
9946	iter.i++
9947	if iter.i < len(iter.page.Values()) {
9948		return nil
9949	}
9950	err = iter.page.NextWithContext(ctx)
9951	if err != nil {
9952		iter.i--
9953		return err
9954	}
9955	iter.i = 0
9956	return nil
9957}
9958
9959// Next advances to the next value.  If there was an error making
9960// the request the iterator does not advance and the error is returned.
9961// Deprecated: Use NextWithContext() instead.
9962func (iter *ProximityPlacementGroupListResultIterator) Next() error {
9963	return iter.NextWithContext(context.Background())
9964}
9965
9966// NotDone returns true if the enumeration should be started or is not yet complete.
9967func (iter ProximityPlacementGroupListResultIterator) NotDone() bool {
9968	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9969}
9970
9971// Response returns the raw server response from the last page request.
9972func (iter ProximityPlacementGroupListResultIterator) Response() ProximityPlacementGroupListResult {
9973	return iter.page.Response()
9974}
9975
9976// Value returns the current value or a zero-initialized value if the
9977// iterator has advanced beyond the end of the collection.
9978func (iter ProximityPlacementGroupListResultIterator) Value() ProximityPlacementGroup {
9979	if !iter.page.NotDone() {
9980		return ProximityPlacementGroup{}
9981	}
9982	return iter.page.Values()[iter.i]
9983}
9984
9985// Creates a new instance of the ProximityPlacementGroupListResultIterator type.
9986func NewProximityPlacementGroupListResultIterator(page ProximityPlacementGroupListResultPage) ProximityPlacementGroupListResultIterator {
9987	return ProximityPlacementGroupListResultIterator{page: page}
9988}
9989
9990// IsEmpty returns true if the ListResult contains no values.
9991func (ppglr ProximityPlacementGroupListResult) IsEmpty() bool {
9992	return ppglr.Value == nil || len(*ppglr.Value) == 0
9993}
9994
9995// hasNextLink returns true if the NextLink is not empty.
9996func (ppglr ProximityPlacementGroupListResult) hasNextLink() bool {
9997	return ppglr.NextLink != nil && len(*ppglr.NextLink) != 0
9998}
9999
10000// proximityPlacementGroupListResultPreparer prepares a request to retrieve the next set of results.
10001// It returns nil if no more results exist.
10002func (ppglr ProximityPlacementGroupListResult) proximityPlacementGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
10003	if !ppglr.hasNextLink() {
10004		return nil, nil
10005	}
10006	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10007		autorest.AsJSON(),
10008		autorest.AsGet(),
10009		autorest.WithBaseURL(to.String(ppglr.NextLink)))
10010}
10011
10012// ProximityPlacementGroupListResultPage contains a page of ProximityPlacementGroup values.
10013type ProximityPlacementGroupListResultPage struct {
10014	fn    func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)
10015	ppglr ProximityPlacementGroupListResult
10016}
10017
10018// NextWithContext advances to the next page of values.  If there was an error making
10019// the request the page does not advance and the error is returned.
10020func (page *ProximityPlacementGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
10021	if tracing.IsEnabled() {
10022		ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultPage.NextWithContext")
10023		defer func() {
10024			sc := -1
10025			if page.Response().Response.Response != nil {
10026				sc = page.Response().Response.Response.StatusCode
10027			}
10028			tracing.EndSpan(ctx, sc, err)
10029		}()
10030	}
10031	for {
10032		next, err := page.fn(ctx, page.ppglr)
10033		if err != nil {
10034			return err
10035		}
10036		page.ppglr = next
10037		if !next.hasNextLink() || !next.IsEmpty() {
10038			break
10039		}
10040	}
10041	return nil
10042}
10043
10044// Next advances to the next page of values.  If there was an error making
10045// the request the page does not advance and the error is returned.
10046// Deprecated: Use NextWithContext() instead.
10047func (page *ProximityPlacementGroupListResultPage) Next() error {
10048	return page.NextWithContext(context.Background())
10049}
10050
10051// NotDone returns true if the page enumeration should be started or is not yet complete.
10052func (page ProximityPlacementGroupListResultPage) NotDone() bool {
10053	return !page.ppglr.IsEmpty()
10054}
10055
10056// Response returns the raw server response from the last page request.
10057func (page ProximityPlacementGroupListResultPage) Response() ProximityPlacementGroupListResult {
10058	return page.ppglr
10059}
10060
10061// Values returns the slice of values for the current page or nil if there are no values.
10062func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementGroup {
10063	if page.ppglr.IsEmpty() {
10064		return nil
10065	}
10066	return *page.ppglr.Value
10067}
10068
10069// Creates a new instance of the ProximityPlacementGroupListResultPage type.
10070func NewProximityPlacementGroupListResultPage(cur ProximityPlacementGroupListResult, getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage {
10071	return ProximityPlacementGroupListResultPage{
10072		fn:    getNextPage,
10073		ppglr: cur,
10074	}
10075}
10076
10077// ProximityPlacementGroupProperties describes the properties of a Proximity Placement Group.
10078type ProximityPlacementGroupProperties struct {
10079	// 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'
10080	ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"`
10081	// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group.
10082	VirtualMachines *[]SubResourceWithColocationStatus `json:"virtualMachines,omitempty"`
10083	// VirtualMachineScaleSets - READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group.
10084	VirtualMachineScaleSets *[]SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty"`
10085	// AvailabilitySets - READ-ONLY; A list of references to all availability sets in the proximity placement group.
10086	AvailabilitySets *[]SubResourceWithColocationStatus `json:"availabilitySets,omitempty"`
10087	// ColocationStatus - Describes colocation status of the Proximity Placement Group.
10088	ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
10089}
10090
10091// MarshalJSON is the custom marshaler for ProximityPlacementGroupProperties.
10092func (ppgp ProximityPlacementGroupProperties) MarshalJSON() ([]byte, error) {
10093	objectMap := make(map[string]interface{})
10094	if ppgp.ProximityPlacementGroupType != "" {
10095		objectMap["proximityPlacementGroupType"] = ppgp.ProximityPlacementGroupType
10096	}
10097	if ppgp.ColocationStatus != nil {
10098		objectMap["colocationStatus"] = ppgp.ColocationStatus
10099	}
10100	return json.Marshal(objectMap)
10101}
10102
10103// ProximityPlacementGroupUpdate specifies information about the proximity placement group.
10104type ProximityPlacementGroupUpdate struct {
10105	// Tags - Resource tags
10106	Tags map[string]*string `json:"tags"`
10107}
10108
10109// MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate.
10110func (ppgu ProximityPlacementGroupUpdate) MarshalJSON() ([]byte, error) {
10111	objectMap := make(map[string]interface{})
10112	if ppgu.Tags != nil {
10113		objectMap["tags"] = ppgu.Tags
10114	}
10115	return json.Marshal(objectMap)
10116}
10117
10118// ProxyOnlyResource the ProxyOnly Resource model definition.
10119type ProxyOnlyResource struct {
10120	// ID - READ-ONLY; Resource Id
10121	ID *string `json:"id,omitempty"`
10122	// Name - READ-ONLY; Resource name
10123	Name *string `json:"name,omitempty"`
10124	// Type - READ-ONLY; Resource type
10125	Type *string `json:"type,omitempty"`
10126}
10127
10128// MarshalJSON is the custom marshaler for ProxyOnlyResource.
10129func (por ProxyOnlyResource) MarshalJSON() ([]byte, error) {
10130	objectMap := make(map[string]interface{})
10131	return json.Marshal(objectMap)
10132}
10133
10134// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
10135type PurchasePlan struct {
10136	// Publisher - The publisher ID.
10137	Publisher *string `json:"publisher,omitempty"`
10138	// Name - The plan ID.
10139	Name *string `json:"name,omitempty"`
10140	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
10141	Product *string `json:"product,omitempty"`
10142	// PromotionCode - The Offer Promotion Code.
10143	PromotionCode *string `json:"promotionCode,omitempty"`
10144}
10145
10146// ReadCloser ...
10147type ReadCloser struct {
10148	autorest.Response `json:"-"`
10149	Value             *io.ReadCloser `json:"value,omitempty"`
10150}
10151
10152// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this
10153// Image Definition. These properties are updatable.
10154type RecommendedMachineConfiguration struct {
10155	VCPUs  *ResourceRange `json:"vCPUs,omitempty"`
10156	Memory *ResourceRange `json:"memory,omitempty"`
10157}
10158
10159// RecoveryWalkResponse response after calling a manual recovery walk
10160type RecoveryWalkResponse struct {
10161	autorest.Response `json:"-"`
10162	// WalkPerformed - READ-ONLY; Whether the recovery walk was performed
10163	WalkPerformed *bool `json:"walkPerformed,omitempty"`
10164	// NextPlatformUpdateDomain - READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed
10165	NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"`
10166}
10167
10168// MarshalJSON is the custom marshaler for RecoveryWalkResponse.
10169func (rwr RecoveryWalkResponse) MarshalJSON() ([]byte, error) {
10170	objectMap := make(map[string]interface{})
10171	return json.Marshal(objectMap)
10172}
10173
10174// RegionalReplicationStatus this is the regional replication status.
10175type RegionalReplicationStatus struct {
10176	// Region - READ-ONLY; The region to which the gallery Image Version is being replicated to.
10177	Region *string `json:"region,omitempty"`
10178	// State - READ-ONLY; This is the regional replication state. Possible values include: 'ReplicationStateUnknown', 'ReplicationStateReplicating', 'ReplicationStateCompleted', 'ReplicationStateFailed'
10179	State ReplicationState `json:"state,omitempty"`
10180	// Details - READ-ONLY; The details of the replication status.
10181	Details *string `json:"details,omitempty"`
10182	// Progress - READ-ONLY; It indicates progress of the replication job.
10183	Progress *int32 `json:"progress,omitempty"`
10184}
10185
10186// MarshalJSON is the custom marshaler for RegionalReplicationStatus.
10187func (rrs RegionalReplicationStatus) MarshalJSON() ([]byte, error) {
10188	objectMap := make(map[string]interface{})
10189	return json.Marshal(objectMap)
10190}
10191
10192// ReplicationStatus this is the replication status of the gallery Image Version.
10193type ReplicationStatus struct {
10194	// AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed'
10195	AggregatedState AggregatedReplicationState `json:"aggregatedState,omitempty"`
10196	// Summary - READ-ONLY; This is a summary of replication status for each region.
10197	Summary *[]RegionalReplicationStatus `json:"summary,omitempty"`
10198}
10199
10200// MarshalJSON is the custom marshaler for ReplicationStatus.
10201func (rs ReplicationStatus) MarshalJSON() ([]byte, error) {
10202	objectMap := make(map[string]interface{})
10203	return json.Marshal(objectMap)
10204}
10205
10206// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api.
10207type RequestRateByIntervalInput struct {
10208	// IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'
10209	IntervalLength IntervalInMins `json:"intervalLength,omitempty"`
10210	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
10211	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
10212	// FromTime - From time of the query
10213	FromTime *date.Time `json:"fromTime,omitempty"`
10214	// ToTime - To time of the query
10215	ToTime *date.Time `json:"toTime,omitempty"`
10216	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
10217	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
10218	// GroupByOperationName - Group query result by Operation Name.
10219	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
10220	// GroupByResourceName - Group query result by Resource Name.
10221	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
10222	// GroupByClientApplicationID - Group query result by Client Application ID.
10223	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
10224	// GroupByUserAgent - Group query result by User Agent.
10225	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
10226}
10227
10228// Resource the Resource model definition.
10229type Resource struct {
10230	// ID - READ-ONLY; Resource Id
10231	ID *string `json:"id,omitempty"`
10232	// Name - READ-ONLY; Resource name
10233	Name *string `json:"name,omitempty"`
10234	// Type - READ-ONLY; Resource type
10235	Type *string `json:"type,omitempty"`
10236	// Location - Resource location
10237	Location *string `json:"location,omitempty"`
10238	// Tags - Resource tags
10239	Tags map[string]*string `json:"tags"`
10240}
10241
10242// MarshalJSON is the custom marshaler for Resource.
10243func (r Resource) MarshalJSON() ([]byte, error) {
10244	objectMap := make(map[string]interface{})
10245	if r.Location != nil {
10246		objectMap["location"] = r.Location
10247	}
10248	if r.Tags != nil {
10249		objectMap["tags"] = r.Tags
10250	}
10251	return json.Marshal(objectMap)
10252}
10253
10254// ResourceInstanceViewStatus instance view status.
10255type ResourceInstanceViewStatus struct {
10256	// Code - READ-ONLY; The status code.
10257	Code *string `json:"code,omitempty"`
10258	// DisplayStatus - READ-ONLY; The short localizable label for the status.
10259	DisplayStatus *string `json:"displayStatus,omitempty"`
10260	// Message - READ-ONLY; The detailed status message, including for alerts and error messages.
10261	Message *string `json:"message,omitempty"`
10262	// Time - READ-ONLY; The time of the status.
10263	Time *date.Time `json:"time,omitempty"`
10264	// Level - The level code. Possible values include: 'Info', 'Warning', 'Error'
10265	Level StatusLevelTypes `json:"level,omitempty"`
10266}
10267
10268// MarshalJSON is the custom marshaler for ResourceInstanceViewStatus.
10269func (rivs ResourceInstanceViewStatus) MarshalJSON() ([]byte, error) {
10270	objectMap := make(map[string]interface{})
10271	if rivs.Level != "" {
10272		objectMap["level"] = rivs.Level
10273	}
10274	return json.Marshal(objectMap)
10275}
10276
10277// ResourceRange describes the resource range.
10278type ResourceRange struct {
10279	// Min - The minimum number of the resource.
10280	Min *int32 `json:"min,omitempty"`
10281	// Max - The maximum number of the resource.
10282	Max *int32 `json:"max,omitempty"`
10283}
10284
10285// ResourceSku describes an available Compute SKU.
10286type ResourceSku struct {
10287	// ResourceType - READ-ONLY; The type of resource the SKU applies to.
10288	ResourceType *string `json:"resourceType,omitempty"`
10289	// Name - READ-ONLY; The name of SKU.
10290	Name *string `json:"name,omitempty"`
10291	// Tier - READ-ONLY; Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
10292	Tier *string `json:"tier,omitempty"`
10293	// Size - READ-ONLY; The Size of the SKU.
10294	Size *string `json:"size,omitempty"`
10295	// Family - READ-ONLY; The Family of this particular SKU.
10296	Family *string `json:"family,omitempty"`
10297	// Kind - READ-ONLY; The Kind of resources that are supported in this SKU.
10298	Kind *string `json:"kind,omitempty"`
10299	// Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
10300	Capacity *ResourceSkuCapacity `json:"capacity,omitempty"`
10301	// Locations - READ-ONLY; The set of locations that the SKU is available.
10302	Locations *[]string `json:"locations,omitempty"`
10303	// LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
10304	LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
10305	// APIVersions - READ-ONLY; The api versions that support this SKU.
10306	APIVersions *[]string `json:"apiVersions,omitempty"`
10307	// Costs - READ-ONLY; Metadata for retrieving price info.
10308	Costs *[]ResourceSkuCosts `json:"costs,omitempty"`
10309	// Capabilities - READ-ONLY; A name value pair to describe the capability.
10310	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
10311	// Restrictions - READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
10312	Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
10313}
10314
10315// MarshalJSON is the custom marshaler for ResourceSku.
10316func (rs ResourceSku) MarshalJSON() ([]byte, error) {
10317	objectMap := make(map[string]interface{})
10318	return json.Marshal(objectMap)
10319}
10320
10321// ResourceSkuCapabilities describes The SKU capabilities object.
10322type ResourceSkuCapabilities struct {
10323	// Name - READ-ONLY; An invariant to describe the feature.
10324	Name *string `json:"name,omitempty"`
10325	// Value - READ-ONLY; An invariant if the feature is measured by quantity.
10326	Value *string `json:"value,omitempty"`
10327}
10328
10329// MarshalJSON is the custom marshaler for ResourceSkuCapabilities.
10330func (rsc ResourceSkuCapabilities) MarshalJSON() ([]byte, error) {
10331	objectMap := make(map[string]interface{})
10332	return json.Marshal(objectMap)
10333}
10334
10335// ResourceSkuCapacity describes scaling information of a SKU.
10336type ResourceSkuCapacity struct {
10337	// Minimum - READ-ONLY; The minimum capacity.
10338	Minimum *int64 `json:"minimum,omitempty"`
10339	// Maximum - READ-ONLY; The maximum capacity that can be set.
10340	Maximum *int64 `json:"maximum,omitempty"`
10341	// Default - READ-ONLY; The default capacity.
10342	Default *int64 `json:"default,omitempty"`
10343	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone'
10344	ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
10345}
10346
10347// MarshalJSON is the custom marshaler for ResourceSkuCapacity.
10348func (rsc ResourceSkuCapacity) MarshalJSON() ([]byte, error) {
10349	objectMap := make(map[string]interface{})
10350	return json.Marshal(objectMap)
10351}
10352
10353// ResourceSkuCosts describes metadata for retrieving price info.
10354type ResourceSkuCosts struct {
10355	// MeterID - READ-ONLY; Used for querying price from commerce.
10356	MeterID *string `json:"meterID,omitempty"`
10357	// Quantity - READ-ONLY; The multiplier is needed to extend the base metered cost.
10358	Quantity *int64 `json:"quantity,omitempty"`
10359	// ExtendedUnit - READ-ONLY; An invariant to show the extended unit.
10360	ExtendedUnit *string `json:"extendedUnit,omitempty"`
10361}
10362
10363// MarshalJSON is the custom marshaler for ResourceSkuCosts.
10364func (rsc ResourceSkuCosts) MarshalJSON() ([]byte, error) {
10365	objectMap := make(map[string]interface{})
10366	return json.Marshal(objectMap)
10367}
10368
10369// ResourceSkuLocationInfo ...
10370type ResourceSkuLocationInfo struct {
10371	// Location - READ-ONLY; Location of the SKU
10372	Location *string `json:"location,omitempty"`
10373	// Zones - READ-ONLY; List of availability zones where the SKU is supported.
10374	Zones *[]string `json:"zones,omitempty"`
10375	// ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones.
10376	ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
10377}
10378
10379// MarshalJSON is the custom marshaler for ResourceSkuLocationInfo.
10380func (rsli ResourceSkuLocationInfo) MarshalJSON() ([]byte, error) {
10381	objectMap := make(map[string]interface{})
10382	return json.Marshal(objectMap)
10383}
10384
10385// ResourceSkuRestrictionInfo ...
10386type ResourceSkuRestrictionInfo struct {
10387	// Locations - READ-ONLY; Locations where the SKU is restricted
10388	Locations *[]string `json:"locations,omitempty"`
10389	// Zones - READ-ONLY; List of availability zones where the SKU is restricted.
10390	Zones *[]string `json:"zones,omitempty"`
10391}
10392
10393// MarshalJSON is the custom marshaler for ResourceSkuRestrictionInfo.
10394func (rsri ResourceSkuRestrictionInfo) MarshalJSON() ([]byte, error) {
10395	objectMap := make(map[string]interface{})
10396	return json.Marshal(objectMap)
10397}
10398
10399// ResourceSkuRestrictions describes scaling information of a SKU.
10400type ResourceSkuRestrictions struct {
10401	// Type - READ-ONLY; The type of restrictions. Possible values include: 'Location', 'Zone'
10402	Type ResourceSkuRestrictionsType `json:"type,omitempty"`
10403	// 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.
10404	Values *[]string `json:"values,omitempty"`
10405	// RestrictionInfo - READ-ONLY; The information about the restriction where the SKU cannot be used.
10406	RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"`
10407	// ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription'
10408	ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
10409}
10410
10411// MarshalJSON is the custom marshaler for ResourceSkuRestrictions.
10412func (rsr ResourceSkuRestrictions) MarshalJSON() ([]byte, error) {
10413	objectMap := make(map[string]interface{})
10414	return json.Marshal(objectMap)
10415}
10416
10417// ResourceSkusResult the List Resource Skus operation response.
10418type ResourceSkusResult struct {
10419	autorest.Response `json:"-"`
10420	// Value - The list of skus available for the subscription.
10421	Value *[]ResourceSku `json:"value,omitempty"`
10422	// NextLink - The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus
10423	NextLink *string `json:"nextLink,omitempty"`
10424}
10425
10426// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values.
10427type ResourceSkusResultIterator struct {
10428	i    int
10429	page ResourceSkusResultPage
10430}
10431
10432// NextWithContext advances to the next value.  If there was an error making
10433// the request the iterator does not advance and the error is returned.
10434func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
10435	if tracing.IsEnabled() {
10436		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext")
10437		defer func() {
10438			sc := -1
10439			if iter.Response().Response.Response != nil {
10440				sc = iter.Response().Response.Response.StatusCode
10441			}
10442			tracing.EndSpan(ctx, sc, err)
10443		}()
10444	}
10445	iter.i++
10446	if iter.i < len(iter.page.Values()) {
10447		return nil
10448	}
10449	err = iter.page.NextWithContext(ctx)
10450	if err != nil {
10451		iter.i--
10452		return err
10453	}
10454	iter.i = 0
10455	return nil
10456}
10457
10458// Next advances to the next value.  If there was an error making
10459// the request the iterator does not advance and the error is returned.
10460// Deprecated: Use NextWithContext() instead.
10461func (iter *ResourceSkusResultIterator) Next() error {
10462	return iter.NextWithContext(context.Background())
10463}
10464
10465// NotDone returns true if the enumeration should be started or is not yet complete.
10466func (iter ResourceSkusResultIterator) NotDone() bool {
10467	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10468}
10469
10470// Response returns the raw server response from the last page request.
10471func (iter ResourceSkusResultIterator) Response() ResourceSkusResult {
10472	return iter.page.Response()
10473}
10474
10475// Value returns the current value or a zero-initialized value if the
10476// iterator has advanced beyond the end of the collection.
10477func (iter ResourceSkusResultIterator) Value() ResourceSku {
10478	if !iter.page.NotDone() {
10479		return ResourceSku{}
10480	}
10481	return iter.page.Values()[iter.i]
10482}
10483
10484// Creates a new instance of the ResourceSkusResultIterator type.
10485func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator {
10486	return ResourceSkusResultIterator{page: page}
10487}
10488
10489// IsEmpty returns true if the ListResult contains no values.
10490func (rsr ResourceSkusResult) IsEmpty() bool {
10491	return rsr.Value == nil || len(*rsr.Value) == 0
10492}
10493
10494// hasNextLink returns true if the NextLink is not empty.
10495func (rsr ResourceSkusResult) hasNextLink() bool {
10496	return rsr.NextLink != nil && len(*rsr.NextLink) != 0
10497}
10498
10499// resourceSkusResultPreparer prepares a request to retrieve the next set of results.
10500// It returns nil if no more results exist.
10501func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) {
10502	if !rsr.hasNextLink() {
10503		return nil, nil
10504	}
10505	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10506		autorest.AsJSON(),
10507		autorest.AsGet(),
10508		autorest.WithBaseURL(to.String(rsr.NextLink)))
10509}
10510
10511// ResourceSkusResultPage contains a page of ResourceSku values.
10512type ResourceSkusResultPage struct {
10513	fn  func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)
10514	rsr ResourceSkusResult
10515}
10516
10517// NextWithContext advances to the next page of values.  If there was an error making
10518// the request the page does not advance and the error is returned.
10519func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) {
10520	if tracing.IsEnabled() {
10521		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext")
10522		defer func() {
10523			sc := -1
10524			if page.Response().Response.Response != nil {
10525				sc = page.Response().Response.Response.StatusCode
10526			}
10527			tracing.EndSpan(ctx, sc, err)
10528		}()
10529	}
10530	for {
10531		next, err := page.fn(ctx, page.rsr)
10532		if err != nil {
10533			return err
10534		}
10535		page.rsr = next
10536		if !next.hasNextLink() || !next.IsEmpty() {
10537			break
10538		}
10539	}
10540	return nil
10541}
10542
10543// Next advances to the next page of values.  If there was an error making
10544// the request the page does not advance and the error is returned.
10545// Deprecated: Use NextWithContext() instead.
10546func (page *ResourceSkusResultPage) Next() error {
10547	return page.NextWithContext(context.Background())
10548}
10549
10550// NotDone returns true if the page enumeration should be started or is not yet complete.
10551func (page ResourceSkusResultPage) NotDone() bool {
10552	return !page.rsr.IsEmpty()
10553}
10554
10555// Response returns the raw server response from the last page request.
10556func (page ResourceSkusResultPage) Response() ResourceSkusResult {
10557	return page.rsr
10558}
10559
10560// Values returns the slice of values for the current page or nil if there are no values.
10561func (page ResourceSkusResultPage) Values() []ResourceSku {
10562	if page.rsr.IsEmpty() {
10563		return nil
10564	}
10565	return *page.rsr.Value
10566}
10567
10568// Creates a new instance of the ResourceSkusResultPage type.
10569func NewResourceSkusResultPage(cur ResourceSkusResult, getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
10570	return ResourceSkusResultPage{
10571		fn:  getNextPage,
10572		rsr: cur,
10573	}
10574}
10575
10576// ResourceSkuZoneDetails describes The zonal capabilities of a SKU.
10577type ResourceSkuZoneDetails struct {
10578	// Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
10579	Name *[]string `json:"name,omitempty"`
10580	// Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
10581	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
10582}
10583
10584// MarshalJSON is the custom marshaler for ResourceSkuZoneDetails.
10585func (rszd ResourceSkuZoneDetails) MarshalJSON() ([]byte, error) {
10586	objectMap := make(map[string]interface{})
10587	return json.Marshal(objectMap)
10588}
10589
10590// ResourceURIList the List resources which are encrypted with the disk encryption set.
10591type ResourceURIList struct {
10592	autorest.Response `json:"-"`
10593	// Value - A list of IDs or Owner IDs of resources which are encrypted with the disk encryption set.
10594	Value *[]string `json:"value,omitempty"`
10595	// NextLink - The uri to fetch the next page of encrypted resources. Call ListNext() with this to fetch the next page of encrypted resources.
10596	NextLink *string `json:"nextLink,omitempty"`
10597}
10598
10599// ResourceURIListIterator provides access to a complete listing of string values.
10600type ResourceURIListIterator struct {
10601	i    int
10602	page ResourceURIListPage
10603}
10604
10605// NextWithContext advances to the next value.  If there was an error making
10606// the request the iterator does not advance and the error is returned.
10607func (iter *ResourceURIListIterator) NextWithContext(ctx context.Context) (err error) {
10608	if tracing.IsEnabled() {
10609		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListIterator.NextWithContext")
10610		defer func() {
10611			sc := -1
10612			if iter.Response().Response.Response != nil {
10613				sc = iter.Response().Response.Response.StatusCode
10614			}
10615			tracing.EndSpan(ctx, sc, err)
10616		}()
10617	}
10618	iter.i++
10619	if iter.i < len(iter.page.Values()) {
10620		return nil
10621	}
10622	err = iter.page.NextWithContext(ctx)
10623	if err != nil {
10624		iter.i--
10625		return err
10626	}
10627	iter.i = 0
10628	return nil
10629}
10630
10631// Next advances to the next value.  If there was an error making
10632// the request the iterator does not advance and the error is returned.
10633// Deprecated: Use NextWithContext() instead.
10634func (iter *ResourceURIListIterator) Next() error {
10635	return iter.NextWithContext(context.Background())
10636}
10637
10638// NotDone returns true if the enumeration should be started or is not yet complete.
10639func (iter ResourceURIListIterator) NotDone() bool {
10640	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10641}
10642
10643// Response returns the raw server response from the last page request.
10644func (iter ResourceURIListIterator) Response() ResourceURIList {
10645	return iter.page.Response()
10646}
10647
10648// Value returns the current value or a zero-initialized value if the
10649// iterator has advanced beyond the end of the collection.
10650func (iter ResourceURIListIterator) Value() string {
10651	if !iter.page.NotDone() {
10652		return ""
10653	}
10654	return iter.page.Values()[iter.i]
10655}
10656
10657// Creates a new instance of the ResourceURIListIterator type.
10658func NewResourceURIListIterator(page ResourceURIListPage) ResourceURIListIterator {
10659	return ResourceURIListIterator{page: page}
10660}
10661
10662// IsEmpty returns true if the ListResult contains no values.
10663func (rul ResourceURIList) IsEmpty() bool {
10664	return rul.Value == nil || len(*rul.Value) == 0
10665}
10666
10667// hasNextLink returns true if the NextLink is not empty.
10668func (rul ResourceURIList) hasNextLink() bool {
10669	return rul.NextLink != nil && len(*rul.NextLink) != 0
10670}
10671
10672// resourceURIListPreparer prepares a request to retrieve the next set of results.
10673// It returns nil if no more results exist.
10674func (rul ResourceURIList) resourceURIListPreparer(ctx context.Context) (*http.Request, error) {
10675	if !rul.hasNextLink() {
10676		return nil, nil
10677	}
10678	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10679		autorest.AsJSON(),
10680		autorest.AsGet(),
10681		autorest.WithBaseURL(to.String(rul.NextLink)))
10682}
10683
10684// ResourceURIListPage contains a page of string values.
10685type ResourceURIListPage struct {
10686	fn  func(context.Context, ResourceURIList) (ResourceURIList, error)
10687	rul ResourceURIList
10688}
10689
10690// NextWithContext advances to the next page of values.  If there was an error making
10691// the request the page does not advance and the error is returned.
10692func (page *ResourceURIListPage) NextWithContext(ctx context.Context) (err error) {
10693	if tracing.IsEnabled() {
10694		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListPage.NextWithContext")
10695		defer func() {
10696			sc := -1
10697			if page.Response().Response.Response != nil {
10698				sc = page.Response().Response.Response.StatusCode
10699			}
10700			tracing.EndSpan(ctx, sc, err)
10701		}()
10702	}
10703	for {
10704		next, err := page.fn(ctx, page.rul)
10705		if err != nil {
10706			return err
10707		}
10708		page.rul = next
10709		if !next.hasNextLink() || !next.IsEmpty() {
10710			break
10711		}
10712	}
10713	return nil
10714}
10715
10716// Next advances to the next page of values.  If there was an error making
10717// the request the page does not advance and the error is returned.
10718// Deprecated: Use NextWithContext() instead.
10719func (page *ResourceURIListPage) Next() error {
10720	return page.NextWithContext(context.Background())
10721}
10722
10723// NotDone returns true if the page enumeration should be started or is not yet complete.
10724func (page ResourceURIListPage) NotDone() bool {
10725	return !page.rul.IsEmpty()
10726}
10727
10728// Response returns the raw server response from the last page request.
10729func (page ResourceURIListPage) Response() ResourceURIList {
10730	return page.rul
10731}
10732
10733// Values returns the slice of values for the current page or nil if there are no values.
10734func (page ResourceURIListPage) Values() []string {
10735	if page.rul.IsEmpty() {
10736		return nil
10737	}
10738	return *page.rul.Value
10739}
10740
10741// Creates a new instance of the ResourceURIListPage type.
10742func NewResourceURIListPage(cur ResourceURIList, getNextPage func(context.Context, ResourceURIList) (ResourceURIList, error)) ResourceURIListPage {
10743	return ResourceURIListPage{
10744		fn:  getNextPage,
10745		rul: cur,
10746	}
10747}
10748
10749// RetrieveBootDiagnosticsDataResult the SAS URIs of the console screenshot and serial log blobs.
10750type RetrieveBootDiagnosticsDataResult struct {
10751	autorest.Response `json:"-"`
10752	// ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI
10753	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
10754	// SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob URI.
10755	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
10756}
10757
10758// MarshalJSON is the custom marshaler for RetrieveBootDiagnosticsDataResult.
10759func (rbddr RetrieveBootDiagnosticsDataResult) MarshalJSON() ([]byte, error) {
10760	objectMap := make(map[string]interface{})
10761	return json.Marshal(objectMap)
10762}
10763
10764// RoleInstance ...
10765type RoleInstance struct {
10766	autorest.Response `json:"-"`
10767	// ID - READ-ONLY; Resource Id
10768	ID *string `json:"id,omitempty"`
10769	// Name - READ-ONLY; Resource Name.
10770	Name *string `json:"name,omitempty"`
10771	// Type - READ-ONLY; Resource Type.
10772	Type *string `json:"type,omitempty"`
10773	// Location - READ-ONLY; Resource Location.
10774	Location *string `json:"location,omitempty"`
10775	// Tags - READ-ONLY; Resource tags.
10776	Tags       map[string]*string      `json:"tags"`
10777	Sku        *InstanceSku            `json:"sku,omitempty"`
10778	Properties *RoleInstanceProperties `json:"properties,omitempty"`
10779}
10780
10781// MarshalJSON is the custom marshaler for RoleInstance.
10782func (ri RoleInstance) MarshalJSON() ([]byte, error) {
10783	objectMap := make(map[string]interface{})
10784	if ri.Sku != nil {
10785		objectMap["sku"] = ri.Sku
10786	}
10787	if ri.Properties != nil {
10788		objectMap["properties"] = ri.Properties
10789	}
10790	return json.Marshal(objectMap)
10791}
10792
10793// RoleInstanceInstanceView the instance view of the role instance.
10794type RoleInstanceInstanceView struct {
10795	autorest.Response `json:"-"`
10796	// PlatformUpdateDomain - READ-ONLY; The Update Domain.
10797	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
10798	// PlatformFaultDomain - READ-ONLY; The Fault Domain.
10799	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
10800	// PrivateID - READ-ONLY; Specifies a unique identifier generated internally for the cloud service associated with this role instance. <br /><br /> NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.
10801	PrivateID *string `json:"privateId,omitempty"`
10802	// Statuses - READ-ONLY
10803	Statuses *[]ResourceInstanceViewStatus `json:"statuses,omitempty"`
10804}
10805
10806// MarshalJSON is the custom marshaler for RoleInstanceInstanceView.
10807func (riiv RoleInstanceInstanceView) MarshalJSON() ([]byte, error) {
10808	objectMap := make(map[string]interface{})
10809	return json.Marshal(objectMap)
10810}
10811
10812// RoleInstanceListResult ...
10813type RoleInstanceListResult struct {
10814	autorest.Response `json:"-"`
10815	Value             *[]RoleInstance `json:"value,omitempty"`
10816	NextLink          *string         `json:"nextLink,omitempty"`
10817}
10818
10819// RoleInstanceListResultIterator provides access to a complete listing of RoleInstance values.
10820type RoleInstanceListResultIterator struct {
10821	i    int
10822	page RoleInstanceListResultPage
10823}
10824
10825// NextWithContext advances to the next value.  If there was an error making
10826// the request the iterator does not advance and the error is returned.
10827func (iter *RoleInstanceListResultIterator) NextWithContext(ctx context.Context) (err error) {
10828	if tracing.IsEnabled() {
10829		ctx = tracing.StartSpan(ctx, fqdn+"/RoleInstanceListResultIterator.NextWithContext")
10830		defer func() {
10831			sc := -1
10832			if iter.Response().Response.Response != nil {
10833				sc = iter.Response().Response.Response.StatusCode
10834			}
10835			tracing.EndSpan(ctx, sc, err)
10836		}()
10837	}
10838	iter.i++
10839	if iter.i < len(iter.page.Values()) {
10840		return nil
10841	}
10842	err = iter.page.NextWithContext(ctx)
10843	if err != nil {
10844		iter.i--
10845		return err
10846	}
10847	iter.i = 0
10848	return nil
10849}
10850
10851// Next advances to the next value.  If there was an error making
10852// the request the iterator does not advance and the error is returned.
10853// Deprecated: Use NextWithContext() instead.
10854func (iter *RoleInstanceListResultIterator) Next() error {
10855	return iter.NextWithContext(context.Background())
10856}
10857
10858// NotDone returns true if the enumeration should be started or is not yet complete.
10859func (iter RoleInstanceListResultIterator) NotDone() bool {
10860	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10861}
10862
10863// Response returns the raw server response from the last page request.
10864func (iter RoleInstanceListResultIterator) Response() RoleInstanceListResult {
10865	return iter.page.Response()
10866}
10867
10868// Value returns the current value or a zero-initialized value if the
10869// iterator has advanced beyond the end of the collection.
10870func (iter RoleInstanceListResultIterator) Value() RoleInstance {
10871	if !iter.page.NotDone() {
10872		return RoleInstance{}
10873	}
10874	return iter.page.Values()[iter.i]
10875}
10876
10877// Creates a new instance of the RoleInstanceListResultIterator type.
10878func NewRoleInstanceListResultIterator(page RoleInstanceListResultPage) RoleInstanceListResultIterator {
10879	return RoleInstanceListResultIterator{page: page}
10880}
10881
10882// IsEmpty returns true if the ListResult contains no values.
10883func (rilr RoleInstanceListResult) IsEmpty() bool {
10884	return rilr.Value == nil || len(*rilr.Value) == 0
10885}
10886
10887// hasNextLink returns true if the NextLink is not empty.
10888func (rilr RoleInstanceListResult) hasNextLink() bool {
10889	return rilr.NextLink != nil && len(*rilr.NextLink) != 0
10890}
10891
10892// roleInstanceListResultPreparer prepares a request to retrieve the next set of results.
10893// It returns nil if no more results exist.
10894func (rilr RoleInstanceListResult) roleInstanceListResultPreparer(ctx context.Context) (*http.Request, error) {
10895	if !rilr.hasNextLink() {
10896		return nil, nil
10897	}
10898	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10899		autorest.AsJSON(),
10900		autorest.AsGet(),
10901		autorest.WithBaseURL(to.String(rilr.NextLink)))
10902}
10903
10904// RoleInstanceListResultPage contains a page of RoleInstance values.
10905type RoleInstanceListResultPage struct {
10906	fn   func(context.Context, RoleInstanceListResult) (RoleInstanceListResult, error)
10907	rilr RoleInstanceListResult
10908}
10909
10910// NextWithContext advances to the next page of values.  If there was an error making
10911// the request the page does not advance and the error is returned.
10912func (page *RoleInstanceListResultPage) NextWithContext(ctx context.Context) (err error) {
10913	if tracing.IsEnabled() {
10914		ctx = tracing.StartSpan(ctx, fqdn+"/RoleInstanceListResultPage.NextWithContext")
10915		defer func() {
10916			sc := -1
10917			if page.Response().Response.Response != nil {
10918				sc = page.Response().Response.Response.StatusCode
10919			}
10920			tracing.EndSpan(ctx, sc, err)
10921		}()
10922	}
10923	for {
10924		next, err := page.fn(ctx, page.rilr)
10925		if err != nil {
10926			return err
10927		}
10928		page.rilr = next
10929		if !next.hasNextLink() || !next.IsEmpty() {
10930			break
10931		}
10932	}
10933	return nil
10934}
10935
10936// Next advances to the next page of values.  If there was an error making
10937// the request the page does not advance and the error is returned.
10938// Deprecated: Use NextWithContext() instead.
10939func (page *RoleInstanceListResultPage) Next() error {
10940	return page.NextWithContext(context.Background())
10941}
10942
10943// NotDone returns true if the page enumeration should be started or is not yet complete.
10944func (page RoleInstanceListResultPage) NotDone() bool {
10945	return !page.rilr.IsEmpty()
10946}
10947
10948// Response returns the raw server response from the last page request.
10949func (page RoleInstanceListResultPage) Response() RoleInstanceListResult {
10950	return page.rilr
10951}
10952
10953// Values returns the slice of values for the current page or nil if there are no values.
10954func (page RoleInstanceListResultPage) Values() []RoleInstance {
10955	if page.rilr.IsEmpty() {
10956		return nil
10957	}
10958	return *page.rilr.Value
10959}
10960
10961// Creates a new instance of the RoleInstanceListResultPage type.
10962func NewRoleInstanceListResultPage(cur RoleInstanceListResult, getNextPage func(context.Context, RoleInstanceListResult) (RoleInstanceListResult, error)) RoleInstanceListResultPage {
10963	return RoleInstanceListResultPage{
10964		fn:   getNextPage,
10965		rilr: cur,
10966	}
10967}
10968
10969// RoleInstanceNetworkProfile describes the network profile for the role instance.
10970type RoleInstanceNetworkProfile struct {
10971	// NetworkInterfaces - READ-ONLY; Specifies the list of resource Ids for the network interfaces associated with the role instance.
10972	NetworkInterfaces *[]SubResource `json:"networkInterfaces,omitempty"`
10973}
10974
10975// MarshalJSON is the custom marshaler for RoleInstanceNetworkProfile.
10976func (rinp RoleInstanceNetworkProfile) MarshalJSON() ([]byte, error) {
10977	objectMap := make(map[string]interface{})
10978	return json.Marshal(objectMap)
10979}
10980
10981// RoleInstanceProperties ...
10982type RoleInstanceProperties struct {
10983	NetworkProfile *RoleInstanceNetworkProfile `json:"networkProfile,omitempty"`
10984	InstanceView   *RoleInstanceInstanceView   `json:"instanceView,omitempty"`
10985}
10986
10987// RoleInstances specifies a list of role instances from the cloud service.
10988type RoleInstances struct {
10989	// RoleInstances - List of cloud service role instance names. Value of '*' will signify all role instances of the cloud service.
10990	RoleInstances *[]string `json:"roleInstances,omitempty"`
10991}
10992
10993// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
10994type RollbackStatusInfo struct {
10995	// SuccessfullyRolledbackInstanceCount - READ-ONLY; The number of instances which have been successfully rolled back.
10996	SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"`
10997	// FailedRolledbackInstanceCount - READ-ONLY; The number of instances which failed to rollback.
10998	FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"`
10999	// RollbackError - READ-ONLY; Error details if OS rollback failed.
11000	RollbackError *APIError `json:"rollbackError,omitempty"`
11001}
11002
11003// MarshalJSON is the custom marshaler for RollbackStatusInfo.
11004func (rsi RollbackStatusInfo) MarshalJSON() ([]byte, error) {
11005	objectMap := make(map[string]interface{})
11006	return json.Marshal(objectMap)
11007}
11008
11009// RollingUpgradePolicy the configuration parameters used while performing a rolling upgrade.
11010type RollingUpgradePolicy struct {
11011	// 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%.
11012	MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"`
11013	// 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%.
11014	MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"`
11015	// 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%.
11016	MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"`
11017	// 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).
11018	PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"`
11019}
11020
11021// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade
11022// state.
11023type RollingUpgradeProgressInfo struct {
11024	// SuccessfulInstanceCount - READ-ONLY; The number of instances that have been successfully upgraded.
11025	SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"`
11026	// FailedInstanceCount - READ-ONLY; The number of instances that have failed to be upgraded successfully.
11027	FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty"`
11028	// InProgressInstanceCount - READ-ONLY; The number of instances that are currently being upgraded.
11029	InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty"`
11030	// PendingInstanceCount - READ-ONLY; The number of instances that have not yet begun to be upgraded.
11031	PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"`
11032}
11033
11034// MarshalJSON is the custom marshaler for RollingUpgradeProgressInfo.
11035func (rupi RollingUpgradeProgressInfo) MarshalJSON() ([]byte, error) {
11036	objectMap := make(map[string]interface{})
11037	return json.Marshal(objectMap)
11038}
11039
11040// RollingUpgradeRunningStatus information about the current running state of the overall upgrade.
11041type RollingUpgradeRunningStatus struct {
11042	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'RollingUpgradeStatusCodeRollingForward', 'RollingUpgradeStatusCodeCancelled', 'RollingUpgradeStatusCodeCompleted', 'RollingUpgradeStatusCodeFaulted'
11043	Code RollingUpgradeStatusCode `json:"code,omitempty"`
11044	// StartTime - READ-ONLY; Start time of the upgrade.
11045	StartTime *date.Time `json:"startTime,omitempty"`
11046	// LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel'
11047	LastAction RollingUpgradeActionType `json:"lastAction,omitempty"`
11048	// LastActionTime - READ-ONLY; Last action time of the upgrade.
11049	LastActionTime *date.Time `json:"lastActionTime,omitempty"`
11050}
11051
11052// MarshalJSON is the custom marshaler for RollingUpgradeRunningStatus.
11053func (rurs RollingUpgradeRunningStatus) MarshalJSON() ([]byte, error) {
11054	objectMap := make(map[string]interface{})
11055	return json.Marshal(objectMap)
11056}
11057
11058// RollingUpgradeStatusInfo the status of the latest virtual machine scale set rolling upgrade.
11059type RollingUpgradeStatusInfo struct {
11060	autorest.Response                   `json:"-"`
11061	*RollingUpgradeStatusInfoProperties `json:"properties,omitempty"`
11062	// ID - READ-ONLY; Resource Id
11063	ID *string `json:"id,omitempty"`
11064	// Name - READ-ONLY; Resource name
11065	Name *string `json:"name,omitempty"`
11066	// Type - READ-ONLY; Resource type
11067	Type *string `json:"type,omitempty"`
11068	// Location - Resource location
11069	Location *string `json:"location,omitempty"`
11070	// Tags - Resource tags
11071	Tags map[string]*string `json:"tags"`
11072}
11073
11074// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfo.
11075func (rusi RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) {
11076	objectMap := make(map[string]interface{})
11077	if rusi.RollingUpgradeStatusInfoProperties != nil {
11078		objectMap["properties"] = rusi.RollingUpgradeStatusInfoProperties
11079	}
11080	if rusi.Location != nil {
11081		objectMap["location"] = rusi.Location
11082	}
11083	if rusi.Tags != nil {
11084		objectMap["tags"] = rusi.Tags
11085	}
11086	return json.Marshal(objectMap)
11087}
11088
11089// UnmarshalJSON is the custom unmarshaler for RollingUpgradeStatusInfo struct.
11090func (rusi *RollingUpgradeStatusInfo) UnmarshalJSON(body []byte) error {
11091	var m map[string]*json.RawMessage
11092	err := json.Unmarshal(body, &m)
11093	if err != nil {
11094		return err
11095	}
11096	for k, v := range m {
11097		switch k {
11098		case "properties":
11099			if v != nil {
11100				var rollingUpgradeStatusInfoProperties RollingUpgradeStatusInfoProperties
11101				err = json.Unmarshal(*v, &rollingUpgradeStatusInfoProperties)
11102				if err != nil {
11103					return err
11104				}
11105				rusi.RollingUpgradeStatusInfoProperties = &rollingUpgradeStatusInfoProperties
11106			}
11107		case "id":
11108			if v != nil {
11109				var ID string
11110				err = json.Unmarshal(*v, &ID)
11111				if err != nil {
11112					return err
11113				}
11114				rusi.ID = &ID
11115			}
11116		case "name":
11117			if v != nil {
11118				var name string
11119				err = json.Unmarshal(*v, &name)
11120				if err != nil {
11121					return err
11122				}
11123				rusi.Name = &name
11124			}
11125		case "type":
11126			if v != nil {
11127				var typeVar string
11128				err = json.Unmarshal(*v, &typeVar)
11129				if err != nil {
11130					return err
11131				}
11132				rusi.Type = &typeVar
11133			}
11134		case "location":
11135			if v != nil {
11136				var location string
11137				err = json.Unmarshal(*v, &location)
11138				if err != nil {
11139					return err
11140				}
11141				rusi.Location = &location
11142			}
11143		case "tags":
11144			if v != nil {
11145				var tags map[string]*string
11146				err = json.Unmarshal(*v, &tags)
11147				if err != nil {
11148					return err
11149				}
11150				rusi.Tags = tags
11151			}
11152		}
11153	}
11154
11155	return nil
11156}
11157
11158// RollingUpgradeStatusInfoProperties the status of the latest virtual machine scale set rolling upgrade.
11159type RollingUpgradeStatusInfoProperties struct {
11160	// Policy - READ-ONLY; The rolling upgrade policies applied for this upgrade.
11161	Policy *RollingUpgradePolicy `json:"policy,omitempty"`
11162	// RunningStatus - READ-ONLY; Information about the current running state of the overall upgrade.
11163	RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"`
11164	// Progress - READ-ONLY; Information about the number of virtual machine instances in each upgrade state.
11165	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
11166	// Error - READ-ONLY; Error details for this upgrade, if there are any.
11167	Error *APIError `json:"error,omitempty"`
11168}
11169
11170// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfoProperties.
11171func (rusip RollingUpgradeStatusInfoProperties) MarshalJSON() ([]byte, error) {
11172	objectMap := make(map[string]interface{})
11173	return json.Marshal(objectMap)
11174}
11175
11176// RunCommandDocument describes the properties of a Run Command.
11177type RunCommandDocument struct {
11178	autorest.Response `json:"-"`
11179	// Script - The script to be executed.
11180	Script *[]string `json:"script,omitempty"`
11181	// Parameters - The parameters used by the script.
11182	Parameters *[]RunCommandParameterDefinition `json:"parameters,omitempty"`
11183	// Schema - The VM run command schema.
11184	Schema *string `json:"$schema,omitempty"`
11185	// ID - The VM run command id.
11186	ID *string `json:"id,omitempty"`
11187	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
11188	OsType OperatingSystemTypes `json:"osType,omitempty"`
11189	// Label - The VM run command label.
11190	Label *string `json:"label,omitempty"`
11191	// Description - The VM run command description.
11192	Description *string `json:"description,omitempty"`
11193}
11194
11195// RunCommandDocumentBase describes the properties of a Run Command metadata.
11196type RunCommandDocumentBase struct {
11197	// Schema - The VM run command schema.
11198	Schema *string `json:"$schema,omitempty"`
11199	// ID - The VM run command id.
11200	ID *string `json:"id,omitempty"`
11201	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
11202	OsType OperatingSystemTypes `json:"osType,omitempty"`
11203	// Label - The VM run command label.
11204	Label *string `json:"label,omitempty"`
11205	// Description - The VM run command description.
11206	Description *string `json:"description,omitempty"`
11207}
11208
11209// RunCommandInput capture Virtual Machine parameters.
11210type RunCommandInput struct {
11211	// CommandID - The run command id.
11212	CommandID *string `json:"commandId,omitempty"`
11213	// Script - Optional. The script to be executed.  When this value is given, the given script will override the default script of the command.
11214	Script *[]string `json:"script,omitempty"`
11215	// Parameters - The run command parameters.
11216	Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
11217}
11218
11219// RunCommandInputParameter describes the properties of a run command parameter.
11220type RunCommandInputParameter struct {
11221	// Name - The run command parameter name.
11222	Name *string `json:"name,omitempty"`
11223	// Value - The run command parameter value.
11224	Value *string `json:"value,omitempty"`
11225}
11226
11227// RunCommandListResult the List Virtual Machine operation response.
11228type RunCommandListResult struct {
11229	autorest.Response `json:"-"`
11230	// Value - The list of virtual machine run commands.
11231	Value *[]RunCommandDocumentBase `json:"value,omitempty"`
11232	// NextLink - The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands.
11233	NextLink *string `json:"nextLink,omitempty"`
11234}
11235
11236// RunCommandListResultIterator provides access to a complete listing of RunCommandDocumentBase values.
11237type RunCommandListResultIterator struct {
11238	i    int
11239	page RunCommandListResultPage
11240}
11241
11242// NextWithContext advances to the next value.  If there was an error making
11243// the request the iterator does not advance and the error is returned.
11244func (iter *RunCommandListResultIterator) NextWithContext(ctx context.Context) (err error) {
11245	if tracing.IsEnabled() {
11246		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultIterator.NextWithContext")
11247		defer func() {
11248			sc := -1
11249			if iter.Response().Response.Response != nil {
11250				sc = iter.Response().Response.Response.StatusCode
11251			}
11252			tracing.EndSpan(ctx, sc, err)
11253		}()
11254	}
11255	iter.i++
11256	if iter.i < len(iter.page.Values()) {
11257		return nil
11258	}
11259	err = iter.page.NextWithContext(ctx)
11260	if err != nil {
11261		iter.i--
11262		return err
11263	}
11264	iter.i = 0
11265	return nil
11266}
11267
11268// Next advances to the next value.  If there was an error making
11269// the request the iterator does not advance and the error is returned.
11270// Deprecated: Use NextWithContext() instead.
11271func (iter *RunCommandListResultIterator) Next() error {
11272	return iter.NextWithContext(context.Background())
11273}
11274
11275// NotDone returns true if the enumeration should be started or is not yet complete.
11276func (iter RunCommandListResultIterator) NotDone() bool {
11277	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11278}
11279
11280// Response returns the raw server response from the last page request.
11281func (iter RunCommandListResultIterator) Response() RunCommandListResult {
11282	return iter.page.Response()
11283}
11284
11285// Value returns the current value or a zero-initialized value if the
11286// iterator has advanced beyond the end of the collection.
11287func (iter RunCommandListResultIterator) Value() RunCommandDocumentBase {
11288	if !iter.page.NotDone() {
11289		return RunCommandDocumentBase{}
11290	}
11291	return iter.page.Values()[iter.i]
11292}
11293
11294// Creates a new instance of the RunCommandListResultIterator type.
11295func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator {
11296	return RunCommandListResultIterator{page: page}
11297}
11298
11299// IsEmpty returns true if the ListResult contains no values.
11300func (rclr RunCommandListResult) IsEmpty() bool {
11301	return rclr.Value == nil || len(*rclr.Value) == 0
11302}
11303
11304// hasNextLink returns true if the NextLink is not empty.
11305func (rclr RunCommandListResult) hasNextLink() bool {
11306	return rclr.NextLink != nil && len(*rclr.NextLink) != 0
11307}
11308
11309// runCommandListResultPreparer prepares a request to retrieve the next set of results.
11310// It returns nil if no more results exist.
11311func (rclr RunCommandListResult) runCommandListResultPreparer(ctx context.Context) (*http.Request, error) {
11312	if !rclr.hasNextLink() {
11313		return nil, nil
11314	}
11315	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11316		autorest.AsJSON(),
11317		autorest.AsGet(),
11318		autorest.WithBaseURL(to.String(rclr.NextLink)))
11319}
11320
11321// RunCommandListResultPage contains a page of RunCommandDocumentBase values.
11322type RunCommandListResultPage struct {
11323	fn   func(context.Context, RunCommandListResult) (RunCommandListResult, error)
11324	rclr RunCommandListResult
11325}
11326
11327// NextWithContext advances to the next page of values.  If there was an error making
11328// the request the page does not advance and the error is returned.
11329func (page *RunCommandListResultPage) NextWithContext(ctx context.Context) (err error) {
11330	if tracing.IsEnabled() {
11331		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultPage.NextWithContext")
11332		defer func() {
11333			sc := -1
11334			if page.Response().Response.Response != nil {
11335				sc = page.Response().Response.Response.StatusCode
11336			}
11337			tracing.EndSpan(ctx, sc, err)
11338		}()
11339	}
11340	for {
11341		next, err := page.fn(ctx, page.rclr)
11342		if err != nil {
11343			return err
11344		}
11345		page.rclr = next
11346		if !next.hasNextLink() || !next.IsEmpty() {
11347			break
11348		}
11349	}
11350	return nil
11351}
11352
11353// Next advances to the next page of values.  If there was an error making
11354// the request the page does not advance and the error is returned.
11355// Deprecated: Use NextWithContext() instead.
11356func (page *RunCommandListResultPage) Next() error {
11357	return page.NextWithContext(context.Background())
11358}
11359
11360// NotDone returns true if the page enumeration should be started or is not yet complete.
11361func (page RunCommandListResultPage) NotDone() bool {
11362	return !page.rclr.IsEmpty()
11363}
11364
11365// Response returns the raw server response from the last page request.
11366func (page RunCommandListResultPage) Response() RunCommandListResult {
11367	return page.rclr
11368}
11369
11370// Values returns the slice of values for the current page or nil if there are no values.
11371func (page RunCommandListResultPage) Values() []RunCommandDocumentBase {
11372	if page.rclr.IsEmpty() {
11373		return nil
11374	}
11375	return *page.rclr.Value
11376}
11377
11378// Creates a new instance of the RunCommandListResultPage type.
11379func NewRunCommandListResultPage(cur RunCommandListResult, getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
11380	return RunCommandListResultPage{
11381		fn:   getNextPage,
11382		rclr: cur,
11383	}
11384}
11385
11386// RunCommandParameterDefinition describes the properties of a run command parameter.
11387type RunCommandParameterDefinition struct {
11388	// Name - The run command parameter name.
11389	Name *string `json:"name,omitempty"`
11390	// Type - The run command parameter type.
11391	Type *string `json:"type,omitempty"`
11392	// DefaultValue - The run command parameter default value.
11393	DefaultValue *string `json:"defaultValue,omitempty"`
11394	// Required - The run command parameter required.
11395	Required *bool `json:"required,omitempty"`
11396}
11397
11398// RunCommandResult ...
11399type RunCommandResult struct {
11400	autorest.Response `json:"-"`
11401	// Value - Run command operation response.
11402	Value *[]InstanceViewStatus `json:"value,omitempty"`
11403}
11404
11405// ScaleInPolicy describes a scale-in policy for a virtual machine scale set.
11406type ScaleInPolicy struct {
11407	// 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>
11408	Rules *[]VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"`
11409}
11410
11411// ScheduledEventsProfile ...
11412type ScheduledEventsProfile struct {
11413	// TerminateNotificationProfile - Specifies Terminate Scheduled Event related configurations.
11414	TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"`
11415}
11416
11417// SecurityProfile specifies the Security profile settings for the virtual machine or virtual machine scale
11418// set.
11419type SecurityProfile struct {
11420	// 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.
11421	EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"`
11422}
11423
11424// ShareInfoElement ...
11425type ShareInfoElement struct {
11426	// VMURI - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
11427	VMURI *string `json:"vmUri,omitempty"`
11428}
11429
11430// MarshalJSON is the custom marshaler for ShareInfoElement.
11431func (sie ShareInfoElement) MarshalJSON() ([]byte, error) {
11432	objectMap := make(map[string]interface{})
11433	return json.Marshal(objectMap)
11434}
11435
11436// Sku describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware
11437// the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU
11438// name.
11439type Sku struct {
11440	// Name - The sku name.
11441	Name *string `json:"name,omitempty"`
11442	// Tier - Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
11443	Tier *string `json:"tier,omitempty"`
11444	// Capacity - Specifies the number of virtual machines in the scale set.
11445	Capacity *int64 `json:"capacity,omitempty"`
11446}
11447
11448// Snapshot snapshot resource.
11449type Snapshot struct {
11450	autorest.Response `json:"-"`
11451	// ManagedBy - READ-ONLY; Unused. Always Null.
11452	ManagedBy *string      `json:"managedBy,omitempty"`
11453	Sku       *SnapshotSku `json:"sku,omitempty"`
11454	// ExtendedLocation - The extended location where the snapshot will be created. Extended location cannot be changed.
11455	ExtendedLocation    *ExtendedLocation `json:"extendedLocation,omitempty"`
11456	*SnapshotProperties `json:"properties,omitempty"`
11457	// ID - READ-ONLY; Resource Id
11458	ID *string `json:"id,omitempty"`
11459	// Name - READ-ONLY; Resource name
11460	Name *string `json:"name,omitempty"`
11461	// Type - READ-ONLY; Resource type
11462	Type *string `json:"type,omitempty"`
11463	// Location - Resource location
11464	Location *string `json:"location,omitempty"`
11465	// Tags - Resource tags
11466	Tags map[string]*string `json:"tags"`
11467}
11468
11469// MarshalJSON is the custom marshaler for Snapshot.
11470func (s Snapshot) MarshalJSON() ([]byte, error) {
11471	objectMap := make(map[string]interface{})
11472	if s.Sku != nil {
11473		objectMap["sku"] = s.Sku
11474	}
11475	if s.ExtendedLocation != nil {
11476		objectMap["extendedLocation"] = s.ExtendedLocation
11477	}
11478	if s.SnapshotProperties != nil {
11479		objectMap["properties"] = s.SnapshotProperties
11480	}
11481	if s.Location != nil {
11482		objectMap["location"] = s.Location
11483	}
11484	if s.Tags != nil {
11485		objectMap["tags"] = s.Tags
11486	}
11487	return json.Marshal(objectMap)
11488}
11489
11490// UnmarshalJSON is the custom unmarshaler for Snapshot struct.
11491func (s *Snapshot) UnmarshalJSON(body []byte) error {
11492	var m map[string]*json.RawMessage
11493	err := json.Unmarshal(body, &m)
11494	if err != nil {
11495		return err
11496	}
11497	for k, v := range m {
11498		switch k {
11499		case "managedBy":
11500			if v != nil {
11501				var managedBy string
11502				err = json.Unmarshal(*v, &managedBy)
11503				if err != nil {
11504					return err
11505				}
11506				s.ManagedBy = &managedBy
11507			}
11508		case "sku":
11509			if v != nil {
11510				var sku SnapshotSku
11511				err = json.Unmarshal(*v, &sku)
11512				if err != nil {
11513					return err
11514				}
11515				s.Sku = &sku
11516			}
11517		case "extendedLocation":
11518			if v != nil {
11519				var extendedLocation ExtendedLocation
11520				err = json.Unmarshal(*v, &extendedLocation)
11521				if err != nil {
11522					return err
11523				}
11524				s.ExtendedLocation = &extendedLocation
11525			}
11526		case "properties":
11527			if v != nil {
11528				var snapshotProperties SnapshotProperties
11529				err = json.Unmarshal(*v, &snapshotProperties)
11530				if err != nil {
11531					return err
11532				}
11533				s.SnapshotProperties = &snapshotProperties
11534			}
11535		case "id":
11536			if v != nil {
11537				var ID string
11538				err = json.Unmarshal(*v, &ID)
11539				if err != nil {
11540					return err
11541				}
11542				s.ID = &ID
11543			}
11544		case "name":
11545			if v != nil {
11546				var name string
11547				err = json.Unmarshal(*v, &name)
11548				if err != nil {
11549					return err
11550				}
11551				s.Name = &name
11552			}
11553		case "type":
11554			if v != nil {
11555				var typeVar string
11556				err = json.Unmarshal(*v, &typeVar)
11557				if err != nil {
11558					return err
11559				}
11560				s.Type = &typeVar
11561			}
11562		case "location":
11563			if v != nil {
11564				var location string
11565				err = json.Unmarshal(*v, &location)
11566				if err != nil {
11567					return err
11568				}
11569				s.Location = &location
11570			}
11571		case "tags":
11572			if v != nil {
11573				var tags map[string]*string
11574				err = json.Unmarshal(*v, &tags)
11575				if err != nil {
11576					return err
11577				}
11578				s.Tags = tags
11579			}
11580		}
11581	}
11582
11583	return nil
11584}
11585
11586// SnapshotList the List Snapshots operation response.
11587type SnapshotList struct {
11588	autorest.Response `json:"-"`
11589	// Value - A list of snapshots.
11590	Value *[]Snapshot `json:"value,omitempty"`
11591	// NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
11592	NextLink *string `json:"nextLink,omitempty"`
11593}
11594
11595// SnapshotListIterator provides access to a complete listing of Snapshot values.
11596type SnapshotListIterator struct {
11597	i    int
11598	page SnapshotListPage
11599}
11600
11601// NextWithContext advances to the next value.  If there was an error making
11602// the request the iterator does not advance and the error is returned.
11603func (iter *SnapshotListIterator) NextWithContext(ctx context.Context) (err error) {
11604	if tracing.IsEnabled() {
11605		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListIterator.NextWithContext")
11606		defer func() {
11607			sc := -1
11608			if iter.Response().Response.Response != nil {
11609				sc = iter.Response().Response.Response.StatusCode
11610			}
11611			tracing.EndSpan(ctx, sc, err)
11612		}()
11613	}
11614	iter.i++
11615	if iter.i < len(iter.page.Values()) {
11616		return nil
11617	}
11618	err = iter.page.NextWithContext(ctx)
11619	if err != nil {
11620		iter.i--
11621		return err
11622	}
11623	iter.i = 0
11624	return nil
11625}
11626
11627// Next advances to the next value.  If there was an error making
11628// the request the iterator does not advance and the error is returned.
11629// Deprecated: Use NextWithContext() instead.
11630func (iter *SnapshotListIterator) Next() error {
11631	return iter.NextWithContext(context.Background())
11632}
11633
11634// NotDone returns true if the enumeration should be started or is not yet complete.
11635func (iter SnapshotListIterator) NotDone() bool {
11636	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11637}
11638
11639// Response returns the raw server response from the last page request.
11640func (iter SnapshotListIterator) Response() SnapshotList {
11641	return iter.page.Response()
11642}
11643
11644// Value returns the current value or a zero-initialized value if the
11645// iterator has advanced beyond the end of the collection.
11646func (iter SnapshotListIterator) Value() Snapshot {
11647	if !iter.page.NotDone() {
11648		return Snapshot{}
11649	}
11650	return iter.page.Values()[iter.i]
11651}
11652
11653// Creates a new instance of the SnapshotListIterator type.
11654func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator {
11655	return SnapshotListIterator{page: page}
11656}
11657
11658// IsEmpty returns true if the ListResult contains no values.
11659func (sl SnapshotList) IsEmpty() bool {
11660	return sl.Value == nil || len(*sl.Value) == 0
11661}
11662
11663// hasNextLink returns true if the NextLink is not empty.
11664func (sl SnapshotList) hasNextLink() bool {
11665	return sl.NextLink != nil && len(*sl.NextLink) != 0
11666}
11667
11668// snapshotListPreparer prepares a request to retrieve the next set of results.
11669// It returns nil if no more results exist.
11670func (sl SnapshotList) snapshotListPreparer(ctx context.Context) (*http.Request, error) {
11671	if !sl.hasNextLink() {
11672		return nil, nil
11673	}
11674	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11675		autorest.AsJSON(),
11676		autorest.AsGet(),
11677		autorest.WithBaseURL(to.String(sl.NextLink)))
11678}
11679
11680// SnapshotListPage contains a page of Snapshot values.
11681type SnapshotListPage struct {
11682	fn func(context.Context, SnapshotList) (SnapshotList, error)
11683	sl SnapshotList
11684}
11685
11686// NextWithContext advances to the next page of values.  If there was an error making
11687// the request the page does not advance and the error is returned.
11688func (page *SnapshotListPage) NextWithContext(ctx context.Context) (err error) {
11689	if tracing.IsEnabled() {
11690		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListPage.NextWithContext")
11691		defer func() {
11692			sc := -1
11693			if page.Response().Response.Response != nil {
11694				sc = page.Response().Response.Response.StatusCode
11695			}
11696			tracing.EndSpan(ctx, sc, err)
11697		}()
11698	}
11699	for {
11700		next, err := page.fn(ctx, page.sl)
11701		if err != nil {
11702			return err
11703		}
11704		page.sl = next
11705		if !next.hasNextLink() || !next.IsEmpty() {
11706			break
11707		}
11708	}
11709	return nil
11710}
11711
11712// Next advances to the next page of values.  If there was an error making
11713// the request the page does not advance and the error is returned.
11714// Deprecated: Use NextWithContext() instead.
11715func (page *SnapshotListPage) Next() error {
11716	return page.NextWithContext(context.Background())
11717}
11718
11719// NotDone returns true if the page enumeration should be started or is not yet complete.
11720func (page SnapshotListPage) NotDone() bool {
11721	return !page.sl.IsEmpty()
11722}
11723
11724// Response returns the raw server response from the last page request.
11725func (page SnapshotListPage) Response() SnapshotList {
11726	return page.sl
11727}
11728
11729// Values returns the slice of values for the current page or nil if there are no values.
11730func (page SnapshotListPage) Values() []Snapshot {
11731	if page.sl.IsEmpty() {
11732		return nil
11733	}
11734	return *page.sl.Value
11735}
11736
11737// Creates a new instance of the SnapshotListPage type.
11738func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
11739	return SnapshotListPage{
11740		fn: getNextPage,
11741		sl: cur,
11742	}
11743}
11744
11745// SnapshotProperties snapshot resource properties.
11746type SnapshotProperties struct {
11747	// TimeCreated - READ-ONLY; The time when the snapshot was created.
11748	TimeCreated *date.Time `json:"timeCreated,omitempty"`
11749	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
11750	OsType OperatingSystemTypes `json:"osType,omitempty"`
11751	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
11752	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
11753	// PurchasePlan - Purchase plan information for the image from which the source disk for the snapshot was originally created.
11754	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
11755	// CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
11756	CreationData *CreationData `json:"creationData,omitempty"`
11757	// 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.
11758	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
11759	// DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
11760	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
11761	// DiskState - The state of the snapshot. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
11762	DiskState DiskState `json:"diskState,omitempty"`
11763	// UniqueID - READ-ONLY; Unique Guid identifying the resource.
11764	UniqueID *string `json:"uniqueId,omitempty"`
11765	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
11766	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
11767	// ProvisioningState - READ-ONLY; The disk provisioning state.
11768	ProvisioningState *string `json:"provisioningState,omitempty"`
11769	// Incremental - Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.
11770	Incremental *bool `json:"incremental,omitempty"`
11771	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
11772	Encryption *Encryption `json:"encryption,omitempty"`
11773	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
11774	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
11775	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
11776	DiskAccessID *string `json:"diskAccessId,omitempty"`
11777}
11778
11779// MarshalJSON is the custom marshaler for SnapshotProperties.
11780func (sp SnapshotProperties) MarshalJSON() ([]byte, error) {
11781	objectMap := make(map[string]interface{})
11782	if sp.OsType != "" {
11783		objectMap["osType"] = sp.OsType
11784	}
11785	if sp.HyperVGeneration != "" {
11786		objectMap["hyperVGeneration"] = sp.HyperVGeneration
11787	}
11788	if sp.PurchasePlan != nil {
11789		objectMap["purchasePlan"] = sp.PurchasePlan
11790	}
11791	if sp.CreationData != nil {
11792		objectMap["creationData"] = sp.CreationData
11793	}
11794	if sp.DiskSizeGB != nil {
11795		objectMap["diskSizeGB"] = sp.DiskSizeGB
11796	}
11797	if sp.DiskState != "" {
11798		objectMap["diskState"] = sp.DiskState
11799	}
11800	if sp.EncryptionSettingsCollection != nil {
11801		objectMap["encryptionSettingsCollection"] = sp.EncryptionSettingsCollection
11802	}
11803	if sp.Incremental != nil {
11804		objectMap["incremental"] = sp.Incremental
11805	}
11806	if sp.Encryption != nil {
11807		objectMap["encryption"] = sp.Encryption
11808	}
11809	if sp.NetworkAccessPolicy != "" {
11810		objectMap["networkAccessPolicy"] = sp.NetworkAccessPolicy
11811	}
11812	if sp.DiskAccessID != nil {
11813		objectMap["diskAccessId"] = sp.DiskAccessID
11814	}
11815	return json.Marshal(objectMap)
11816}
11817
11818// SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
11819// operation.
11820type SnapshotsCreateOrUpdateFuture struct {
11821	azure.FutureAPI
11822	// Result returns the result of the asynchronous operation.
11823	// If the operation has not completed it will return an error.
11824	Result func(SnapshotsClient) (Snapshot, error)
11825}
11826
11827// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11828func (future *SnapshotsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11829	var azFuture azure.Future
11830	if err := json.Unmarshal(body, &azFuture); err != nil {
11831		return err
11832	}
11833	future.FutureAPI = &azFuture
11834	future.Result = future.result
11835	return nil
11836}
11837
11838// result is the default implementation for SnapshotsCreateOrUpdateFuture.Result.
11839func (future *SnapshotsCreateOrUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
11840	var done bool
11841	done, err = future.DoneWithContext(context.Background(), client)
11842	if err != nil {
11843		err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11844		return
11845	}
11846	if !done {
11847		s.Response.Response = future.Response()
11848		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
11849		return
11850	}
11851	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11852	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
11853		s, err = client.CreateOrUpdateResponder(s.Response.Response)
11854		if err != nil {
11855			err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
11856		}
11857	}
11858	return
11859}
11860
11861// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11862// operation.
11863type SnapshotsDeleteFuture struct {
11864	azure.FutureAPI
11865	// Result returns the result of the asynchronous operation.
11866	// If the operation has not completed it will return an error.
11867	Result func(SnapshotsClient) (autorest.Response, error)
11868}
11869
11870// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11871func (future *SnapshotsDeleteFuture) UnmarshalJSON(body []byte) error {
11872	var azFuture azure.Future
11873	if err := json.Unmarshal(body, &azFuture); err != nil {
11874		return err
11875	}
11876	future.FutureAPI = &azFuture
11877	future.Result = future.result
11878	return nil
11879}
11880
11881// result is the default implementation for SnapshotsDeleteFuture.Result.
11882func (future *SnapshotsDeleteFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
11883	var done bool
11884	done, err = future.DoneWithContext(context.Background(), client)
11885	if err != nil {
11886		err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Polling failure")
11887		return
11888	}
11889	if !done {
11890		ar.Response = future.Response()
11891		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
11892		return
11893	}
11894	ar.Response = future.Response()
11895	return
11896}
11897
11898// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
11899// operation.
11900type SnapshotsGrantAccessFuture struct {
11901	azure.FutureAPI
11902	// Result returns the result of the asynchronous operation.
11903	// If the operation has not completed it will return an error.
11904	Result func(SnapshotsClient) (AccessURI, error)
11905}
11906
11907// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11908func (future *SnapshotsGrantAccessFuture) UnmarshalJSON(body []byte) error {
11909	var azFuture azure.Future
11910	if err := json.Unmarshal(body, &azFuture); err != nil {
11911		return err
11912	}
11913	future.FutureAPI = &azFuture
11914	future.Result = future.result
11915	return nil
11916}
11917
11918// result is the default implementation for SnapshotsGrantAccessFuture.Result.
11919func (future *SnapshotsGrantAccessFuture) result(client SnapshotsClient) (au AccessURI, err error) {
11920	var done bool
11921	done, err = future.DoneWithContext(context.Background(), client)
11922	if err != nil {
11923		err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Polling failure")
11924		return
11925	}
11926	if !done {
11927		au.Response.Response = future.Response()
11928		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
11929		return
11930	}
11931	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11932	if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
11933		au, err = client.GrantAccessResponder(au.Response.Response)
11934		if err != nil {
11935			err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
11936		}
11937	}
11938	return
11939}
11940
11941// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an
11942// optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same
11943// sku as the previous snapshot
11944type SnapshotSku struct {
11945	// Name - The sku name. Possible values include: 'SnapshotStorageAccountTypesStandardLRS', 'SnapshotStorageAccountTypesPremiumLRS', 'SnapshotStorageAccountTypesStandardZRS'
11946	Name SnapshotStorageAccountTypes `json:"name,omitempty"`
11947	// Tier - READ-ONLY; The sku tier.
11948	Tier *string `json:"tier,omitempty"`
11949}
11950
11951// MarshalJSON is the custom marshaler for SnapshotSku.
11952func (ss SnapshotSku) MarshalJSON() ([]byte, error) {
11953	objectMap := make(map[string]interface{})
11954	if ss.Name != "" {
11955		objectMap["name"] = ss.Name
11956	}
11957	return json.Marshal(objectMap)
11958}
11959
11960// SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
11961// operation.
11962type SnapshotsRevokeAccessFuture struct {
11963	azure.FutureAPI
11964	// Result returns the result of the asynchronous operation.
11965	// If the operation has not completed it will return an error.
11966	Result func(SnapshotsClient) (autorest.Response, error)
11967}
11968
11969// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11970func (future *SnapshotsRevokeAccessFuture) UnmarshalJSON(body []byte) error {
11971	var azFuture azure.Future
11972	if err := json.Unmarshal(body, &azFuture); err != nil {
11973		return err
11974	}
11975	future.FutureAPI = &azFuture
11976	future.Result = future.result
11977	return nil
11978}
11979
11980// result is the default implementation for SnapshotsRevokeAccessFuture.Result.
11981func (future *SnapshotsRevokeAccessFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
11982	var done bool
11983	done, err = future.DoneWithContext(context.Background(), client)
11984	if err != nil {
11985		err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Polling failure")
11986		return
11987	}
11988	if !done {
11989		ar.Response = future.Response()
11990		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
11991		return
11992	}
11993	ar.Response = future.Response()
11994	return
11995}
11996
11997// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
11998// operation.
11999type SnapshotsUpdateFuture struct {
12000	azure.FutureAPI
12001	// Result returns the result of the asynchronous operation.
12002	// If the operation has not completed it will return an error.
12003	Result func(SnapshotsClient) (Snapshot, error)
12004}
12005
12006// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12007func (future *SnapshotsUpdateFuture) UnmarshalJSON(body []byte) error {
12008	var azFuture azure.Future
12009	if err := json.Unmarshal(body, &azFuture); err != nil {
12010		return err
12011	}
12012	future.FutureAPI = &azFuture
12013	future.Result = future.result
12014	return nil
12015}
12016
12017// result is the default implementation for SnapshotsUpdateFuture.Result.
12018func (future *SnapshotsUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
12019	var done bool
12020	done, err = future.DoneWithContext(context.Background(), client)
12021	if err != nil {
12022		err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Polling failure")
12023		return
12024	}
12025	if !done {
12026		s.Response.Response = future.Response()
12027		err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
12028		return
12029	}
12030	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12031	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
12032		s, err = client.UpdateResponder(s.Response.Response)
12033		if err != nil {
12034			err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
12035		}
12036	}
12037	return
12038}
12039
12040// SnapshotUpdate snapshot update resource.
12041type SnapshotUpdate struct {
12042	*SnapshotUpdateProperties `json:"properties,omitempty"`
12043	// Tags - Resource tags
12044	Tags map[string]*string `json:"tags"`
12045	Sku  *SnapshotSku       `json:"sku,omitempty"`
12046}
12047
12048// MarshalJSON is the custom marshaler for SnapshotUpdate.
12049func (su SnapshotUpdate) MarshalJSON() ([]byte, error) {
12050	objectMap := make(map[string]interface{})
12051	if su.SnapshotUpdateProperties != nil {
12052		objectMap["properties"] = su.SnapshotUpdateProperties
12053	}
12054	if su.Tags != nil {
12055		objectMap["tags"] = su.Tags
12056	}
12057	if su.Sku != nil {
12058		objectMap["sku"] = su.Sku
12059	}
12060	return json.Marshal(objectMap)
12061}
12062
12063// UnmarshalJSON is the custom unmarshaler for SnapshotUpdate struct.
12064func (su *SnapshotUpdate) UnmarshalJSON(body []byte) error {
12065	var m map[string]*json.RawMessage
12066	err := json.Unmarshal(body, &m)
12067	if err != nil {
12068		return err
12069	}
12070	for k, v := range m {
12071		switch k {
12072		case "properties":
12073			if v != nil {
12074				var snapshotUpdateProperties SnapshotUpdateProperties
12075				err = json.Unmarshal(*v, &snapshotUpdateProperties)
12076				if err != nil {
12077					return err
12078				}
12079				su.SnapshotUpdateProperties = &snapshotUpdateProperties
12080			}
12081		case "tags":
12082			if v != nil {
12083				var tags map[string]*string
12084				err = json.Unmarshal(*v, &tags)
12085				if err != nil {
12086					return err
12087				}
12088				su.Tags = tags
12089			}
12090		case "sku":
12091			if v != nil {
12092				var sku SnapshotSku
12093				err = json.Unmarshal(*v, &sku)
12094				if err != nil {
12095					return err
12096				}
12097				su.Sku = &sku
12098			}
12099		}
12100	}
12101
12102	return nil
12103}
12104
12105// SnapshotUpdateProperties snapshot resource update properties.
12106type SnapshotUpdateProperties struct {
12107	// OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
12108	OsType OperatingSystemTypes `json:"osType,omitempty"`
12109	// 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.
12110	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
12111	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
12112	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
12113	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
12114	Encryption *Encryption `json:"encryption,omitempty"`
12115	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
12116	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
12117	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
12118	DiskAccessID *string `json:"diskAccessId,omitempty"`
12119}
12120
12121// SourceVault the vault id is an Azure Resource Manager Resource id in the form
12122// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
12123type SourceVault struct {
12124	// ID - Resource Id
12125	ID *string `json:"id,omitempty"`
12126}
12127
12128// SSHConfiguration SSH configuration for Linux based VMs running on Azure
12129type SSHConfiguration struct {
12130	// PublicKeys - The list of SSH public keys used to authenticate with linux based VMs.
12131	PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
12132}
12133
12134// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where
12135// the public key is placed.
12136type SSHPublicKey struct {
12137	// 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
12138	Path *string `json:"path,omitempty"`
12139	// KeyData - SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
12140	KeyData *string `json:"keyData,omitempty"`
12141}
12142
12143// SSHPublicKeyGenerateKeyPairResult response from generation of an SSH key pair.
12144type SSHPublicKeyGenerateKeyPairResult struct {
12145	autorest.Response `json:"-"`
12146	// 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.
12147	PrivateKey *string `json:"privateKey,omitempty"`
12148	// 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.
12149	PublicKey *string `json:"publicKey,omitempty"`
12150	// ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}
12151	ID *string `json:"id,omitempty"`
12152}
12153
12154// SSHPublicKeyResource specifies information about the SSH public key.
12155type SSHPublicKeyResource struct {
12156	autorest.Response `json:"-"`
12157	// SSHPublicKeyResourceProperties - Properties of the SSH public key.
12158	*SSHPublicKeyResourceProperties `json:"properties,omitempty"`
12159	// ID - READ-ONLY; Resource Id
12160	ID *string `json:"id,omitempty"`
12161	// Name - READ-ONLY; Resource name
12162	Name *string `json:"name,omitempty"`
12163	// Type - READ-ONLY; Resource type
12164	Type *string `json:"type,omitempty"`
12165	// Location - Resource location
12166	Location *string `json:"location,omitempty"`
12167	// Tags - Resource tags
12168	Tags map[string]*string `json:"tags"`
12169}
12170
12171// MarshalJSON is the custom marshaler for SSHPublicKeyResource.
12172func (spkr SSHPublicKeyResource) MarshalJSON() ([]byte, error) {
12173	objectMap := make(map[string]interface{})
12174	if spkr.SSHPublicKeyResourceProperties != nil {
12175		objectMap["properties"] = spkr.SSHPublicKeyResourceProperties
12176	}
12177	if spkr.Location != nil {
12178		objectMap["location"] = spkr.Location
12179	}
12180	if spkr.Tags != nil {
12181		objectMap["tags"] = spkr.Tags
12182	}
12183	return json.Marshal(objectMap)
12184}
12185
12186// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyResource struct.
12187func (spkr *SSHPublicKeyResource) UnmarshalJSON(body []byte) error {
12188	var m map[string]*json.RawMessage
12189	err := json.Unmarshal(body, &m)
12190	if err != nil {
12191		return err
12192	}
12193	for k, v := range m {
12194		switch k {
12195		case "properties":
12196			if v != nil {
12197				var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
12198				err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
12199				if err != nil {
12200					return err
12201				}
12202				spkr.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
12203			}
12204		case "id":
12205			if v != nil {
12206				var ID string
12207				err = json.Unmarshal(*v, &ID)
12208				if err != nil {
12209					return err
12210				}
12211				spkr.ID = &ID
12212			}
12213		case "name":
12214			if v != nil {
12215				var name string
12216				err = json.Unmarshal(*v, &name)
12217				if err != nil {
12218					return err
12219				}
12220				spkr.Name = &name
12221			}
12222		case "type":
12223			if v != nil {
12224				var typeVar string
12225				err = json.Unmarshal(*v, &typeVar)
12226				if err != nil {
12227					return err
12228				}
12229				spkr.Type = &typeVar
12230			}
12231		case "location":
12232			if v != nil {
12233				var location string
12234				err = json.Unmarshal(*v, &location)
12235				if err != nil {
12236					return err
12237				}
12238				spkr.Location = &location
12239			}
12240		case "tags":
12241			if v != nil {
12242				var tags map[string]*string
12243				err = json.Unmarshal(*v, &tags)
12244				if err != nil {
12245					return err
12246				}
12247				spkr.Tags = tags
12248			}
12249		}
12250	}
12251
12252	return nil
12253}
12254
12255// SSHPublicKeyResourceProperties properties of the SSH public key.
12256type SSHPublicKeyResourceProperties struct {
12257	// 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.
12258	PublicKey *string `json:"publicKey,omitempty"`
12259}
12260
12261// SSHPublicKeysGroupListResult the list SSH public keys operation response.
12262type SSHPublicKeysGroupListResult struct {
12263	autorest.Response `json:"-"`
12264	// Value - The list of SSH public keys
12265	Value *[]SSHPublicKeyResource `json:"value,omitempty"`
12266	// 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.
12267	NextLink *string `json:"nextLink,omitempty"`
12268}
12269
12270// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource
12271// values.
12272type SSHPublicKeysGroupListResultIterator struct {
12273	i    int
12274	page SSHPublicKeysGroupListResultPage
12275}
12276
12277// NextWithContext advances to the next value.  If there was an error making
12278// the request the iterator does not advance and the error is returned.
12279func (iter *SSHPublicKeysGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
12280	if tracing.IsEnabled() {
12281		ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultIterator.NextWithContext")
12282		defer func() {
12283			sc := -1
12284			if iter.Response().Response.Response != nil {
12285				sc = iter.Response().Response.Response.StatusCode
12286			}
12287			tracing.EndSpan(ctx, sc, err)
12288		}()
12289	}
12290	iter.i++
12291	if iter.i < len(iter.page.Values()) {
12292		return nil
12293	}
12294	err = iter.page.NextWithContext(ctx)
12295	if err != nil {
12296		iter.i--
12297		return err
12298	}
12299	iter.i = 0
12300	return nil
12301}
12302
12303// Next advances to the next value.  If there was an error making
12304// the request the iterator does not advance and the error is returned.
12305// Deprecated: Use NextWithContext() instead.
12306func (iter *SSHPublicKeysGroupListResultIterator) Next() error {
12307	return iter.NextWithContext(context.Background())
12308}
12309
12310// NotDone returns true if the enumeration should be started or is not yet complete.
12311func (iter SSHPublicKeysGroupListResultIterator) NotDone() bool {
12312	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12313}
12314
12315// Response returns the raw server response from the last page request.
12316func (iter SSHPublicKeysGroupListResultIterator) Response() SSHPublicKeysGroupListResult {
12317	return iter.page.Response()
12318}
12319
12320// Value returns the current value or a zero-initialized value if the
12321// iterator has advanced beyond the end of the collection.
12322func (iter SSHPublicKeysGroupListResultIterator) Value() SSHPublicKeyResource {
12323	if !iter.page.NotDone() {
12324		return SSHPublicKeyResource{}
12325	}
12326	return iter.page.Values()[iter.i]
12327}
12328
12329// Creates a new instance of the SSHPublicKeysGroupListResultIterator type.
12330func NewSSHPublicKeysGroupListResultIterator(page SSHPublicKeysGroupListResultPage) SSHPublicKeysGroupListResultIterator {
12331	return SSHPublicKeysGroupListResultIterator{page: page}
12332}
12333
12334// IsEmpty returns true if the ListResult contains no values.
12335func (spkglr SSHPublicKeysGroupListResult) IsEmpty() bool {
12336	return spkglr.Value == nil || len(*spkglr.Value) == 0
12337}
12338
12339// hasNextLink returns true if the NextLink is not empty.
12340func (spkglr SSHPublicKeysGroupListResult) hasNextLink() bool {
12341	return spkglr.NextLink != nil && len(*spkglr.NextLink) != 0
12342}
12343
12344// sSHPublicKeysGroupListResultPreparer prepares a request to retrieve the next set of results.
12345// It returns nil if no more results exist.
12346func (spkglr SSHPublicKeysGroupListResult) sSHPublicKeysGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
12347	if !spkglr.hasNextLink() {
12348		return nil, nil
12349	}
12350	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12351		autorest.AsJSON(),
12352		autorest.AsGet(),
12353		autorest.WithBaseURL(to.String(spkglr.NextLink)))
12354}
12355
12356// SSHPublicKeysGroupListResultPage contains a page of SSHPublicKeyResource values.
12357type SSHPublicKeysGroupListResultPage struct {
12358	fn     func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)
12359	spkglr SSHPublicKeysGroupListResult
12360}
12361
12362// NextWithContext advances to the next page of values.  If there was an error making
12363// the request the page does not advance and the error is returned.
12364func (page *SSHPublicKeysGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
12365	if tracing.IsEnabled() {
12366		ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultPage.NextWithContext")
12367		defer func() {
12368			sc := -1
12369			if page.Response().Response.Response != nil {
12370				sc = page.Response().Response.Response.StatusCode
12371			}
12372			tracing.EndSpan(ctx, sc, err)
12373		}()
12374	}
12375	for {
12376		next, err := page.fn(ctx, page.spkglr)
12377		if err != nil {
12378			return err
12379		}
12380		page.spkglr = next
12381		if !next.hasNextLink() || !next.IsEmpty() {
12382			break
12383		}
12384	}
12385	return nil
12386}
12387
12388// Next advances to the next page of values.  If there was an error making
12389// the request the page does not advance and the error is returned.
12390// Deprecated: Use NextWithContext() instead.
12391func (page *SSHPublicKeysGroupListResultPage) Next() error {
12392	return page.NextWithContext(context.Background())
12393}
12394
12395// NotDone returns true if the page enumeration should be started or is not yet complete.
12396func (page SSHPublicKeysGroupListResultPage) NotDone() bool {
12397	return !page.spkglr.IsEmpty()
12398}
12399
12400// Response returns the raw server response from the last page request.
12401func (page SSHPublicKeysGroupListResultPage) Response() SSHPublicKeysGroupListResult {
12402	return page.spkglr
12403}
12404
12405// Values returns the slice of values for the current page or nil if there are no values.
12406func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource {
12407	if page.spkglr.IsEmpty() {
12408		return nil
12409	}
12410	return *page.spkglr.Value
12411}
12412
12413// Creates a new instance of the SSHPublicKeysGroupListResultPage type.
12414func NewSSHPublicKeysGroupListResultPage(cur SSHPublicKeysGroupListResult, getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage {
12415	return SSHPublicKeysGroupListResultPage{
12416		fn:     getNextPage,
12417		spkglr: cur,
12418	}
12419}
12420
12421// SSHPublicKeyUpdateResource specifies information about the SSH public key.
12422type SSHPublicKeyUpdateResource struct {
12423	// SSHPublicKeyResourceProperties - Properties of the SSH public key.
12424	*SSHPublicKeyResourceProperties `json:"properties,omitempty"`
12425	// Tags - Resource tags
12426	Tags map[string]*string `json:"tags"`
12427}
12428
12429// MarshalJSON is the custom marshaler for SSHPublicKeyUpdateResource.
12430func (spkur SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) {
12431	objectMap := make(map[string]interface{})
12432	if spkur.SSHPublicKeyResourceProperties != nil {
12433		objectMap["properties"] = spkur.SSHPublicKeyResourceProperties
12434	}
12435	if spkur.Tags != nil {
12436		objectMap["tags"] = spkur.Tags
12437	}
12438	return json.Marshal(objectMap)
12439}
12440
12441// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyUpdateResource struct.
12442func (spkur *SSHPublicKeyUpdateResource) UnmarshalJSON(body []byte) error {
12443	var m map[string]*json.RawMessage
12444	err := json.Unmarshal(body, &m)
12445	if err != nil {
12446		return err
12447	}
12448	for k, v := range m {
12449		switch k {
12450		case "properties":
12451			if v != nil {
12452				var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
12453				err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
12454				if err != nil {
12455					return err
12456				}
12457				spkur.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
12458			}
12459		case "tags":
12460			if v != nil {
12461				var tags map[string]*string
12462				err = json.Unmarshal(*v, &tags)
12463				if err != nil {
12464					return err
12465				}
12466				spkur.Tags = tags
12467			}
12468		}
12469	}
12470
12471	return nil
12472}
12473
12474// StatusCodeCount ...
12475type StatusCodeCount struct {
12476	// Code - READ-ONLY; The instance view status code
12477	Code *string `json:"code,omitempty"`
12478	// Count - READ-ONLY; Number of instances having this status code
12479	Count *int32 `json:"count,omitempty"`
12480}
12481
12482// MarshalJSON is the custom marshaler for StatusCodeCount.
12483func (scc StatusCodeCount) MarshalJSON() ([]byte, error) {
12484	objectMap := make(map[string]interface{})
12485	return json.Marshal(objectMap)
12486}
12487
12488// StorageProfile specifies the storage settings for the virtual machine disks.
12489type StorageProfile struct {
12490	// 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.
12491	ImageReference *ImageReference `json:"imageReference,omitempty"`
12492	// 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).
12493	OsDisk *OSDisk `json:"osDisk,omitempty"`
12494	// 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).
12495	DataDisks *[]DataDisk `json:"dataDisks,omitempty"`
12496}
12497
12498// SubResource ...
12499type SubResource struct {
12500	// ID - Resource Id
12501	ID *string `json:"id,omitempty"`
12502}
12503
12504// SubResourceReadOnly ...
12505type SubResourceReadOnly struct {
12506	// ID - READ-ONLY; Resource Id
12507	ID *string `json:"id,omitempty"`
12508}
12509
12510// MarshalJSON is the custom marshaler for SubResourceReadOnly.
12511func (srro SubResourceReadOnly) MarshalJSON() ([]byte, error) {
12512	objectMap := make(map[string]interface{})
12513	return json.Marshal(objectMap)
12514}
12515
12516// SubResourceWithColocationStatus ...
12517type SubResourceWithColocationStatus struct {
12518	// ColocationStatus - Describes colocation status of a resource in the Proximity Placement Group.
12519	ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
12520	// ID - Resource Id
12521	ID *string `json:"id,omitempty"`
12522}
12523
12524// TargetRegion describes the target region information.
12525type TargetRegion struct {
12526	// Name - The name of the region.
12527	Name *string `json:"name,omitempty"`
12528	// RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable.
12529	RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"`
12530	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
12531	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
12532	Encryption         *EncryptionImages  `json:"encryption,omitempty"`
12533}
12534
12535// TerminateNotificationProfile ...
12536type TerminateNotificationProfile struct {
12537	// 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)
12538	NotBeforeTimeout *string `json:"notBeforeTimeout,omitempty"`
12539	// Enable - Specifies whether the Terminate Scheduled event is enabled or disabled.
12540	Enable *bool `json:"enable,omitempty"`
12541}
12542
12543// ThrottledRequestsInput api request input for LogAnalytics getThrottledRequests Api.
12544type ThrottledRequestsInput struct {
12545	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
12546	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
12547	// FromTime - From time of the query
12548	FromTime *date.Time `json:"fromTime,omitempty"`
12549	// ToTime - To time of the query
12550	ToTime *date.Time `json:"toTime,omitempty"`
12551	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
12552	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
12553	// GroupByOperationName - Group query result by Operation Name.
12554	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
12555	// GroupByResourceName - Group query result by Resource Name.
12556	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
12557	// GroupByClientApplicationID - Group query result by Client Application ID.
12558	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
12559	// GroupByUserAgent - Group query result by User Agent.
12560	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
12561}
12562
12563// UpdateDomain defines an update domain for the cloud service.
12564type UpdateDomain struct {
12565	autorest.Response `json:"-"`
12566	// ID - READ-ONLY; Resource Id
12567	ID *string `json:"id,omitempty"`
12568	// Name - READ-ONLY; Resource Name
12569	Name *string `json:"name,omitempty"`
12570}
12571
12572// MarshalJSON is the custom marshaler for UpdateDomain.
12573func (ud UpdateDomain) MarshalJSON() ([]byte, error) {
12574	objectMap := make(map[string]interface{})
12575	return json.Marshal(objectMap)
12576}
12577
12578// UpdateDomainListResult ...
12579type UpdateDomainListResult struct {
12580	autorest.Response `json:"-"`
12581	Value             *[]UpdateDomain `json:"value,omitempty"`
12582	NextLink          *string         `json:"nextLink,omitempty"`
12583}
12584
12585// UpdateDomainListResultIterator provides access to a complete listing of UpdateDomain values.
12586type UpdateDomainListResultIterator struct {
12587	i    int
12588	page UpdateDomainListResultPage
12589}
12590
12591// NextWithContext advances to the next value.  If there was an error making
12592// the request the iterator does not advance and the error is returned.
12593func (iter *UpdateDomainListResultIterator) NextWithContext(ctx context.Context) (err error) {
12594	if tracing.IsEnabled() {
12595		ctx = tracing.StartSpan(ctx, fqdn+"/UpdateDomainListResultIterator.NextWithContext")
12596		defer func() {
12597			sc := -1
12598			if iter.Response().Response.Response != nil {
12599				sc = iter.Response().Response.Response.StatusCode
12600			}
12601			tracing.EndSpan(ctx, sc, err)
12602		}()
12603	}
12604	iter.i++
12605	if iter.i < len(iter.page.Values()) {
12606		return nil
12607	}
12608	err = iter.page.NextWithContext(ctx)
12609	if err != nil {
12610		iter.i--
12611		return err
12612	}
12613	iter.i = 0
12614	return nil
12615}
12616
12617// Next advances to the next value.  If there was an error making
12618// the request the iterator does not advance and the error is returned.
12619// Deprecated: Use NextWithContext() instead.
12620func (iter *UpdateDomainListResultIterator) Next() error {
12621	return iter.NextWithContext(context.Background())
12622}
12623
12624// NotDone returns true if the enumeration should be started or is not yet complete.
12625func (iter UpdateDomainListResultIterator) NotDone() bool {
12626	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12627}
12628
12629// Response returns the raw server response from the last page request.
12630func (iter UpdateDomainListResultIterator) Response() UpdateDomainListResult {
12631	return iter.page.Response()
12632}
12633
12634// Value returns the current value or a zero-initialized value if the
12635// iterator has advanced beyond the end of the collection.
12636func (iter UpdateDomainListResultIterator) Value() UpdateDomain {
12637	if !iter.page.NotDone() {
12638		return UpdateDomain{}
12639	}
12640	return iter.page.Values()[iter.i]
12641}
12642
12643// Creates a new instance of the UpdateDomainListResultIterator type.
12644func NewUpdateDomainListResultIterator(page UpdateDomainListResultPage) UpdateDomainListResultIterator {
12645	return UpdateDomainListResultIterator{page: page}
12646}
12647
12648// IsEmpty returns true if the ListResult contains no values.
12649func (udlr UpdateDomainListResult) IsEmpty() bool {
12650	return udlr.Value == nil || len(*udlr.Value) == 0
12651}
12652
12653// hasNextLink returns true if the NextLink is not empty.
12654func (udlr UpdateDomainListResult) hasNextLink() bool {
12655	return udlr.NextLink != nil && len(*udlr.NextLink) != 0
12656}
12657
12658// updateDomainListResultPreparer prepares a request to retrieve the next set of results.
12659// It returns nil if no more results exist.
12660func (udlr UpdateDomainListResult) updateDomainListResultPreparer(ctx context.Context) (*http.Request, error) {
12661	if !udlr.hasNextLink() {
12662		return nil, nil
12663	}
12664	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12665		autorest.AsJSON(),
12666		autorest.AsGet(),
12667		autorest.WithBaseURL(to.String(udlr.NextLink)))
12668}
12669
12670// UpdateDomainListResultPage contains a page of UpdateDomain values.
12671type UpdateDomainListResultPage struct {
12672	fn   func(context.Context, UpdateDomainListResult) (UpdateDomainListResult, error)
12673	udlr UpdateDomainListResult
12674}
12675
12676// NextWithContext advances to the next page of values.  If there was an error making
12677// the request the page does not advance and the error is returned.
12678func (page *UpdateDomainListResultPage) NextWithContext(ctx context.Context) (err error) {
12679	if tracing.IsEnabled() {
12680		ctx = tracing.StartSpan(ctx, fqdn+"/UpdateDomainListResultPage.NextWithContext")
12681		defer func() {
12682			sc := -1
12683			if page.Response().Response.Response != nil {
12684				sc = page.Response().Response.Response.StatusCode
12685			}
12686			tracing.EndSpan(ctx, sc, err)
12687		}()
12688	}
12689	for {
12690		next, err := page.fn(ctx, page.udlr)
12691		if err != nil {
12692			return err
12693		}
12694		page.udlr = next
12695		if !next.hasNextLink() || !next.IsEmpty() {
12696			break
12697		}
12698	}
12699	return nil
12700}
12701
12702// Next advances to the next page of values.  If there was an error making
12703// the request the page does not advance and the error is returned.
12704// Deprecated: Use NextWithContext() instead.
12705func (page *UpdateDomainListResultPage) Next() error {
12706	return page.NextWithContext(context.Background())
12707}
12708
12709// NotDone returns true if the page enumeration should be started or is not yet complete.
12710func (page UpdateDomainListResultPage) NotDone() bool {
12711	return !page.udlr.IsEmpty()
12712}
12713
12714// Response returns the raw server response from the last page request.
12715func (page UpdateDomainListResultPage) Response() UpdateDomainListResult {
12716	return page.udlr
12717}
12718
12719// Values returns the slice of values for the current page or nil if there are no values.
12720func (page UpdateDomainListResultPage) Values() []UpdateDomain {
12721	if page.udlr.IsEmpty() {
12722		return nil
12723	}
12724	return *page.udlr.Value
12725}
12726
12727// Creates a new instance of the UpdateDomainListResultPage type.
12728func NewUpdateDomainListResultPage(cur UpdateDomainListResult, getNextPage func(context.Context, UpdateDomainListResult) (UpdateDomainListResult, error)) UpdateDomainListResultPage {
12729	return UpdateDomainListResultPage{
12730		fn:   getNextPage,
12731		udlr: cur,
12732	}
12733}
12734
12735// UpdateResource the Update Resource model definition.
12736type UpdateResource struct {
12737	// Tags - Resource tags
12738	Tags map[string]*string `json:"tags"`
12739}
12740
12741// MarshalJSON is the custom marshaler for UpdateResource.
12742func (ur UpdateResource) MarshalJSON() ([]byte, error) {
12743	objectMap := make(map[string]interface{})
12744	if ur.Tags != nil {
12745		objectMap["tags"] = ur.Tags
12746	}
12747	return json.Marshal(objectMap)
12748}
12749
12750// UpdateResourceDefinition the Update Resource model definition.
12751type UpdateResourceDefinition struct {
12752	// ID - READ-ONLY; Resource Id
12753	ID *string `json:"id,omitempty"`
12754	// Name - READ-ONLY; Resource name
12755	Name *string `json:"name,omitempty"`
12756	// Type - READ-ONLY; Resource type
12757	Type *string `json:"type,omitempty"`
12758	// Tags - Resource tags
12759	Tags map[string]*string `json:"tags"`
12760}
12761
12762// MarshalJSON is the custom marshaler for UpdateResourceDefinition.
12763func (urd UpdateResourceDefinition) MarshalJSON() ([]byte, error) {
12764	objectMap := make(map[string]interface{})
12765	if urd.Tags != nil {
12766		objectMap["tags"] = urd.Tags
12767	}
12768	return json.Marshal(objectMap)
12769}
12770
12771// UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response.
12772type UpgradeOperationHistoricalStatusInfo struct {
12773	// Properties - READ-ONLY; Information about the properties of the upgrade operation.
12774	Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty"`
12775	// Type - READ-ONLY; Resource type
12776	Type *string `json:"type,omitempty"`
12777	// Location - READ-ONLY; Resource location
12778	Location *string `json:"location,omitempty"`
12779}
12780
12781// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfo.
12782func (uohsi UpgradeOperationHistoricalStatusInfo) MarshalJSON() ([]byte, error) {
12783	objectMap := make(map[string]interface{})
12784	return json.Marshal(objectMap)
12785}
12786
12787// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale
12788// Set.
12789type UpgradeOperationHistoricalStatusInfoProperties struct {
12790	// RunningStatus - READ-ONLY; Information about the overall status of the upgrade operation.
12791	RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"`
12792	// Progress - READ-ONLY; Counts of the VMs in each state.
12793	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
12794	// Error - READ-ONLY; Error Details for this upgrade if there are any.
12795	Error *APIError `json:"error,omitempty"`
12796	// StartedBy - READ-ONLY; Invoker of the Upgrade Operation. Possible values include: 'UpgradeOperationInvokerUnknown', 'UpgradeOperationInvokerUser', 'UpgradeOperationInvokerPlatform'
12797	StartedBy UpgradeOperationInvoker `json:"startedBy,omitempty"`
12798	// TargetImageReference - READ-ONLY; Image Reference details
12799	TargetImageReference *ImageReference `json:"targetImageReference,omitempty"`
12800	// RollbackInfo - READ-ONLY; Information about OS rollback if performed
12801	RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"`
12802}
12803
12804// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfoProperties.
12805func (uohsip UpgradeOperationHistoricalStatusInfoProperties) MarshalJSON() ([]byte, error) {
12806	objectMap := make(map[string]interface{})
12807	return json.Marshal(objectMap)
12808}
12809
12810// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade.
12811type UpgradeOperationHistoryStatus struct {
12812	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted'
12813	Code UpgradeState `json:"code,omitempty"`
12814	// StartTime - READ-ONLY; Start time of the upgrade.
12815	StartTime *date.Time `json:"startTime,omitempty"`
12816	// EndTime - READ-ONLY; End time of the upgrade.
12817	EndTime *date.Time `json:"endTime,omitempty"`
12818}
12819
12820// MarshalJSON is the custom marshaler for UpgradeOperationHistoryStatus.
12821func (uohs UpgradeOperationHistoryStatus) MarshalJSON() ([]byte, error) {
12822	objectMap := make(map[string]interface{})
12823	return json.Marshal(objectMap)
12824}
12825
12826// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling.
12827type UpgradePolicy struct {
12828	// 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'
12829	Mode UpgradeMode `json:"mode,omitempty"`
12830	// RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.
12831	RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"`
12832	// AutomaticOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade.
12833	AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"`
12834}
12835
12836// Usage describes Compute Resource Usage.
12837type Usage struct {
12838	// Unit - An enum describing the unit of usage measurement.
12839	Unit *string `json:"unit,omitempty"`
12840	// CurrentValue - The current usage of the resource.
12841	CurrentValue *int32 `json:"currentValue,omitempty"`
12842	// Limit - The maximum permitted usage of the resource.
12843	Limit *int64 `json:"limit,omitempty"`
12844	// Name - The name of the type of usage.
12845	Name *UsageName `json:"name,omitempty"`
12846}
12847
12848// UsageName the Usage Names.
12849type UsageName struct {
12850	// Value - The name of the resource.
12851	Value *string `json:"value,omitempty"`
12852	// LocalizedValue - The localized name of the resource.
12853	LocalizedValue *string `json:"localizedValue,omitempty"`
12854}
12855
12856// UserArtifactManage ...
12857type UserArtifactManage struct {
12858	// Install - Required. The path and arguments to install the gallery application. This is limited to 4096 characters.
12859	Install *string `json:"install,omitempty"`
12860	// Remove - Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.
12861	Remove *string `json:"remove,omitempty"`
12862	// Update - Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters.
12863	Update *string `json:"update,omitempty"`
12864}
12865
12866// UserArtifactSource the source image from which the Image Version is going to be created.
12867type UserArtifactSource struct {
12868	// MediaLink - Required. The mediaLink of the artifact, must be a readable storage page blob.
12869	MediaLink *string `json:"mediaLink,omitempty"`
12870	// DefaultConfigurationLink - Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.
12871	DefaultConfigurationLink *string `json:"defaultConfigurationLink,omitempty"`
12872}
12873
12874// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate
12875// should reside on the VM.
12876type VaultCertificate struct {
12877	// 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>}
12878	CertificateURL *string `json:"certificateUrl,omitempty"`
12879	// 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.
12880	CertificateStore *string `json:"certificateStore,omitempty"`
12881}
12882
12883// VaultSecretGroup describes a set of certificates which are all in the same Key Vault.
12884type VaultSecretGroup struct {
12885	// SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
12886	SourceVault *SubResource `json:"sourceVault,omitempty"`
12887	// VaultCertificates - The list of key vault references in SourceVault which contain certificates.
12888	VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"`
12889}
12890
12891// VirtualHardDisk describes the uri of a disk.
12892type VirtualHardDisk struct {
12893	// URI - Specifies the virtual hard disk's uri.
12894	URI *string `json:"uri,omitempty"`
12895}
12896
12897// VirtualMachine describes a Virtual Machine.
12898type VirtualMachine struct {
12899	autorest.Response `json:"-"`
12900	// 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**.
12901	Plan                      *Plan `json:"plan,omitempty"`
12902	*VirtualMachineProperties `json:"properties,omitempty"`
12903	// Resources - READ-ONLY; The virtual machine child extension resources.
12904	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
12905	// Identity - The identity of the virtual machine, if configured.
12906	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
12907	// Zones - The virtual machine zones.
12908	Zones *[]string `json:"zones,omitempty"`
12909	// ID - READ-ONLY; Resource Id
12910	ID *string `json:"id,omitempty"`
12911	// Name - READ-ONLY; Resource name
12912	Name *string `json:"name,omitempty"`
12913	// Type - READ-ONLY; Resource type
12914	Type *string `json:"type,omitempty"`
12915	// Location - Resource location
12916	Location *string `json:"location,omitempty"`
12917	// Tags - Resource tags
12918	Tags map[string]*string `json:"tags"`
12919}
12920
12921// MarshalJSON is the custom marshaler for VirtualMachine.
12922func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
12923	objectMap := make(map[string]interface{})
12924	if VM.Plan != nil {
12925		objectMap["plan"] = VM.Plan
12926	}
12927	if VM.VirtualMachineProperties != nil {
12928		objectMap["properties"] = VM.VirtualMachineProperties
12929	}
12930	if VM.Identity != nil {
12931		objectMap["identity"] = VM.Identity
12932	}
12933	if VM.Zones != nil {
12934		objectMap["zones"] = VM.Zones
12935	}
12936	if VM.Location != nil {
12937		objectMap["location"] = VM.Location
12938	}
12939	if VM.Tags != nil {
12940		objectMap["tags"] = VM.Tags
12941	}
12942	return json.Marshal(objectMap)
12943}
12944
12945// UnmarshalJSON is the custom unmarshaler for VirtualMachine struct.
12946func (VM *VirtualMachine) UnmarshalJSON(body []byte) error {
12947	var m map[string]*json.RawMessage
12948	err := json.Unmarshal(body, &m)
12949	if err != nil {
12950		return err
12951	}
12952	for k, v := range m {
12953		switch k {
12954		case "plan":
12955			if v != nil {
12956				var plan Plan
12957				err = json.Unmarshal(*v, &plan)
12958				if err != nil {
12959					return err
12960				}
12961				VM.Plan = &plan
12962			}
12963		case "properties":
12964			if v != nil {
12965				var virtualMachineProperties VirtualMachineProperties
12966				err = json.Unmarshal(*v, &virtualMachineProperties)
12967				if err != nil {
12968					return err
12969				}
12970				VM.VirtualMachineProperties = &virtualMachineProperties
12971			}
12972		case "resources":
12973			if v != nil {
12974				var resources []VirtualMachineExtension
12975				err = json.Unmarshal(*v, &resources)
12976				if err != nil {
12977					return err
12978				}
12979				VM.Resources = &resources
12980			}
12981		case "identity":
12982			if v != nil {
12983				var identity VirtualMachineIdentity
12984				err = json.Unmarshal(*v, &identity)
12985				if err != nil {
12986					return err
12987				}
12988				VM.Identity = &identity
12989			}
12990		case "zones":
12991			if v != nil {
12992				var zones []string
12993				err = json.Unmarshal(*v, &zones)
12994				if err != nil {
12995					return err
12996				}
12997				VM.Zones = &zones
12998			}
12999		case "id":
13000			if v != nil {
13001				var ID string
13002				err = json.Unmarshal(*v, &ID)
13003				if err != nil {
13004					return err
13005				}
13006				VM.ID = &ID
13007			}
13008		case "name":
13009			if v != nil {
13010				var name string
13011				err = json.Unmarshal(*v, &name)
13012				if err != nil {
13013					return err
13014				}
13015				VM.Name = &name
13016			}
13017		case "type":
13018			if v != nil {
13019				var typeVar string
13020				err = json.Unmarshal(*v, &typeVar)
13021				if err != nil {
13022					return err
13023				}
13024				VM.Type = &typeVar
13025			}
13026		case "location":
13027			if v != nil {
13028				var location string
13029				err = json.Unmarshal(*v, &location)
13030				if err != nil {
13031					return err
13032				}
13033				VM.Location = &location
13034			}
13035		case "tags":
13036			if v != nil {
13037				var tags map[string]*string
13038				err = json.Unmarshal(*v, &tags)
13039				if err != nil {
13040					return err
13041				}
13042				VM.Tags = tags
13043			}
13044		}
13045	}
13046
13047	return nil
13048}
13049
13050// VirtualMachineAgentInstanceView the instance view of the VM Agent running on the virtual machine.
13051type VirtualMachineAgentInstanceView struct {
13052	// VMAgentVersion - The VM Agent full version.
13053	VMAgentVersion *string `json:"vmAgentVersion,omitempty"`
13054	// ExtensionHandlers - The virtual machine extension handler instance view.
13055	ExtensionHandlers *[]VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"`
13056	// Statuses - The resource status information.
13057	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
13058}
13059
13060// VirtualMachineAssessPatchesResult describes the properties of an AssessPatches result.
13061type VirtualMachineAssessPatchesResult struct {
13062	autorest.Response `json:"-"`
13063	// 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'
13064	Status PatchOperationStatus `json:"status,omitempty"`
13065	// AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
13066	AssessmentActivityID *string `json:"assessmentActivityId,omitempty"`
13067	// 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.
13068	RebootPending *bool `json:"rebootPending,omitempty"`
13069	// CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
13070	CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"`
13071	// OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security.
13072	OtherPatchCount *int32 `json:"otherPatchCount,omitempty"`
13073	// StartDateTime - READ-ONLY; The UTC timestamp when the operation began.
13074	StartDateTime *date.Time `json:"startDateTime,omitempty"`
13075	// Patches - READ-ONLY; The list of patches that have been detected as available for installation.
13076	Patches *[]VirtualMachineSoftwarePatchProperties `json:"patches,omitempty"`
13077	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
13078	Error *APIError `json:"error,omitempty"`
13079}
13080
13081// MarshalJSON is the custom marshaler for VirtualMachineAssessPatchesResult.
13082func (vmapr VirtualMachineAssessPatchesResult) MarshalJSON() ([]byte, error) {
13083	objectMap := make(map[string]interface{})
13084	return json.Marshal(objectMap)
13085}
13086
13087// VirtualMachineCaptureParameters capture Virtual Machine parameters.
13088type VirtualMachineCaptureParameters struct {
13089	// VhdPrefix - The captured virtual hard disk's name prefix.
13090	VhdPrefix *string `json:"vhdPrefix,omitempty"`
13091	// DestinationContainerName - The destination container name.
13092	DestinationContainerName *string `json:"destinationContainerName,omitempty"`
13093	// OverwriteVhds - Specifies whether to overwrite the destination virtual hard disk, in case of conflict.
13094	OverwriteVhds *bool `json:"overwriteVhds,omitempty"`
13095}
13096
13097// VirtualMachineCaptureResult output of virtual machine capture operation.
13098type VirtualMachineCaptureResult struct {
13099	autorest.Response `json:"-"`
13100	// Schema - READ-ONLY; the schema of the captured virtual machine
13101	Schema *string `json:"$schema,omitempty"`
13102	// ContentVersion - READ-ONLY; the version of the content
13103	ContentVersion *string `json:"contentVersion,omitempty"`
13104	// Parameters - READ-ONLY; parameters of the captured virtual machine
13105	Parameters interface{} `json:"parameters,omitempty"`
13106	// Resources - READ-ONLY; a list of resource items of the captured virtual machine
13107	Resources *[]interface{} `json:"resources,omitempty"`
13108	// ID - Resource Id
13109	ID *string `json:"id,omitempty"`
13110}
13111
13112// MarshalJSON is the custom marshaler for VirtualMachineCaptureResult.
13113func (vmcr VirtualMachineCaptureResult) MarshalJSON() ([]byte, error) {
13114	objectMap := make(map[string]interface{})
13115	if vmcr.ID != nil {
13116		objectMap["id"] = vmcr.ID
13117	}
13118	return json.Marshal(objectMap)
13119}
13120
13121// VirtualMachineExtension describes a Virtual Machine Extension.
13122type VirtualMachineExtension struct {
13123	autorest.Response                  `json:"-"`
13124	*VirtualMachineExtensionProperties `json:"properties,omitempty"`
13125	// ID - READ-ONLY; Resource Id
13126	ID *string `json:"id,omitempty"`
13127	// Name - READ-ONLY; Resource name
13128	Name *string `json:"name,omitempty"`
13129	// Type - READ-ONLY; Resource type
13130	Type *string `json:"type,omitempty"`
13131	// Location - Resource location
13132	Location *string `json:"location,omitempty"`
13133	// Tags - Resource tags
13134	Tags map[string]*string `json:"tags"`
13135}
13136
13137// MarshalJSON is the custom marshaler for VirtualMachineExtension.
13138func (vme VirtualMachineExtension) MarshalJSON() ([]byte, error) {
13139	objectMap := make(map[string]interface{})
13140	if vme.VirtualMachineExtensionProperties != nil {
13141		objectMap["properties"] = vme.VirtualMachineExtensionProperties
13142	}
13143	if vme.Location != nil {
13144		objectMap["location"] = vme.Location
13145	}
13146	if vme.Tags != nil {
13147		objectMap["tags"] = vme.Tags
13148	}
13149	return json.Marshal(objectMap)
13150}
13151
13152// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtension struct.
13153func (vme *VirtualMachineExtension) UnmarshalJSON(body []byte) error {
13154	var m map[string]*json.RawMessage
13155	err := json.Unmarshal(body, &m)
13156	if err != nil {
13157		return err
13158	}
13159	for k, v := range m {
13160		switch k {
13161		case "properties":
13162			if v != nil {
13163				var virtualMachineExtensionProperties VirtualMachineExtensionProperties
13164				err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
13165				if err != nil {
13166					return err
13167				}
13168				vme.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
13169			}
13170		case "id":
13171			if v != nil {
13172				var ID string
13173				err = json.Unmarshal(*v, &ID)
13174				if err != nil {
13175					return err
13176				}
13177				vme.ID = &ID
13178			}
13179		case "name":
13180			if v != nil {
13181				var name string
13182				err = json.Unmarshal(*v, &name)
13183				if err != nil {
13184					return err
13185				}
13186				vme.Name = &name
13187			}
13188		case "type":
13189			if v != nil {
13190				var typeVar string
13191				err = json.Unmarshal(*v, &typeVar)
13192				if err != nil {
13193					return err
13194				}
13195				vme.Type = &typeVar
13196			}
13197		case "location":
13198			if v != nil {
13199				var location string
13200				err = json.Unmarshal(*v, &location)
13201				if err != nil {
13202					return err
13203				}
13204				vme.Location = &location
13205			}
13206		case "tags":
13207			if v != nil {
13208				var tags map[string]*string
13209				err = json.Unmarshal(*v, &tags)
13210				if err != nil {
13211					return err
13212				}
13213				vme.Tags = tags
13214			}
13215		}
13216	}
13217
13218	return nil
13219}
13220
13221// VirtualMachineExtensionHandlerInstanceView the instance view of a virtual machine extension handler.
13222type VirtualMachineExtensionHandlerInstanceView struct {
13223	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
13224	Type *string `json:"type,omitempty"`
13225	// TypeHandlerVersion - Specifies the version of the script handler.
13226	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
13227	// Status - The extension handler status.
13228	Status *InstanceViewStatus `json:"status,omitempty"`
13229}
13230
13231// VirtualMachineExtensionImage describes a Virtual Machine Extension Image.
13232type VirtualMachineExtensionImage struct {
13233	autorest.Response                       `json:"-"`
13234	*VirtualMachineExtensionImageProperties `json:"properties,omitempty"`
13235	// ID - READ-ONLY; Resource Id
13236	ID *string `json:"id,omitempty"`
13237	// Name - READ-ONLY; Resource name
13238	Name *string `json:"name,omitempty"`
13239	// Type - READ-ONLY; Resource type
13240	Type *string `json:"type,omitempty"`
13241	// Location - Resource location
13242	Location *string `json:"location,omitempty"`
13243	// Tags - Resource tags
13244	Tags map[string]*string `json:"tags"`
13245}
13246
13247// MarshalJSON is the custom marshaler for VirtualMachineExtensionImage.
13248func (vmei VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) {
13249	objectMap := make(map[string]interface{})
13250	if vmei.VirtualMachineExtensionImageProperties != nil {
13251		objectMap["properties"] = vmei.VirtualMachineExtensionImageProperties
13252	}
13253	if vmei.Location != nil {
13254		objectMap["location"] = vmei.Location
13255	}
13256	if vmei.Tags != nil {
13257		objectMap["tags"] = vmei.Tags
13258	}
13259	return json.Marshal(objectMap)
13260}
13261
13262// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionImage struct.
13263func (vmei *VirtualMachineExtensionImage) UnmarshalJSON(body []byte) error {
13264	var m map[string]*json.RawMessage
13265	err := json.Unmarshal(body, &m)
13266	if err != nil {
13267		return err
13268	}
13269	for k, v := range m {
13270		switch k {
13271		case "properties":
13272			if v != nil {
13273				var virtualMachineExtensionImageProperties VirtualMachineExtensionImageProperties
13274				err = json.Unmarshal(*v, &virtualMachineExtensionImageProperties)
13275				if err != nil {
13276					return err
13277				}
13278				vmei.VirtualMachineExtensionImageProperties = &virtualMachineExtensionImageProperties
13279			}
13280		case "id":
13281			if v != nil {
13282				var ID string
13283				err = json.Unmarshal(*v, &ID)
13284				if err != nil {
13285					return err
13286				}
13287				vmei.ID = &ID
13288			}
13289		case "name":
13290			if v != nil {
13291				var name string
13292				err = json.Unmarshal(*v, &name)
13293				if err != nil {
13294					return err
13295				}
13296				vmei.Name = &name
13297			}
13298		case "type":
13299			if v != nil {
13300				var typeVar string
13301				err = json.Unmarshal(*v, &typeVar)
13302				if err != nil {
13303					return err
13304				}
13305				vmei.Type = &typeVar
13306			}
13307		case "location":
13308			if v != nil {
13309				var location string
13310				err = json.Unmarshal(*v, &location)
13311				if err != nil {
13312					return err
13313				}
13314				vmei.Location = &location
13315			}
13316		case "tags":
13317			if v != nil {
13318				var tags map[string]*string
13319				err = json.Unmarshal(*v, &tags)
13320				if err != nil {
13321					return err
13322				}
13323				vmei.Tags = tags
13324			}
13325		}
13326	}
13327
13328	return nil
13329}
13330
13331// VirtualMachineExtensionImageProperties describes the properties of a Virtual Machine Extension Image.
13332type VirtualMachineExtensionImageProperties struct {
13333	// OperatingSystem - The operating system this extension supports.
13334	OperatingSystem *string `json:"operatingSystem,omitempty"`
13335	// ComputeRole - The type of role (IaaS or PaaS) this extension supports.
13336	ComputeRole *string `json:"computeRole,omitempty"`
13337	// HandlerSchema - The schema defined by publisher, where extension consumers should provide settings in a matching schema.
13338	HandlerSchema *string `json:"handlerSchema,omitempty"`
13339	// 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.
13340	VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"`
13341	// SupportsMultipleExtensions - Whether the handler can support multiple extensions.
13342	SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"`
13343}
13344
13345// VirtualMachineExtensionInstanceView the instance view of a virtual machine extension.
13346type VirtualMachineExtensionInstanceView struct {
13347	// Name - The virtual machine extension name.
13348	Name *string `json:"name,omitempty"`
13349	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
13350	Type *string `json:"type,omitempty"`
13351	// TypeHandlerVersion - Specifies the version of the script handler.
13352	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
13353	// Substatuses - The resource status information.
13354	Substatuses *[]InstanceViewStatus `json:"substatuses,omitempty"`
13355	// Statuses - The resource status information.
13356	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
13357}
13358
13359// VirtualMachineExtensionProperties describes the properties of a Virtual Machine Extension.
13360type VirtualMachineExtensionProperties struct {
13361	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
13362	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
13363	// Publisher - The name of the extension handler publisher.
13364	Publisher *string `json:"publisher,omitempty"`
13365	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
13366	Type *string `json:"type,omitempty"`
13367	// TypeHandlerVersion - Specifies the version of the script handler.
13368	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
13369	// 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.
13370	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
13371	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
13372	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
13373	// Settings - Json formatted public settings for the extension.
13374	Settings interface{} `json:"settings,omitempty"`
13375	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
13376	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
13377	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
13378	ProvisioningState *string `json:"provisioningState,omitempty"`
13379	// InstanceView - The virtual machine extension instance view.
13380	InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`
13381}
13382
13383// MarshalJSON is the custom marshaler for VirtualMachineExtensionProperties.
13384func (vmep VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) {
13385	objectMap := make(map[string]interface{})
13386	if vmep.ForceUpdateTag != nil {
13387		objectMap["forceUpdateTag"] = vmep.ForceUpdateTag
13388	}
13389	if vmep.Publisher != nil {
13390		objectMap["publisher"] = vmep.Publisher
13391	}
13392	if vmep.Type != nil {
13393		objectMap["type"] = vmep.Type
13394	}
13395	if vmep.TypeHandlerVersion != nil {
13396		objectMap["typeHandlerVersion"] = vmep.TypeHandlerVersion
13397	}
13398	if vmep.AutoUpgradeMinorVersion != nil {
13399		objectMap["autoUpgradeMinorVersion"] = vmep.AutoUpgradeMinorVersion
13400	}
13401	if vmep.EnableAutomaticUpgrade != nil {
13402		objectMap["enableAutomaticUpgrade"] = vmep.EnableAutomaticUpgrade
13403	}
13404	if vmep.Settings != nil {
13405		objectMap["settings"] = vmep.Settings
13406	}
13407	if vmep.ProtectedSettings != nil {
13408		objectMap["protectedSettings"] = vmep.ProtectedSettings
13409	}
13410	if vmep.InstanceView != nil {
13411		objectMap["instanceView"] = vmep.InstanceView
13412	}
13413	return json.Marshal(objectMap)
13414}
13415
13416// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
13417// a long-running operation.
13418type VirtualMachineExtensionsCreateOrUpdateFuture struct {
13419	azure.FutureAPI
13420	// Result returns the result of the asynchronous operation.
13421	// If the operation has not completed it will return an error.
13422	Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
13423}
13424
13425// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13426func (future *VirtualMachineExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13427	var azFuture azure.Future
13428	if err := json.Unmarshal(body, &azFuture); err != nil {
13429		return err
13430	}
13431	future.FutureAPI = &azFuture
13432	future.Result = future.result
13433	return nil
13434}
13435
13436// result is the default implementation for VirtualMachineExtensionsCreateOrUpdateFuture.Result.
13437func (future *VirtualMachineExtensionsCreateOrUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
13438	var done bool
13439	done, err = future.DoneWithContext(context.Background(), client)
13440	if err != nil {
13441		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13442		return
13443	}
13444	if !done {
13445		vme.Response.Response = future.Response()
13446		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
13447		return
13448	}
13449	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13450	if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
13451		vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
13452		if err != nil {
13453			err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
13454		}
13455	}
13456	return
13457}
13458
13459// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
13460// long-running operation.
13461type VirtualMachineExtensionsDeleteFuture struct {
13462	azure.FutureAPI
13463	// Result returns the result of the asynchronous operation.
13464	// If the operation has not completed it will return an error.
13465	Result func(VirtualMachineExtensionsClient) (autorest.Response, error)
13466}
13467
13468// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13469func (future *VirtualMachineExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
13470	var azFuture azure.Future
13471	if err := json.Unmarshal(body, &azFuture); err != nil {
13472		return err
13473	}
13474	future.FutureAPI = &azFuture
13475	future.Result = future.result
13476	return nil
13477}
13478
13479// result is the default implementation for VirtualMachineExtensionsDeleteFuture.Result.
13480func (future *VirtualMachineExtensionsDeleteFuture) result(client VirtualMachineExtensionsClient) (ar autorest.Response, err error) {
13481	var done bool
13482	done, err = future.DoneWithContext(context.Background(), client)
13483	if err != nil {
13484		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
13485		return
13486	}
13487	if !done {
13488		ar.Response = future.Response()
13489		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
13490		return
13491	}
13492	ar.Response = future.Response()
13493	return
13494}
13495
13496// VirtualMachineExtensionsListResult the List Extension operation response
13497type VirtualMachineExtensionsListResult struct {
13498	autorest.Response `json:"-"`
13499	// Value - The list of extensions
13500	Value *[]VirtualMachineExtension `json:"value,omitempty"`
13501}
13502
13503// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
13504// long-running operation.
13505type VirtualMachineExtensionsUpdateFuture struct {
13506	azure.FutureAPI
13507	// Result returns the result of the asynchronous operation.
13508	// If the operation has not completed it will return an error.
13509	Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
13510}
13511
13512// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13513func (future *VirtualMachineExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
13514	var azFuture azure.Future
13515	if err := json.Unmarshal(body, &azFuture); err != nil {
13516		return err
13517	}
13518	future.FutureAPI = &azFuture
13519	future.Result = future.result
13520	return nil
13521}
13522
13523// result is the default implementation for VirtualMachineExtensionsUpdateFuture.Result.
13524func (future *VirtualMachineExtensionsUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
13525	var done bool
13526	done, err = future.DoneWithContext(context.Background(), client)
13527	if err != nil {
13528		err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
13529		return
13530	}
13531	if !done {
13532		vme.Response.Response = future.Response()
13533		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
13534		return
13535	}
13536	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13537	if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
13538		vme, err = client.UpdateResponder(vme.Response.Response)
13539		if err != nil {
13540			err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
13541		}
13542	}
13543	return
13544}
13545
13546// VirtualMachineExtensionUpdate describes a Virtual Machine Extension.
13547type VirtualMachineExtensionUpdate struct {
13548	*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
13549	// Tags - Resource tags
13550	Tags map[string]*string `json:"tags"`
13551}
13552
13553// MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate.
13554func (vmeu VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) {
13555	objectMap := make(map[string]interface{})
13556	if vmeu.VirtualMachineExtensionUpdateProperties != nil {
13557		objectMap["properties"] = vmeu.VirtualMachineExtensionUpdateProperties
13558	}
13559	if vmeu.Tags != nil {
13560		objectMap["tags"] = vmeu.Tags
13561	}
13562	return json.Marshal(objectMap)
13563}
13564
13565// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionUpdate struct.
13566func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error {
13567	var m map[string]*json.RawMessage
13568	err := json.Unmarshal(body, &m)
13569	if err != nil {
13570		return err
13571	}
13572	for k, v := range m {
13573		switch k {
13574		case "properties":
13575			if v != nil {
13576				var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
13577				err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
13578				if err != nil {
13579					return err
13580				}
13581				vmeu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
13582			}
13583		case "tags":
13584			if v != nil {
13585				var tags map[string]*string
13586				err = json.Unmarshal(*v, &tags)
13587				if err != nil {
13588					return err
13589				}
13590				vmeu.Tags = tags
13591			}
13592		}
13593	}
13594
13595	return nil
13596}
13597
13598// VirtualMachineExtensionUpdateProperties describes the properties of a Virtual Machine Extension.
13599type VirtualMachineExtensionUpdateProperties struct {
13600	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
13601	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
13602	// Publisher - The name of the extension handler publisher.
13603	Publisher *string `json:"publisher,omitempty"`
13604	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
13605	Type *string `json:"type,omitempty"`
13606	// TypeHandlerVersion - Specifies the version of the script handler.
13607	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
13608	// 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.
13609	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
13610	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
13611	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
13612	// Settings - Json formatted public settings for the extension.
13613	Settings interface{} `json:"settings,omitempty"`
13614	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
13615	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
13616}
13617
13618// VirtualMachineHealthStatus the health status of the VM.
13619type VirtualMachineHealthStatus struct {
13620	// Status - READ-ONLY; The health status information for the VM.
13621	Status *InstanceViewStatus `json:"status,omitempty"`
13622}
13623
13624// MarshalJSON is the custom marshaler for VirtualMachineHealthStatus.
13625func (vmhs VirtualMachineHealthStatus) MarshalJSON() ([]byte, error) {
13626	objectMap := make(map[string]interface{})
13627	return json.Marshal(objectMap)
13628}
13629
13630// VirtualMachineIdentity identity for the virtual machine.
13631type VirtualMachineIdentity struct {
13632	// PrincipalID - READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity.
13633	PrincipalID *string `json:"principalId,omitempty"`
13634	// TenantID - READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity.
13635	TenantID *string `json:"tenantId,omitempty"`
13636	// 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'
13637	Type ResourceIdentityType `json:"type,omitempty"`
13638	// 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}'.
13639	UserAssignedIdentities map[string]*VirtualMachineIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
13640}
13641
13642// MarshalJSON is the custom marshaler for VirtualMachineIdentity.
13643func (vmi VirtualMachineIdentity) MarshalJSON() ([]byte, error) {
13644	objectMap := make(map[string]interface{})
13645	if vmi.Type != "" {
13646		objectMap["type"] = vmi.Type
13647	}
13648	if vmi.UserAssignedIdentities != nil {
13649		objectMap["userAssignedIdentities"] = vmi.UserAssignedIdentities
13650	}
13651	return json.Marshal(objectMap)
13652}
13653
13654// VirtualMachineIdentityUserAssignedIdentitiesValue ...
13655type VirtualMachineIdentityUserAssignedIdentitiesValue struct {
13656	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
13657	PrincipalID *string `json:"principalId,omitempty"`
13658	// ClientID - READ-ONLY; The client id of user assigned identity.
13659	ClientID *string `json:"clientId,omitempty"`
13660}
13661
13662// MarshalJSON is the custom marshaler for VirtualMachineIdentityUserAssignedIdentitiesValue.
13663func (vmiAiv VirtualMachineIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
13664	objectMap := make(map[string]interface{})
13665	return json.Marshal(objectMap)
13666}
13667
13668// VirtualMachineImage describes a Virtual Machine Image.
13669type VirtualMachineImage struct {
13670	autorest.Response              `json:"-"`
13671	*VirtualMachineImageProperties `json:"properties,omitempty"`
13672	// Name - The name of the resource.
13673	Name *string `json:"name,omitempty"`
13674	// Location - The supported Azure location of the resource.
13675	Location *string `json:"location,omitempty"`
13676	// 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).
13677	Tags map[string]*string `json:"tags"`
13678	// ID - Resource Id
13679	ID *string `json:"id,omitempty"`
13680}
13681
13682// MarshalJSON is the custom marshaler for VirtualMachineImage.
13683func (vmi VirtualMachineImage) MarshalJSON() ([]byte, error) {
13684	objectMap := make(map[string]interface{})
13685	if vmi.VirtualMachineImageProperties != nil {
13686		objectMap["properties"] = vmi.VirtualMachineImageProperties
13687	}
13688	if vmi.Name != nil {
13689		objectMap["name"] = vmi.Name
13690	}
13691	if vmi.Location != nil {
13692		objectMap["location"] = vmi.Location
13693	}
13694	if vmi.Tags != nil {
13695		objectMap["tags"] = vmi.Tags
13696	}
13697	if vmi.ID != nil {
13698		objectMap["id"] = vmi.ID
13699	}
13700	return json.Marshal(objectMap)
13701}
13702
13703// UnmarshalJSON is the custom unmarshaler for VirtualMachineImage struct.
13704func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error {
13705	var m map[string]*json.RawMessage
13706	err := json.Unmarshal(body, &m)
13707	if err != nil {
13708		return err
13709	}
13710	for k, v := range m {
13711		switch k {
13712		case "properties":
13713			if v != nil {
13714				var virtualMachineImageProperties VirtualMachineImageProperties
13715				err = json.Unmarshal(*v, &virtualMachineImageProperties)
13716				if err != nil {
13717					return err
13718				}
13719				vmi.VirtualMachineImageProperties = &virtualMachineImageProperties
13720			}
13721		case "name":
13722			if v != nil {
13723				var name string
13724				err = json.Unmarshal(*v, &name)
13725				if err != nil {
13726					return err
13727				}
13728				vmi.Name = &name
13729			}
13730		case "location":
13731			if v != nil {
13732				var location string
13733				err = json.Unmarshal(*v, &location)
13734				if err != nil {
13735					return err
13736				}
13737				vmi.Location = &location
13738			}
13739		case "tags":
13740			if v != nil {
13741				var tags map[string]*string
13742				err = json.Unmarshal(*v, &tags)
13743				if err != nil {
13744					return err
13745				}
13746				vmi.Tags = tags
13747			}
13748		case "id":
13749			if v != nil {
13750				var ID string
13751				err = json.Unmarshal(*v, &ID)
13752				if err != nil {
13753					return err
13754				}
13755				vmi.ID = &ID
13756			}
13757		}
13758	}
13759
13760	return nil
13761}
13762
13763// VirtualMachineImageProperties describes the properties of a Virtual Machine Image.
13764type VirtualMachineImageProperties struct {
13765	Plan                         *PurchasePlan                 `json:"plan,omitempty"`
13766	OsDiskImage                  *OSDiskImage                  `json:"osDiskImage,omitempty"`
13767	DataDiskImages               *[]DataDiskImage              `json:"dataDiskImages,omitempty"`
13768	AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"`
13769	// HyperVGeneration - Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
13770	HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
13771	// Disallowed - Specifies disallowed configuration for the VirtualMachine created from the image
13772	Disallowed *DisallowedConfiguration `json:"disallowed,omitempty"`
13773}
13774
13775// VirtualMachineImageResource virtual machine image resource information.
13776type VirtualMachineImageResource struct {
13777	// Name - The name of the resource.
13778	Name *string `json:"name,omitempty"`
13779	// Location - The supported Azure location of the resource.
13780	Location *string `json:"location,omitempty"`
13781	// 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).
13782	Tags map[string]*string `json:"tags"`
13783	// ID - Resource Id
13784	ID *string `json:"id,omitempty"`
13785}
13786
13787// MarshalJSON is the custom marshaler for VirtualMachineImageResource.
13788func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) {
13789	objectMap := make(map[string]interface{})
13790	if vmir.Name != nil {
13791		objectMap["name"] = vmir.Name
13792	}
13793	if vmir.Location != nil {
13794		objectMap["location"] = vmir.Location
13795	}
13796	if vmir.Tags != nil {
13797		objectMap["tags"] = vmir.Tags
13798	}
13799	if vmir.ID != nil {
13800		objectMap["id"] = vmir.ID
13801	}
13802	return json.Marshal(objectMap)
13803}
13804
13805// VirtualMachineInstanceView the instance view of a virtual machine.
13806type VirtualMachineInstanceView struct {
13807	autorest.Response `json:"-"`
13808	// PlatformUpdateDomain - Specifies the update domain of the virtual machine.
13809	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
13810	// PlatformFaultDomain - Specifies the fault domain of the virtual machine.
13811	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
13812	// ComputerName - The computer name assigned to the virtual machine.
13813	ComputerName *string `json:"computerName,omitempty"`
13814	// OsName - The Operating System running on the virtual machine.
13815	OsName *string `json:"osName,omitempty"`
13816	// OsVersion - The version of Operating System running on the virtual machine.
13817	OsVersion *string `json:"osVersion,omitempty"`
13818	// HyperVGeneration - Specifies the HyperVGeneration Type associated with a resource. Possible values include: 'HyperVGenerationTypeV1', 'HyperVGenerationTypeV2'
13819	HyperVGeneration HyperVGenerationType `json:"hyperVGeneration,omitempty"`
13820	// RdpThumbPrint - The Remote desktop certificate thumbprint.
13821	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
13822	// VMAgent - The VM Agent running on the virtual machine.
13823	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
13824	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
13825	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
13826	// Disks - The virtual machine disk information.
13827	Disks *[]DiskInstanceView `json:"disks,omitempty"`
13828	// Extensions - The extensions information.
13829	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
13830	// VMHealth - READ-ONLY; The health status for the VM.
13831	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
13832	// 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.
13833	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
13834	// 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.
13835	AssignedHost *string `json:"assignedHost,omitempty"`
13836	// Statuses - The resource status information.
13837	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
13838	// PatchStatus - The status of virtual machine patch operations.
13839	PatchStatus *VirtualMachinePatchStatus `json:"patchStatus,omitempty"`
13840}
13841
13842// MarshalJSON is the custom marshaler for VirtualMachineInstanceView.
13843func (vmiv VirtualMachineInstanceView) MarshalJSON() ([]byte, error) {
13844	objectMap := make(map[string]interface{})
13845	if vmiv.PlatformUpdateDomain != nil {
13846		objectMap["platformUpdateDomain"] = vmiv.PlatformUpdateDomain
13847	}
13848	if vmiv.PlatformFaultDomain != nil {
13849		objectMap["platformFaultDomain"] = vmiv.PlatformFaultDomain
13850	}
13851	if vmiv.ComputerName != nil {
13852		objectMap["computerName"] = vmiv.ComputerName
13853	}
13854	if vmiv.OsName != nil {
13855		objectMap["osName"] = vmiv.OsName
13856	}
13857	if vmiv.OsVersion != nil {
13858		objectMap["osVersion"] = vmiv.OsVersion
13859	}
13860	if vmiv.HyperVGeneration != "" {
13861		objectMap["hyperVGeneration"] = vmiv.HyperVGeneration
13862	}
13863	if vmiv.RdpThumbPrint != nil {
13864		objectMap["rdpThumbPrint"] = vmiv.RdpThumbPrint
13865	}
13866	if vmiv.VMAgent != nil {
13867		objectMap["vmAgent"] = vmiv.VMAgent
13868	}
13869	if vmiv.MaintenanceRedeployStatus != nil {
13870		objectMap["maintenanceRedeployStatus"] = vmiv.MaintenanceRedeployStatus
13871	}
13872	if vmiv.Disks != nil {
13873		objectMap["disks"] = vmiv.Disks
13874	}
13875	if vmiv.Extensions != nil {
13876		objectMap["extensions"] = vmiv.Extensions
13877	}
13878	if vmiv.BootDiagnostics != nil {
13879		objectMap["bootDiagnostics"] = vmiv.BootDiagnostics
13880	}
13881	if vmiv.Statuses != nil {
13882		objectMap["statuses"] = vmiv.Statuses
13883	}
13884	if vmiv.PatchStatus != nil {
13885		objectMap["patchStatus"] = vmiv.PatchStatus
13886	}
13887	return json.Marshal(objectMap)
13888}
13889
13890// VirtualMachineListResult the List Virtual Machine operation response.
13891type VirtualMachineListResult struct {
13892	autorest.Response `json:"-"`
13893	// Value - The list of virtual machines.
13894	Value *[]VirtualMachine `json:"value,omitempty"`
13895	// NextLink - The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines.
13896	NextLink *string `json:"nextLink,omitempty"`
13897}
13898
13899// VirtualMachineListResultIterator provides access to a complete listing of VirtualMachine values.
13900type VirtualMachineListResultIterator struct {
13901	i    int
13902	page VirtualMachineListResultPage
13903}
13904
13905// NextWithContext advances to the next value.  If there was an error making
13906// the request the iterator does not advance and the error is returned.
13907func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) {
13908	if tracing.IsEnabled() {
13909		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.NextWithContext")
13910		defer func() {
13911			sc := -1
13912			if iter.Response().Response.Response != nil {
13913				sc = iter.Response().Response.Response.StatusCode
13914			}
13915			tracing.EndSpan(ctx, sc, err)
13916		}()
13917	}
13918	iter.i++
13919	if iter.i < len(iter.page.Values()) {
13920		return nil
13921	}
13922	err = iter.page.NextWithContext(ctx)
13923	if err != nil {
13924		iter.i--
13925		return err
13926	}
13927	iter.i = 0
13928	return nil
13929}
13930
13931// Next advances to the next value.  If there was an error making
13932// the request the iterator does not advance and the error is returned.
13933// Deprecated: Use NextWithContext() instead.
13934func (iter *VirtualMachineListResultIterator) Next() error {
13935	return iter.NextWithContext(context.Background())
13936}
13937
13938// NotDone returns true if the enumeration should be started or is not yet complete.
13939func (iter VirtualMachineListResultIterator) NotDone() bool {
13940	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13941}
13942
13943// Response returns the raw server response from the last page request.
13944func (iter VirtualMachineListResultIterator) Response() VirtualMachineListResult {
13945	return iter.page.Response()
13946}
13947
13948// Value returns the current value or a zero-initialized value if the
13949// iterator has advanced beyond the end of the collection.
13950func (iter VirtualMachineListResultIterator) Value() VirtualMachine {
13951	if !iter.page.NotDone() {
13952		return VirtualMachine{}
13953	}
13954	return iter.page.Values()[iter.i]
13955}
13956
13957// Creates a new instance of the VirtualMachineListResultIterator type.
13958func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator {
13959	return VirtualMachineListResultIterator{page: page}
13960}
13961
13962// IsEmpty returns true if the ListResult contains no values.
13963func (vmlr VirtualMachineListResult) IsEmpty() bool {
13964	return vmlr.Value == nil || len(*vmlr.Value) == 0
13965}
13966
13967// hasNextLink returns true if the NextLink is not empty.
13968func (vmlr VirtualMachineListResult) hasNextLink() bool {
13969	return vmlr.NextLink != nil && len(*vmlr.NextLink) != 0
13970}
13971
13972// virtualMachineListResultPreparer prepares a request to retrieve the next set of results.
13973// It returns nil if no more results exist.
13974func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) {
13975	if !vmlr.hasNextLink() {
13976		return nil, nil
13977	}
13978	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13979		autorest.AsJSON(),
13980		autorest.AsGet(),
13981		autorest.WithBaseURL(to.String(vmlr.NextLink)))
13982}
13983
13984// VirtualMachineListResultPage contains a page of VirtualMachine values.
13985type VirtualMachineListResultPage struct {
13986	fn   func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)
13987	vmlr VirtualMachineListResult
13988}
13989
13990// NextWithContext advances to the next page of values.  If there was an error making
13991// the request the page does not advance and the error is returned.
13992func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) {
13993	if tracing.IsEnabled() {
13994		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext")
13995		defer func() {
13996			sc := -1
13997			if page.Response().Response.Response != nil {
13998				sc = page.Response().Response.Response.StatusCode
13999			}
14000			tracing.EndSpan(ctx, sc, err)
14001		}()
14002	}
14003	for {
14004		next, err := page.fn(ctx, page.vmlr)
14005		if err != nil {
14006			return err
14007		}
14008		page.vmlr = next
14009		if !next.hasNextLink() || !next.IsEmpty() {
14010			break
14011		}
14012	}
14013	return nil
14014}
14015
14016// Next advances to the next page of values.  If there was an error making
14017// the request the page does not advance and the error is returned.
14018// Deprecated: Use NextWithContext() instead.
14019func (page *VirtualMachineListResultPage) Next() error {
14020	return page.NextWithContext(context.Background())
14021}
14022
14023// NotDone returns true if the page enumeration should be started or is not yet complete.
14024func (page VirtualMachineListResultPage) NotDone() bool {
14025	return !page.vmlr.IsEmpty()
14026}
14027
14028// Response returns the raw server response from the last page request.
14029func (page VirtualMachineListResultPage) Response() VirtualMachineListResult {
14030	return page.vmlr
14031}
14032
14033// Values returns the slice of values for the current page or nil if there are no values.
14034func (page VirtualMachineListResultPage) Values() []VirtualMachine {
14035	if page.vmlr.IsEmpty() {
14036		return nil
14037	}
14038	return *page.vmlr.Value
14039}
14040
14041// Creates a new instance of the VirtualMachineListResultPage type.
14042func NewVirtualMachineListResultPage(cur VirtualMachineListResult, getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
14043	return VirtualMachineListResultPage{
14044		fn:   getNextPage,
14045		vmlr: cur,
14046	}
14047}
14048
14049// VirtualMachinePatchStatus the status of virtual machine patch operations.
14050type VirtualMachinePatchStatus struct {
14051	// AvailablePatchSummary - The available patch summary of the latest assessment operation for the virtual machine.
14052	AvailablePatchSummary *AvailablePatchSummary `json:"availablePatchSummary,omitempty"`
14053	// LastPatchInstallationSummary - The installation summary of the latest installation operation for the virtual machine.
14054	LastPatchInstallationSummary *LastPatchInstallationSummary `json:"lastPatchInstallationSummary,omitempty"`
14055}
14056
14057// VirtualMachineProperties describes the properties of a Virtual Machine.
14058type VirtualMachineProperties struct {
14059	// HardwareProfile - Specifies the hardware settings for the virtual machine.
14060	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
14061	// StorageProfile - Specifies the storage settings for the virtual machine disks.
14062	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
14063	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine.
14064	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
14065	// OsProfile - Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
14066	OsProfile *OSProfile `json:"osProfile,omitempty"`
14067	// NetworkProfile - Specifies the network interfaces of the virtual machine.
14068	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
14069	// SecurityProfile - Specifies the Security related profile settings for the virtual machine.
14070	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
14071	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
14072	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
14073	// 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.
14074	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
14075	// 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
14076	VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"`
14077	// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.
14078	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
14079	// Priority - Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot'
14080	Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
14081	// 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'
14082	EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
14083	// BillingProfile - Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
14084	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
14085	// Host - Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
14086	Host *SubResource `json:"host,omitempty"`
14087	// 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.
14088	HostGroup *SubResource `json:"hostGroup,omitempty"`
14089	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
14090	ProvisioningState *string `json:"provisioningState,omitempty"`
14091	// InstanceView - READ-ONLY; The virtual machine instance view.
14092	InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"`
14093	// 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
14094	LicenseType *string `json:"licenseType,omitempty"`
14095	// 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.
14096	VMID *string `json:"vmId,omitempty"`
14097	// 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
14098	ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`
14099}
14100
14101// MarshalJSON is the custom marshaler for VirtualMachineProperties.
14102func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) {
14103	objectMap := make(map[string]interface{})
14104	if vmp.HardwareProfile != nil {
14105		objectMap["hardwareProfile"] = vmp.HardwareProfile
14106	}
14107	if vmp.StorageProfile != nil {
14108		objectMap["storageProfile"] = vmp.StorageProfile
14109	}
14110	if vmp.AdditionalCapabilities != nil {
14111		objectMap["additionalCapabilities"] = vmp.AdditionalCapabilities
14112	}
14113	if vmp.OsProfile != nil {
14114		objectMap["osProfile"] = vmp.OsProfile
14115	}
14116	if vmp.NetworkProfile != nil {
14117		objectMap["networkProfile"] = vmp.NetworkProfile
14118	}
14119	if vmp.SecurityProfile != nil {
14120		objectMap["securityProfile"] = vmp.SecurityProfile
14121	}
14122	if vmp.DiagnosticsProfile != nil {
14123		objectMap["diagnosticsProfile"] = vmp.DiagnosticsProfile
14124	}
14125	if vmp.AvailabilitySet != nil {
14126		objectMap["availabilitySet"] = vmp.AvailabilitySet
14127	}
14128	if vmp.VirtualMachineScaleSet != nil {
14129		objectMap["virtualMachineScaleSet"] = vmp.VirtualMachineScaleSet
14130	}
14131	if vmp.ProximityPlacementGroup != nil {
14132		objectMap["proximityPlacementGroup"] = vmp.ProximityPlacementGroup
14133	}
14134	if vmp.Priority != "" {
14135		objectMap["priority"] = vmp.Priority
14136	}
14137	if vmp.EvictionPolicy != "" {
14138		objectMap["evictionPolicy"] = vmp.EvictionPolicy
14139	}
14140	if vmp.BillingProfile != nil {
14141		objectMap["billingProfile"] = vmp.BillingProfile
14142	}
14143	if vmp.Host != nil {
14144		objectMap["host"] = vmp.Host
14145	}
14146	if vmp.HostGroup != nil {
14147		objectMap["hostGroup"] = vmp.HostGroup
14148	}
14149	if vmp.LicenseType != nil {
14150		objectMap["licenseType"] = vmp.LicenseType
14151	}
14152	if vmp.ExtensionsTimeBudget != nil {
14153		objectMap["extensionsTimeBudget"] = vmp.ExtensionsTimeBudget
14154	}
14155	return json.Marshal(objectMap)
14156}
14157
14158// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk
14159// will always be reimaged
14160type VirtualMachineReimageParameters struct {
14161	// 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.
14162	TempDisk *bool `json:"tempDisk,omitempty"`
14163}
14164
14165// VirtualMachineRunCommand describes a Virtual Machine run command.
14166type VirtualMachineRunCommand struct {
14167	autorest.Response                   `json:"-"`
14168	*VirtualMachineRunCommandProperties `json:"properties,omitempty"`
14169	// ID - READ-ONLY; Resource Id
14170	ID *string `json:"id,omitempty"`
14171	// Name - READ-ONLY; Resource name
14172	Name *string `json:"name,omitempty"`
14173	// Type - READ-ONLY; Resource type
14174	Type *string `json:"type,omitempty"`
14175	// Location - Resource location
14176	Location *string `json:"location,omitempty"`
14177	// Tags - Resource tags
14178	Tags map[string]*string `json:"tags"`
14179}
14180
14181// MarshalJSON is the custom marshaler for VirtualMachineRunCommand.
14182func (vmrc VirtualMachineRunCommand) MarshalJSON() ([]byte, error) {
14183	objectMap := make(map[string]interface{})
14184	if vmrc.VirtualMachineRunCommandProperties != nil {
14185		objectMap["properties"] = vmrc.VirtualMachineRunCommandProperties
14186	}
14187	if vmrc.Location != nil {
14188		objectMap["location"] = vmrc.Location
14189	}
14190	if vmrc.Tags != nil {
14191		objectMap["tags"] = vmrc.Tags
14192	}
14193	return json.Marshal(objectMap)
14194}
14195
14196// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommand struct.
14197func (vmrc *VirtualMachineRunCommand) UnmarshalJSON(body []byte) error {
14198	var m map[string]*json.RawMessage
14199	err := json.Unmarshal(body, &m)
14200	if err != nil {
14201		return err
14202	}
14203	for k, v := range m {
14204		switch k {
14205		case "properties":
14206			if v != nil {
14207				var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties
14208				err = json.Unmarshal(*v, &virtualMachineRunCommandProperties)
14209				if err != nil {
14210					return err
14211				}
14212				vmrc.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties
14213			}
14214		case "id":
14215			if v != nil {
14216				var ID string
14217				err = json.Unmarshal(*v, &ID)
14218				if err != nil {
14219					return err
14220				}
14221				vmrc.ID = &ID
14222			}
14223		case "name":
14224			if v != nil {
14225				var name string
14226				err = json.Unmarshal(*v, &name)
14227				if err != nil {
14228					return err
14229				}
14230				vmrc.Name = &name
14231			}
14232		case "type":
14233			if v != nil {
14234				var typeVar string
14235				err = json.Unmarshal(*v, &typeVar)
14236				if err != nil {
14237					return err
14238				}
14239				vmrc.Type = &typeVar
14240			}
14241		case "location":
14242			if v != nil {
14243				var location string
14244				err = json.Unmarshal(*v, &location)
14245				if err != nil {
14246					return err
14247				}
14248				vmrc.Location = &location
14249			}
14250		case "tags":
14251			if v != nil {
14252				var tags map[string]*string
14253				err = json.Unmarshal(*v, &tags)
14254				if err != nil {
14255					return err
14256				}
14257				vmrc.Tags = tags
14258			}
14259		}
14260	}
14261
14262	return nil
14263}
14264
14265// VirtualMachineRunCommandInstanceView the instance view of a virtual machine run command.
14266type VirtualMachineRunCommandInstanceView struct {
14267	// ExecutionState - Script execution status. Possible values include: 'ExecutionStateUnknown', 'ExecutionStatePending', 'ExecutionStateRunning', 'ExecutionStateFailed', 'ExecutionStateSucceeded', 'ExecutionStateTimedOut', 'ExecutionStateCanceled'
14268	ExecutionState ExecutionState `json:"executionState,omitempty"`
14269	// ExecutionMessage - Communicate script configuration errors or execution messages.
14270	ExecutionMessage *string `json:"executionMessage,omitempty"`
14271	// ExitCode - Exit code returned from script execution.
14272	ExitCode *int32 `json:"exitCode,omitempty"`
14273	// Output - Script output stream.
14274	Output *string `json:"output,omitempty"`
14275	// Error - Script error stream.
14276	Error *string `json:"error,omitempty"`
14277	// StartTime - Script start time.
14278	StartTime *date.Time `json:"startTime,omitempty"`
14279	// EndTime - Script end time.
14280	EndTime *date.Time `json:"endTime,omitempty"`
14281	// Statuses - The resource status information.
14282	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
14283}
14284
14285// VirtualMachineRunCommandProperties describes the properties of a Virtual Machine run command.
14286type VirtualMachineRunCommandProperties struct {
14287	// Source - The source of the run command script.
14288	Source *VirtualMachineRunCommandScriptSource `json:"source,omitempty"`
14289	// Parameters - The parameters used by the script.
14290	Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
14291	// ProtectedParameters - The parameters used by the script.
14292	ProtectedParameters *[]RunCommandInputParameter `json:"protectedParameters,omitempty"`
14293	// AsyncExecution - Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
14294	AsyncExecution *bool `json:"asyncExecution,omitempty"`
14295	// RunAsUser - Specifies the user account on the VM when executing the run command.
14296	RunAsUser *string `json:"runAsUser,omitempty"`
14297	// RunAsPassword - Specifies the user account password on the VM when executing the run command.
14298	RunAsPassword *string `json:"runAsPassword,omitempty"`
14299	// TimeoutInSeconds - The timeout in seconds to execute the run command.
14300	TimeoutInSeconds *int32 `json:"timeoutInSeconds,omitempty"`
14301	// OutputBlobURI - Specifies the Azure storage blob where script output stream will be uploaded.
14302	OutputBlobURI *string `json:"outputBlobUri,omitempty"`
14303	// ErrorBlobURI - Specifies the Azure storage blob where script error stream will be uploaded.
14304	ErrorBlobURI *string `json:"errorBlobUri,omitempty"`
14305	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
14306	ProvisioningState *string `json:"provisioningState,omitempty"`
14307	// InstanceView - READ-ONLY; The virtual machine run command instance view.
14308	InstanceView *VirtualMachineRunCommandInstanceView `json:"instanceView,omitempty"`
14309}
14310
14311// MarshalJSON is the custom marshaler for VirtualMachineRunCommandProperties.
14312func (vmrcp VirtualMachineRunCommandProperties) MarshalJSON() ([]byte, error) {
14313	objectMap := make(map[string]interface{})
14314	if vmrcp.Source != nil {
14315		objectMap["source"] = vmrcp.Source
14316	}
14317	if vmrcp.Parameters != nil {
14318		objectMap["parameters"] = vmrcp.Parameters
14319	}
14320	if vmrcp.ProtectedParameters != nil {
14321		objectMap["protectedParameters"] = vmrcp.ProtectedParameters
14322	}
14323	if vmrcp.AsyncExecution != nil {
14324		objectMap["asyncExecution"] = vmrcp.AsyncExecution
14325	}
14326	if vmrcp.RunAsUser != nil {
14327		objectMap["runAsUser"] = vmrcp.RunAsUser
14328	}
14329	if vmrcp.RunAsPassword != nil {
14330		objectMap["runAsPassword"] = vmrcp.RunAsPassword
14331	}
14332	if vmrcp.TimeoutInSeconds != nil {
14333		objectMap["timeoutInSeconds"] = vmrcp.TimeoutInSeconds
14334	}
14335	if vmrcp.OutputBlobURI != nil {
14336		objectMap["outputBlobUri"] = vmrcp.OutputBlobURI
14337	}
14338	if vmrcp.ErrorBlobURI != nil {
14339		objectMap["errorBlobUri"] = vmrcp.ErrorBlobURI
14340	}
14341	return json.Marshal(objectMap)
14342}
14343
14344// VirtualMachineRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
14345// of a long-running operation.
14346type VirtualMachineRunCommandsCreateOrUpdateFuture struct {
14347	azure.FutureAPI
14348	// Result returns the result of the asynchronous operation.
14349	// If the operation has not completed it will return an error.
14350	Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error)
14351}
14352
14353// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14354func (future *VirtualMachineRunCommandsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14355	var azFuture azure.Future
14356	if err := json.Unmarshal(body, &azFuture); err != nil {
14357		return err
14358	}
14359	future.FutureAPI = &azFuture
14360	future.Result = future.result
14361	return nil
14362}
14363
14364// result is the default implementation for VirtualMachineRunCommandsCreateOrUpdateFuture.Result.
14365func (future *VirtualMachineRunCommandsCreateOrUpdateFuture) result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
14366	var done bool
14367	done, err = future.DoneWithContext(context.Background(), client)
14368	if err != nil {
14369		err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14370		return
14371	}
14372	if !done {
14373		vmrc.Response.Response = future.Response()
14374		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsCreateOrUpdateFuture")
14375		return
14376	}
14377	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14378	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
14379		vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response)
14380		if err != nil {
14381			err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
14382		}
14383	}
14384	return
14385}
14386
14387// VirtualMachineRunCommandScriptSource describes the script sources for run command.
14388type VirtualMachineRunCommandScriptSource struct {
14389	// Script - Specifies the script content to be executed on the VM.
14390	Script *string `json:"script,omitempty"`
14391	// ScriptURI - Specifies the script download location.
14392	ScriptURI *string `json:"scriptUri,omitempty"`
14393	// CommandID - Specifies a commandId of predefined built-in script.
14394	CommandID *string `json:"commandId,omitempty"`
14395}
14396
14397// VirtualMachineRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results of a
14398// long-running operation.
14399type VirtualMachineRunCommandsDeleteFuture struct {
14400	azure.FutureAPI
14401	// Result returns the result of the asynchronous operation.
14402	// If the operation has not completed it will return an error.
14403	Result func(VirtualMachineRunCommandsClient) (autorest.Response, error)
14404}
14405
14406// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14407func (future *VirtualMachineRunCommandsDeleteFuture) UnmarshalJSON(body []byte) error {
14408	var azFuture azure.Future
14409	if err := json.Unmarshal(body, &azFuture); err != nil {
14410		return err
14411	}
14412	future.FutureAPI = &azFuture
14413	future.Result = future.result
14414	return nil
14415}
14416
14417// result is the default implementation for VirtualMachineRunCommandsDeleteFuture.Result.
14418func (future *VirtualMachineRunCommandsDeleteFuture) result(client VirtualMachineRunCommandsClient) (ar autorest.Response, err error) {
14419	var done bool
14420	done, err = future.DoneWithContext(context.Background(), client)
14421	if err != nil {
14422		err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure")
14423		return
14424	}
14425	if !done {
14426		ar.Response = future.Response()
14427		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsDeleteFuture")
14428		return
14429	}
14430	ar.Response = future.Response()
14431	return
14432}
14433
14434// VirtualMachineRunCommandsListResult the List run command operation response
14435type VirtualMachineRunCommandsListResult struct {
14436	autorest.Response `json:"-"`
14437	// Value - The list of run commands
14438	Value *[]VirtualMachineRunCommand `json:"value,omitempty"`
14439	// NextLink - The uri to fetch the next page of run commands.
14440	NextLink *string `json:"nextLink,omitempty"`
14441}
14442
14443// VirtualMachineRunCommandsListResultIterator provides access to a complete listing of
14444// VirtualMachineRunCommand values.
14445type VirtualMachineRunCommandsListResultIterator struct {
14446	i    int
14447	page VirtualMachineRunCommandsListResultPage
14448}
14449
14450// NextWithContext advances to the next value.  If there was an error making
14451// the request the iterator does not advance and the error is returned.
14452func (iter *VirtualMachineRunCommandsListResultIterator) NextWithContext(ctx context.Context) (err error) {
14453	if tracing.IsEnabled() {
14454		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultIterator.NextWithContext")
14455		defer func() {
14456			sc := -1
14457			if iter.Response().Response.Response != nil {
14458				sc = iter.Response().Response.Response.StatusCode
14459			}
14460			tracing.EndSpan(ctx, sc, err)
14461		}()
14462	}
14463	iter.i++
14464	if iter.i < len(iter.page.Values()) {
14465		return nil
14466	}
14467	err = iter.page.NextWithContext(ctx)
14468	if err != nil {
14469		iter.i--
14470		return err
14471	}
14472	iter.i = 0
14473	return nil
14474}
14475
14476// Next advances to the next value.  If there was an error making
14477// the request the iterator does not advance and the error is returned.
14478// Deprecated: Use NextWithContext() instead.
14479func (iter *VirtualMachineRunCommandsListResultIterator) Next() error {
14480	return iter.NextWithContext(context.Background())
14481}
14482
14483// NotDone returns true if the enumeration should be started or is not yet complete.
14484func (iter VirtualMachineRunCommandsListResultIterator) NotDone() bool {
14485	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14486}
14487
14488// Response returns the raw server response from the last page request.
14489func (iter VirtualMachineRunCommandsListResultIterator) Response() VirtualMachineRunCommandsListResult {
14490	return iter.page.Response()
14491}
14492
14493// Value returns the current value or a zero-initialized value if the
14494// iterator has advanced beyond the end of the collection.
14495func (iter VirtualMachineRunCommandsListResultIterator) Value() VirtualMachineRunCommand {
14496	if !iter.page.NotDone() {
14497		return VirtualMachineRunCommand{}
14498	}
14499	return iter.page.Values()[iter.i]
14500}
14501
14502// Creates a new instance of the VirtualMachineRunCommandsListResultIterator type.
14503func NewVirtualMachineRunCommandsListResultIterator(page VirtualMachineRunCommandsListResultPage) VirtualMachineRunCommandsListResultIterator {
14504	return VirtualMachineRunCommandsListResultIterator{page: page}
14505}
14506
14507// IsEmpty returns true if the ListResult contains no values.
14508func (vmrclr VirtualMachineRunCommandsListResult) IsEmpty() bool {
14509	return vmrclr.Value == nil || len(*vmrclr.Value) == 0
14510}
14511
14512// hasNextLink returns true if the NextLink is not empty.
14513func (vmrclr VirtualMachineRunCommandsListResult) hasNextLink() bool {
14514	return vmrclr.NextLink != nil && len(*vmrclr.NextLink) != 0
14515}
14516
14517// virtualMachineRunCommandsListResultPreparer prepares a request to retrieve the next set of results.
14518// It returns nil if no more results exist.
14519func (vmrclr VirtualMachineRunCommandsListResult) virtualMachineRunCommandsListResultPreparer(ctx context.Context) (*http.Request, error) {
14520	if !vmrclr.hasNextLink() {
14521		return nil, nil
14522	}
14523	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14524		autorest.AsJSON(),
14525		autorest.AsGet(),
14526		autorest.WithBaseURL(to.String(vmrclr.NextLink)))
14527}
14528
14529// VirtualMachineRunCommandsListResultPage contains a page of VirtualMachineRunCommand values.
14530type VirtualMachineRunCommandsListResultPage struct {
14531	fn     func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)
14532	vmrclr VirtualMachineRunCommandsListResult
14533}
14534
14535// NextWithContext advances to the next page of values.  If there was an error making
14536// the request the page does not advance and the error is returned.
14537func (page *VirtualMachineRunCommandsListResultPage) NextWithContext(ctx context.Context) (err error) {
14538	if tracing.IsEnabled() {
14539		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultPage.NextWithContext")
14540		defer func() {
14541			sc := -1
14542			if page.Response().Response.Response != nil {
14543				sc = page.Response().Response.Response.StatusCode
14544			}
14545			tracing.EndSpan(ctx, sc, err)
14546		}()
14547	}
14548	for {
14549		next, err := page.fn(ctx, page.vmrclr)
14550		if err != nil {
14551			return err
14552		}
14553		page.vmrclr = next
14554		if !next.hasNextLink() || !next.IsEmpty() {
14555			break
14556		}
14557	}
14558	return nil
14559}
14560
14561// Next advances to the next page of values.  If there was an error making
14562// the request the page does not advance and the error is returned.
14563// Deprecated: Use NextWithContext() instead.
14564func (page *VirtualMachineRunCommandsListResultPage) Next() error {
14565	return page.NextWithContext(context.Background())
14566}
14567
14568// NotDone returns true if the page enumeration should be started or is not yet complete.
14569func (page VirtualMachineRunCommandsListResultPage) NotDone() bool {
14570	return !page.vmrclr.IsEmpty()
14571}
14572
14573// Response returns the raw server response from the last page request.
14574func (page VirtualMachineRunCommandsListResultPage) Response() VirtualMachineRunCommandsListResult {
14575	return page.vmrclr
14576}
14577
14578// Values returns the slice of values for the current page or nil if there are no values.
14579func (page VirtualMachineRunCommandsListResultPage) Values() []VirtualMachineRunCommand {
14580	if page.vmrclr.IsEmpty() {
14581		return nil
14582	}
14583	return *page.vmrclr.Value
14584}
14585
14586// Creates a new instance of the VirtualMachineRunCommandsListResultPage type.
14587func NewVirtualMachineRunCommandsListResultPage(cur VirtualMachineRunCommandsListResult, getNextPage func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)) VirtualMachineRunCommandsListResultPage {
14588	return VirtualMachineRunCommandsListResultPage{
14589		fn:     getNextPage,
14590		vmrclr: cur,
14591	}
14592}
14593
14594// VirtualMachineRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results of a
14595// long-running operation.
14596type VirtualMachineRunCommandsUpdateFuture struct {
14597	azure.FutureAPI
14598	// Result returns the result of the asynchronous operation.
14599	// If the operation has not completed it will return an error.
14600	Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error)
14601}
14602
14603// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14604func (future *VirtualMachineRunCommandsUpdateFuture) UnmarshalJSON(body []byte) error {
14605	var azFuture azure.Future
14606	if err := json.Unmarshal(body, &azFuture); err != nil {
14607		return err
14608	}
14609	future.FutureAPI = &azFuture
14610	future.Result = future.result
14611	return nil
14612}
14613
14614// result is the default implementation for VirtualMachineRunCommandsUpdateFuture.Result.
14615func (future *VirtualMachineRunCommandsUpdateFuture) result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
14616	var done bool
14617	done, err = future.DoneWithContext(context.Background(), client)
14618	if err != nil {
14619		err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure")
14620		return
14621	}
14622	if !done {
14623		vmrc.Response.Response = future.Response()
14624		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsUpdateFuture")
14625		return
14626	}
14627	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14628	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
14629		vmrc, err = client.UpdateResponder(vmrc.Response.Response)
14630		if err != nil {
14631			err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
14632		}
14633	}
14634	return
14635}
14636
14637// VirtualMachineRunCommandUpdate describes a Virtual Machine run command.
14638type VirtualMachineRunCommandUpdate struct {
14639	*VirtualMachineRunCommandProperties `json:"properties,omitempty"`
14640	// Tags - Resource tags
14641	Tags map[string]*string `json:"tags"`
14642}
14643
14644// MarshalJSON is the custom marshaler for VirtualMachineRunCommandUpdate.
14645func (vmrcu VirtualMachineRunCommandUpdate) MarshalJSON() ([]byte, error) {
14646	objectMap := make(map[string]interface{})
14647	if vmrcu.VirtualMachineRunCommandProperties != nil {
14648		objectMap["properties"] = vmrcu.VirtualMachineRunCommandProperties
14649	}
14650	if vmrcu.Tags != nil {
14651		objectMap["tags"] = vmrcu.Tags
14652	}
14653	return json.Marshal(objectMap)
14654}
14655
14656// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommandUpdate struct.
14657func (vmrcu *VirtualMachineRunCommandUpdate) UnmarshalJSON(body []byte) error {
14658	var m map[string]*json.RawMessage
14659	err := json.Unmarshal(body, &m)
14660	if err != nil {
14661		return err
14662	}
14663	for k, v := range m {
14664		switch k {
14665		case "properties":
14666			if v != nil {
14667				var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties
14668				err = json.Unmarshal(*v, &virtualMachineRunCommandProperties)
14669				if err != nil {
14670					return err
14671				}
14672				vmrcu.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties
14673			}
14674		case "tags":
14675			if v != nil {
14676				var tags map[string]*string
14677				err = json.Unmarshal(*v, &tags)
14678				if err != nil {
14679					return err
14680				}
14681				vmrcu.Tags = tags
14682			}
14683		}
14684	}
14685
14686	return nil
14687}
14688
14689// VirtualMachinesAssessPatchesFuture an abstraction for monitoring and retrieving the results of a
14690// long-running operation.
14691type VirtualMachinesAssessPatchesFuture struct {
14692	azure.FutureAPI
14693	// Result returns the result of the asynchronous operation.
14694	// If the operation has not completed it will return an error.
14695	Result func(VirtualMachinesClient) (VirtualMachineAssessPatchesResult, error)
14696}
14697
14698// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14699func (future *VirtualMachinesAssessPatchesFuture) UnmarshalJSON(body []byte) error {
14700	var azFuture azure.Future
14701	if err := json.Unmarshal(body, &azFuture); err != nil {
14702		return err
14703	}
14704	future.FutureAPI = &azFuture
14705	future.Result = future.result
14706	return nil
14707}
14708
14709// result is the default implementation for VirtualMachinesAssessPatchesFuture.Result.
14710func (future *VirtualMachinesAssessPatchesFuture) result(client VirtualMachinesClient) (vmapr VirtualMachineAssessPatchesResult, err error) {
14711	var done bool
14712	done, err = future.DoneWithContext(context.Background(), client)
14713	if err != nil {
14714		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesAssessPatchesFuture", "Result", future.Response(), "Polling failure")
14715		return
14716	}
14717	if !done {
14718		vmapr.Response.Response = future.Response()
14719		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesAssessPatchesFuture")
14720		return
14721	}
14722	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14723	if vmapr.Response.Response, err = future.GetResult(sender); err == nil && vmapr.Response.Response.StatusCode != http.StatusNoContent {
14724		vmapr, err = client.AssessPatchesResponder(vmapr.Response.Response)
14725		if err != nil {
14726			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesAssessPatchesFuture", "Result", vmapr.Response.Response, "Failure responding to request")
14727		}
14728	}
14729	return
14730}
14731
14732// VirtualMachineScaleSet describes a Virtual Machine Scale Set.
14733type VirtualMachineScaleSet struct {
14734	autorest.Response `json:"-"`
14735	// Sku - The virtual machine scale set sku.
14736	Sku *Sku `json:"sku,omitempty"`
14737	// 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**.
14738	Plan                              *Plan `json:"plan,omitempty"`
14739	*VirtualMachineScaleSetProperties `json:"properties,omitempty"`
14740	// Identity - The identity of the virtual machine scale set, if configured.
14741	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
14742	// Zones - The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set
14743	Zones *[]string `json:"zones,omitempty"`
14744	// ID - READ-ONLY; Resource Id
14745	ID *string `json:"id,omitempty"`
14746	// Name - READ-ONLY; Resource name
14747	Name *string `json:"name,omitempty"`
14748	// Type - READ-ONLY; Resource type
14749	Type *string `json:"type,omitempty"`
14750	// Location - Resource location
14751	Location *string `json:"location,omitempty"`
14752	// Tags - Resource tags
14753	Tags map[string]*string `json:"tags"`
14754}
14755
14756// MarshalJSON is the custom marshaler for VirtualMachineScaleSet.
14757func (vmss VirtualMachineScaleSet) MarshalJSON() ([]byte, error) {
14758	objectMap := make(map[string]interface{})
14759	if vmss.Sku != nil {
14760		objectMap["sku"] = vmss.Sku
14761	}
14762	if vmss.Plan != nil {
14763		objectMap["plan"] = vmss.Plan
14764	}
14765	if vmss.VirtualMachineScaleSetProperties != nil {
14766		objectMap["properties"] = vmss.VirtualMachineScaleSetProperties
14767	}
14768	if vmss.Identity != nil {
14769		objectMap["identity"] = vmss.Identity
14770	}
14771	if vmss.Zones != nil {
14772		objectMap["zones"] = vmss.Zones
14773	}
14774	if vmss.Location != nil {
14775		objectMap["location"] = vmss.Location
14776	}
14777	if vmss.Tags != nil {
14778		objectMap["tags"] = vmss.Tags
14779	}
14780	return json.Marshal(objectMap)
14781}
14782
14783// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSet struct.
14784func (vmss *VirtualMachineScaleSet) UnmarshalJSON(body []byte) error {
14785	var m map[string]*json.RawMessage
14786	err := json.Unmarshal(body, &m)
14787	if err != nil {
14788		return err
14789	}
14790	for k, v := range m {
14791		switch k {
14792		case "sku":
14793			if v != nil {
14794				var sku Sku
14795				err = json.Unmarshal(*v, &sku)
14796				if err != nil {
14797					return err
14798				}
14799				vmss.Sku = &sku
14800			}
14801		case "plan":
14802			if v != nil {
14803				var plan Plan
14804				err = json.Unmarshal(*v, &plan)
14805				if err != nil {
14806					return err
14807				}
14808				vmss.Plan = &plan
14809			}
14810		case "properties":
14811			if v != nil {
14812				var virtualMachineScaleSetProperties VirtualMachineScaleSetProperties
14813				err = json.Unmarshal(*v, &virtualMachineScaleSetProperties)
14814				if err != nil {
14815					return err
14816				}
14817				vmss.VirtualMachineScaleSetProperties = &virtualMachineScaleSetProperties
14818			}
14819		case "identity":
14820			if v != nil {
14821				var identity VirtualMachineScaleSetIdentity
14822				err = json.Unmarshal(*v, &identity)
14823				if err != nil {
14824					return err
14825				}
14826				vmss.Identity = &identity
14827			}
14828		case "zones":
14829			if v != nil {
14830				var zones []string
14831				err = json.Unmarshal(*v, &zones)
14832				if err != nil {
14833					return err
14834				}
14835				vmss.Zones = &zones
14836			}
14837		case "id":
14838			if v != nil {
14839				var ID string
14840				err = json.Unmarshal(*v, &ID)
14841				if err != nil {
14842					return err
14843				}
14844				vmss.ID = &ID
14845			}
14846		case "name":
14847			if v != nil {
14848				var name string
14849				err = json.Unmarshal(*v, &name)
14850				if err != nil {
14851					return err
14852				}
14853				vmss.Name = &name
14854			}
14855		case "type":
14856			if v != nil {
14857				var typeVar string
14858				err = json.Unmarshal(*v, &typeVar)
14859				if err != nil {
14860					return err
14861				}
14862				vmss.Type = &typeVar
14863			}
14864		case "location":
14865			if v != nil {
14866				var location string
14867				err = json.Unmarshal(*v, &location)
14868				if err != nil {
14869					return err
14870				}
14871				vmss.Location = &location
14872			}
14873		case "tags":
14874			if v != nil {
14875				var tags map[string]*string
14876				err = json.Unmarshal(*v, &tags)
14877				if err != nil {
14878					return err
14879				}
14880				vmss.Tags = tags
14881			}
14882		}
14883	}
14884
14885	return nil
14886}
14887
14888// VirtualMachineScaleSetDataDisk describes a virtual machine scale set data disk.
14889type VirtualMachineScaleSetDataDisk struct {
14890	// Name - The disk name.
14891	Name *string `json:"name,omitempty"`
14892	// 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.
14893	Lun *int32 `json:"lun,omitempty"`
14894	// 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'
14895	Caching CachingTypes `json:"caching,omitempty"`
14896	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
14897	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
14898	// CreateOption - The create option. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
14899	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
14900	// 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
14901	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
14902	// ManagedDisk - The managed disk parameters.
14903	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
14904	// 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.
14905	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
14906	// 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.
14907	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
14908}
14909
14910// VirtualMachineScaleSetExtension describes a Virtual Machine Scale Set Extension.
14911type VirtualMachineScaleSetExtension struct {
14912	autorest.Response `json:"-"`
14913	// Name - The name of the extension.
14914	Name *string `json:"name,omitempty"`
14915	// Type - READ-ONLY; Resource type
14916	Type                                       *string `json:"type,omitempty"`
14917	*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
14918	// ID - READ-ONLY; Resource Id
14919	ID *string `json:"id,omitempty"`
14920}
14921
14922// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtension.
14923func (vmsse VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) {
14924	objectMap := make(map[string]interface{})
14925	if vmsse.Name != nil {
14926		objectMap["name"] = vmsse.Name
14927	}
14928	if vmsse.VirtualMachineScaleSetExtensionProperties != nil {
14929		objectMap["properties"] = vmsse.VirtualMachineScaleSetExtensionProperties
14930	}
14931	return json.Marshal(objectMap)
14932}
14933
14934// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtension struct.
14935func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error {
14936	var m map[string]*json.RawMessage
14937	err := json.Unmarshal(body, &m)
14938	if err != nil {
14939		return err
14940	}
14941	for k, v := range m {
14942		switch k {
14943		case "name":
14944			if v != nil {
14945				var name string
14946				err = json.Unmarshal(*v, &name)
14947				if err != nil {
14948					return err
14949				}
14950				vmsse.Name = &name
14951			}
14952		case "type":
14953			if v != nil {
14954				var typeVar string
14955				err = json.Unmarshal(*v, &typeVar)
14956				if err != nil {
14957					return err
14958				}
14959				vmsse.Type = &typeVar
14960			}
14961		case "properties":
14962			if v != nil {
14963				var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
14964				err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
14965				if err != nil {
14966					return err
14967				}
14968				vmsse.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
14969			}
14970		case "id":
14971			if v != nil {
14972				var ID string
14973				err = json.Unmarshal(*v, &ID)
14974				if err != nil {
14975					return err
14976				}
14977				vmsse.ID = &ID
14978			}
14979		}
14980	}
14981
14982	return nil
14983}
14984
14985// VirtualMachineScaleSetExtensionListResult the List VM scale set extension operation response.
14986type VirtualMachineScaleSetExtensionListResult struct {
14987	autorest.Response `json:"-"`
14988	// Value - The list of VM scale set extensions.
14989	Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"`
14990	// 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.
14991	NextLink *string `json:"nextLink,omitempty"`
14992}
14993
14994// VirtualMachineScaleSetExtensionListResultIterator provides access to a complete listing of
14995// VirtualMachineScaleSetExtension values.
14996type VirtualMachineScaleSetExtensionListResultIterator struct {
14997	i    int
14998	page VirtualMachineScaleSetExtensionListResultPage
14999}
15000
15001// NextWithContext advances to the next value.  If there was an error making
15002// the request the iterator does not advance and the error is returned.
15003func (iter *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) {
15004	if tracing.IsEnabled() {
15005		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.NextWithContext")
15006		defer func() {
15007			sc := -1
15008			if iter.Response().Response.Response != nil {
15009				sc = iter.Response().Response.Response.StatusCode
15010			}
15011			tracing.EndSpan(ctx, sc, err)
15012		}()
15013	}
15014	iter.i++
15015	if iter.i < len(iter.page.Values()) {
15016		return nil
15017	}
15018	err = iter.page.NextWithContext(ctx)
15019	if err != nil {
15020		iter.i--
15021		return err
15022	}
15023	iter.i = 0
15024	return nil
15025}
15026
15027// Next advances to the next value.  If there was an error making
15028// the request the iterator does not advance and the error is returned.
15029// Deprecated: Use NextWithContext() instead.
15030func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error {
15031	return iter.NextWithContext(context.Background())
15032}
15033
15034// NotDone returns true if the enumeration should be started or is not yet complete.
15035func (iter VirtualMachineScaleSetExtensionListResultIterator) NotDone() bool {
15036	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15037}
15038
15039// Response returns the raw server response from the last page request.
15040func (iter VirtualMachineScaleSetExtensionListResultIterator) Response() VirtualMachineScaleSetExtensionListResult {
15041	return iter.page.Response()
15042}
15043
15044// Value returns the current value or a zero-initialized value if the
15045// iterator has advanced beyond the end of the collection.
15046func (iter VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMachineScaleSetExtension {
15047	if !iter.page.NotDone() {
15048		return VirtualMachineScaleSetExtension{}
15049	}
15050	return iter.page.Values()[iter.i]
15051}
15052
15053// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type.
15054func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator {
15055	return VirtualMachineScaleSetExtensionListResultIterator{page: page}
15056}
15057
15058// IsEmpty returns true if the ListResult contains no values.
15059func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool {
15060	return vmsselr.Value == nil || len(*vmsselr.Value) == 0
15061}
15062
15063// hasNextLink returns true if the NextLink is not empty.
15064func (vmsselr VirtualMachineScaleSetExtensionListResult) hasNextLink() bool {
15065	return vmsselr.NextLink != nil && len(*vmsselr.NextLink) != 0
15066}
15067
15068// virtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results.
15069// It returns nil if no more results exist.
15070func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer(ctx context.Context) (*http.Request, error) {
15071	if !vmsselr.hasNextLink() {
15072		return nil, nil
15073	}
15074	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15075		autorest.AsJSON(),
15076		autorest.AsGet(),
15077		autorest.WithBaseURL(to.String(vmsselr.NextLink)))
15078}
15079
15080// VirtualMachineScaleSetExtensionListResultPage contains a page of VirtualMachineScaleSetExtension values.
15081type VirtualMachineScaleSetExtensionListResultPage struct {
15082	fn      func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)
15083	vmsselr VirtualMachineScaleSetExtensionListResult
15084}
15085
15086// NextWithContext advances to the next page of values.  If there was an error making
15087// the request the page does not advance and the error is returned.
15088func (page *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx context.Context) (err error) {
15089	if tracing.IsEnabled() {
15090		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultPage.NextWithContext")
15091		defer func() {
15092			sc := -1
15093			if page.Response().Response.Response != nil {
15094				sc = page.Response().Response.Response.StatusCode
15095			}
15096			tracing.EndSpan(ctx, sc, err)
15097		}()
15098	}
15099	for {
15100		next, err := page.fn(ctx, page.vmsselr)
15101		if err != nil {
15102			return err
15103		}
15104		page.vmsselr = next
15105		if !next.hasNextLink() || !next.IsEmpty() {
15106			break
15107		}
15108	}
15109	return nil
15110}
15111
15112// Next advances to the next page of values.  If there was an error making
15113// the request the page does not advance and the error is returned.
15114// Deprecated: Use NextWithContext() instead.
15115func (page *VirtualMachineScaleSetExtensionListResultPage) Next() error {
15116	return page.NextWithContext(context.Background())
15117}
15118
15119// NotDone returns true if the page enumeration should be started or is not yet complete.
15120func (page VirtualMachineScaleSetExtensionListResultPage) NotDone() bool {
15121	return !page.vmsselr.IsEmpty()
15122}
15123
15124// Response returns the raw server response from the last page request.
15125func (page VirtualMachineScaleSetExtensionListResultPage) Response() VirtualMachineScaleSetExtensionListResult {
15126	return page.vmsselr
15127}
15128
15129// Values returns the slice of values for the current page or nil if there are no values.
15130func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMachineScaleSetExtension {
15131	if page.vmsselr.IsEmpty() {
15132		return nil
15133	}
15134	return *page.vmsselr.Value
15135}
15136
15137// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type.
15138func NewVirtualMachineScaleSetExtensionListResultPage(cur VirtualMachineScaleSetExtensionListResult, getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
15139	return VirtualMachineScaleSetExtensionListResultPage{
15140		fn:      getNextPage,
15141		vmsselr: cur,
15142	}
15143}
15144
15145// VirtualMachineScaleSetExtensionProfile describes a virtual machine scale set extension profile.
15146type VirtualMachineScaleSetExtensionProfile struct {
15147	// Extensions - The virtual machine scale set child extension resources.
15148	Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"`
15149	// 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
15150	ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`
15151}
15152
15153// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set
15154// Extension.
15155type VirtualMachineScaleSetExtensionProperties struct {
15156	// 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.
15157	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
15158	// Publisher - The name of the extension handler publisher.
15159	Publisher *string `json:"publisher,omitempty"`
15160	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
15161	Type *string `json:"type,omitempty"`
15162	// TypeHandlerVersion - Specifies the version of the script handler.
15163	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
15164	// 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.
15165	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
15166	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
15167	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
15168	// Settings - Json formatted public settings for the extension.
15169	Settings interface{} `json:"settings,omitempty"`
15170	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
15171	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
15172	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
15173	ProvisioningState *string `json:"provisioningState,omitempty"`
15174	// ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
15175	ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
15176}
15177
15178// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionProperties.
15179func (vmssep VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, error) {
15180	objectMap := make(map[string]interface{})
15181	if vmssep.ForceUpdateTag != nil {
15182		objectMap["forceUpdateTag"] = vmssep.ForceUpdateTag
15183	}
15184	if vmssep.Publisher != nil {
15185		objectMap["publisher"] = vmssep.Publisher
15186	}
15187	if vmssep.Type != nil {
15188		objectMap["type"] = vmssep.Type
15189	}
15190	if vmssep.TypeHandlerVersion != nil {
15191		objectMap["typeHandlerVersion"] = vmssep.TypeHandlerVersion
15192	}
15193	if vmssep.AutoUpgradeMinorVersion != nil {
15194		objectMap["autoUpgradeMinorVersion"] = vmssep.AutoUpgradeMinorVersion
15195	}
15196	if vmssep.EnableAutomaticUpgrade != nil {
15197		objectMap["enableAutomaticUpgrade"] = vmssep.EnableAutomaticUpgrade
15198	}
15199	if vmssep.Settings != nil {
15200		objectMap["settings"] = vmssep.Settings
15201	}
15202	if vmssep.ProtectedSettings != nil {
15203		objectMap["protectedSettings"] = vmssep.ProtectedSettings
15204	}
15205	if vmssep.ProvisionAfterExtensions != nil {
15206		objectMap["provisionAfterExtensions"] = vmssep.ProvisionAfterExtensions
15207	}
15208	return json.Marshal(objectMap)
15209}
15210
15211// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
15212// results of a long-running operation.
15213type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
15214	azure.FutureAPI
15215	// Result returns the result of the asynchronous operation.
15216	// If the operation has not completed it will return an error.
15217	Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
15218}
15219
15220// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15221func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15222	var azFuture azure.Future
15223	if err := json.Unmarshal(body, &azFuture); err != nil {
15224		return err
15225	}
15226	future.FutureAPI = &azFuture
15227	future.Result = future.result
15228	return nil
15229}
15230
15231// result is the default implementation for VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.Result.
15232func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
15233	var done bool
15234	done, err = future.DoneWithContext(context.Background(), client)
15235	if err != nil {
15236		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15237		return
15238	}
15239	if !done {
15240		vmsse.Response.Response = future.Response()
15241		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
15242		return
15243	}
15244	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15245	if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
15246		vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response)
15247		if err != nil {
15248			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
15249		}
15250	}
15251	return
15252}
15253
15254// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of
15255// a long-running operation.
15256type VirtualMachineScaleSetExtensionsDeleteFuture struct {
15257	azure.FutureAPI
15258	// Result returns the result of the asynchronous operation.
15259	// If the operation has not completed it will return an error.
15260	Result func(VirtualMachineScaleSetExtensionsClient) (autorest.Response, error)
15261}
15262
15263// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15264func (future *VirtualMachineScaleSetExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
15265	var azFuture azure.Future
15266	if err := json.Unmarshal(body, &azFuture); err != nil {
15267		return err
15268	}
15269	future.FutureAPI = &azFuture
15270	future.Result = future.result
15271	return nil
15272}
15273
15274// result is the default implementation for VirtualMachineScaleSetExtensionsDeleteFuture.Result.
15275func (future *VirtualMachineScaleSetExtensionsDeleteFuture) result(client VirtualMachineScaleSetExtensionsClient) (ar autorest.Response, err error) {
15276	var done bool
15277	done, err = future.DoneWithContext(context.Background(), client)
15278	if err != nil {
15279		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
15280		return
15281	}
15282	if !done {
15283		ar.Response = future.Response()
15284		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
15285		return
15286	}
15287	ar.Response = future.Response()
15288	return
15289}
15290
15291// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of
15292// a long-running operation.
15293type VirtualMachineScaleSetExtensionsUpdateFuture struct {
15294	azure.FutureAPI
15295	// Result returns the result of the asynchronous operation.
15296	// If the operation has not completed it will return an error.
15297	Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
15298}
15299
15300// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15301func (future *VirtualMachineScaleSetExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
15302	var azFuture azure.Future
15303	if err := json.Unmarshal(body, &azFuture); err != nil {
15304		return err
15305	}
15306	future.FutureAPI = &azFuture
15307	future.Result = future.result
15308	return nil
15309}
15310
15311// result is the default implementation for VirtualMachineScaleSetExtensionsUpdateFuture.Result.
15312func (future *VirtualMachineScaleSetExtensionsUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
15313	var done bool
15314	done, err = future.DoneWithContext(context.Background(), client)
15315	if err != nil {
15316		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
15317		return
15318	}
15319	if !done {
15320		vmsse.Response.Response = future.Response()
15321		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsUpdateFuture")
15322		return
15323	}
15324	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15325	if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
15326		vmsse, err = client.UpdateResponder(vmsse.Response.Response)
15327		if err != nil {
15328			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
15329		}
15330	}
15331	return
15332}
15333
15334// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension.
15335type VirtualMachineScaleSetExtensionUpdate struct {
15336	// Name - READ-ONLY; The name of the extension.
15337	Name *string `json:"name,omitempty"`
15338	// Type - READ-ONLY; Resource type
15339	Type                                       *string `json:"type,omitempty"`
15340	*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
15341	// ID - READ-ONLY; Resource Id
15342	ID *string `json:"id,omitempty"`
15343}
15344
15345// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionUpdate.
15346func (vmsseu VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) {
15347	objectMap := make(map[string]interface{})
15348	if vmsseu.VirtualMachineScaleSetExtensionProperties != nil {
15349		objectMap["properties"] = vmsseu.VirtualMachineScaleSetExtensionProperties
15350	}
15351	return json.Marshal(objectMap)
15352}
15353
15354// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtensionUpdate struct.
15355func (vmsseu *VirtualMachineScaleSetExtensionUpdate) UnmarshalJSON(body []byte) error {
15356	var m map[string]*json.RawMessage
15357	err := json.Unmarshal(body, &m)
15358	if err != nil {
15359		return err
15360	}
15361	for k, v := range m {
15362		switch k {
15363		case "name":
15364			if v != nil {
15365				var name string
15366				err = json.Unmarshal(*v, &name)
15367				if err != nil {
15368					return err
15369				}
15370				vmsseu.Name = &name
15371			}
15372		case "type":
15373			if v != nil {
15374				var typeVar string
15375				err = json.Unmarshal(*v, &typeVar)
15376				if err != nil {
15377					return err
15378				}
15379				vmsseu.Type = &typeVar
15380			}
15381		case "properties":
15382			if v != nil {
15383				var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
15384				err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
15385				if err != nil {
15386					return err
15387				}
15388				vmsseu.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
15389			}
15390		case "id":
15391			if v != nil {
15392				var ID string
15393				err = json.Unmarshal(*v, &ID)
15394				if err != nil {
15395					return err
15396				}
15397				vmsseu.ID = &ID
15398			}
15399		}
15400	}
15401
15402	return nil
15403}
15404
15405// VirtualMachineScaleSetIdentity identity for the virtual machine scale set.
15406type VirtualMachineScaleSetIdentity struct {
15407	// PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity.
15408	PrincipalID *string `json:"principalId,omitempty"`
15409	// TenantID - READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity.
15410	TenantID *string `json:"tenantId,omitempty"`
15411	// 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'
15412	Type ResourceIdentityType `json:"type,omitempty"`
15413	// 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}'.
15414	UserAssignedIdentities map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
15415}
15416
15417// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentity.
15418func (vmssi VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) {
15419	objectMap := make(map[string]interface{})
15420	if vmssi.Type != "" {
15421		objectMap["type"] = vmssi.Type
15422	}
15423	if vmssi.UserAssignedIdentities != nil {
15424		objectMap["userAssignedIdentities"] = vmssi.UserAssignedIdentities
15425	}
15426	return json.Marshal(objectMap)
15427}
15428
15429// VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue ...
15430type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct {
15431	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
15432	PrincipalID *string `json:"principalId,omitempty"`
15433	// ClientID - READ-ONLY; The client id of user assigned identity.
15434	ClientID *string `json:"clientId,omitempty"`
15435}
15436
15437// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue.
15438func (vmssiAiv VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
15439	objectMap := make(map[string]interface{})
15440	return json.Marshal(objectMap)
15441}
15442
15443// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set.
15444type VirtualMachineScaleSetInstanceView struct {
15445	autorest.Response `json:"-"`
15446	// VirtualMachine - READ-ONLY; The instance view status summary for the virtual machine scale set.
15447	VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"`
15448	// Extensions - READ-ONLY; The extensions information.
15449	Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"`
15450	// Statuses - The resource status information.
15451	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
15452	// OrchestrationServices - READ-ONLY; The orchestration services information.
15453	OrchestrationServices *[]OrchestrationServiceSummary `json:"orchestrationServices,omitempty"`
15454}
15455
15456// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceView.
15457func (vmssiv VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) {
15458	objectMap := make(map[string]interface{})
15459	if vmssiv.Statuses != nil {
15460		objectMap["statuses"] = vmssiv.Statuses
15461	}
15462	return json.Marshal(objectMap)
15463}
15464
15465// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of
15466// a virtual machine scale set.
15467type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
15468	// StatusesSummary - READ-ONLY; The extensions information.
15469	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
15470}
15471
15472// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceViewStatusesSummary.
15473func (vmssivss VirtualMachineScaleSetInstanceViewStatusesSummary) MarshalJSON() ([]byte, error) {
15474	objectMap := make(map[string]interface{})
15475	return json.Marshal(objectMap)
15476}
15477
15478// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP
15479// configuration.
15480type VirtualMachineScaleSetIPConfiguration struct {
15481	// Name - The IP configuration name.
15482	Name                                             *string `json:"name,omitempty"`
15483	*VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"`
15484	// ID - Resource Id
15485	ID *string `json:"id,omitempty"`
15486}
15487
15488// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIPConfiguration.
15489func (vmssic VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) {
15490	objectMap := make(map[string]interface{})
15491	if vmssic.Name != nil {
15492		objectMap["name"] = vmssic.Name
15493	}
15494	if vmssic.VirtualMachineScaleSetIPConfigurationProperties != nil {
15495		objectMap["properties"] = vmssic.VirtualMachineScaleSetIPConfigurationProperties
15496	}
15497	if vmssic.ID != nil {
15498		objectMap["id"] = vmssic.ID
15499	}
15500	return json.Marshal(objectMap)
15501}
15502
15503// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetIPConfiguration struct.
15504func (vmssic *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(body []byte) error {
15505	var m map[string]*json.RawMessage
15506	err := json.Unmarshal(body, &m)
15507	if err != nil {
15508		return err
15509	}
15510	for k, v := range m {
15511		switch k {
15512		case "name":
15513			if v != nil {
15514				var name string
15515				err = json.Unmarshal(*v, &name)
15516				if err != nil {
15517					return err
15518				}
15519				vmssic.Name = &name
15520			}
15521		case "properties":
15522			if v != nil {
15523				var virtualMachineScaleSetIPConfigurationProperties VirtualMachineScaleSetIPConfigurationProperties
15524				err = json.Unmarshal(*v, &virtualMachineScaleSetIPConfigurationProperties)
15525				if err != nil {
15526					return err
15527				}
15528				vmssic.VirtualMachineScaleSetIPConfigurationProperties = &virtualMachineScaleSetIPConfigurationProperties
15529			}
15530		case "id":
15531			if v != nil {
15532				var ID string
15533				err = json.Unmarshal(*v, &ID)
15534				if err != nil {
15535					return err
15536				}
15537				vmssic.ID = &ID
15538			}
15539		}
15540	}
15541
15542	return nil
15543}
15544
15545// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's
15546// IP configuration properties.
15547type VirtualMachineScaleSetIPConfigurationProperties struct {
15548	// Subnet - Specifies the identifier of the subnet.
15549	Subnet *APIEntityReference `json:"subnet,omitempty"`
15550	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
15551	Primary *bool `json:"primary,omitempty"`
15552	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
15553	PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
15554	// 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'
15555	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
15556	// 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.
15557	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
15558	// ApplicationSecurityGroups - Specifies an array of references to application security group.
15559	ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
15560	// 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.
15561	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
15562	// 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.
15563	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
15564}
15565
15566// VirtualMachineScaleSetIPTag contains the IP tag associated with the public IP address.
15567type VirtualMachineScaleSetIPTag struct {
15568	// IPTagType - IP tag type. Example: FirstPartyUsage.
15569	IPTagType *string `json:"ipTagType,omitempty"`
15570	// Tag - IP tag associated with the public IP. Example: SQL, Storage etc.
15571	Tag *string `json:"tag,omitempty"`
15572}
15573
15574// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History
15575// operation response.
15576type VirtualMachineScaleSetListOSUpgradeHistory struct {
15577	autorest.Response `json:"-"`
15578	// Value - The list of OS upgrades performed on the virtual machine scale set.
15579	Value *[]UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"`
15580	// 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.
15581	NextLink *string `json:"nextLink,omitempty"`
15582}
15583
15584// VirtualMachineScaleSetListOSUpgradeHistoryIterator provides access to a complete listing of
15585// UpgradeOperationHistoricalStatusInfo values.
15586type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct {
15587	i    int
15588	page VirtualMachineScaleSetListOSUpgradeHistoryPage
15589}
15590
15591// NextWithContext advances to the next value.  If there was an error making
15592// the request the iterator does not advance and the error is returned.
15593func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) {
15594	if tracing.IsEnabled() {
15595		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.NextWithContext")
15596		defer func() {
15597			sc := -1
15598			if iter.Response().Response.Response != nil {
15599				sc = iter.Response().Response.Response.StatusCode
15600			}
15601			tracing.EndSpan(ctx, sc, err)
15602		}()
15603	}
15604	iter.i++
15605	if iter.i < len(iter.page.Values()) {
15606		return nil
15607	}
15608	err = iter.page.NextWithContext(ctx)
15609	if err != nil {
15610		iter.i--
15611		return err
15612	}
15613	iter.i = 0
15614	return nil
15615}
15616
15617// Next advances to the next value.  If there was an error making
15618// the request the iterator does not advance and the error is returned.
15619// Deprecated: Use NextWithContext() instead.
15620func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error {
15621	return iter.NextWithContext(context.Background())
15622}
15623
15624// NotDone returns true if the enumeration should be started or is not yet complete.
15625func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) NotDone() bool {
15626	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15627}
15628
15629// Response returns the raw server response from the last page request.
15630func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Response() VirtualMachineScaleSetListOSUpgradeHistory {
15631	return iter.page.Response()
15632}
15633
15634// Value returns the current value or a zero-initialized value if the
15635// iterator has advanced beyond the end of the collection.
15636func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOperationHistoricalStatusInfo {
15637	if !iter.page.NotDone() {
15638		return UpgradeOperationHistoricalStatusInfo{}
15639	}
15640	return iter.page.Values()[iter.i]
15641}
15642
15643// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type.
15644func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator {
15645	return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page}
15646}
15647
15648// IsEmpty returns true if the ListResult contains no values.
15649func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool {
15650	return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0
15651}
15652
15653// hasNextLink returns true if the NextLink is not empty.
15654func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) hasNextLink() bool {
15655	return vmsslouh.NextLink != nil && len(*vmsslouh.NextLink) != 0
15656}
15657
15658// virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results.
15659// It returns nil if no more results exist.
15660func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) {
15661	if !vmsslouh.hasNextLink() {
15662		return nil, nil
15663	}
15664	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15665		autorest.AsJSON(),
15666		autorest.AsGet(),
15667		autorest.WithBaseURL(to.String(vmsslouh.NextLink)))
15668}
15669
15670// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo
15671// values.
15672type VirtualMachineScaleSetListOSUpgradeHistoryPage struct {
15673	fn       func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)
15674	vmsslouh VirtualMachineScaleSetListOSUpgradeHistory
15675}
15676
15677// NextWithContext advances to the next page of values.  If there was an error making
15678// the request the page does not advance and the error is returned.
15679func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) {
15680	if tracing.IsEnabled() {
15681		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.NextWithContext")
15682		defer func() {
15683			sc := -1
15684			if page.Response().Response.Response != nil {
15685				sc = page.Response().Response.Response.StatusCode
15686			}
15687			tracing.EndSpan(ctx, sc, err)
15688		}()
15689	}
15690	for {
15691		next, err := page.fn(ctx, page.vmsslouh)
15692		if err != nil {
15693			return err
15694		}
15695		page.vmsslouh = next
15696		if !next.hasNextLink() || !next.IsEmpty() {
15697			break
15698		}
15699	}
15700	return nil
15701}
15702
15703// Next advances to the next page of values.  If there was an error making
15704// the request the page does not advance and the error is returned.
15705// Deprecated: Use NextWithContext() instead.
15706func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error {
15707	return page.NextWithContext(context.Background())
15708}
15709
15710// NotDone returns true if the page enumeration should be started or is not yet complete.
15711func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool {
15712	return !page.vmsslouh.IsEmpty()
15713}
15714
15715// Response returns the raw server response from the last page request.
15716func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Response() VirtualMachineScaleSetListOSUpgradeHistory {
15717	return page.vmsslouh
15718}
15719
15720// Values returns the slice of values for the current page or nil if there are no values.
15721func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOperationHistoricalStatusInfo {
15722	if page.vmsslouh.IsEmpty() {
15723		return nil
15724	}
15725	return *page.vmsslouh.Value
15726}
15727
15728// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type.
15729func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(cur VirtualMachineScaleSetListOSUpgradeHistory, getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage {
15730	return VirtualMachineScaleSetListOSUpgradeHistoryPage{
15731		fn:       getNextPage,
15732		vmsslouh: cur,
15733	}
15734}
15735
15736// VirtualMachineScaleSetListResult the List Virtual Machine operation response.
15737type VirtualMachineScaleSetListResult struct {
15738	autorest.Response `json:"-"`
15739	// Value - The list of virtual machine scale sets.
15740	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
15741	// NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS.
15742	NextLink *string `json:"nextLink,omitempty"`
15743}
15744
15745// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet
15746// values.
15747type VirtualMachineScaleSetListResultIterator struct {
15748	i    int
15749	page VirtualMachineScaleSetListResultPage
15750}
15751
15752// NextWithContext advances to the next value.  If there was an error making
15753// the request the iterator does not advance and the error is returned.
15754func (iter *VirtualMachineScaleSetListResultIterator) NextWithContext(ctx context.Context) (err error) {
15755	if tracing.IsEnabled() {
15756		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultIterator.NextWithContext")
15757		defer func() {
15758			sc := -1
15759			if iter.Response().Response.Response != nil {
15760				sc = iter.Response().Response.Response.StatusCode
15761			}
15762			tracing.EndSpan(ctx, sc, err)
15763		}()
15764	}
15765	iter.i++
15766	if iter.i < len(iter.page.Values()) {
15767		return nil
15768	}
15769	err = iter.page.NextWithContext(ctx)
15770	if err != nil {
15771		iter.i--
15772		return err
15773	}
15774	iter.i = 0
15775	return nil
15776}
15777
15778// Next advances to the next value.  If there was an error making
15779// the request the iterator does not advance and the error is returned.
15780// Deprecated: Use NextWithContext() instead.
15781func (iter *VirtualMachineScaleSetListResultIterator) Next() error {
15782	return iter.NextWithContext(context.Background())
15783}
15784
15785// NotDone returns true if the enumeration should be started or is not yet complete.
15786func (iter VirtualMachineScaleSetListResultIterator) NotDone() bool {
15787	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15788}
15789
15790// Response returns the raw server response from the last page request.
15791func (iter VirtualMachineScaleSetListResultIterator) Response() VirtualMachineScaleSetListResult {
15792	return iter.page.Response()
15793}
15794
15795// Value returns the current value or a zero-initialized value if the
15796// iterator has advanced beyond the end of the collection.
15797func (iter VirtualMachineScaleSetListResultIterator) Value() VirtualMachineScaleSet {
15798	if !iter.page.NotDone() {
15799		return VirtualMachineScaleSet{}
15800	}
15801	return iter.page.Values()[iter.i]
15802}
15803
15804// Creates a new instance of the VirtualMachineScaleSetListResultIterator type.
15805func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator {
15806	return VirtualMachineScaleSetListResultIterator{page: page}
15807}
15808
15809// IsEmpty returns true if the ListResult contains no values.
15810func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool {
15811	return vmsslr.Value == nil || len(*vmsslr.Value) == 0
15812}
15813
15814// hasNextLink returns true if the NextLink is not empty.
15815func (vmsslr VirtualMachineScaleSetListResult) hasNextLink() bool {
15816	return vmsslr.NextLink != nil && len(*vmsslr.NextLink) != 0
15817}
15818
15819// virtualMachineScaleSetListResultPreparer prepares a request to retrieve the next set of results.
15820// It returns nil if no more results exist.
15821func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer(ctx context.Context) (*http.Request, error) {
15822	if !vmsslr.hasNextLink() {
15823		return nil, nil
15824	}
15825	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15826		autorest.AsJSON(),
15827		autorest.AsGet(),
15828		autorest.WithBaseURL(to.String(vmsslr.NextLink)))
15829}
15830
15831// VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values.
15832type VirtualMachineScaleSetListResultPage struct {
15833	fn     func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)
15834	vmsslr VirtualMachineScaleSetListResult
15835}
15836
15837// NextWithContext advances to the next page of values.  If there was an error making
15838// the request the page does not advance and the error is returned.
15839func (page *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error) {
15840	if tracing.IsEnabled() {
15841		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultPage.NextWithContext")
15842		defer func() {
15843			sc := -1
15844			if page.Response().Response.Response != nil {
15845				sc = page.Response().Response.Response.StatusCode
15846			}
15847			tracing.EndSpan(ctx, sc, err)
15848		}()
15849	}
15850	for {
15851		next, err := page.fn(ctx, page.vmsslr)
15852		if err != nil {
15853			return err
15854		}
15855		page.vmsslr = next
15856		if !next.hasNextLink() || !next.IsEmpty() {
15857			break
15858		}
15859	}
15860	return nil
15861}
15862
15863// Next advances to the next page of values.  If there was an error making
15864// the request the page does not advance and the error is returned.
15865// Deprecated: Use NextWithContext() instead.
15866func (page *VirtualMachineScaleSetListResultPage) Next() error {
15867	return page.NextWithContext(context.Background())
15868}
15869
15870// NotDone returns true if the page enumeration should be started or is not yet complete.
15871func (page VirtualMachineScaleSetListResultPage) NotDone() bool {
15872	return !page.vmsslr.IsEmpty()
15873}
15874
15875// Response returns the raw server response from the last page request.
15876func (page VirtualMachineScaleSetListResultPage) Response() VirtualMachineScaleSetListResult {
15877	return page.vmsslr
15878}
15879
15880// Values returns the slice of values for the current page or nil if there are no values.
15881func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleSet {
15882	if page.vmsslr.IsEmpty() {
15883		return nil
15884	}
15885	return *page.vmsslr.Value
15886}
15887
15888// Creates a new instance of the VirtualMachineScaleSetListResultPage type.
15889func NewVirtualMachineScaleSetListResultPage(cur VirtualMachineScaleSetListResult, getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
15890	return VirtualMachineScaleSetListResultPage{
15891		fn:     getNextPage,
15892		vmsslr: cur,
15893	}
15894}
15895
15896// VirtualMachineScaleSetListSkusResult the Virtual Machine Scale Set List Skus operation response.
15897type VirtualMachineScaleSetListSkusResult struct {
15898	autorest.Response `json:"-"`
15899	// Value - The list of skus available for the virtual machine scale set.
15900	Value *[]VirtualMachineScaleSetSku `json:"value,omitempty"`
15901	// 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.
15902	NextLink *string `json:"nextLink,omitempty"`
15903}
15904
15905// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of
15906// VirtualMachineScaleSetSku values.
15907type VirtualMachineScaleSetListSkusResultIterator struct {
15908	i    int
15909	page VirtualMachineScaleSetListSkusResultPage
15910}
15911
15912// NextWithContext advances to the next value.  If there was an error making
15913// the request the iterator does not advance and the error is returned.
15914func (iter *VirtualMachineScaleSetListSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
15915	if tracing.IsEnabled() {
15916		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultIterator.NextWithContext")
15917		defer func() {
15918			sc := -1
15919			if iter.Response().Response.Response != nil {
15920				sc = iter.Response().Response.Response.StatusCode
15921			}
15922			tracing.EndSpan(ctx, sc, err)
15923		}()
15924	}
15925	iter.i++
15926	if iter.i < len(iter.page.Values()) {
15927		return nil
15928	}
15929	err = iter.page.NextWithContext(ctx)
15930	if err != nil {
15931		iter.i--
15932		return err
15933	}
15934	iter.i = 0
15935	return nil
15936}
15937
15938// Next advances to the next value.  If there was an error making
15939// the request the iterator does not advance and the error is returned.
15940// Deprecated: Use NextWithContext() instead.
15941func (iter *VirtualMachineScaleSetListSkusResultIterator) Next() error {
15942	return iter.NextWithContext(context.Background())
15943}
15944
15945// NotDone returns true if the enumeration should be started or is not yet complete.
15946func (iter VirtualMachineScaleSetListSkusResultIterator) NotDone() bool {
15947	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15948}
15949
15950// Response returns the raw server response from the last page request.
15951func (iter VirtualMachineScaleSetListSkusResultIterator) Response() VirtualMachineScaleSetListSkusResult {
15952	return iter.page.Response()
15953}
15954
15955// Value returns the current value or a zero-initialized value if the
15956// iterator has advanced beyond the end of the collection.
15957func (iter VirtualMachineScaleSetListSkusResultIterator) Value() VirtualMachineScaleSetSku {
15958	if !iter.page.NotDone() {
15959		return VirtualMachineScaleSetSku{}
15960	}
15961	return iter.page.Values()[iter.i]
15962}
15963
15964// Creates a new instance of the VirtualMachineScaleSetListSkusResultIterator type.
15965func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator {
15966	return VirtualMachineScaleSetListSkusResultIterator{page: page}
15967}
15968
15969// IsEmpty returns true if the ListResult contains no values.
15970func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool {
15971	return vmsslsr.Value == nil || len(*vmsslsr.Value) == 0
15972}
15973
15974// hasNextLink returns true if the NextLink is not empty.
15975func (vmsslsr VirtualMachineScaleSetListSkusResult) hasNextLink() bool {
15976	return vmsslsr.NextLink != nil && len(*vmsslsr.NextLink) != 0
15977}
15978
15979// virtualMachineScaleSetListSkusResultPreparer prepares a request to retrieve the next set of results.
15980// It returns nil if no more results exist.
15981func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer(ctx context.Context) (*http.Request, error) {
15982	if !vmsslsr.hasNextLink() {
15983		return nil, nil
15984	}
15985	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15986		autorest.AsJSON(),
15987		autorest.AsGet(),
15988		autorest.WithBaseURL(to.String(vmsslsr.NextLink)))
15989}
15990
15991// VirtualMachineScaleSetListSkusResultPage contains a page of VirtualMachineScaleSetSku values.
15992type VirtualMachineScaleSetListSkusResultPage struct {
15993	fn      func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)
15994	vmsslsr VirtualMachineScaleSetListSkusResult
15995}
15996
15997// NextWithContext advances to the next page of values.  If there was an error making
15998// the request the page does not advance and the error is returned.
15999func (page *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx context.Context) (err error) {
16000	if tracing.IsEnabled() {
16001		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultPage.NextWithContext")
16002		defer func() {
16003			sc := -1
16004			if page.Response().Response.Response != nil {
16005				sc = page.Response().Response.Response.StatusCode
16006			}
16007			tracing.EndSpan(ctx, sc, err)
16008		}()
16009	}
16010	for {
16011		next, err := page.fn(ctx, page.vmsslsr)
16012		if err != nil {
16013			return err
16014		}
16015		page.vmsslsr = next
16016		if !next.hasNextLink() || !next.IsEmpty() {
16017			break
16018		}
16019	}
16020	return nil
16021}
16022
16023// Next advances to the next page of values.  If there was an error making
16024// the request the page does not advance and the error is returned.
16025// Deprecated: Use NextWithContext() instead.
16026func (page *VirtualMachineScaleSetListSkusResultPage) Next() error {
16027	return page.NextWithContext(context.Background())
16028}
16029
16030// NotDone returns true if the page enumeration should be started or is not yet complete.
16031func (page VirtualMachineScaleSetListSkusResultPage) NotDone() bool {
16032	return !page.vmsslsr.IsEmpty()
16033}
16034
16035// Response returns the raw server response from the last page request.
16036func (page VirtualMachineScaleSetListSkusResultPage) Response() VirtualMachineScaleSetListSkusResult {
16037	return page.vmsslsr
16038}
16039
16040// Values returns the slice of values for the current page or nil if there are no values.
16041func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineScaleSetSku {
16042	if page.vmsslsr.IsEmpty() {
16043		return nil
16044	}
16045	return *page.vmsslsr.Value
16046}
16047
16048// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type.
16049func NewVirtualMachineScaleSetListSkusResultPage(cur VirtualMachineScaleSetListSkusResult, getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
16050	return VirtualMachineScaleSetListSkusResultPage{
16051		fn:      getNextPage,
16052		vmsslsr: cur,
16053	}
16054}
16055
16056// VirtualMachineScaleSetListWithLinkResult the List Virtual Machine operation response.
16057type VirtualMachineScaleSetListWithLinkResult struct {
16058	autorest.Response `json:"-"`
16059	// Value - The list of virtual machine scale sets.
16060	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
16061	// 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.
16062	NextLink *string `json:"nextLink,omitempty"`
16063}
16064
16065// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of
16066// VirtualMachineScaleSet values.
16067type VirtualMachineScaleSetListWithLinkResultIterator struct {
16068	i    int
16069	page VirtualMachineScaleSetListWithLinkResultPage
16070}
16071
16072// NextWithContext advances to the next value.  If there was an error making
16073// the request the iterator does not advance and the error is returned.
16074func (iter *VirtualMachineScaleSetListWithLinkResultIterator) NextWithContext(ctx context.Context) (err error) {
16075	if tracing.IsEnabled() {
16076		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultIterator.NextWithContext")
16077		defer func() {
16078			sc := -1
16079			if iter.Response().Response.Response != nil {
16080				sc = iter.Response().Response.Response.StatusCode
16081			}
16082			tracing.EndSpan(ctx, sc, err)
16083		}()
16084	}
16085	iter.i++
16086	if iter.i < len(iter.page.Values()) {
16087		return nil
16088	}
16089	err = iter.page.NextWithContext(ctx)
16090	if err != nil {
16091		iter.i--
16092		return err
16093	}
16094	iter.i = 0
16095	return nil
16096}
16097
16098// Next advances to the next value.  If there was an error making
16099// the request the iterator does not advance and the error is returned.
16100// Deprecated: Use NextWithContext() instead.
16101func (iter *VirtualMachineScaleSetListWithLinkResultIterator) Next() error {
16102	return iter.NextWithContext(context.Background())
16103}
16104
16105// NotDone returns true if the enumeration should be started or is not yet complete.
16106func (iter VirtualMachineScaleSetListWithLinkResultIterator) NotDone() bool {
16107	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16108}
16109
16110// Response returns the raw server response from the last page request.
16111func (iter VirtualMachineScaleSetListWithLinkResultIterator) Response() VirtualMachineScaleSetListWithLinkResult {
16112	return iter.page.Response()
16113}
16114
16115// Value returns the current value or a zero-initialized value if the
16116// iterator has advanced beyond the end of the collection.
16117func (iter VirtualMachineScaleSetListWithLinkResultIterator) Value() VirtualMachineScaleSet {
16118	if !iter.page.NotDone() {
16119		return VirtualMachineScaleSet{}
16120	}
16121	return iter.page.Values()[iter.i]
16122}
16123
16124// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultIterator type.
16125func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator {
16126	return VirtualMachineScaleSetListWithLinkResultIterator{page: page}
16127}
16128
16129// IsEmpty returns true if the ListResult contains no values.
16130func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool {
16131	return vmsslwlr.Value == nil || len(*vmsslwlr.Value) == 0
16132}
16133
16134// hasNextLink returns true if the NextLink is not empty.
16135func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) hasNextLink() bool {
16136	return vmsslwlr.NextLink != nil && len(*vmsslwlr.NextLink) != 0
16137}
16138
16139// virtualMachineScaleSetListWithLinkResultPreparer prepares a request to retrieve the next set of results.
16140// It returns nil if no more results exist.
16141func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer(ctx context.Context) (*http.Request, error) {
16142	if !vmsslwlr.hasNextLink() {
16143		return nil, nil
16144	}
16145	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16146		autorest.AsJSON(),
16147		autorest.AsGet(),
16148		autorest.WithBaseURL(to.String(vmsslwlr.NextLink)))
16149}
16150
16151// VirtualMachineScaleSetListWithLinkResultPage contains a page of VirtualMachineScaleSet values.
16152type VirtualMachineScaleSetListWithLinkResultPage struct {
16153	fn       func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)
16154	vmsslwlr VirtualMachineScaleSetListWithLinkResult
16155}
16156
16157// NextWithContext advances to the next page of values.  If there was an error making
16158// the request the page does not advance and the error is returned.
16159func (page *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx context.Context) (err error) {
16160	if tracing.IsEnabled() {
16161		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultPage.NextWithContext")
16162		defer func() {
16163			sc := -1
16164			if page.Response().Response.Response != nil {
16165				sc = page.Response().Response.Response.StatusCode
16166			}
16167			tracing.EndSpan(ctx, sc, err)
16168		}()
16169	}
16170	for {
16171		next, err := page.fn(ctx, page.vmsslwlr)
16172		if err != nil {
16173			return err
16174		}
16175		page.vmsslwlr = next
16176		if !next.hasNextLink() || !next.IsEmpty() {
16177			break
16178		}
16179	}
16180	return nil
16181}
16182
16183// Next advances to the next page of values.  If there was an error making
16184// the request the page does not advance and the error is returned.
16185// Deprecated: Use NextWithContext() instead.
16186func (page *VirtualMachineScaleSetListWithLinkResultPage) Next() error {
16187	return page.NextWithContext(context.Background())
16188}
16189
16190// NotDone returns true if the page enumeration should be started or is not yet complete.
16191func (page VirtualMachineScaleSetListWithLinkResultPage) NotDone() bool {
16192	return !page.vmsslwlr.IsEmpty()
16193}
16194
16195// Response returns the raw server response from the last page request.
16196func (page VirtualMachineScaleSetListWithLinkResultPage) Response() VirtualMachineScaleSetListWithLinkResult {
16197	return page.vmsslwlr
16198}
16199
16200// Values returns the slice of values for the current page or nil if there are no values.
16201func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachineScaleSet {
16202	if page.vmsslwlr.IsEmpty() {
16203		return nil
16204	}
16205	return *page.vmsslwlr.Value
16206}
16207
16208// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type.
16209func NewVirtualMachineScaleSetListWithLinkResultPage(cur VirtualMachineScaleSetListWithLinkResult, getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
16210	return VirtualMachineScaleSetListWithLinkResultPage{
16211		fn:       getNextPage,
16212		vmsslwlr: cur,
16213	}
16214}
16215
16216// VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk.
16217type VirtualMachineScaleSetManagedDiskParameters struct {
16218	// 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'
16219	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
16220	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
16221	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
16222}
16223
16224// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's
16225// network configurations.
16226type VirtualMachineScaleSetNetworkConfiguration struct {
16227	// Name - The network configuration name.
16228	Name                                                  *string `json:"name,omitempty"`
16229	*VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"`
16230	// ID - Resource Id
16231	ID *string `json:"id,omitempty"`
16232}
16233
16234// MarshalJSON is the custom marshaler for VirtualMachineScaleSetNetworkConfiguration.
16235func (vmssnc VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) {
16236	objectMap := make(map[string]interface{})
16237	if vmssnc.Name != nil {
16238		objectMap["name"] = vmssnc.Name
16239	}
16240	if vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties != nil {
16241		objectMap["properties"] = vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties
16242	}
16243	if vmssnc.ID != nil {
16244		objectMap["id"] = vmssnc.ID
16245	}
16246	return json.Marshal(objectMap)
16247}
16248
16249// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetNetworkConfiguration struct.
16250func (vmssnc *VirtualMachineScaleSetNetworkConfiguration) UnmarshalJSON(body []byte) error {
16251	var m map[string]*json.RawMessage
16252	err := json.Unmarshal(body, &m)
16253	if err != nil {
16254		return err
16255	}
16256	for k, v := range m {
16257		switch k {
16258		case "name":
16259			if v != nil {
16260				var name string
16261				err = json.Unmarshal(*v, &name)
16262				if err != nil {
16263					return err
16264				}
16265				vmssnc.Name = &name
16266			}
16267		case "properties":
16268			if v != nil {
16269				var virtualMachineScaleSetNetworkConfigurationProperties VirtualMachineScaleSetNetworkConfigurationProperties
16270				err = json.Unmarshal(*v, &virtualMachineScaleSetNetworkConfigurationProperties)
16271				if err != nil {
16272					return err
16273				}
16274				vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties = &virtualMachineScaleSetNetworkConfigurationProperties
16275			}
16276		case "id":
16277			if v != nil {
16278				var ID string
16279				err = json.Unmarshal(*v, &ID)
16280				if err != nil {
16281					return err
16282				}
16283				vmssnc.ID = &ID
16284			}
16285		}
16286	}
16287
16288	return nil
16289}
16290
16291// VirtualMachineScaleSetNetworkConfigurationDNSSettings describes a virtual machines scale sets network
16292// configuration's DNS settings.
16293type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
16294	// DNSServers - List of DNS servers IP addresses
16295	DNSServers *[]string `json:"dnsServers,omitempty"`
16296}
16297
16298// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network
16299// profile's IP configuration.
16300type VirtualMachineScaleSetNetworkConfigurationProperties struct {
16301	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
16302	Primary *bool `json:"primary,omitempty"`
16303	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
16304	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
16305	// EnableFpga - Specifies whether the network interface is FPGA networking-enabled.
16306	EnableFpga *bool `json:"enableFpga,omitempty"`
16307	// NetworkSecurityGroup - The network security group.
16308	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
16309	// DNSSettings - The dns settings to be applied on the network interfaces.
16310	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
16311	// IPConfigurations - Specifies the IP configurations of the network interface.
16312	IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"`
16313	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
16314	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
16315}
16316
16317// VirtualMachineScaleSetNetworkProfile describes a virtual machine scale set network profile.
16318type VirtualMachineScaleSetNetworkProfile struct {
16319	// 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}'.
16320	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
16321	// NetworkInterfaceConfigurations - The list of network configurations.
16322	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
16323}
16324
16325// VirtualMachineScaleSetOSDisk describes a virtual machine scale set operating system disk.
16326type VirtualMachineScaleSetOSDisk struct {
16327	// Name - The disk name.
16328	Name *string `json:"name,omitempty"`
16329	// 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'
16330	Caching CachingTypes `json:"caching,omitempty"`
16331	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
16332	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
16333	// 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'
16334	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
16335	// DiffDiskSettings - Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
16336	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
16337	// 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
16338	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
16339	// 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'
16340	OsType OperatingSystemTypes `json:"osType,omitempty"`
16341	// Image - Specifies information about the unmanaged user image to base the scale set on.
16342	Image *VirtualHardDisk `json:"image,omitempty"`
16343	// VhdContainers - Specifies the container urls that are used to store operating system disks for the scale set.
16344	VhdContainers *[]string `json:"vhdContainers,omitempty"`
16345	// ManagedDisk - The managed disk parameters.
16346	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
16347}
16348
16349// VirtualMachineScaleSetOSProfile describes a virtual machine scale set OS profile.
16350type VirtualMachineScaleSetOSProfile struct {
16351	// 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.
16352	ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"`
16353	// 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)
16354	AdminUsername *string `json:"adminUsername,omitempty"`
16355	// 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)
16356	AdminPassword *string `json:"adminPassword,omitempty"`
16357	// 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)
16358	CustomData *string `json:"customData,omitempty"`
16359	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
16360	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
16361	// 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).
16362	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
16363	// Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set.
16364	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
16365}
16366
16367// VirtualMachineScaleSetProperties describes the properties of a Virtual Machine Scale Set.
16368type VirtualMachineScaleSetProperties struct {
16369	// UpgradePolicy - The upgrade policy.
16370	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
16371	// AutomaticRepairsPolicy - Policy for automatic repairs.
16372	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
16373	// VirtualMachineProfile - The virtual machine profile.
16374	VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"`
16375	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
16376	ProvisioningState *string `json:"provisioningState,omitempty"`
16377	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
16378	Overprovision *bool `json:"overprovision,omitempty"`
16379	// 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.
16380	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
16381	// UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
16382	UniqueID *string `json:"uniqueId,omitempty"`
16383	// 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.
16384	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
16385	// ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.
16386	ZoneBalance *bool `json:"zoneBalance,omitempty"`
16387	// PlatformFaultDomainCount - Fault Domain count for each placement group.
16388	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
16389	// 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.
16390	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
16391	// HostGroup - Specifies information about the dedicated host group that the virtual machine scale set resides in. <br><br>Minimum api-version: 2020-06-01.
16392	HostGroup *SubResource `json:"hostGroup,omitempty"`
16393	// 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.
16394	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
16395	// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
16396	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
16397}
16398
16399// MarshalJSON is the custom marshaler for VirtualMachineScaleSetProperties.
16400func (vmssp VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) {
16401	objectMap := make(map[string]interface{})
16402	if vmssp.UpgradePolicy != nil {
16403		objectMap["upgradePolicy"] = vmssp.UpgradePolicy
16404	}
16405	if vmssp.AutomaticRepairsPolicy != nil {
16406		objectMap["automaticRepairsPolicy"] = vmssp.AutomaticRepairsPolicy
16407	}
16408	if vmssp.VirtualMachineProfile != nil {
16409		objectMap["virtualMachineProfile"] = vmssp.VirtualMachineProfile
16410	}
16411	if vmssp.Overprovision != nil {
16412		objectMap["overprovision"] = vmssp.Overprovision
16413	}
16414	if vmssp.DoNotRunExtensionsOnOverprovisionedVMs != nil {
16415		objectMap["doNotRunExtensionsOnOverprovisionedVMs"] = vmssp.DoNotRunExtensionsOnOverprovisionedVMs
16416	}
16417	if vmssp.SinglePlacementGroup != nil {
16418		objectMap["singlePlacementGroup"] = vmssp.SinglePlacementGroup
16419	}
16420	if vmssp.ZoneBalance != nil {
16421		objectMap["zoneBalance"] = vmssp.ZoneBalance
16422	}
16423	if vmssp.PlatformFaultDomainCount != nil {
16424		objectMap["platformFaultDomainCount"] = vmssp.PlatformFaultDomainCount
16425	}
16426	if vmssp.ProximityPlacementGroup != nil {
16427		objectMap["proximityPlacementGroup"] = vmssp.ProximityPlacementGroup
16428	}
16429	if vmssp.HostGroup != nil {
16430		objectMap["hostGroup"] = vmssp.HostGroup
16431	}
16432	if vmssp.AdditionalCapabilities != nil {
16433		objectMap["additionalCapabilities"] = vmssp.AdditionalCapabilities
16434	}
16435	if vmssp.ScaleInPolicy != nil {
16436		objectMap["scaleInPolicy"] = vmssp.ScaleInPolicy
16437	}
16438	return json.Marshal(objectMap)
16439}
16440
16441// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP
16442// Configuration's PublicIPAddress configuration
16443type VirtualMachineScaleSetPublicIPAddressConfiguration struct {
16444	// Name - The publicIP address configuration name.
16445	Name                                                          *string `json:"name,omitempty"`
16446	*VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"`
16447}
16448
16449// MarshalJSON is the custom marshaler for VirtualMachineScaleSetPublicIPAddressConfiguration.
16450func (vmsspiac VirtualMachineScaleSetPublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
16451	objectMap := make(map[string]interface{})
16452	if vmsspiac.Name != nil {
16453		objectMap["name"] = vmsspiac.Name
16454	}
16455	if vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties != nil {
16456		objectMap["properties"] = vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties
16457	}
16458	return json.Marshal(objectMap)
16459}
16460
16461// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetPublicIPAddressConfiguration struct.
16462func (vmsspiac *VirtualMachineScaleSetPublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
16463	var m map[string]*json.RawMessage
16464	err := json.Unmarshal(body, &m)
16465	if err != nil {
16466		return err
16467	}
16468	for k, v := range m {
16469		switch k {
16470		case "name":
16471			if v != nil {
16472				var name string
16473				err = json.Unmarshal(*v, &name)
16474				if err != nil {
16475					return err
16476				}
16477				vmsspiac.Name = &name
16478			}
16479		case "properties":
16480			if v != nil {
16481				var virtualMachineScaleSetPublicIPAddressConfigurationProperties VirtualMachineScaleSetPublicIPAddressConfigurationProperties
16482				err = json.Unmarshal(*v, &virtualMachineScaleSetPublicIPAddressConfigurationProperties)
16483				if err != nil {
16484					return err
16485				}
16486				vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties = &virtualMachineScaleSetPublicIPAddressConfigurationProperties
16487			}
16488		}
16489	}
16490
16491	return nil
16492}
16493
16494// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets
16495// network configuration's DNS settings.
16496type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct {
16497	// 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
16498	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
16499}
16500
16501// VirtualMachineScaleSetPublicIPAddressConfigurationProperties describes a virtual machines scale set IP
16502// Configuration's PublicIPAddress configuration
16503type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
16504	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
16505	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
16506	// DNSSettings - The dns settings to be applied on the publicIP addresses .
16507	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
16508	// IPTags - The list of IP tags associated with the public IP address.
16509	IPTags *[]VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"`
16510	// PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses.
16511	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
16512	// 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'
16513	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
16514}
16515
16516// VirtualMachineScaleSetReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
16517type VirtualMachineScaleSetReimageParameters struct {
16518	// 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.
16519	InstanceIds *[]string `json:"instanceIds,omitempty"`
16520	// 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.
16521	TempDisk *bool `json:"tempDisk,omitempty"`
16522}
16523
16524// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the
16525// results of a long-running operation.
16526type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
16527	azure.FutureAPI
16528	// Result returns the result of the asynchronous operation.
16529	// If the operation has not completed it will return an error.
16530	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
16531}
16532
16533// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16534func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) UnmarshalJSON(body []byte) error {
16535	var azFuture azure.Future
16536	if err := json.Unmarshal(body, &azFuture); err != nil {
16537		return err
16538	}
16539	future.FutureAPI = &azFuture
16540	future.Result = future.result
16541	return nil
16542}
16543
16544// result is the default implementation for VirtualMachineScaleSetRollingUpgradesCancelFuture.Result.
16545func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
16546	var done bool
16547	done, err = future.DoneWithContext(context.Background(), client)
16548	if err != nil {
16549		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Polling failure")
16550		return
16551	}
16552	if !done {
16553		ar.Response = future.Response()
16554		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
16555		return
16556	}
16557	ar.Response = future.Response()
16558	return
16559}
16560
16561// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and
16562// retrieving the results of a long-running operation.
16563type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct {
16564	azure.FutureAPI
16565	// Result returns the result of the asynchronous operation.
16566	// If the operation has not completed it will return an error.
16567	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
16568}
16569
16570// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16571func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) UnmarshalJSON(body []byte) error {
16572	var azFuture azure.Future
16573	if err := json.Unmarshal(body, &azFuture); err != nil {
16574		return err
16575	}
16576	future.FutureAPI = &azFuture
16577	future.Result = future.result
16578	return nil
16579}
16580
16581// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.Result.
16582func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
16583	var done bool
16584	done, err = future.DoneWithContext(context.Background(), client)
16585	if err != nil {
16586		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture", "Result", future.Response(), "Polling failure")
16587		return
16588	}
16589	if !done {
16590		ar.Response = future.Response()
16591		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture")
16592		return
16593	}
16594	ar.Response = future.Response()
16595	return
16596}
16597
16598// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving
16599// the results of a long-running operation.
16600type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
16601	azure.FutureAPI
16602	// Result returns the result of the asynchronous operation.
16603	// If the operation has not completed it will return an error.
16604	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
16605}
16606
16607// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16608func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) UnmarshalJSON(body []byte) error {
16609	var azFuture azure.Future
16610	if err := json.Unmarshal(body, &azFuture); err != nil {
16611		return err
16612	}
16613	future.FutureAPI = &azFuture
16614	future.Result = future.result
16615	return nil
16616}
16617
16618// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.Result.
16619func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
16620	var done bool
16621	done, err = future.DoneWithContext(context.Background(), client)
16622	if err != nil {
16623		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Polling failure")
16624		return
16625	}
16626	if !done {
16627		ar.Response = future.Response()
16628		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
16629		return
16630	}
16631	ar.Response = future.Response()
16632	return
16633}
16634
16635// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
16636// a long-running operation.
16637type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
16638	azure.FutureAPI
16639	// Result returns the result of the asynchronous operation.
16640	// If the operation has not completed it will return an error.
16641	Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
16642}
16643
16644// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16645func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16646	var azFuture azure.Future
16647	if err := json.Unmarshal(body, &azFuture); err != nil {
16648		return err
16649	}
16650	future.FutureAPI = &azFuture
16651	future.Result = future.result
16652	return nil
16653}
16654
16655// result is the default implementation for VirtualMachineScaleSetsCreateOrUpdateFuture.Result.
16656func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
16657	var done bool
16658	done, err = future.DoneWithContext(context.Background(), client)
16659	if err != nil {
16660		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16661		return
16662	}
16663	if !done {
16664		vmss.Response.Response = future.Response()
16665		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
16666		return
16667	}
16668	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16669	if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
16670		vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
16671		if err != nil {
16672			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
16673		}
16674	}
16675	return
16676}
16677
16678// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a
16679// long-running operation.
16680type VirtualMachineScaleSetsDeallocateFuture struct {
16681	azure.FutureAPI
16682	// Result returns the result of the asynchronous operation.
16683	// If the operation has not completed it will return an error.
16684	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
16685}
16686
16687// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16688func (future *VirtualMachineScaleSetsDeallocateFuture) UnmarshalJSON(body []byte) error {
16689	var azFuture azure.Future
16690	if err := json.Unmarshal(body, &azFuture); err != nil {
16691		return err
16692	}
16693	future.FutureAPI = &azFuture
16694	future.Result = future.result
16695	return nil
16696}
16697
16698// result is the default implementation for VirtualMachineScaleSetsDeallocateFuture.Result.
16699func (future *VirtualMachineScaleSetsDeallocateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
16700	var done bool
16701	done, err = future.DoneWithContext(context.Background(), client)
16702	if err != nil {
16703		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Polling failure")
16704		return
16705	}
16706	if !done {
16707		ar.Response = future.Response()
16708		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
16709		return
16710	}
16711	ar.Response = future.Response()
16712	return
16713}
16714
16715// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
16716// long-running operation.
16717type VirtualMachineScaleSetsDeleteFuture struct {
16718	azure.FutureAPI
16719	// Result returns the result of the asynchronous operation.
16720	// If the operation has not completed it will return an error.
16721	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
16722}
16723
16724// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16725func (future *VirtualMachineScaleSetsDeleteFuture) UnmarshalJSON(body []byte) error {
16726	var azFuture azure.Future
16727	if err := json.Unmarshal(body, &azFuture); err != nil {
16728		return err
16729	}
16730	future.FutureAPI = &azFuture
16731	future.Result = future.result
16732	return nil
16733}
16734
16735// result is the default implementation for VirtualMachineScaleSetsDeleteFuture.Result.
16736func (future *VirtualMachineScaleSetsDeleteFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
16737	var done bool
16738	done, err = future.DoneWithContext(context.Background(), client)
16739	if err != nil {
16740		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Polling failure")
16741		return
16742	}
16743	if !done {
16744		ar.Response = future.Response()
16745		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
16746		return
16747	}
16748	ar.Response = future.Response()
16749	return
16750}
16751
16752// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of
16753// a long-running operation.
16754type VirtualMachineScaleSetsDeleteInstancesFuture struct {
16755	azure.FutureAPI
16756	// Result returns the result of the asynchronous operation.
16757	// If the operation has not completed it will return an error.
16758	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
16759}
16760
16761// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16762func (future *VirtualMachineScaleSetsDeleteInstancesFuture) UnmarshalJSON(body []byte) error {
16763	var azFuture azure.Future
16764	if err := json.Unmarshal(body, &azFuture); err != nil {
16765		return err
16766	}
16767	future.FutureAPI = &azFuture
16768	future.Result = future.result
16769	return nil
16770}
16771
16772// result is the default implementation for VirtualMachineScaleSetsDeleteInstancesFuture.Result.
16773func (future *VirtualMachineScaleSetsDeleteInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
16774	var done bool
16775	done, err = future.DoneWithContext(context.Background(), client)
16776	if err != nil {
16777		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Polling failure")
16778		return
16779	}
16780	if !done {
16781		ar.Response = future.Response()
16782		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
16783		return
16784	}
16785	ar.Response = future.Response()
16786	return
16787}
16788
16789// VirtualMachineScaleSetSku describes an available virtual machine scale set sku.
16790type VirtualMachineScaleSetSku struct {
16791	// ResourceType - READ-ONLY; The type of resource the sku applies to.
16792	ResourceType *string `json:"resourceType,omitempty"`
16793	// Sku - READ-ONLY; The Sku.
16794	Sku *Sku `json:"sku,omitempty"`
16795	// Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
16796	Capacity *VirtualMachineScaleSetSkuCapacity `json:"capacity,omitempty"`
16797}
16798
16799// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSku.
16800func (vmsss VirtualMachineScaleSetSku) MarshalJSON() ([]byte, error) {
16801	objectMap := make(map[string]interface{})
16802	return json.Marshal(objectMap)
16803}
16804
16805// VirtualMachineScaleSetSkuCapacity describes scaling information of a sku.
16806type VirtualMachineScaleSetSkuCapacity struct {
16807	// Minimum - READ-ONLY; The minimum capacity.
16808	Minimum *int64 `json:"minimum,omitempty"`
16809	// Maximum - READ-ONLY; The maximum capacity that can be set.
16810	Maximum *int64 `json:"maximum,omitempty"`
16811	// DefaultCapacity - READ-ONLY; The default capacity.
16812	DefaultCapacity *int64 `json:"defaultCapacity,omitempty"`
16813	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'VirtualMachineScaleSetSkuScaleTypeAutomatic', 'VirtualMachineScaleSetSkuScaleTypeNone'
16814	ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"`
16815}
16816
16817// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSkuCapacity.
16818func (vmsssc VirtualMachineScaleSetSkuCapacity) MarshalJSON() ([]byte, error) {
16819	objectMap := make(map[string]interface{})
16820	return json.Marshal(objectMap)
16821}
16822
16823// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results
16824// of a long-running operation.
16825type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
16826	azure.FutureAPI
16827	// Result returns the result of the asynchronous operation.
16828	// If the operation has not completed it will return an error.
16829	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
16830}
16831
16832// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16833func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
16834	var azFuture azure.Future
16835	if err := json.Unmarshal(body, &azFuture); err != nil {
16836		return err
16837	}
16838	future.FutureAPI = &azFuture
16839	future.Result = future.result
16840	return nil
16841}
16842
16843// result is the default implementation for VirtualMachineScaleSetsPerformMaintenanceFuture.Result.
16844func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
16845	var done bool
16846	done, err = future.DoneWithContext(context.Background(), client)
16847	if err != nil {
16848		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
16849		return
16850	}
16851	if !done {
16852		ar.Response = future.Response()
16853		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
16854		return
16855	}
16856	ar.Response = future.Response()
16857	return
16858}
16859
16860// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a
16861// long-running operation.
16862type VirtualMachineScaleSetsPowerOffFuture struct {
16863	azure.FutureAPI
16864	// Result returns the result of the asynchronous operation.
16865	// If the operation has not completed it will return an error.
16866	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
16867}
16868
16869// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16870func (future *VirtualMachineScaleSetsPowerOffFuture) UnmarshalJSON(body []byte) error {
16871	var azFuture azure.Future
16872	if err := json.Unmarshal(body, &azFuture); err != nil {
16873		return err
16874	}
16875	future.FutureAPI = &azFuture
16876	future.Result = future.result
16877	return nil
16878}
16879
16880// result is the default implementation for VirtualMachineScaleSetsPowerOffFuture.Result.
16881func (future *VirtualMachineScaleSetsPowerOffFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
16882	var done bool
16883	done, err = future.DoneWithContext(context.Background(), client)
16884	if err != nil {
16885		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Polling failure")
16886		return
16887	}
16888	if !done {
16889		ar.Response = future.Response()
16890		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
16891		return
16892	}
16893	ar.Response = future.Response()
16894	return
16895}
16896
16897// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a
16898// long-running operation.
16899type VirtualMachineScaleSetsRedeployFuture struct {
16900	azure.FutureAPI
16901	// Result returns the result of the asynchronous operation.
16902	// If the operation has not completed it will return an error.
16903	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
16904}
16905
16906// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16907func (future *VirtualMachineScaleSetsRedeployFuture) UnmarshalJSON(body []byte) error {
16908	var azFuture azure.Future
16909	if err := json.Unmarshal(body, &azFuture); err != nil {
16910		return err
16911	}
16912	future.FutureAPI = &azFuture
16913	future.Result = future.result
16914	return nil
16915}
16916
16917// result is the default implementation for VirtualMachineScaleSetsRedeployFuture.Result.
16918func (future *VirtualMachineScaleSetsRedeployFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
16919	var done bool
16920	done, err = future.DoneWithContext(context.Background(), client)
16921	if err != nil {
16922		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Polling failure")
16923		return
16924	}
16925	if !done {
16926		ar.Response = future.Response()
16927		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
16928		return
16929	}
16930	ar.Response = future.Response()
16931	return
16932}
16933
16934// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a
16935// long-running operation.
16936type VirtualMachineScaleSetsReimageAllFuture struct {
16937	azure.FutureAPI
16938	// Result returns the result of the asynchronous operation.
16939	// If the operation has not completed it will return an error.
16940	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
16941}
16942
16943// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16944func (future *VirtualMachineScaleSetsReimageAllFuture) UnmarshalJSON(body []byte) error {
16945	var azFuture azure.Future
16946	if err := json.Unmarshal(body, &azFuture); err != nil {
16947		return err
16948	}
16949	future.FutureAPI = &azFuture
16950	future.Result = future.result
16951	return nil
16952}
16953
16954// result is the default implementation for VirtualMachineScaleSetsReimageAllFuture.Result.
16955func (future *VirtualMachineScaleSetsReimageAllFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
16956	var done bool
16957	done, err = future.DoneWithContext(context.Background(), client)
16958	if err != nil {
16959		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Polling failure")
16960		return
16961	}
16962	if !done {
16963		ar.Response = future.Response()
16964		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
16965		return
16966	}
16967	ar.Response = future.Response()
16968	return
16969}
16970
16971// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a
16972// long-running operation.
16973type VirtualMachineScaleSetsReimageFuture struct {
16974	azure.FutureAPI
16975	// Result returns the result of the asynchronous operation.
16976	// If the operation has not completed it will return an error.
16977	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
16978}
16979
16980// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16981func (future *VirtualMachineScaleSetsReimageFuture) UnmarshalJSON(body []byte) error {
16982	var azFuture azure.Future
16983	if err := json.Unmarshal(body, &azFuture); err != nil {
16984		return err
16985	}
16986	future.FutureAPI = &azFuture
16987	future.Result = future.result
16988	return nil
16989}
16990
16991// result is the default implementation for VirtualMachineScaleSetsReimageFuture.Result.
16992func (future *VirtualMachineScaleSetsReimageFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
16993	var done bool
16994	done, err = future.DoneWithContext(context.Background(), client)
16995	if err != nil {
16996		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Polling failure")
16997		return
16998	}
16999	if !done {
17000		ar.Response = future.Response()
17001		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
17002		return
17003	}
17004	ar.Response = future.Response()
17005	return
17006}
17007
17008// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a
17009// long-running operation.
17010type VirtualMachineScaleSetsRestartFuture struct {
17011	azure.FutureAPI
17012	// Result returns the result of the asynchronous operation.
17013	// If the operation has not completed it will return an error.
17014	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
17015}
17016
17017// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17018func (future *VirtualMachineScaleSetsRestartFuture) UnmarshalJSON(body []byte) error {
17019	var azFuture azure.Future
17020	if err := json.Unmarshal(body, &azFuture); err != nil {
17021		return err
17022	}
17023	future.FutureAPI = &azFuture
17024	future.Result = future.result
17025	return nil
17026}
17027
17028// result is the default implementation for VirtualMachineScaleSetsRestartFuture.Result.
17029func (future *VirtualMachineScaleSetsRestartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
17030	var done bool
17031	done, err = future.DoneWithContext(context.Background(), client)
17032	if err != nil {
17033		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Polling failure")
17034		return
17035	}
17036	if !done {
17037		ar.Response = future.Response()
17038		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
17039		return
17040	}
17041	ar.Response = future.Response()
17042	return
17043}
17044
17045// VirtualMachineScaleSetsSetOrchestrationServiceStateFuture an abstraction for monitoring and retrieving
17046// the results of a long-running operation.
17047type VirtualMachineScaleSetsSetOrchestrationServiceStateFuture struct {
17048	azure.FutureAPI
17049	// Result returns the result of the asynchronous operation.
17050	// If the operation has not completed it will return an error.
17051	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
17052}
17053
17054// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17055func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) UnmarshalJSON(body []byte) error {
17056	var azFuture azure.Future
17057	if err := json.Unmarshal(body, &azFuture); err != nil {
17058		return err
17059	}
17060	future.FutureAPI = &azFuture
17061	future.Result = future.result
17062	return nil
17063}
17064
17065// result is the default implementation for VirtualMachineScaleSetsSetOrchestrationServiceStateFuture.Result.
17066func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
17067	var done bool
17068	done, err = future.DoneWithContext(context.Background(), client)
17069	if err != nil {
17070		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture", "Result", future.Response(), "Polling failure")
17071		return
17072	}
17073	if !done {
17074		ar.Response = future.Response()
17075		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture")
17076		return
17077	}
17078	ar.Response = future.Response()
17079	return
17080}
17081
17082// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a
17083// long-running operation.
17084type VirtualMachineScaleSetsStartFuture struct {
17085	azure.FutureAPI
17086	// Result returns the result of the asynchronous operation.
17087	// If the operation has not completed it will return an error.
17088	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
17089}
17090
17091// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17092func (future *VirtualMachineScaleSetsStartFuture) UnmarshalJSON(body []byte) error {
17093	var azFuture azure.Future
17094	if err := json.Unmarshal(body, &azFuture); err != nil {
17095		return err
17096	}
17097	future.FutureAPI = &azFuture
17098	future.Result = future.result
17099	return nil
17100}
17101
17102// result is the default implementation for VirtualMachineScaleSetsStartFuture.Result.
17103func (future *VirtualMachineScaleSetsStartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
17104	var done bool
17105	done, err = future.DoneWithContext(context.Background(), client)
17106	if err != nil {
17107		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Polling failure")
17108		return
17109	}
17110	if !done {
17111		ar.Response = future.Response()
17112		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
17113		return
17114	}
17115	ar.Response = future.Response()
17116	return
17117}
17118
17119// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile.
17120type VirtualMachineScaleSetStorageProfile struct {
17121	// 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.
17122	ImageReference *ImageReference `json:"imageReference,omitempty"`
17123	// 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).
17124	OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"`
17125	// 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).
17126	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
17127}
17128
17129// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
17130// long-running operation.
17131type VirtualMachineScaleSetsUpdateFuture struct {
17132	azure.FutureAPI
17133	// Result returns the result of the asynchronous operation.
17134	// If the operation has not completed it will return an error.
17135	Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
17136}
17137
17138// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17139func (future *VirtualMachineScaleSetsUpdateFuture) UnmarshalJSON(body []byte) error {
17140	var azFuture azure.Future
17141	if err := json.Unmarshal(body, &azFuture); err != nil {
17142		return err
17143	}
17144	future.FutureAPI = &azFuture
17145	future.Result = future.result
17146	return nil
17147}
17148
17149// result is the default implementation for VirtualMachineScaleSetsUpdateFuture.Result.
17150func (future *VirtualMachineScaleSetsUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
17151	var done bool
17152	done, err = future.DoneWithContext(context.Background(), client)
17153	if err != nil {
17154		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Polling failure")
17155		return
17156	}
17157	if !done {
17158		vmss.Response.Response = future.Response()
17159		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
17160		return
17161	}
17162	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17163	if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
17164		vmss, err = client.UpdateResponder(vmss.Response.Response)
17165		if err != nil {
17166			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
17167		}
17168	}
17169	return
17170}
17171
17172// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of
17173// a long-running operation.
17174type VirtualMachineScaleSetsUpdateInstancesFuture struct {
17175	azure.FutureAPI
17176	// Result returns the result of the asynchronous operation.
17177	// If the operation has not completed it will return an error.
17178	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
17179}
17180
17181// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17182func (future *VirtualMachineScaleSetsUpdateInstancesFuture) UnmarshalJSON(body []byte) error {
17183	var azFuture azure.Future
17184	if err := json.Unmarshal(body, &azFuture); err != nil {
17185		return err
17186	}
17187	future.FutureAPI = &azFuture
17188	future.Result = future.result
17189	return nil
17190}
17191
17192// result is the default implementation for VirtualMachineScaleSetsUpdateInstancesFuture.Result.
17193func (future *VirtualMachineScaleSetsUpdateInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
17194	var done bool
17195	done, err = future.DoneWithContext(context.Background(), client)
17196	if err != nil {
17197		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Polling failure")
17198		return
17199	}
17200	if !done {
17201		ar.Response = future.Response()
17202		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
17203		return
17204	}
17205	ar.Response = future.Response()
17206	return
17207}
17208
17209// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set.
17210type VirtualMachineScaleSetUpdate struct {
17211	// Sku - The virtual machine scale set sku.
17212	Sku *Sku `json:"sku,omitempty"`
17213	// Plan - The purchase plan when deploying a virtual machine scale set from VM Marketplace images.
17214	Plan                                    *Plan `json:"plan,omitempty"`
17215	*VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"`
17216	// Identity - The identity of the virtual machine scale set, if configured.
17217	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
17218	// Tags - Resource tags
17219	Tags map[string]*string `json:"tags"`
17220}
17221
17222// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate.
17223func (vmssu VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) {
17224	objectMap := make(map[string]interface{})
17225	if vmssu.Sku != nil {
17226		objectMap["sku"] = vmssu.Sku
17227	}
17228	if vmssu.Plan != nil {
17229		objectMap["plan"] = vmssu.Plan
17230	}
17231	if vmssu.VirtualMachineScaleSetUpdateProperties != nil {
17232		objectMap["properties"] = vmssu.VirtualMachineScaleSetUpdateProperties
17233	}
17234	if vmssu.Identity != nil {
17235		objectMap["identity"] = vmssu.Identity
17236	}
17237	if vmssu.Tags != nil {
17238		objectMap["tags"] = vmssu.Tags
17239	}
17240	return json.Marshal(objectMap)
17241}
17242
17243// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdate struct.
17244func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error {
17245	var m map[string]*json.RawMessage
17246	err := json.Unmarshal(body, &m)
17247	if err != nil {
17248		return err
17249	}
17250	for k, v := range m {
17251		switch k {
17252		case "sku":
17253			if v != nil {
17254				var sku Sku
17255				err = json.Unmarshal(*v, &sku)
17256				if err != nil {
17257					return err
17258				}
17259				vmssu.Sku = &sku
17260			}
17261		case "plan":
17262			if v != nil {
17263				var plan Plan
17264				err = json.Unmarshal(*v, &plan)
17265				if err != nil {
17266					return err
17267				}
17268				vmssu.Plan = &plan
17269			}
17270		case "properties":
17271			if v != nil {
17272				var virtualMachineScaleSetUpdateProperties VirtualMachineScaleSetUpdateProperties
17273				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateProperties)
17274				if err != nil {
17275					return err
17276				}
17277				vmssu.VirtualMachineScaleSetUpdateProperties = &virtualMachineScaleSetUpdateProperties
17278			}
17279		case "identity":
17280			if v != nil {
17281				var identity VirtualMachineScaleSetIdentity
17282				err = json.Unmarshal(*v, &identity)
17283				if err != nil {
17284					return err
17285				}
17286				vmssu.Identity = &identity
17287			}
17288		case "tags":
17289			if v != nil {
17290				var tags map[string]*string
17291				err = json.Unmarshal(*v, &tags)
17292				if err != nil {
17293					return err
17294				}
17295				vmssu.Tags = tags
17296			}
17297		}
17298	}
17299
17300	return nil
17301}
17302
17303// VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP
17304// configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the
17305// new subnet are in the same virtual network
17306type VirtualMachineScaleSetUpdateIPConfiguration struct {
17307	// Name - The IP configuration name.
17308	Name                                                   *string `json:"name,omitempty"`
17309	*VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"`
17310	// ID - Resource Id
17311	ID *string `json:"id,omitempty"`
17312}
17313
17314// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateIPConfiguration.
17315func (vmssuic VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) {
17316	objectMap := make(map[string]interface{})
17317	if vmssuic.Name != nil {
17318		objectMap["name"] = vmssuic.Name
17319	}
17320	if vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties != nil {
17321		objectMap["properties"] = vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties
17322	}
17323	if vmssuic.ID != nil {
17324		objectMap["id"] = vmssuic.ID
17325	}
17326	return json.Marshal(objectMap)
17327}
17328
17329// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateIPConfiguration struct.
17330func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body []byte) error {
17331	var m map[string]*json.RawMessage
17332	err := json.Unmarshal(body, &m)
17333	if err != nil {
17334		return err
17335	}
17336	for k, v := range m {
17337		switch k {
17338		case "name":
17339			if v != nil {
17340				var name string
17341				err = json.Unmarshal(*v, &name)
17342				if err != nil {
17343					return err
17344				}
17345				vmssuic.Name = &name
17346			}
17347		case "properties":
17348			if v != nil {
17349				var virtualMachineScaleSetUpdateIPConfigurationProperties VirtualMachineScaleSetUpdateIPConfigurationProperties
17350				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateIPConfigurationProperties)
17351				if err != nil {
17352					return err
17353				}
17354				vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties = &virtualMachineScaleSetUpdateIPConfigurationProperties
17355			}
17356		case "id":
17357			if v != nil {
17358				var ID string
17359				err = json.Unmarshal(*v, &ID)
17360				if err != nil {
17361					return err
17362				}
17363				vmssuic.ID = &ID
17364			}
17365		}
17366	}
17367
17368	return nil
17369}
17370
17371// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network
17372// profile's IP configuration properties.
17373type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
17374	// Subnet - The subnet.
17375	Subnet *APIEntityReference `json:"subnet,omitempty"`
17376	// Primary - Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.
17377	Primary *bool `json:"primary,omitempty"`
17378	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
17379	PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
17380	// 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'
17381	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
17382	// ApplicationGatewayBackendAddressPools - The application gateway backend address pools.
17383	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
17384	// ApplicationSecurityGroups - Specifies an array of references to application security group.
17385	ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
17386	// LoadBalancerBackendAddressPools - The load balancer backend address pools.
17387	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
17388	// LoadBalancerInboundNatPools - The load balancer inbound nat pools.
17389	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
17390}
17391
17392// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's
17393// network configurations.
17394type VirtualMachineScaleSetUpdateNetworkConfiguration struct {
17395	// Name - The network configuration name.
17396	Name                                                        *string `json:"name,omitempty"`
17397	*VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"`
17398	// ID - Resource Id
17399	ID *string `json:"id,omitempty"`
17400}
17401
17402// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateNetworkConfiguration.
17403func (vmssunc VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) {
17404	objectMap := make(map[string]interface{})
17405	if vmssunc.Name != nil {
17406		objectMap["name"] = vmssunc.Name
17407	}
17408	if vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties != nil {
17409		objectMap["properties"] = vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties
17410	}
17411	if vmssunc.ID != nil {
17412		objectMap["id"] = vmssunc.ID
17413	}
17414	return json.Marshal(objectMap)
17415}
17416
17417// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateNetworkConfiguration struct.
17418func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(body []byte) error {
17419	var m map[string]*json.RawMessage
17420	err := json.Unmarshal(body, &m)
17421	if err != nil {
17422		return err
17423	}
17424	for k, v := range m {
17425		switch k {
17426		case "name":
17427			if v != nil {
17428				var name string
17429				err = json.Unmarshal(*v, &name)
17430				if err != nil {
17431					return err
17432				}
17433				vmssunc.Name = &name
17434			}
17435		case "properties":
17436			if v != nil {
17437				var virtualMachineScaleSetUpdateNetworkConfigurationProperties VirtualMachineScaleSetUpdateNetworkConfigurationProperties
17438				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateNetworkConfigurationProperties)
17439				if err != nil {
17440					return err
17441				}
17442				vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties = &virtualMachineScaleSetUpdateNetworkConfigurationProperties
17443			}
17444		case "id":
17445			if v != nil {
17446				var ID string
17447				err = json.Unmarshal(*v, &ID)
17448				if err != nil {
17449					return err
17450				}
17451				vmssunc.ID = &ID
17452			}
17453		}
17454	}
17455
17456	return nil
17457}
17458
17459// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set
17460// updatable network profile's IP configuration.Use this object for updating network profile's IP
17461// Configuration.
17462type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct {
17463	// Primary - Whether this is a primary NIC on a virtual machine.
17464	Primary *bool `json:"primary,omitempty"`
17465	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
17466	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
17467	// EnableFpga - Specifies whether the network interface is FPGA networking-enabled.
17468	EnableFpga *bool `json:"enableFpga,omitempty"`
17469	// NetworkSecurityGroup - The network security group.
17470	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
17471	// DNSSettings - The dns settings to be applied on the network interfaces.
17472	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
17473	// IPConfigurations - The virtual machine scale set IP Configuration.
17474	IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"`
17475	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
17476	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
17477}
17478
17479// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile.
17480type VirtualMachineScaleSetUpdateNetworkProfile struct {
17481	// 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}'.
17482	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
17483	// NetworkInterfaceConfigurations - The list of network configurations.
17484	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
17485}
17486
17487// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update
17488// Object. This should be used for Updating VMSS OS Disk.
17489type VirtualMachineScaleSetUpdateOSDisk struct {
17490	// Caching - The caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
17491	Caching CachingTypes `json:"caching,omitempty"`
17492	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
17493	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
17494	// 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
17495	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
17496	// 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.
17497	Image *VirtualHardDisk `json:"image,omitempty"`
17498	// VhdContainers - The list of virtual hard disk container uris.
17499	VhdContainers *[]string `json:"vhdContainers,omitempty"`
17500	// ManagedDisk - The managed disk parameters.
17501	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
17502}
17503
17504// VirtualMachineScaleSetUpdateOSProfile describes a virtual machine scale set OS profile.
17505type VirtualMachineScaleSetUpdateOSProfile struct {
17506	// CustomData - A base-64 encoded string of custom data.
17507	CustomData *string `json:"customData,omitempty"`
17508	// WindowsConfiguration - The Windows Configuration of the OS profile.
17509	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
17510	// LinuxConfiguration - The Linux Configuration of the OS profile.
17511	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
17512	// Secrets - The List of certificates for addition to the VM.
17513	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
17514}
17515
17516// VirtualMachineScaleSetUpdateProperties describes the properties of a Virtual Machine Scale Set.
17517type VirtualMachineScaleSetUpdateProperties struct {
17518	// UpgradePolicy - The upgrade policy.
17519	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
17520	// AutomaticRepairsPolicy - Policy for automatic repairs.
17521	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
17522	// VirtualMachineProfile - The virtual machine profile.
17523	VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"`
17524	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
17525	Overprovision *bool `json:"overprovision,omitempty"`
17526	// 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.
17527	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
17528	// 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.
17529	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
17530	// 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.
17531	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
17532	// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
17533	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
17534	// 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.
17535	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
17536}
17537
17538// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP
17539// Configuration's PublicIPAddress configuration
17540type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct {
17541	// Name - The publicIP address configuration name.
17542	Name                                                                *string `json:"name,omitempty"`
17543	*VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"`
17544}
17545
17546// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.
17547func (vmssupiac VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
17548	objectMap := make(map[string]interface{})
17549	if vmssupiac.Name != nil {
17550		objectMap["name"] = vmssupiac.Name
17551	}
17552	if vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties != nil {
17553		objectMap["properties"] = vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
17554	}
17555	return json.Marshal(objectMap)
17556}
17557
17558// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct.
17559func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
17560	var m map[string]*json.RawMessage
17561	err := json.Unmarshal(body, &m)
17562	if err != nil {
17563		return err
17564	}
17565	for k, v := range m {
17566		switch k {
17567		case "name":
17568			if v != nil {
17569				var name string
17570				err = json.Unmarshal(*v, &name)
17571				if err != nil {
17572					return err
17573				}
17574				vmssupiac.Name = &name
17575			}
17576		case "properties":
17577			if v != nil {
17578				var virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
17579				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties)
17580				if err != nil {
17581					return err
17582				}
17583				vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
17584			}
17585		}
17586	}
17587
17588	return nil
17589}
17590
17591// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale
17592// set IP Configuration's PublicIPAddress configuration
17593type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct {
17594	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
17595	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
17596	// DNSSettings - The dns settings to be applied on the publicIP addresses .
17597	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
17598}
17599
17600// VirtualMachineScaleSetUpdateStorageProfile describes a virtual machine scale set storage profile.
17601type VirtualMachineScaleSetUpdateStorageProfile struct {
17602	// ImageReference - The image reference.
17603	ImageReference *ImageReference `json:"imageReference,omitempty"`
17604	// OsDisk - The OS disk.
17605	OsDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"`
17606	// DataDisks - The data disks.
17607	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
17608}
17609
17610// VirtualMachineScaleSetUpdateVMProfile describes a virtual machine scale set virtual machine profile.
17611type VirtualMachineScaleSetUpdateVMProfile struct {
17612	// OsProfile - The virtual machine scale set OS profile.
17613	OsProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"`
17614	// StorageProfile - The virtual machine scale set storage profile.
17615	StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"`
17616	// NetworkProfile - The virtual machine scale set network profile.
17617	NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"`
17618	// SecurityProfile - The virtual machine scale set Security profile
17619	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
17620	// DiagnosticsProfile - The virtual machine scale set diagnostics profile.
17621	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
17622	// ExtensionProfile - The virtual machine scale set extension profile.
17623	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
17624	// LicenseType - The license type, which is for bring your own license scenario.
17625	LicenseType *string `json:"licenseType,omitempty"`
17626	// BillingProfile - Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01.
17627	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
17628	// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
17629	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
17630}
17631
17632// VirtualMachineScaleSetVM describes a virtual machine scale set virtual machine.
17633type VirtualMachineScaleSetVM struct {
17634	autorest.Response `json:"-"`
17635	// InstanceID - READ-ONLY; The virtual machine instance ID.
17636	InstanceID *string `json:"instanceId,omitempty"`
17637	// Sku - READ-ONLY; The virtual machine SKU.
17638	Sku                                 *Sku `json:"sku,omitempty"`
17639	*VirtualMachineScaleSetVMProperties `json:"properties,omitempty"`
17640	// 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**.
17641	Plan *Plan `json:"plan,omitempty"`
17642	// Resources - READ-ONLY; The virtual machine child extension resources.
17643	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
17644	// Zones - READ-ONLY; The virtual machine zones.
17645	Zones *[]string `json:"zones,omitempty"`
17646	// ID - READ-ONLY; Resource Id
17647	ID *string `json:"id,omitempty"`
17648	// Name - READ-ONLY; Resource name
17649	Name *string `json:"name,omitempty"`
17650	// Type - READ-ONLY; Resource type
17651	Type *string `json:"type,omitempty"`
17652	// Location - Resource location
17653	Location *string `json:"location,omitempty"`
17654	// Tags - Resource tags
17655	Tags map[string]*string `json:"tags"`
17656}
17657
17658// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVM.
17659func (vmssv VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) {
17660	objectMap := make(map[string]interface{})
17661	if vmssv.VirtualMachineScaleSetVMProperties != nil {
17662		objectMap["properties"] = vmssv.VirtualMachineScaleSetVMProperties
17663	}
17664	if vmssv.Plan != nil {
17665		objectMap["plan"] = vmssv.Plan
17666	}
17667	if vmssv.Location != nil {
17668		objectMap["location"] = vmssv.Location
17669	}
17670	if vmssv.Tags != nil {
17671		objectMap["tags"] = vmssv.Tags
17672	}
17673	return json.Marshal(objectMap)
17674}
17675
17676// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVM struct.
17677func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error {
17678	var m map[string]*json.RawMessage
17679	err := json.Unmarshal(body, &m)
17680	if err != nil {
17681		return err
17682	}
17683	for k, v := range m {
17684		switch k {
17685		case "instanceId":
17686			if v != nil {
17687				var instanceID string
17688				err = json.Unmarshal(*v, &instanceID)
17689				if err != nil {
17690					return err
17691				}
17692				vmssv.InstanceID = &instanceID
17693			}
17694		case "sku":
17695			if v != nil {
17696				var sku Sku
17697				err = json.Unmarshal(*v, &sku)
17698				if err != nil {
17699					return err
17700				}
17701				vmssv.Sku = &sku
17702			}
17703		case "properties":
17704			if v != nil {
17705				var virtualMachineScaleSetVMProperties VirtualMachineScaleSetVMProperties
17706				err = json.Unmarshal(*v, &virtualMachineScaleSetVMProperties)
17707				if err != nil {
17708					return err
17709				}
17710				vmssv.VirtualMachineScaleSetVMProperties = &virtualMachineScaleSetVMProperties
17711			}
17712		case "plan":
17713			if v != nil {
17714				var plan Plan
17715				err = json.Unmarshal(*v, &plan)
17716				if err != nil {
17717					return err
17718				}
17719				vmssv.Plan = &plan
17720			}
17721		case "resources":
17722			if v != nil {
17723				var resources []VirtualMachineExtension
17724				err = json.Unmarshal(*v, &resources)
17725				if err != nil {
17726					return err
17727				}
17728				vmssv.Resources = &resources
17729			}
17730		case "zones":
17731			if v != nil {
17732				var zones []string
17733				err = json.Unmarshal(*v, &zones)
17734				if err != nil {
17735					return err
17736				}
17737				vmssv.Zones = &zones
17738			}
17739		case "id":
17740			if v != nil {
17741				var ID string
17742				err = json.Unmarshal(*v, &ID)
17743				if err != nil {
17744					return err
17745				}
17746				vmssv.ID = &ID
17747			}
17748		case "name":
17749			if v != nil {
17750				var name string
17751				err = json.Unmarshal(*v, &name)
17752				if err != nil {
17753					return err
17754				}
17755				vmssv.Name = &name
17756			}
17757		case "type":
17758			if v != nil {
17759				var typeVar string
17760				err = json.Unmarshal(*v, &typeVar)
17761				if err != nil {
17762					return err
17763				}
17764				vmssv.Type = &typeVar
17765			}
17766		case "location":
17767			if v != nil {
17768				var location string
17769				err = json.Unmarshal(*v, &location)
17770				if err != nil {
17771					return err
17772				}
17773				vmssv.Location = &location
17774			}
17775		case "tags":
17776			if v != nil {
17777				var tags map[string]*string
17778				err = json.Unmarshal(*v, &tags)
17779				if err != nil {
17780					return err
17781				}
17782				vmssv.Tags = tags
17783			}
17784		}
17785	}
17786
17787	return nil
17788}
17789
17790// VirtualMachineScaleSetVMExtension describes a VMSS VM Extension.
17791type VirtualMachineScaleSetVMExtension struct {
17792	autorest.Response `json:"-"`
17793	// Name - READ-ONLY; The name of the extension.
17794	Name *string `json:"name,omitempty"`
17795	// Type - READ-ONLY; Resource type
17796	Type                               *string `json:"type,omitempty"`
17797	*VirtualMachineExtensionProperties `json:"properties,omitempty"`
17798	// ID - READ-ONLY; Resource Id
17799	ID *string `json:"id,omitempty"`
17800}
17801
17802// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtension.
17803func (vmssve VirtualMachineScaleSetVMExtension) MarshalJSON() ([]byte, error) {
17804	objectMap := make(map[string]interface{})
17805	if vmssve.VirtualMachineExtensionProperties != nil {
17806		objectMap["properties"] = vmssve.VirtualMachineExtensionProperties
17807	}
17808	return json.Marshal(objectMap)
17809}
17810
17811// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtension struct.
17812func (vmssve *VirtualMachineScaleSetVMExtension) UnmarshalJSON(body []byte) error {
17813	var m map[string]*json.RawMessage
17814	err := json.Unmarshal(body, &m)
17815	if err != nil {
17816		return err
17817	}
17818	for k, v := range m {
17819		switch k {
17820		case "name":
17821			if v != nil {
17822				var name string
17823				err = json.Unmarshal(*v, &name)
17824				if err != nil {
17825					return err
17826				}
17827				vmssve.Name = &name
17828			}
17829		case "type":
17830			if v != nil {
17831				var typeVar string
17832				err = json.Unmarshal(*v, &typeVar)
17833				if err != nil {
17834					return err
17835				}
17836				vmssve.Type = &typeVar
17837			}
17838		case "properties":
17839			if v != nil {
17840				var virtualMachineExtensionProperties VirtualMachineExtensionProperties
17841				err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
17842				if err != nil {
17843					return err
17844				}
17845				vmssve.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
17846			}
17847		case "id":
17848			if v != nil {
17849				var ID string
17850				err = json.Unmarshal(*v, &ID)
17851				if err != nil {
17852					return err
17853				}
17854				vmssve.ID = &ID
17855			}
17856		}
17857	}
17858
17859	return nil
17860}
17861
17862// VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
17863// results of a long-running operation.
17864type VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture struct {
17865	azure.FutureAPI
17866	// Result returns the result of the asynchronous operation.
17867	// If the operation has not completed it will return an error.
17868	Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error)
17869}
17870
17871// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17872func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17873	var azFuture azure.Future
17874	if err := json.Unmarshal(body, &azFuture); err != nil {
17875		return err
17876	}
17877	future.FutureAPI = &azFuture
17878	future.Result = future.result
17879	return nil
17880}
17881
17882// result is the default implementation for VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.Result.
17883func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) {
17884	var done bool
17885	done, err = future.DoneWithContext(context.Background(), client)
17886	if err != nil {
17887		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17888		return
17889	}
17890	if !done {
17891		vmssve.Response.Response = future.Response()
17892		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture")
17893		return
17894	}
17895	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17896	if vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent {
17897		vmssve, err = client.CreateOrUpdateResponder(vmssve.Response.Response)
17898		if err != nil {
17899			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request")
17900		}
17901	}
17902	return
17903}
17904
17905// VirtualMachineScaleSetVMExtensionsDeleteFuture an abstraction for monitoring and retrieving the results
17906// of a long-running operation.
17907type VirtualMachineScaleSetVMExtensionsDeleteFuture struct {
17908	azure.FutureAPI
17909	// Result returns the result of the asynchronous operation.
17910	// If the operation has not completed it will return an error.
17911	Result func(VirtualMachineScaleSetVMExtensionsClient) (autorest.Response, error)
17912}
17913
17914// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17915func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
17916	var azFuture azure.Future
17917	if err := json.Unmarshal(body, &azFuture); err != nil {
17918		return err
17919	}
17920	future.FutureAPI = &azFuture
17921	future.Result = future.result
17922	return nil
17923}
17924
17925// result is the default implementation for VirtualMachineScaleSetVMExtensionsDeleteFuture.Result.
17926func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (ar autorest.Response, err error) {
17927	var done bool
17928	done, err = future.DoneWithContext(context.Background(), client)
17929	if err != nil {
17930		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
17931		return
17932	}
17933	if !done {
17934		ar.Response = future.Response()
17935		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsDeleteFuture")
17936		return
17937	}
17938	ar.Response = future.Response()
17939	return
17940}
17941
17942// VirtualMachineScaleSetVMExtensionsListResult the List VMSS VM Extension operation response
17943type VirtualMachineScaleSetVMExtensionsListResult struct {
17944	autorest.Response `json:"-"`
17945	// Value - The list of VMSS VM extensions
17946	Value *[]VirtualMachineScaleSetVMExtension `json:"value,omitempty"`
17947}
17948
17949// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine
17950// scale set.
17951type VirtualMachineScaleSetVMExtensionsSummary struct {
17952	// Name - READ-ONLY; The extension name.
17953	Name *string `json:"name,omitempty"`
17954	// StatusesSummary - READ-ONLY; The extensions information.
17955	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
17956}
17957
17958// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionsSummary.
17959func (vmssves VirtualMachineScaleSetVMExtensionsSummary) MarshalJSON() ([]byte, error) {
17960	objectMap := make(map[string]interface{})
17961	return json.Marshal(objectMap)
17962}
17963
17964// VirtualMachineScaleSetVMExtensionsUpdateFuture an abstraction for monitoring and retrieving the results
17965// of a long-running operation.
17966type VirtualMachineScaleSetVMExtensionsUpdateFuture struct {
17967	azure.FutureAPI
17968	// Result returns the result of the asynchronous operation.
17969	// If the operation has not completed it will return an error.
17970	Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error)
17971}
17972
17973// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17974func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
17975	var azFuture azure.Future
17976	if err := json.Unmarshal(body, &azFuture); err != nil {
17977		return err
17978	}
17979	future.FutureAPI = &azFuture
17980	future.Result = future.result
17981	return nil
17982}
17983
17984// result is the default implementation for VirtualMachineScaleSetVMExtensionsUpdateFuture.Result.
17985func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) {
17986	var done bool
17987	done, err = future.DoneWithContext(context.Background(), client)
17988	if err != nil {
17989		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
17990		return
17991	}
17992	if !done {
17993		vmssve.Response.Response = future.Response()
17994		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsUpdateFuture")
17995		return
17996	}
17997	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17998	if vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent {
17999		vmssve, err = client.UpdateResponder(vmssve.Response.Response)
18000		if err != nil {
18001			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request")
18002		}
18003	}
18004	return
18005}
18006
18007// VirtualMachineScaleSetVMExtensionUpdate describes a VMSS VM Extension.
18008type VirtualMachineScaleSetVMExtensionUpdate struct {
18009	// Name - READ-ONLY; The name of the extension.
18010	Name *string `json:"name,omitempty"`
18011	// Type - READ-ONLY; Resource type
18012	Type                                     *string `json:"type,omitempty"`
18013	*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
18014	// ID - READ-ONLY; Resource Id
18015	ID *string `json:"id,omitempty"`
18016}
18017
18018// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionUpdate.
18019func (vmssveu VirtualMachineScaleSetVMExtensionUpdate) MarshalJSON() ([]byte, error) {
18020	objectMap := make(map[string]interface{})
18021	if vmssveu.VirtualMachineExtensionUpdateProperties != nil {
18022		objectMap["properties"] = vmssveu.VirtualMachineExtensionUpdateProperties
18023	}
18024	return json.Marshal(objectMap)
18025}
18026
18027// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtensionUpdate struct.
18028func (vmssveu *VirtualMachineScaleSetVMExtensionUpdate) UnmarshalJSON(body []byte) error {
18029	var m map[string]*json.RawMessage
18030	err := json.Unmarshal(body, &m)
18031	if err != nil {
18032		return err
18033	}
18034	for k, v := range m {
18035		switch k {
18036		case "name":
18037			if v != nil {
18038				var name string
18039				err = json.Unmarshal(*v, &name)
18040				if err != nil {
18041					return err
18042				}
18043				vmssveu.Name = &name
18044			}
18045		case "type":
18046			if v != nil {
18047				var typeVar string
18048				err = json.Unmarshal(*v, &typeVar)
18049				if err != nil {
18050					return err
18051				}
18052				vmssveu.Type = &typeVar
18053			}
18054		case "properties":
18055			if v != nil {
18056				var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
18057				err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
18058				if err != nil {
18059					return err
18060				}
18061				vmssveu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
18062			}
18063		case "id":
18064			if v != nil {
18065				var ID string
18066				err = json.Unmarshal(*v, &ID)
18067				if err != nil {
18068					return err
18069				}
18070				vmssveu.ID = &ID
18071			}
18072		}
18073	}
18074
18075	return nil
18076}
18077
18078// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale
18079// set.
18080type VirtualMachineScaleSetVMInstanceIDs struct {
18081	// 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.
18082	InstanceIds *[]string `json:"instanceIds,omitempty"`
18083}
18084
18085// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM
18086// scale set.
18087type VirtualMachineScaleSetVMInstanceRequiredIDs struct {
18088	// InstanceIds - The virtual machine scale set instance ids.
18089	InstanceIds *[]string `json:"instanceIds,omitempty"`
18090}
18091
18092// VirtualMachineScaleSetVMInstanceView the instance view of a virtual machine scale set VM.
18093type VirtualMachineScaleSetVMInstanceView struct {
18094	autorest.Response `json:"-"`
18095	// PlatformUpdateDomain - The Update Domain count.
18096	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
18097	// PlatformFaultDomain - The Fault Domain count.
18098	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
18099	// RdpThumbPrint - The Remote desktop certificate thumbprint.
18100	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
18101	// VMAgent - The VM Agent running on the virtual machine.
18102	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
18103	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
18104	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
18105	// Disks - The disks information.
18106	Disks *[]DiskInstanceView `json:"disks,omitempty"`
18107	// Extensions - The extensions information.
18108	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
18109	// VMHealth - READ-ONLY; The health status for the VM.
18110	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
18111	// 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.
18112	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
18113	// Statuses - The resource status information.
18114	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
18115	// 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.
18116	AssignedHost *string `json:"assignedHost,omitempty"`
18117	// PlacementGroupID - The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId.
18118	PlacementGroupID *string `json:"placementGroupId,omitempty"`
18119}
18120
18121// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMInstanceView.
18122func (vmssviv VirtualMachineScaleSetVMInstanceView) MarshalJSON() ([]byte, error) {
18123	objectMap := make(map[string]interface{})
18124	if vmssviv.PlatformUpdateDomain != nil {
18125		objectMap["platformUpdateDomain"] = vmssviv.PlatformUpdateDomain
18126	}
18127	if vmssviv.PlatformFaultDomain != nil {
18128		objectMap["platformFaultDomain"] = vmssviv.PlatformFaultDomain
18129	}
18130	if vmssviv.RdpThumbPrint != nil {
18131		objectMap["rdpThumbPrint"] = vmssviv.RdpThumbPrint
18132	}
18133	if vmssviv.VMAgent != nil {
18134		objectMap["vmAgent"] = vmssviv.VMAgent
18135	}
18136	if vmssviv.MaintenanceRedeployStatus != nil {
18137		objectMap["maintenanceRedeployStatus"] = vmssviv.MaintenanceRedeployStatus
18138	}
18139	if vmssviv.Disks != nil {
18140		objectMap["disks"] = vmssviv.Disks
18141	}
18142	if vmssviv.Extensions != nil {
18143		objectMap["extensions"] = vmssviv.Extensions
18144	}
18145	if vmssviv.BootDiagnostics != nil {
18146		objectMap["bootDiagnostics"] = vmssviv.BootDiagnostics
18147	}
18148	if vmssviv.Statuses != nil {
18149		objectMap["statuses"] = vmssviv.Statuses
18150	}
18151	if vmssviv.PlacementGroupID != nil {
18152		objectMap["placementGroupId"] = vmssviv.PlacementGroupID
18153	}
18154	return json.Marshal(objectMap)
18155}
18156
18157// VirtualMachineScaleSetVMListResult the List Virtual Machine Scale Set VMs operation response.
18158type VirtualMachineScaleSetVMListResult struct {
18159	autorest.Response `json:"-"`
18160	// Value - The list of virtual machine scale sets VMs.
18161	Value *[]VirtualMachineScaleSetVM `json:"value,omitempty"`
18162	// 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
18163	NextLink *string `json:"nextLink,omitempty"`
18164}
18165
18166// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of
18167// VirtualMachineScaleSetVM values.
18168type VirtualMachineScaleSetVMListResultIterator struct {
18169	i    int
18170	page VirtualMachineScaleSetVMListResultPage
18171}
18172
18173// NextWithContext advances to the next value.  If there was an error making
18174// the request the iterator does not advance and the error is returned.
18175func (iter *VirtualMachineScaleSetVMListResultIterator) NextWithContext(ctx context.Context) (err error) {
18176	if tracing.IsEnabled() {
18177		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultIterator.NextWithContext")
18178		defer func() {
18179			sc := -1
18180			if iter.Response().Response.Response != nil {
18181				sc = iter.Response().Response.Response.StatusCode
18182			}
18183			tracing.EndSpan(ctx, sc, err)
18184		}()
18185	}
18186	iter.i++
18187	if iter.i < len(iter.page.Values()) {
18188		return nil
18189	}
18190	err = iter.page.NextWithContext(ctx)
18191	if err != nil {
18192		iter.i--
18193		return err
18194	}
18195	iter.i = 0
18196	return nil
18197}
18198
18199// Next advances to the next value.  If there was an error making
18200// the request the iterator does not advance and the error is returned.
18201// Deprecated: Use NextWithContext() instead.
18202func (iter *VirtualMachineScaleSetVMListResultIterator) Next() error {
18203	return iter.NextWithContext(context.Background())
18204}
18205
18206// NotDone returns true if the enumeration should be started or is not yet complete.
18207func (iter VirtualMachineScaleSetVMListResultIterator) NotDone() bool {
18208	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18209}
18210
18211// Response returns the raw server response from the last page request.
18212func (iter VirtualMachineScaleSetVMListResultIterator) Response() VirtualMachineScaleSetVMListResult {
18213	return iter.page.Response()
18214}
18215
18216// Value returns the current value or a zero-initialized value if the
18217// iterator has advanced beyond the end of the collection.
18218func (iter VirtualMachineScaleSetVMListResultIterator) Value() VirtualMachineScaleSetVM {
18219	if !iter.page.NotDone() {
18220		return VirtualMachineScaleSetVM{}
18221	}
18222	return iter.page.Values()[iter.i]
18223}
18224
18225// Creates a new instance of the VirtualMachineScaleSetVMListResultIterator type.
18226func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator {
18227	return VirtualMachineScaleSetVMListResultIterator{page: page}
18228}
18229
18230// IsEmpty returns true if the ListResult contains no values.
18231func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool {
18232	return vmssvlr.Value == nil || len(*vmssvlr.Value) == 0
18233}
18234
18235// hasNextLink returns true if the NextLink is not empty.
18236func (vmssvlr VirtualMachineScaleSetVMListResult) hasNextLink() bool {
18237	return vmssvlr.NextLink != nil && len(*vmssvlr.NextLink) != 0
18238}
18239
18240// virtualMachineScaleSetVMListResultPreparer prepares a request to retrieve the next set of results.
18241// It returns nil if no more results exist.
18242func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer(ctx context.Context) (*http.Request, error) {
18243	if !vmssvlr.hasNextLink() {
18244		return nil, nil
18245	}
18246	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18247		autorest.AsJSON(),
18248		autorest.AsGet(),
18249		autorest.WithBaseURL(to.String(vmssvlr.NextLink)))
18250}
18251
18252// VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values.
18253type VirtualMachineScaleSetVMListResultPage struct {
18254	fn      func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)
18255	vmssvlr VirtualMachineScaleSetVMListResult
18256}
18257
18258// NextWithContext advances to the next page of values.  If there was an error making
18259// the request the page does not advance and the error is returned.
18260func (page *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context.Context) (err error) {
18261	if tracing.IsEnabled() {
18262		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultPage.NextWithContext")
18263		defer func() {
18264			sc := -1
18265			if page.Response().Response.Response != nil {
18266				sc = page.Response().Response.Response.StatusCode
18267			}
18268			tracing.EndSpan(ctx, sc, err)
18269		}()
18270	}
18271	for {
18272		next, err := page.fn(ctx, page.vmssvlr)
18273		if err != nil {
18274			return err
18275		}
18276		page.vmssvlr = next
18277		if !next.hasNextLink() || !next.IsEmpty() {
18278			break
18279		}
18280	}
18281	return nil
18282}
18283
18284// Next advances to the next page of values.  If there was an error making
18285// the request the page does not advance and the error is returned.
18286// Deprecated: Use NextWithContext() instead.
18287func (page *VirtualMachineScaleSetVMListResultPage) Next() error {
18288	return page.NextWithContext(context.Background())
18289}
18290
18291// NotDone returns true if the page enumeration should be started or is not yet complete.
18292func (page VirtualMachineScaleSetVMListResultPage) NotDone() bool {
18293	return !page.vmssvlr.IsEmpty()
18294}
18295
18296// Response returns the raw server response from the last page request.
18297func (page VirtualMachineScaleSetVMListResultPage) Response() VirtualMachineScaleSetVMListResult {
18298	return page.vmssvlr
18299}
18300
18301// Values returns the slice of values for the current page or nil if there are no values.
18302func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScaleSetVM {
18303	if page.vmssvlr.IsEmpty() {
18304		return nil
18305	}
18306	return *page.vmssvlr.Value
18307}
18308
18309// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type.
18310func NewVirtualMachineScaleSetVMListResultPage(cur VirtualMachineScaleSetVMListResult, getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
18311	return VirtualMachineScaleSetVMListResultPage{
18312		fn:      getNextPage,
18313		vmssvlr: cur,
18314	}
18315}
18316
18317// VirtualMachineScaleSetVMNetworkProfileConfiguration describes a virtual machine scale set VM network
18318// profile.
18319type VirtualMachineScaleSetVMNetworkProfileConfiguration struct {
18320	// NetworkInterfaceConfigurations - The list of network configurations.
18321	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
18322}
18323
18324// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile.
18325type VirtualMachineScaleSetVMProfile struct {
18326	// OsProfile - Specifies the operating system settings for the virtual machines in the scale set.
18327	OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"`
18328	// StorageProfile - Specifies the storage settings for the virtual machine disks.
18329	StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"`
18330	// NetworkProfile - Specifies properties of the network interfaces of the virtual machines in the scale set.
18331	NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"`
18332	// SecurityProfile - Specifies the Security related profile settings for the virtual machines in the scale set.
18333	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
18334	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
18335	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
18336	// ExtensionProfile - Specifies a collection of settings for extensions installed on virtual machines in the scale set.
18337	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
18338	// 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
18339	LicenseType *string `json:"licenseType,omitempty"`
18340	// 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'
18341	Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
18342	// 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'
18343	EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
18344	// BillingProfile - Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01.
18345	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
18346	// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
18347	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
18348}
18349
18350// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual
18351// machine.
18352type VirtualMachineScaleSetVMProperties struct {
18353	// LatestModelApplied - READ-ONLY; Specifies whether the latest model has been applied to the virtual machine.
18354	LatestModelApplied *bool `json:"latestModelApplied,omitempty"`
18355	// VMID - READ-ONLY; Azure VM unique ID.
18356	VMID *string `json:"vmId,omitempty"`
18357	// InstanceView - READ-ONLY; The virtual machine instance view.
18358	InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty"`
18359	// HardwareProfile - Specifies the hardware settings for the virtual machine.
18360	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
18361	// StorageProfile - Specifies the storage settings for the virtual machine disks.
18362	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
18363	// 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.
18364	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
18365	// OsProfile - Specifies the operating system settings for the virtual machine.
18366	OsProfile *OSProfile `json:"osProfile,omitempty"`
18367	// SecurityProfile - Specifies the Security related profile settings for the virtual machine.
18368	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
18369	// NetworkProfile - Specifies the network interfaces of the virtual machine.
18370	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
18371	// NetworkProfileConfiguration - Specifies the network profile configuration of the virtual machine.
18372	NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration `json:"networkProfileConfiguration,omitempty"`
18373	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
18374	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
18375	// 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.
18376	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
18377	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
18378	ProvisioningState *string `json:"provisioningState,omitempty"`
18379	// 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
18380	LicenseType *string `json:"licenseType,omitempty"`
18381	// 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.
18382	ModelDefinitionApplied *string `json:"modelDefinitionApplied,omitempty"`
18383	// ProtectionPolicy - Specifies the protection policy of the virtual machine.
18384	ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy `json:"protectionPolicy,omitempty"`
18385}
18386
18387// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMProperties.
18388func (vmssvp VirtualMachineScaleSetVMProperties) MarshalJSON() ([]byte, error) {
18389	objectMap := make(map[string]interface{})
18390	if vmssvp.HardwareProfile != nil {
18391		objectMap["hardwareProfile"] = vmssvp.HardwareProfile
18392	}
18393	if vmssvp.StorageProfile != nil {
18394		objectMap["storageProfile"] = vmssvp.StorageProfile
18395	}
18396	if vmssvp.AdditionalCapabilities != nil {
18397		objectMap["additionalCapabilities"] = vmssvp.AdditionalCapabilities
18398	}
18399	if vmssvp.OsProfile != nil {
18400		objectMap["osProfile"] = vmssvp.OsProfile
18401	}
18402	if vmssvp.SecurityProfile != nil {
18403		objectMap["securityProfile"] = vmssvp.SecurityProfile
18404	}
18405	if vmssvp.NetworkProfile != nil {
18406		objectMap["networkProfile"] = vmssvp.NetworkProfile
18407	}
18408	if vmssvp.NetworkProfileConfiguration != nil {
18409		objectMap["networkProfileConfiguration"] = vmssvp.NetworkProfileConfiguration
18410	}
18411	if vmssvp.DiagnosticsProfile != nil {
18412		objectMap["diagnosticsProfile"] = vmssvp.DiagnosticsProfile
18413	}
18414	if vmssvp.AvailabilitySet != nil {
18415		objectMap["availabilitySet"] = vmssvp.AvailabilitySet
18416	}
18417	if vmssvp.LicenseType != nil {
18418		objectMap["licenseType"] = vmssvp.LicenseType
18419	}
18420	if vmssvp.ProtectionPolicy != nil {
18421		objectMap["protectionPolicy"] = vmssvp.ProtectionPolicy
18422	}
18423	return json.Marshal(objectMap)
18424}
18425
18426// VirtualMachineScaleSetVMProtectionPolicy the protection policy of a virtual machine scale set VM.
18427type VirtualMachineScaleSetVMProtectionPolicy struct {
18428	// ProtectFromScaleIn - Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.
18429	ProtectFromScaleIn *bool `json:"protectFromScaleIn,omitempty"`
18430	// 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.
18431	ProtectFromScaleSetActions *bool `json:"protectFromScaleSetActions,omitempty"`
18432}
18433
18434// VirtualMachineScaleSetVMReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
18435type VirtualMachineScaleSetVMReimageParameters struct {
18436	// 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.
18437	TempDisk *bool `json:"tempDisk,omitempty"`
18438}
18439
18440// VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
18441// results of a long-running operation.
18442type VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture struct {
18443	azure.FutureAPI
18444	// Result returns the result of the asynchronous operation.
18445	// If the operation has not completed it will return an error.
18446	Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error)
18447}
18448
18449// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18450func (future *VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18451	var azFuture azure.Future
18452	if err := json.Unmarshal(body, &azFuture); err != nil {
18453		return err
18454	}
18455	future.FutureAPI = &azFuture
18456	future.Result = future.result
18457	return nil
18458}
18459
18460// result is the default implementation for VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture.Result.
18461func (future *VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
18462	var done bool
18463	done, err = future.DoneWithContext(context.Background(), client)
18464	if err != nil {
18465		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18466		return
18467	}
18468	if !done {
18469		vmrc.Response.Response = future.Response()
18470		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture")
18471		return
18472	}
18473	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18474	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
18475		vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response)
18476		if err != nil {
18477			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
18478		}
18479	}
18480	return
18481}
18482
18483// VirtualMachineScaleSetVMRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results
18484// of a long-running operation.
18485type VirtualMachineScaleSetVMRunCommandsDeleteFuture struct {
18486	azure.FutureAPI
18487	// Result returns the result of the asynchronous operation.
18488	// If the operation has not completed it will return an error.
18489	Result func(VirtualMachineScaleSetVMRunCommandsClient) (autorest.Response, error)
18490}
18491
18492// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18493func (future *VirtualMachineScaleSetVMRunCommandsDeleteFuture) UnmarshalJSON(body []byte) error {
18494	var azFuture azure.Future
18495	if err := json.Unmarshal(body, &azFuture); err != nil {
18496		return err
18497	}
18498	future.FutureAPI = &azFuture
18499	future.Result = future.result
18500	return nil
18501}
18502
18503// result is the default implementation for VirtualMachineScaleSetVMRunCommandsDeleteFuture.Result.
18504func (future *VirtualMachineScaleSetVMRunCommandsDeleteFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (ar autorest.Response, err error) {
18505	var done bool
18506	done, err = future.DoneWithContext(context.Background(), client)
18507	if err != nil {
18508		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure")
18509		return
18510	}
18511	if !done {
18512		ar.Response = future.Response()
18513		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture")
18514		return
18515	}
18516	ar.Response = future.Response()
18517	return
18518}
18519
18520// VirtualMachineScaleSetVMRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results
18521// of a long-running operation.
18522type VirtualMachineScaleSetVMRunCommandsUpdateFuture struct {
18523	azure.FutureAPI
18524	// Result returns the result of the asynchronous operation.
18525	// If the operation has not completed it will return an error.
18526	Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error)
18527}
18528
18529// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18530func (future *VirtualMachineScaleSetVMRunCommandsUpdateFuture) UnmarshalJSON(body []byte) error {
18531	var azFuture azure.Future
18532	if err := json.Unmarshal(body, &azFuture); err != nil {
18533		return err
18534	}
18535	future.FutureAPI = &azFuture
18536	future.Result = future.result
18537	return nil
18538}
18539
18540// result is the default implementation for VirtualMachineScaleSetVMRunCommandsUpdateFuture.Result.
18541func (future *VirtualMachineScaleSetVMRunCommandsUpdateFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
18542	var done bool
18543	done, err = future.DoneWithContext(context.Background(), client)
18544	if err != nil {
18545		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure")
18546		return
18547	}
18548	if !done {
18549		vmrc.Response.Response = future.Response()
18550		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture")
18551		return
18552	}
18553	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18554	if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
18555		vmrc, err = client.UpdateResponder(vmrc.Response.Response)
18556		if err != nil {
18557			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
18558		}
18559	}
18560	return
18561}
18562
18563// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a
18564// long-running operation.
18565type VirtualMachineScaleSetVMsDeallocateFuture struct {
18566	azure.FutureAPI
18567	// Result returns the result of the asynchronous operation.
18568	// If the operation has not completed it will return an error.
18569	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
18570}
18571
18572// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18573func (future *VirtualMachineScaleSetVMsDeallocateFuture) UnmarshalJSON(body []byte) error {
18574	var azFuture azure.Future
18575	if err := json.Unmarshal(body, &azFuture); err != nil {
18576		return err
18577	}
18578	future.FutureAPI = &azFuture
18579	future.Result = future.result
18580	return nil
18581}
18582
18583// result is the default implementation for VirtualMachineScaleSetVMsDeallocateFuture.Result.
18584func (future *VirtualMachineScaleSetVMsDeallocateFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
18585	var done bool
18586	done, err = future.DoneWithContext(context.Background(), client)
18587	if err != nil {
18588		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Polling failure")
18589		return
18590	}
18591	if !done {
18592		ar.Response = future.Response()
18593		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
18594		return
18595	}
18596	ar.Response = future.Response()
18597	return
18598}
18599
18600// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
18601// long-running operation.
18602type VirtualMachineScaleSetVMsDeleteFuture struct {
18603	azure.FutureAPI
18604	// Result returns the result of the asynchronous operation.
18605	// If the operation has not completed it will return an error.
18606	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
18607}
18608
18609// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18610func (future *VirtualMachineScaleSetVMsDeleteFuture) UnmarshalJSON(body []byte) error {
18611	var azFuture azure.Future
18612	if err := json.Unmarshal(body, &azFuture); err != nil {
18613		return err
18614	}
18615	future.FutureAPI = &azFuture
18616	future.Result = future.result
18617	return nil
18618}
18619
18620// result is the default implementation for VirtualMachineScaleSetVMsDeleteFuture.Result.
18621func (future *VirtualMachineScaleSetVMsDeleteFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
18622	var done bool
18623	done, err = future.DoneWithContext(context.Background(), client)
18624	if err != nil {
18625		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Polling failure")
18626		return
18627	}
18628	if !done {
18629		ar.Response = future.Response()
18630		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
18631		return
18632	}
18633	ar.Response = future.Response()
18634	return
18635}
18636
18637// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the
18638// results of a long-running operation.
18639type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
18640	azure.FutureAPI
18641	// Result returns the result of the asynchronous operation.
18642	// If the operation has not completed it will return an error.
18643	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
18644}
18645
18646// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18647func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
18648	var azFuture azure.Future
18649	if err := json.Unmarshal(body, &azFuture); err != nil {
18650		return err
18651	}
18652	future.FutureAPI = &azFuture
18653	future.Result = future.result
18654	return nil
18655}
18656
18657// result is the default implementation for VirtualMachineScaleSetVMsPerformMaintenanceFuture.Result.
18658func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
18659	var done bool
18660	done, err = future.DoneWithContext(context.Background(), client)
18661	if err != nil {
18662		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
18663		return
18664	}
18665	if !done {
18666		ar.Response = future.Response()
18667		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
18668		return
18669	}
18670	ar.Response = future.Response()
18671	return
18672}
18673
18674// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a
18675// long-running operation.
18676type VirtualMachineScaleSetVMsPowerOffFuture struct {
18677	azure.FutureAPI
18678	// Result returns the result of the asynchronous operation.
18679	// If the operation has not completed it will return an error.
18680	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
18681}
18682
18683// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18684func (future *VirtualMachineScaleSetVMsPowerOffFuture) UnmarshalJSON(body []byte) error {
18685	var azFuture azure.Future
18686	if err := json.Unmarshal(body, &azFuture); err != nil {
18687		return err
18688	}
18689	future.FutureAPI = &azFuture
18690	future.Result = future.result
18691	return nil
18692}
18693
18694// result is the default implementation for VirtualMachineScaleSetVMsPowerOffFuture.Result.
18695func (future *VirtualMachineScaleSetVMsPowerOffFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
18696	var done bool
18697	done, err = future.DoneWithContext(context.Background(), client)
18698	if err != nil {
18699		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Polling failure")
18700		return
18701	}
18702	if !done {
18703		ar.Response = future.Response()
18704		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
18705		return
18706	}
18707	ar.Response = future.Response()
18708	return
18709}
18710
18711// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a
18712// long-running operation.
18713type VirtualMachineScaleSetVMsRedeployFuture struct {
18714	azure.FutureAPI
18715	// Result returns the result of the asynchronous operation.
18716	// If the operation has not completed it will return an error.
18717	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
18718}
18719
18720// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18721func (future *VirtualMachineScaleSetVMsRedeployFuture) UnmarshalJSON(body []byte) error {
18722	var azFuture azure.Future
18723	if err := json.Unmarshal(body, &azFuture); err != nil {
18724		return err
18725	}
18726	future.FutureAPI = &azFuture
18727	future.Result = future.result
18728	return nil
18729}
18730
18731// result is the default implementation for VirtualMachineScaleSetVMsRedeployFuture.Result.
18732func (future *VirtualMachineScaleSetVMsRedeployFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
18733	var done bool
18734	done, err = future.DoneWithContext(context.Background(), client)
18735	if err != nil {
18736		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Polling failure")
18737		return
18738	}
18739	if !done {
18740		ar.Response = future.Response()
18741		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
18742		return
18743	}
18744	ar.Response = future.Response()
18745	return
18746}
18747
18748// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a
18749// long-running operation.
18750type VirtualMachineScaleSetVMsReimageAllFuture struct {
18751	azure.FutureAPI
18752	// Result returns the result of the asynchronous operation.
18753	// If the operation has not completed it will return an error.
18754	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
18755}
18756
18757// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18758func (future *VirtualMachineScaleSetVMsReimageAllFuture) UnmarshalJSON(body []byte) error {
18759	var azFuture azure.Future
18760	if err := json.Unmarshal(body, &azFuture); err != nil {
18761		return err
18762	}
18763	future.FutureAPI = &azFuture
18764	future.Result = future.result
18765	return nil
18766}
18767
18768// result is the default implementation for VirtualMachineScaleSetVMsReimageAllFuture.Result.
18769func (future *VirtualMachineScaleSetVMsReimageAllFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
18770	var done bool
18771	done, err = future.DoneWithContext(context.Background(), client)
18772	if err != nil {
18773		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Polling failure")
18774		return
18775	}
18776	if !done {
18777		ar.Response = future.Response()
18778		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
18779		return
18780	}
18781	ar.Response = future.Response()
18782	return
18783}
18784
18785// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a
18786// long-running operation.
18787type VirtualMachineScaleSetVMsReimageFuture struct {
18788	azure.FutureAPI
18789	// Result returns the result of the asynchronous operation.
18790	// If the operation has not completed it will return an error.
18791	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
18792}
18793
18794// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18795func (future *VirtualMachineScaleSetVMsReimageFuture) UnmarshalJSON(body []byte) error {
18796	var azFuture azure.Future
18797	if err := json.Unmarshal(body, &azFuture); err != nil {
18798		return err
18799	}
18800	future.FutureAPI = &azFuture
18801	future.Result = future.result
18802	return nil
18803}
18804
18805// result is the default implementation for VirtualMachineScaleSetVMsReimageFuture.Result.
18806func (future *VirtualMachineScaleSetVMsReimageFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
18807	var done bool
18808	done, err = future.DoneWithContext(context.Background(), client)
18809	if err != nil {
18810		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Polling failure")
18811		return
18812	}
18813	if !done {
18814		ar.Response = future.Response()
18815		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
18816		return
18817	}
18818	ar.Response = future.Response()
18819	return
18820}
18821
18822// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a
18823// long-running operation.
18824type VirtualMachineScaleSetVMsRestartFuture struct {
18825	azure.FutureAPI
18826	// Result returns the result of the asynchronous operation.
18827	// If the operation has not completed it will return an error.
18828	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
18829}
18830
18831// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18832func (future *VirtualMachineScaleSetVMsRestartFuture) UnmarshalJSON(body []byte) error {
18833	var azFuture azure.Future
18834	if err := json.Unmarshal(body, &azFuture); err != nil {
18835		return err
18836	}
18837	future.FutureAPI = &azFuture
18838	future.Result = future.result
18839	return nil
18840}
18841
18842// result is the default implementation for VirtualMachineScaleSetVMsRestartFuture.Result.
18843func (future *VirtualMachineScaleSetVMsRestartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
18844	var done bool
18845	done, err = future.DoneWithContext(context.Background(), client)
18846	if err != nil {
18847		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Polling failure")
18848		return
18849	}
18850	if !done {
18851		ar.Response = future.Response()
18852		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
18853		return
18854	}
18855	ar.Response = future.Response()
18856	return
18857}
18858
18859// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a
18860// long-running operation.
18861type VirtualMachineScaleSetVMsRunCommandFuture struct {
18862	azure.FutureAPI
18863	// Result returns the result of the asynchronous operation.
18864	// If the operation has not completed it will return an error.
18865	Result func(VirtualMachineScaleSetVMsClient) (RunCommandResult, error)
18866}
18867
18868// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18869func (future *VirtualMachineScaleSetVMsRunCommandFuture) UnmarshalJSON(body []byte) error {
18870	var azFuture azure.Future
18871	if err := json.Unmarshal(body, &azFuture); err != nil {
18872		return err
18873	}
18874	future.FutureAPI = &azFuture
18875	future.Result = future.result
18876	return nil
18877}
18878
18879// result is the default implementation for VirtualMachineScaleSetVMsRunCommandFuture.Result.
18880func (future *VirtualMachineScaleSetVMsRunCommandFuture) result(client VirtualMachineScaleSetVMsClient) (rcr RunCommandResult, err error) {
18881	var done bool
18882	done, err = future.DoneWithContext(context.Background(), client)
18883	if err != nil {
18884		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", future.Response(), "Polling failure")
18885		return
18886	}
18887	if !done {
18888		rcr.Response.Response = future.Response()
18889		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture")
18890		return
18891	}
18892	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18893	if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
18894		rcr, err = client.RunCommandResponder(rcr.Response.Response)
18895		if err != nil {
18896			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
18897		}
18898	}
18899	return
18900}
18901
18902// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a
18903// long-running operation.
18904type VirtualMachineScaleSetVMsStartFuture struct {
18905	azure.FutureAPI
18906	// Result returns the result of the asynchronous operation.
18907	// If the operation has not completed it will return an error.
18908	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
18909}
18910
18911// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18912func (future *VirtualMachineScaleSetVMsStartFuture) UnmarshalJSON(body []byte) error {
18913	var azFuture azure.Future
18914	if err := json.Unmarshal(body, &azFuture); err != nil {
18915		return err
18916	}
18917	future.FutureAPI = &azFuture
18918	future.Result = future.result
18919	return nil
18920}
18921
18922// result is the default implementation for VirtualMachineScaleSetVMsStartFuture.Result.
18923func (future *VirtualMachineScaleSetVMsStartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
18924	var done bool
18925	done, err = future.DoneWithContext(context.Background(), client)
18926	if err != nil {
18927		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Polling failure")
18928		return
18929	}
18930	if !done {
18931		ar.Response = future.Response()
18932		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
18933		return
18934	}
18935	ar.Response = future.Response()
18936	return
18937}
18938
18939// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a
18940// long-running operation.
18941type VirtualMachineScaleSetVMsUpdateFuture struct {
18942	azure.FutureAPI
18943	// Result returns the result of the asynchronous operation.
18944	// If the operation has not completed it will return an error.
18945	Result func(VirtualMachineScaleSetVMsClient) (VirtualMachineScaleSetVM, error)
18946}
18947
18948// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18949func (future *VirtualMachineScaleSetVMsUpdateFuture) UnmarshalJSON(body []byte) error {
18950	var azFuture azure.Future
18951	if err := json.Unmarshal(body, &azFuture); err != nil {
18952		return err
18953	}
18954	future.FutureAPI = &azFuture
18955	future.Result = future.result
18956	return nil
18957}
18958
18959// result is the default implementation for VirtualMachineScaleSetVMsUpdateFuture.Result.
18960func (future *VirtualMachineScaleSetVMsUpdateFuture) result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) {
18961	var done bool
18962	done, err = future.DoneWithContext(context.Background(), client)
18963	if err != nil {
18964		err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Polling failure")
18965		return
18966	}
18967	if !done {
18968		vmssv.Response.Response = future.Response()
18969		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
18970		return
18971	}
18972	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18973	if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent {
18974		vmssv, err = client.UpdateResponder(vmssv.Response.Response)
18975		if err != nil {
18976			err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request")
18977		}
18978	}
18979	return
18980}
18981
18982// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running
18983// operation.
18984type VirtualMachinesCaptureFuture struct {
18985	azure.FutureAPI
18986	// Result returns the result of the asynchronous operation.
18987	// If the operation has not completed it will return an error.
18988	Result func(VirtualMachinesClient) (VirtualMachineCaptureResult, error)
18989}
18990
18991// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18992func (future *VirtualMachinesCaptureFuture) UnmarshalJSON(body []byte) error {
18993	var azFuture azure.Future
18994	if err := json.Unmarshal(body, &azFuture); err != nil {
18995		return err
18996	}
18997	future.FutureAPI = &azFuture
18998	future.Result = future.result
18999	return nil
19000}
19001
19002// result is the default implementation for VirtualMachinesCaptureFuture.Result.
19003func (future *VirtualMachinesCaptureFuture) result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
19004	var done bool
19005	done, err = future.DoneWithContext(context.Background(), client)
19006	if err != nil {
19007		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Polling failure")
19008		return
19009	}
19010	if !done {
19011		vmcr.Response.Response = future.Response()
19012		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
19013		return
19014	}
19015	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19016	if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
19017		vmcr, err = client.CaptureResponder(vmcr.Response.Response)
19018		if err != nil {
19019			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
19020		}
19021	}
19022	return
19023}
19024
19025// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a
19026// long-running operation.
19027type VirtualMachinesConvertToManagedDisksFuture struct {
19028	azure.FutureAPI
19029	// Result returns the result of the asynchronous operation.
19030	// If the operation has not completed it will return an error.
19031	Result func(VirtualMachinesClient) (autorest.Response, error)
19032}
19033
19034// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19035func (future *VirtualMachinesConvertToManagedDisksFuture) UnmarshalJSON(body []byte) error {
19036	var azFuture azure.Future
19037	if err := json.Unmarshal(body, &azFuture); err != nil {
19038		return err
19039	}
19040	future.FutureAPI = &azFuture
19041	future.Result = future.result
19042	return nil
19043}
19044
19045// result is the default implementation for VirtualMachinesConvertToManagedDisksFuture.Result.
19046func (future *VirtualMachinesConvertToManagedDisksFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
19047	var done bool
19048	done, err = future.DoneWithContext(context.Background(), client)
19049	if err != nil {
19050		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Polling failure")
19051		return
19052	}
19053	if !done {
19054		ar.Response = future.Response()
19055		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
19056		return
19057	}
19058	ar.Response = future.Response()
19059	return
19060}
19061
19062// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19063// long-running operation.
19064type VirtualMachinesCreateOrUpdateFuture struct {
19065	azure.FutureAPI
19066	// Result returns the result of the asynchronous operation.
19067	// If the operation has not completed it will return an error.
19068	Result func(VirtualMachinesClient) (VirtualMachine, error)
19069}
19070
19071// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19072func (future *VirtualMachinesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19073	var azFuture azure.Future
19074	if err := json.Unmarshal(body, &azFuture); err != nil {
19075		return err
19076	}
19077	future.FutureAPI = &azFuture
19078	future.Result = future.result
19079	return nil
19080}
19081
19082// result is the default implementation for VirtualMachinesCreateOrUpdateFuture.Result.
19083func (future *VirtualMachinesCreateOrUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
19084	var done bool
19085	done, err = future.DoneWithContext(context.Background(), client)
19086	if err != nil {
19087		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19088		return
19089	}
19090	if !done {
19091		VM.Response.Response = future.Response()
19092		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
19093		return
19094	}
19095	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19096	if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
19097		VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
19098		if err != nil {
19099			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
19100		}
19101	}
19102	return
19103}
19104
19105// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a
19106// long-running operation.
19107type VirtualMachinesDeallocateFuture struct {
19108	azure.FutureAPI
19109	// Result returns the result of the asynchronous operation.
19110	// If the operation has not completed it will return an error.
19111	Result func(VirtualMachinesClient) (autorest.Response, error)
19112}
19113
19114// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19115func (future *VirtualMachinesDeallocateFuture) UnmarshalJSON(body []byte) error {
19116	var azFuture azure.Future
19117	if err := json.Unmarshal(body, &azFuture); err != nil {
19118		return err
19119	}
19120	future.FutureAPI = &azFuture
19121	future.Result = future.result
19122	return nil
19123}
19124
19125// result is the default implementation for VirtualMachinesDeallocateFuture.Result.
19126func (future *VirtualMachinesDeallocateFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
19127	var done bool
19128	done, err = future.DoneWithContext(context.Background(), client)
19129	if err != nil {
19130		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Polling failure")
19131		return
19132	}
19133	if !done {
19134		ar.Response = future.Response()
19135		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
19136		return
19137	}
19138	ar.Response = future.Response()
19139	return
19140}
19141
19142// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19143// operation.
19144type VirtualMachinesDeleteFuture struct {
19145	azure.FutureAPI
19146	// Result returns the result of the asynchronous operation.
19147	// If the operation has not completed it will return an error.
19148	Result func(VirtualMachinesClient) (autorest.Response, error)
19149}
19150
19151// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19152func (future *VirtualMachinesDeleteFuture) UnmarshalJSON(body []byte) error {
19153	var azFuture azure.Future
19154	if err := json.Unmarshal(body, &azFuture); err != nil {
19155		return err
19156	}
19157	future.FutureAPI = &azFuture
19158	future.Result = future.result
19159	return nil
19160}
19161
19162// result is the default implementation for VirtualMachinesDeleteFuture.Result.
19163func (future *VirtualMachinesDeleteFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
19164	var done bool
19165	done, err = future.DoneWithContext(context.Background(), client)
19166	if err != nil {
19167		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure")
19168		return
19169	}
19170	if !done {
19171		ar.Response = future.Response()
19172		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
19173		return
19174	}
19175	ar.Response = future.Response()
19176	return
19177}
19178
19179// VirtualMachineSize describes the properties of a VM size.
19180type VirtualMachineSize struct {
19181	// Name - The name of the virtual machine size.
19182	Name *string `json:"name,omitempty"`
19183	// NumberOfCores - The number of cores supported by the virtual machine size.
19184	NumberOfCores *int32 `json:"numberOfCores,omitempty"`
19185	// OsDiskSizeInMB - The OS disk size, in MB, allowed by the virtual machine size.
19186	OsDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"`
19187	// ResourceDiskSizeInMB - The resource disk size, in MB, allowed by the virtual machine size.
19188	ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"`
19189	// MemoryInMB - The amount of memory, in MB, supported by the virtual machine size.
19190	MemoryInMB *int32 `json:"memoryInMB,omitempty"`
19191	// MaxDataDiskCount - The maximum number of data disks that can be attached to the virtual machine size.
19192	MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"`
19193}
19194
19195// VirtualMachineSizeListResult the List Virtual Machine operation response.
19196type VirtualMachineSizeListResult struct {
19197	autorest.Response `json:"-"`
19198	// Value - The list of virtual machine sizes.
19199	Value *[]VirtualMachineSize `json:"value,omitempty"`
19200}
19201
19202// VirtualMachineSoftwarePatchProperties describes the properties of a Virtual Machine software patch.
19203type VirtualMachineSoftwarePatchProperties struct {
19204	// PatchID - READ-ONLY; A unique identifier for the patch.
19205	PatchID *string `json:"patchId,omitempty"`
19206	// Name - READ-ONLY; The friendly name of the patch.
19207	Name *string `json:"name,omitempty"`
19208	// Version - READ-ONLY; The version number of the patch. This property applies only to Linux patches.
19209	Version *string `json:"version,omitempty"`
19210	// Kbid - READ-ONLY; The KBID of the patch. Only applies to Windows patches.
19211	Kbid *string `json:"kbid,omitempty"`
19212	// Classifications - READ-ONLY; The classification(s) of the patch as provided by the patch publisher.
19213	Classifications *[]string `json:"classifications,omitempty"`
19214	// RebootBehavior - READ-ONLY; Describes the reboot requirements of the patch. Possible values include: 'NeverReboots', 'AlwaysRequiresReboot', 'CanRequestReboot'
19215	RebootBehavior SoftwareUpdateRebootBehavior `json:"rebootBehavior,omitempty"`
19216	// ActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
19217	ActivityID *string `json:"activityId,omitempty"`
19218	// PublishedDate - READ-ONLY; The UTC timestamp when the repository published this patch.
19219	PublishedDate *date.Time `json:"publishedDate,omitempty"`
19220	// LastModifiedDateTime - READ-ONLY; The UTC timestamp of the last update to this patch record.
19221	LastModifiedDateTime *date.Time `json:"lastModifiedDateTime,omitempty"`
19222	// AssessmentState - READ-ONLY; Describes the outcome of an install operation for a given patch. Possible values include: 'PatchAssessmentStateInstalled', 'PatchAssessmentStateFailed', 'PatchAssessmentStateExcluded', 'PatchAssessmentStateNotSelected', 'PatchAssessmentStatePending', 'PatchAssessmentStateAvailable'
19223	AssessmentState PatchAssessmentState `json:"assessmentState,omitempty"`
19224}
19225
19226// MarshalJSON is the custom marshaler for VirtualMachineSoftwarePatchProperties.
19227func (vmspp VirtualMachineSoftwarePatchProperties) MarshalJSON() ([]byte, error) {
19228	objectMap := make(map[string]interface{})
19229	return json.Marshal(objectMap)
19230}
19231
19232// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a
19233// long-running operation.
19234type VirtualMachinesPerformMaintenanceFuture struct {
19235	azure.FutureAPI
19236	// Result returns the result of the asynchronous operation.
19237	// If the operation has not completed it will return an error.
19238	Result func(VirtualMachinesClient) (autorest.Response, error)
19239}
19240
19241// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19242func (future *VirtualMachinesPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
19243	var azFuture azure.Future
19244	if err := json.Unmarshal(body, &azFuture); err != nil {
19245		return err
19246	}
19247	future.FutureAPI = &azFuture
19248	future.Result = future.result
19249	return nil
19250}
19251
19252// result is the default implementation for VirtualMachinesPerformMaintenanceFuture.Result.
19253func (future *VirtualMachinesPerformMaintenanceFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
19254	var done bool
19255	done, err = future.DoneWithContext(context.Background(), client)
19256	if err != nil {
19257		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
19258		return
19259	}
19260	if !done {
19261		ar.Response = future.Response()
19262		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
19263		return
19264	}
19265	ar.Response = future.Response()
19266	return
19267}
19268
19269// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
19270// operation.
19271type VirtualMachinesPowerOffFuture struct {
19272	azure.FutureAPI
19273	// Result returns the result of the asynchronous operation.
19274	// If the operation has not completed it will return an error.
19275	Result func(VirtualMachinesClient) (autorest.Response, error)
19276}
19277
19278// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19279func (future *VirtualMachinesPowerOffFuture) UnmarshalJSON(body []byte) error {
19280	var azFuture azure.Future
19281	if err := json.Unmarshal(body, &azFuture); err != nil {
19282		return err
19283	}
19284	future.FutureAPI = &azFuture
19285	future.Result = future.result
19286	return nil
19287}
19288
19289// result is the default implementation for VirtualMachinesPowerOffFuture.Result.
19290func (future *VirtualMachinesPowerOffFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
19291	var done bool
19292	done, err = future.DoneWithContext(context.Background(), client)
19293	if err != nil {
19294		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Polling failure")
19295		return
19296	}
19297	if !done {
19298		ar.Response = future.Response()
19299		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
19300		return
19301	}
19302	ar.Response = future.Response()
19303	return
19304}
19305
19306// VirtualMachinesReapplyFuture an abstraction for monitoring and retrieving the results of a long-running
19307// operation.
19308type VirtualMachinesReapplyFuture struct {
19309	azure.FutureAPI
19310	// Result returns the result of the asynchronous operation.
19311	// If the operation has not completed it will return an error.
19312	Result func(VirtualMachinesClient) (autorest.Response, error)
19313}
19314
19315// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19316func (future *VirtualMachinesReapplyFuture) UnmarshalJSON(body []byte) error {
19317	var azFuture azure.Future
19318	if err := json.Unmarshal(body, &azFuture); err != nil {
19319		return err
19320	}
19321	future.FutureAPI = &azFuture
19322	future.Result = future.result
19323	return nil
19324}
19325
19326// result is the default implementation for VirtualMachinesReapplyFuture.Result.
19327func (future *VirtualMachinesReapplyFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
19328	var done bool
19329	done, err = future.DoneWithContext(context.Background(), client)
19330	if err != nil {
19331		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReapplyFuture", "Result", future.Response(), "Polling failure")
19332		return
19333	}
19334	if !done {
19335		ar.Response = future.Response()
19336		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReapplyFuture")
19337		return
19338	}
19339	ar.Response = future.Response()
19340	return
19341}
19342
19343// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running
19344// operation.
19345type VirtualMachinesRedeployFuture struct {
19346	azure.FutureAPI
19347	// Result returns the result of the asynchronous operation.
19348	// If the operation has not completed it will return an error.
19349	Result func(VirtualMachinesClient) (autorest.Response, error)
19350}
19351
19352// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19353func (future *VirtualMachinesRedeployFuture) UnmarshalJSON(body []byte) error {
19354	var azFuture azure.Future
19355	if err := json.Unmarshal(body, &azFuture); err != nil {
19356		return err
19357	}
19358	future.FutureAPI = &azFuture
19359	future.Result = future.result
19360	return nil
19361}
19362
19363// result is the default implementation for VirtualMachinesRedeployFuture.Result.
19364func (future *VirtualMachinesRedeployFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
19365	var done bool
19366	done, err = future.DoneWithContext(context.Background(), client)
19367	if err != nil {
19368		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Polling failure")
19369		return
19370	}
19371	if !done {
19372		ar.Response = future.Response()
19373		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
19374		return
19375	}
19376	ar.Response = future.Response()
19377	return
19378}
19379
19380// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
19381// operation.
19382type VirtualMachinesReimageFuture struct {
19383	azure.FutureAPI
19384	// Result returns the result of the asynchronous operation.
19385	// If the operation has not completed it will return an error.
19386	Result func(VirtualMachinesClient) (autorest.Response, error)
19387}
19388
19389// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19390func (future *VirtualMachinesReimageFuture) UnmarshalJSON(body []byte) error {
19391	var azFuture azure.Future
19392	if err := json.Unmarshal(body, &azFuture); err != nil {
19393		return err
19394	}
19395	future.FutureAPI = &azFuture
19396	future.Result = future.result
19397	return nil
19398}
19399
19400// result is the default implementation for VirtualMachinesReimageFuture.Result.
19401func (future *VirtualMachinesReimageFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
19402	var done bool
19403	done, err = future.DoneWithContext(context.Background(), client)
19404	if err != nil {
19405		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReimageFuture", "Result", future.Response(), "Polling failure")
19406		return
19407	}
19408	if !done {
19409		ar.Response = future.Response()
19410		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
19411		return
19412	}
19413	ar.Response = future.Response()
19414	return
19415}
19416
19417// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
19418// operation.
19419type VirtualMachinesRestartFuture struct {
19420	azure.FutureAPI
19421	// Result returns the result of the asynchronous operation.
19422	// If the operation has not completed it will return an error.
19423	Result func(VirtualMachinesClient) (autorest.Response, error)
19424}
19425
19426// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19427func (future *VirtualMachinesRestartFuture) UnmarshalJSON(body []byte) error {
19428	var azFuture azure.Future
19429	if err := json.Unmarshal(body, &azFuture); err != nil {
19430		return err
19431	}
19432	future.FutureAPI = &azFuture
19433	future.Result = future.result
19434	return nil
19435}
19436
19437// result is the default implementation for VirtualMachinesRestartFuture.Result.
19438func (future *VirtualMachinesRestartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
19439	var done bool
19440	done, err = future.DoneWithContext(context.Background(), client)
19441	if err != nil {
19442		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Polling failure")
19443		return
19444	}
19445	if !done {
19446		ar.Response = future.Response()
19447		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
19448		return
19449	}
19450	ar.Response = future.Response()
19451	return
19452}
19453
19454// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a
19455// long-running operation.
19456type VirtualMachinesRunCommandFuture struct {
19457	azure.FutureAPI
19458	// Result returns the result of the asynchronous operation.
19459	// If the operation has not completed it will return an error.
19460	Result func(VirtualMachinesClient) (RunCommandResult, error)
19461}
19462
19463// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19464func (future *VirtualMachinesRunCommandFuture) UnmarshalJSON(body []byte) error {
19465	var azFuture azure.Future
19466	if err := json.Unmarshal(body, &azFuture); err != nil {
19467		return err
19468	}
19469	future.FutureAPI = &azFuture
19470	future.Result = future.result
19471	return nil
19472}
19473
19474// result is the default implementation for VirtualMachinesRunCommandFuture.Result.
19475func (future *VirtualMachinesRunCommandFuture) result(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
19476	var done bool
19477	done, err = future.DoneWithContext(context.Background(), client)
19478	if err != nil {
19479		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Polling failure")
19480		return
19481	}
19482	if !done {
19483		rcr.Response.Response = future.Response()
19484		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
19485		return
19486	}
19487	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19488	if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
19489		rcr, err = client.RunCommandResponder(rcr.Response.Response)
19490		if err != nil {
19491			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
19492		}
19493	}
19494	return
19495}
19496
19497// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
19498// operation.
19499type VirtualMachinesStartFuture struct {
19500	azure.FutureAPI
19501	// Result returns the result of the asynchronous operation.
19502	// If the operation has not completed it will return an error.
19503	Result func(VirtualMachinesClient) (autorest.Response, error)
19504}
19505
19506// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19507func (future *VirtualMachinesStartFuture) UnmarshalJSON(body []byte) error {
19508	var azFuture azure.Future
19509	if err := json.Unmarshal(body, &azFuture); err != nil {
19510		return err
19511	}
19512	future.FutureAPI = &azFuture
19513	future.Result = future.result
19514	return nil
19515}
19516
19517// result is the default implementation for VirtualMachinesStartFuture.Result.
19518func (future *VirtualMachinesStartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
19519	var done bool
19520	done, err = future.DoneWithContext(context.Background(), client)
19521	if err != nil {
19522		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure")
19523		return
19524	}
19525	if !done {
19526		ar.Response = future.Response()
19527		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
19528		return
19529	}
19530	ar.Response = future.Response()
19531	return
19532}
19533
19534// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view
19535// status summary.
19536type VirtualMachineStatusCodeCount struct {
19537	// Code - READ-ONLY; The instance view status code.
19538	Code *string `json:"code,omitempty"`
19539	// Count - READ-ONLY; The number of instances having a particular status code.
19540	Count *int32 `json:"count,omitempty"`
19541}
19542
19543// MarshalJSON is the custom marshaler for VirtualMachineStatusCodeCount.
19544func (vmscc VirtualMachineStatusCodeCount) MarshalJSON() ([]byte, error) {
19545	objectMap := make(map[string]interface{})
19546	return json.Marshal(objectMap)
19547}
19548
19549// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
19550// operation.
19551type VirtualMachinesUpdateFuture struct {
19552	azure.FutureAPI
19553	// Result returns the result of the asynchronous operation.
19554	// If the operation has not completed it will return an error.
19555	Result func(VirtualMachinesClient) (VirtualMachine, error)
19556}
19557
19558// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19559func (future *VirtualMachinesUpdateFuture) UnmarshalJSON(body []byte) error {
19560	var azFuture azure.Future
19561	if err := json.Unmarshal(body, &azFuture); err != nil {
19562		return err
19563	}
19564	future.FutureAPI = &azFuture
19565	future.Result = future.result
19566	return nil
19567}
19568
19569// result is the default implementation for VirtualMachinesUpdateFuture.Result.
19570func (future *VirtualMachinesUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
19571	var done bool
19572	done, err = future.DoneWithContext(context.Background(), client)
19573	if err != nil {
19574		err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Polling failure")
19575		return
19576	}
19577	if !done {
19578		VM.Response.Response = future.Response()
19579		err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
19580		return
19581	}
19582	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19583	if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
19584		VM, err = client.UpdateResponder(VM.Response.Response)
19585		if err != nil {
19586			err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
19587		}
19588	}
19589	return
19590}
19591
19592// VirtualMachineUpdate describes a Virtual Machine Update.
19593type VirtualMachineUpdate struct {
19594	// 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**.
19595	Plan                      *Plan `json:"plan,omitempty"`
19596	*VirtualMachineProperties `json:"properties,omitempty"`
19597	// Identity - The identity of the virtual machine, if configured.
19598	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
19599	// Zones - The virtual machine zones.
19600	Zones *[]string `json:"zones,omitempty"`
19601	// Tags - Resource tags
19602	Tags map[string]*string `json:"tags"`
19603}
19604
19605// MarshalJSON is the custom marshaler for VirtualMachineUpdate.
19606func (vmu VirtualMachineUpdate) MarshalJSON() ([]byte, error) {
19607	objectMap := make(map[string]interface{})
19608	if vmu.Plan != nil {
19609		objectMap["plan"] = vmu.Plan
19610	}
19611	if vmu.VirtualMachineProperties != nil {
19612		objectMap["properties"] = vmu.VirtualMachineProperties
19613	}
19614	if vmu.Identity != nil {
19615		objectMap["identity"] = vmu.Identity
19616	}
19617	if vmu.Zones != nil {
19618		objectMap["zones"] = vmu.Zones
19619	}
19620	if vmu.Tags != nil {
19621		objectMap["tags"] = vmu.Tags
19622	}
19623	return json.Marshal(objectMap)
19624}
19625
19626// UnmarshalJSON is the custom unmarshaler for VirtualMachineUpdate struct.
19627func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error {
19628	var m map[string]*json.RawMessage
19629	err := json.Unmarshal(body, &m)
19630	if err != nil {
19631		return err
19632	}
19633	for k, v := range m {
19634		switch k {
19635		case "plan":
19636			if v != nil {
19637				var plan Plan
19638				err = json.Unmarshal(*v, &plan)
19639				if err != nil {
19640					return err
19641				}
19642				vmu.Plan = &plan
19643			}
19644		case "properties":
19645			if v != nil {
19646				var virtualMachineProperties VirtualMachineProperties
19647				err = json.Unmarshal(*v, &virtualMachineProperties)
19648				if err != nil {
19649					return err
19650				}
19651				vmu.VirtualMachineProperties = &virtualMachineProperties
19652			}
19653		case "identity":
19654			if v != nil {
19655				var identity VirtualMachineIdentity
19656				err = json.Unmarshal(*v, &identity)
19657				if err != nil {
19658					return err
19659				}
19660				vmu.Identity = &identity
19661			}
19662		case "zones":
19663			if v != nil {
19664				var zones []string
19665				err = json.Unmarshal(*v, &zones)
19666				if err != nil {
19667					return err
19668				}
19669				vmu.Zones = &zones
19670			}
19671		case "tags":
19672			if v != nil {
19673				var tags map[string]*string
19674				err = json.Unmarshal(*v, &tags)
19675				if err != nil {
19676					return err
19677				}
19678				vmu.Tags = tags
19679			}
19680		}
19681	}
19682
19683	return nil
19684}
19685
19686// VMScaleSetConvertToSinglePlacementGroupInput ...
19687type VMScaleSetConvertToSinglePlacementGroupInput struct {
19688	// 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.
19689	ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"`
19690}
19691
19692// WindowsConfiguration specifies Windows operating system settings on the virtual machine.
19693type WindowsConfiguration struct {
19694	// 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.
19695	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
19696	// 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.
19697	EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
19698	// 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).
19699	TimeZone *string `json:"timeZone,omitempty"`
19700	// AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.
19701	AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"`
19702	// PatchSettings - Specifies settings related to in-guest patching (KBs).
19703	PatchSettings *PatchSettings `json:"patchSettings,omitempty"`
19704	// WinRM - Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.
19705	WinRM *WinRMConfiguration `json:"winRM,omitempty"`
19706}
19707
19708// WinRMConfiguration describes Windows Remote Management configuration of the VM
19709type WinRMConfiguration struct {
19710	// Listeners - The list of Windows Remote Management listeners
19711	Listeners *[]WinRMListener `json:"listeners,omitempty"`
19712}
19713
19714// WinRMListener describes Protocol and thumbprint of Windows Remote Management listener
19715type WinRMListener struct {
19716	// Protocol - Specifies the protocol of WinRM listener. <br><br> Possible values are: <br>**http** <br><br> **https**. Possible values include: 'HTTP', 'HTTPS'
19717	Protocol ProtocolTypes `json:"protocol,omitempty"`
19718	// 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>}
19719	CertificateURL *string `json:"certificateUrl,omitempty"`
19720}
19721