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