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	"io"
29	"net/http"
30)
31
32// The package's fully qualified name.
33const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/compute/mgmt/2020-10-01-preview/compute"
34
35// AccessURI a disk access SAS uri.
36type AccessURI struct {
37	autorest.Response `json:"-"`
38	// AccessSAS - READ-ONLY; A SAS uri for accessing a disk.
39	AccessSAS *string `json:"accessSAS,omitempty"`
40}
41
42// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale
43// set.
44type AdditionalCapabilities struct {
45	// UltraSSDEnabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
46	UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`
47}
48
49// AdditionalUnattendContent specifies additional XML formatted information that can be included in the
50// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name,
51// and the pass in which the content is applied.
52type AdditionalUnattendContent struct {
53	// PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem'
54	PassName PassNames `json:"passName,omitempty"`
55	// ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'MicrosoftWindowsShellSetup'
56	ComponentName ComponentNames `json:"componentName,omitempty"`
57	// SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands'
58	SettingName SettingNames `json:"settingName,omitempty"`
59	// 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.
60	Content *string `json:"content,omitempty"`
61}
62
63// APIEntityReference the API entity reference.
64type APIEntityReference struct {
65	// ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
66	ID *string `json:"id,omitempty"`
67}
68
69// APIError api error.
70type APIError struct {
71	// Details - The Api error details
72	Details *[]APIErrorBase `json:"details,omitempty"`
73	// Innererror - The Api inner error
74	Innererror *InnerError `json:"innererror,omitempty"`
75	// Code - The error code.
76	Code *string `json:"code,omitempty"`
77	// Target - The target of the particular error.
78	Target *string `json:"target,omitempty"`
79	// Message - The error message.
80	Message *string `json:"message,omitempty"`
81}
82
83// APIErrorBase api error base.
84type APIErrorBase struct {
85	// Code - The error code.
86	Code *string `json:"code,omitempty"`
87	// Target - The target of the particular error.
88	Target *string `json:"target,omitempty"`
89	// Message - The error message.
90	Message *string `json:"message,omitempty"`
91}
92
93// AutomaticOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade.
94type AutomaticOSUpgradePolicy struct {
95	// EnableAutomaticOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. <br><br> If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true.
96	EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"`
97	// DisableAutomaticRollback - Whether OS image rollback feature should be disabled. Default value is false.
98	DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"`
99}
100
101// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image.
102type AutomaticOSUpgradeProperties struct {
103	// AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image.
104	AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"`
105}
106
107// AutomaticRepairsPolicy specifies the configuration parameters for automatic repairs on the virtual
108// machine scale set.
109type AutomaticRepairsPolicy struct {
110	// Enabled - Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
111	Enabled *bool `json:"enabled,omitempty"`
112	// GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
113	GracePeriod *string `json:"gracePeriod,omitempty"`
114}
115
116// AvailabilitySet specifies information about the availability set that the virtual machine should be
117// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to
118// maximize availability. For more information about availability sets, see [Manage the availability of
119// virtual
120// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
121// <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual
122// machines in
123// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
124// <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot
125// be added to an availability set.
126type AvailabilitySet struct {
127	autorest.Response          `json:"-"`
128	*AvailabilitySetProperties `json:"properties,omitempty"`
129	// Sku - Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.
130	Sku *Sku `json:"sku,omitempty"`
131	// ID - READ-ONLY; Resource Id
132	ID *string `json:"id,omitempty"`
133	// Name - READ-ONLY; Resource name
134	Name *string `json:"name,omitempty"`
135	// Type - READ-ONLY; Resource type
136	Type *string `json:"type,omitempty"`
137	// Location - Resource location
138	Location *string `json:"location,omitempty"`
139	// Tags - Resource tags
140	Tags map[string]*string `json:"tags"`
141}
142
143// MarshalJSON is the custom marshaler for AvailabilitySet.
144func (as AvailabilitySet) MarshalJSON() ([]byte, error) {
145	objectMap := make(map[string]interface{})
146	if as.AvailabilitySetProperties != nil {
147		objectMap["properties"] = as.AvailabilitySetProperties
148	}
149	if as.Sku != nil {
150		objectMap["sku"] = as.Sku
151	}
152	if as.Location != nil {
153		objectMap["location"] = as.Location
154	}
155	if as.Tags != nil {
156		objectMap["tags"] = as.Tags
157	}
158	return json.Marshal(objectMap)
159}
160
161// UnmarshalJSON is the custom unmarshaler for AvailabilitySet struct.
162func (as *AvailabilitySet) UnmarshalJSON(body []byte) error {
163	var m map[string]*json.RawMessage
164	err := json.Unmarshal(body, &m)
165	if err != nil {
166		return err
167	}
168	for k, v := range m {
169		switch k {
170		case "properties":
171			if v != nil {
172				var availabilitySetProperties AvailabilitySetProperties
173				err = json.Unmarshal(*v, &availabilitySetProperties)
174				if err != nil {
175					return err
176				}
177				as.AvailabilitySetProperties = &availabilitySetProperties
178			}
179		case "sku":
180			if v != nil {
181				var sku Sku
182				err = json.Unmarshal(*v, &sku)
183				if err != nil {
184					return err
185				}
186				as.Sku = &sku
187			}
188		case "id":
189			if v != nil {
190				var ID string
191				err = json.Unmarshal(*v, &ID)
192				if err != nil {
193					return err
194				}
195				as.ID = &ID
196			}
197		case "name":
198			if v != nil {
199				var name string
200				err = json.Unmarshal(*v, &name)
201				if err != nil {
202					return err
203				}
204				as.Name = &name
205			}
206		case "type":
207			if v != nil {
208				var typeVar string
209				err = json.Unmarshal(*v, &typeVar)
210				if err != nil {
211					return err
212				}
213				as.Type = &typeVar
214			}
215		case "location":
216			if v != nil {
217				var location string
218				err = json.Unmarshal(*v, &location)
219				if err != nil {
220					return err
221				}
222				as.Location = &location
223			}
224		case "tags":
225			if v != nil {
226				var tags map[string]*string
227				err = json.Unmarshal(*v, &tags)
228				if err != nil {
229					return err
230				}
231				as.Tags = tags
232			}
233		}
234	}
235
236	return nil
237}
238
239// AvailabilitySetListResult the List Availability Set operation response.
240type AvailabilitySetListResult struct {
241	autorest.Response `json:"-"`
242	// Value - The list of availability sets
243	Value *[]AvailabilitySet `json:"value,omitempty"`
244	// NextLink - The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets.
245	NextLink *string `json:"nextLink,omitempty"`
246}
247
248// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values.
249type AvailabilitySetListResultIterator struct {
250	i    int
251	page AvailabilitySetListResultPage
252}
253
254// NextWithContext advances to the next value.  If there was an error making
255// the request the iterator does not advance and the error is returned.
256func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) {
257	if tracing.IsEnabled() {
258		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.NextWithContext")
259		defer func() {
260			sc := -1
261			if iter.Response().Response.Response != nil {
262				sc = iter.Response().Response.Response.StatusCode
263			}
264			tracing.EndSpan(ctx, sc, err)
265		}()
266	}
267	iter.i++
268	if iter.i < len(iter.page.Values()) {
269		return nil
270	}
271	err = iter.page.NextWithContext(ctx)
272	if err != nil {
273		iter.i--
274		return err
275	}
276	iter.i = 0
277	return nil
278}
279
280// Next advances to the next value.  If there was an error making
281// the request the iterator does not advance and the error is returned.
282// Deprecated: Use NextWithContext() instead.
283func (iter *AvailabilitySetListResultIterator) Next() error {
284	return iter.NextWithContext(context.Background())
285}
286
287// NotDone returns true if the enumeration should be started or is not yet complete.
288func (iter AvailabilitySetListResultIterator) NotDone() bool {
289	return iter.page.NotDone() && iter.i < len(iter.page.Values())
290}
291
292// Response returns the raw server response from the last page request.
293func (iter AvailabilitySetListResultIterator) Response() AvailabilitySetListResult {
294	return iter.page.Response()
295}
296
297// Value returns the current value or a zero-initialized value if the
298// iterator has advanced beyond the end of the collection.
299func (iter AvailabilitySetListResultIterator) Value() AvailabilitySet {
300	if !iter.page.NotDone() {
301		return AvailabilitySet{}
302	}
303	return iter.page.Values()[iter.i]
304}
305
306// Creates a new instance of the AvailabilitySetListResultIterator type.
307func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator {
308	return AvailabilitySetListResultIterator{page: page}
309}
310
311// IsEmpty returns true if the ListResult contains no values.
312func (aslr AvailabilitySetListResult) IsEmpty() bool {
313	return aslr.Value == nil || len(*aslr.Value) == 0
314}
315
316// hasNextLink returns true if the NextLink is not empty.
317func (aslr AvailabilitySetListResult) hasNextLink() bool {
318	return aslr.NextLink != nil && len(*aslr.NextLink) != 0
319}
320
321// availabilitySetListResultPreparer prepares a request to retrieve the next set of results.
322// It returns nil if no more results exist.
323func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer(ctx context.Context) (*http.Request, error) {
324	if !aslr.hasNextLink() {
325		return nil, nil
326	}
327	return autorest.Prepare((&http.Request{}).WithContext(ctx),
328		autorest.AsJSON(),
329		autorest.AsGet(),
330		autorest.WithBaseURL(to.String(aslr.NextLink)))
331}
332
333// AvailabilitySetListResultPage contains a page of AvailabilitySet values.
334type AvailabilitySetListResultPage struct {
335	fn   func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)
336	aslr AvailabilitySetListResult
337}
338
339// NextWithContext advances to the next page of values.  If there was an error making
340// the request the page does not advance and the error is returned.
341func (page *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) (err error) {
342	if tracing.IsEnabled() {
343		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultPage.NextWithContext")
344		defer func() {
345			sc := -1
346			if page.Response().Response.Response != nil {
347				sc = page.Response().Response.Response.StatusCode
348			}
349			tracing.EndSpan(ctx, sc, err)
350		}()
351	}
352	for {
353		next, err := page.fn(ctx, page.aslr)
354		if err != nil {
355			return err
356		}
357		page.aslr = next
358		if !next.hasNextLink() || !next.IsEmpty() {
359			break
360		}
361	}
362	return nil
363}
364
365// Next advances to the next page of values.  If there was an error making
366// the request the page does not advance and the error is returned.
367// Deprecated: Use NextWithContext() instead.
368func (page *AvailabilitySetListResultPage) Next() error {
369	return page.NextWithContext(context.Background())
370}
371
372// NotDone returns true if the page enumeration should be started or is not yet complete.
373func (page AvailabilitySetListResultPage) NotDone() bool {
374	return !page.aslr.IsEmpty()
375}
376
377// Response returns the raw server response from the last page request.
378func (page AvailabilitySetListResultPage) Response() AvailabilitySetListResult {
379	return page.aslr
380}
381
382// Values returns the slice of values for the current page or nil if there are no values.
383func (page AvailabilitySetListResultPage) Values() []AvailabilitySet {
384	if page.aslr.IsEmpty() {
385		return nil
386	}
387	return *page.aslr.Value
388}
389
390// Creates a new instance of the AvailabilitySetListResultPage type.
391func NewAvailabilitySetListResultPage(cur AvailabilitySetListResult, getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage {
392	return AvailabilitySetListResultPage{
393		fn:   getNextPage,
394		aslr: cur,
395	}
396}
397
398// AvailabilitySetProperties the instance view of a resource.
399type AvailabilitySetProperties struct {
400	// PlatformUpdateDomainCount - Update Domain count.
401	PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"`
402	// PlatformFaultDomainCount - Fault Domain count.
403	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
404	// VirtualMachines - A list of references to all virtual machines in the availability set.
405	VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"`
406	// ProximityPlacementGroup - Specifies information about the proximity placement group that the availability set should be assigned to. <br><br>Minimum api-version: 2018-04-01.
407	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
408	// Statuses - READ-ONLY; The resource status information.
409	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
410}
411
412// MarshalJSON is the custom marshaler for AvailabilitySetProperties.
413func (asp AvailabilitySetProperties) MarshalJSON() ([]byte, error) {
414	objectMap := make(map[string]interface{})
415	if asp.PlatformUpdateDomainCount != nil {
416		objectMap["platformUpdateDomainCount"] = asp.PlatformUpdateDomainCount
417	}
418	if asp.PlatformFaultDomainCount != nil {
419		objectMap["platformFaultDomainCount"] = asp.PlatformFaultDomainCount
420	}
421	if asp.VirtualMachines != nil {
422		objectMap["virtualMachines"] = asp.VirtualMachines
423	}
424	if asp.ProximityPlacementGroup != nil {
425		objectMap["proximityPlacementGroup"] = asp.ProximityPlacementGroup
426	}
427	return json.Marshal(objectMap)
428}
429
430// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should
431// be assigned to. Only tags may be updated.
432type AvailabilitySetUpdate struct {
433	*AvailabilitySetProperties `json:"properties,omitempty"`
434	// Sku - Sku of the availability set
435	Sku *Sku `json:"sku,omitempty"`
436	// Tags - Resource tags
437	Tags map[string]*string `json:"tags"`
438}
439
440// MarshalJSON is the custom marshaler for AvailabilitySetUpdate.
441func (asu AvailabilitySetUpdate) MarshalJSON() ([]byte, error) {
442	objectMap := make(map[string]interface{})
443	if asu.AvailabilitySetProperties != nil {
444		objectMap["properties"] = asu.AvailabilitySetProperties
445	}
446	if asu.Sku != nil {
447		objectMap["sku"] = asu.Sku
448	}
449	if asu.Tags != nil {
450		objectMap["tags"] = asu.Tags
451	}
452	return json.Marshal(objectMap)
453}
454
455// UnmarshalJSON is the custom unmarshaler for AvailabilitySetUpdate struct.
456func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
457	var m map[string]*json.RawMessage
458	err := json.Unmarshal(body, &m)
459	if err != nil {
460		return err
461	}
462	for k, v := range m {
463		switch k {
464		case "properties":
465			if v != nil {
466				var availabilitySetProperties AvailabilitySetProperties
467				err = json.Unmarshal(*v, &availabilitySetProperties)
468				if err != nil {
469					return err
470				}
471				asu.AvailabilitySetProperties = &availabilitySetProperties
472			}
473		case "sku":
474			if v != nil {
475				var sku Sku
476				err = json.Unmarshal(*v, &sku)
477				if err != nil {
478					return err
479				}
480				asu.Sku = &sku
481			}
482		case "tags":
483			if v != nil {
484				var tags map[string]*string
485				err = json.Unmarshal(*v, &tags)
486				if err != nil {
487					return err
488				}
489				asu.Tags = tags
490			}
491		}
492	}
493
494	return nil
495}
496
497// AvailablePatchSummary describes the properties of an virtual machine instance view for available patch
498// summary.
499type AvailablePatchSummary struct {
500	// Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
501	Status PatchOperationStatus `json:"status,omitempty"`
502	// AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
503	AssessmentActivityID *string `json:"assessmentActivityId,omitempty"`
504	// RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.
505	RebootPending *bool `json:"rebootPending,omitempty"`
506	// CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
507	CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"`
508	// OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security.
509	OtherPatchCount *int32 `json:"otherPatchCount,omitempty"`
510	// StartTime - READ-ONLY; The UTC timestamp when the operation began.
511	StartTime *date.Time `json:"startTime,omitempty"`
512	// LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began.
513	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
514	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
515	Error *APIError `json:"error,omitempty"`
516}
517
518// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS. <br><br>Minimum
519// api-version: 2019-03-01.
520type BillingProfile struct {
521	// MaxPrice - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if  the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01.
522	MaxPrice *float64 `json:"maxPrice,omitempty"`
523}
524
525// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and
526// Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br>
527// Azure also enables you to see a screenshot of the VM from the hypervisor.
528type BootDiagnostics struct {
529	// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
530	Enabled *bool `json:"enabled,omitempty"`
531	// StorageURI - Uri of the storage account to use for placing the console output and screenshot. <br><br>If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
532	StorageURI *string `json:"storageUri,omitempty"`
533}
534
535// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics.
536type BootDiagnosticsInstanceView struct {
537	// ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI. <br><br>NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage.
538	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
539	// SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob Uri. <br><br>NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage.
540	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
541	// Status - READ-ONLY; The boot diagnostics status information for the VM. <br><br> NOTE: It will be set only if there are errors encountered in enabling boot diagnostics.
542	Status *InstanceViewStatus `json:"status,omitempty"`
543}
544
545// CloudError an error response from the Compute service.
546type CloudError struct {
547	Error *APIError `json:"error,omitempty"`
548}
549
550// CloudService describes the cloud service.
551type CloudService struct {
552	autorest.Response `json:"-"`
553	// ID - READ-ONLY; Resource Id.
554	ID *string `json:"id,omitempty"`
555	// Name - READ-ONLY; Resource name.
556	Name *string `json:"name,omitempty"`
557	// Type - READ-ONLY; Resource type.
558	Type *string `json:"type,omitempty"`
559	// Location - Resource location.
560	Location *string `json:"location,omitempty"`
561	// Tags - Resource tags.
562	Tags       map[string]*string      `json:"tags"`
563	Properties *CloudServiceProperties `json:"properties,omitempty"`
564}
565
566// MarshalJSON is the custom marshaler for CloudService.
567func (cs CloudService) MarshalJSON() ([]byte, error) {
568	objectMap := make(map[string]interface{})
569	if cs.Location != nil {
570		objectMap["location"] = cs.Location
571	}
572	if cs.Tags != nil {
573		objectMap["tags"] = cs.Tags
574	}
575	if cs.Properties != nil {
576		objectMap["properties"] = cs.Properties
577	}
578	return json.Marshal(objectMap)
579}
580
581// CloudServiceExtensionProfile describes a cloud service extension profile.
582type CloudServiceExtensionProfile struct {
583	// Extensions - List of extensions for the cloud service.
584	Extensions *[]Extension `json:"extensions,omitempty"`
585}
586
587// CloudServiceExtensionProperties extension Properties.
588type CloudServiceExtensionProperties struct {
589	// Publisher - The name of the extension handler publisher.
590	Publisher *string `json:"publisher,omitempty"`
591	// Type - Specifies the type of the extension.
592	Type *string `json:"type,omitempty"`
593	// TypeHandlerVersion - Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance.
594	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
595	// AutoUpgradeMinorVersion - Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available.
596	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
597	// Settings - Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension.
598	Settings *string `json:"settings,omitempty"`
599	// ProtectedSettings - Protected settings for the extension which are encrypted before sent to the role instance.
600	ProtectedSettings             *string                              `json:"protectedSettings,omitempty"`
601	ProtectedSettingsFromKeyVault *CloudServiceVaultAndSecretReference `json:"protectedSettingsFromKeyVault,omitempty"`
602	// ForceUpdateTag - Tag to force apply the provided public and protected settings.
603	// Changing the tag value allows for re-running the extension without changing any of the public or protected settings.
604	// If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler.
605	// If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and
606	// it is up to handler implementation whether to re-run it or not
607	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
608	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
609	ProvisioningState *string `json:"provisioningState,omitempty"`
610	// RolesAppliedTo - Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service.
611	RolesAppliedTo *[]string `json:"rolesAppliedTo,omitempty"`
612}
613
614// MarshalJSON is the custom marshaler for CloudServiceExtensionProperties.
615func (csep CloudServiceExtensionProperties) MarshalJSON() ([]byte, error) {
616	objectMap := make(map[string]interface{})
617	if csep.Publisher != nil {
618		objectMap["publisher"] = csep.Publisher
619	}
620	if csep.Type != nil {
621		objectMap["type"] = csep.Type
622	}
623	if csep.TypeHandlerVersion != nil {
624		objectMap["typeHandlerVersion"] = csep.TypeHandlerVersion
625	}
626	if csep.AutoUpgradeMinorVersion != nil {
627		objectMap["autoUpgradeMinorVersion"] = csep.AutoUpgradeMinorVersion
628	}
629	if csep.Settings != nil {
630		objectMap["settings"] = csep.Settings
631	}
632	if csep.ProtectedSettings != nil {
633		objectMap["protectedSettings"] = csep.ProtectedSettings
634	}
635	if csep.ProtectedSettingsFromKeyVault != nil {
636		objectMap["protectedSettingsFromKeyVault"] = csep.ProtectedSettingsFromKeyVault
637	}
638	if csep.ForceUpdateTag != nil {
639		objectMap["forceUpdateTag"] = csep.ForceUpdateTag
640	}
641	if csep.RolesAppliedTo != nil {
642		objectMap["rolesAppliedTo"] = csep.RolesAppliedTo
643	}
644	return json.Marshal(objectMap)
645}
646
647// CloudServiceInstanceView instanceView of CloudService as a whole
648type CloudServiceInstanceView struct {
649	autorest.Response `json:"-"`
650	RoleInstance      *InstanceViewStatusesSummary `json:"roleInstance,omitempty"`
651	// SdkVersion - READ-ONLY; The version of the SDK that was used to generate the package for the cloud service.
652	SdkVersion *string `json:"sdkVersion,omitempty"`
653	// Statuses - READ-ONLY
654	Statuses *[]ResourceInstanceViewStatus `json:"statuses,omitempty"`
655}
656
657// MarshalJSON is the custom marshaler for CloudServiceInstanceView.
658func (csiv CloudServiceInstanceView) MarshalJSON() ([]byte, error) {
659	objectMap := make(map[string]interface{})
660	if csiv.RoleInstance != nil {
661		objectMap["roleInstance"] = csiv.RoleInstance
662	}
663	return json.Marshal(objectMap)
664}
665
666// CloudServiceListResult ...
667type CloudServiceListResult struct {
668	autorest.Response `json:"-"`
669	Value             *[]CloudService `json:"value,omitempty"`
670	NextLink          *string         `json:"nextLink,omitempty"`
671}
672
673// CloudServiceListResultIterator provides access to a complete listing of CloudService values.
674type CloudServiceListResultIterator struct {
675	i    int
676	page CloudServiceListResultPage
677}
678
679// NextWithContext advances to the next value.  If there was an error making
680// the request the iterator does not advance and the error is returned.
681func (iter *CloudServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
682	if tracing.IsEnabled() {
683		ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceListResultIterator.NextWithContext")
684		defer func() {
685			sc := -1
686			if iter.Response().Response.Response != nil {
687				sc = iter.Response().Response.Response.StatusCode
688			}
689			tracing.EndSpan(ctx, sc, err)
690		}()
691	}
692	iter.i++
693	if iter.i < len(iter.page.Values()) {
694		return nil
695	}
696	err = iter.page.NextWithContext(ctx)
697	if err != nil {
698		iter.i--
699		return err
700	}
701	iter.i = 0
702	return nil
703}
704
705// Next advances to the next value.  If there was an error making
706// the request the iterator does not advance and the error is returned.
707// Deprecated: Use NextWithContext() instead.
708func (iter *CloudServiceListResultIterator) Next() error {
709	return iter.NextWithContext(context.Background())
710}
711
712// NotDone returns true if the enumeration should be started or is not yet complete.
713func (iter CloudServiceListResultIterator) NotDone() bool {
714	return iter.page.NotDone() && iter.i < len(iter.page.Values())
715}
716
717// Response returns the raw server response from the last page request.
718func (iter CloudServiceListResultIterator) Response() CloudServiceListResult {
719	return iter.page.Response()
720}
721
722// Value returns the current value or a zero-initialized value if the
723// iterator has advanced beyond the end of the collection.
724func (iter CloudServiceListResultIterator) Value() CloudService {
725	if !iter.page.NotDone() {
726		return CloudService{}
727	}
728	return iter.page.Values()[iter.i]
729}
730
731// Creates a new instance of the CloudServiceListResultIterator type.
732func NewCloudServiceListResultIterator(page CloudServiceListResultPage) CloudServiceListResultIterator {
733	return CloudServiceListResultIterator{page: page}
734}
735
736// IsEmpty returns true if the ListResult contains no values.
737func (cslr CloudServiceListResult) IsEmpty() bool {
738	return cslr.Value == nil || len(*cslr.Value) == 0
739}
740
741// hasNextLink returns true if the NextLink is not empty.
742func (cslr CloudServiceListResult) hasNextLink() bool {
743	return cslr.NextLink != nil && len(*cslr.NextLink) != 0
744}
745
746// cloudServiceListResultPreparer prepares a request to retrieve the next set of results.
747// It returns nil if no more results exist.
748func (cslr CloudServiceListResult) cloudServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
749	if !cslr.hasNextLink() {
750		return nil, nil
751	}
752	return autorest.Prepare((&http.Request{}).WithContext(ctx),
753		autorest.AsJSON(),
754		autorest.AsGet(),
755		autorest.WithBaseURL(to.String(cslr.NextLink)))
756}
757
758// CloudServiceListResultPage contains a page of CloudService values.
759type CloudServiceListResultPage struct {
760	fn   func(context.Context, CloudServiceListResult) (CloudServiceListResult, error)
761	cslr CloudServiceListResult
762}
763
764// NextWithContext advances to the next page of values.  If there was an error making
765// the request the page does not advance and the error is returned.
766func (page *CloudServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
767	if tracing.IsEnabled() {
768		ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceListResultPage.NextWithContext")
769		defer func() {
770			sc := -1
771			if page.Response().Response.Response != nil {
772				sc = page.Response().Response.Response.StatusCode
773			}
774			tracing.EndSpan(ctx, sc, err)
775		}()
776	}
777	for {
778		next, err := page.fn(ctx, page.cslr)
779		if err != nil {
780			return err
781		}
782		page.cslr = next
783		if !next.hasNextLink() || !next.IsEmpty() {
784			break
785		}
786	}
787	return nil
788}
789
790// Next advances to the next page of values.  If there was an error making
791// the request the page does not advance and the error is returned.
792// Deprecated: Use NextWithContext() instead.
793func (page *CloudServiceListResultPage) Next() error {
794	return page.NextWithContext(context.Background())
795}
796
797// NotDone returns true if the page enumeration should be started or is not yet complete.
798func (page CloudServiceListResultPage) NotDone() bool {
799	return !page.cslr.IsEmpty()
800}
801
802// Response returns the raw server response from the last page request.
803func (page CloudServiceListResultPage) Response() CloudServiceListResult {
804	return page.cslr
805}
806
807// Values returns the slice of values for the current page or nil if there are no values.
808func (page CloudServiceListResultPage) Values() []CloudService {
809	if page.cslr.IsEmpty() {
810		return nil
811	}
812	return *page.cslr.Value
813}
814
815// Creates a new instance of the CloudServiceListResultPage type.
816func NewCloudServiceListResultPage(cur CloudServiceListResult, getNextPage func(context.Context, CloudServiceListResult) (CloudServiceListResult, error)) CloudServiceListResultPage {
817	return CloudServiceListResultPage{
818		fn:   getNextPage,
819		cslr: cur,
820	}
821}
822
823// CloudServiceNetworkProfile network Profile for the cloud service.
824type CloudServiceNetworkProfile struct {
825	// LoadBalancerConfigurations - The list of load balancer configurations for the cloud service.
826	LoadBalancerConfigurations *[]LoadBalancerConfiguration `json:"loadBalancerConfigurations,omitempty"`
827	SwappableCloudService      *SubResource                 `json:"swappableCloudService,omitempty"`
828}
829
830// CloudServiceOsProfile describes the OS profile for the cloud service.
831type CloudServiceOsProfile struct {
832	// Secrets - Specifies set of certificates that should be installed onto the role instances.
833	Secrets *[]CloudServiceVaultSecretGroup `json:"secrets,omitempty"`
834}
835
836// CloudServiceProperties cloud service properties
837type CloudServiceProperties struct {
838	// PackageURL - Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account.
839	// This is a write-only property and is not returned in GET calls.
840	PackageURL *string `json:"packageUrl,omitempty"`
841	// Configuration - Specifies the XML service configuration (.cscfg) for the cloud service.
842	Configuration *string `json:"configuration,omitempty"`
843	// ConfigurationURL - Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL  can be Shared Access Signature (SAS) URI from any storage account.
844	// This is a write-only property and is not returned in GET calls.
845	ConfigurationURL *string `json:"configurationUrl,omitempty"`
846	// StartCloudService - (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`.
847	// If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff.
848	StartCloudService *bool `json:"startCloudService,omitempty"`
849	// UpgradeMode - Possible values include: 'Auto', 'Manual', 'Simultaneous'
850	UpgradeMode      CloudServiceUpgradeMode       `json:"upgradeMode,omitempty"`
851	RoleProfile      *CloudServiceRoleProfile      `json:"roleProfile,omitempty"`
852	OsProfile        *CloudServiceOsProfile        `json:"osProfile,omitempty"`
853	NetworkProfile   *CloudServiceNetworkProfile   `json:"networkProfile,omitempty"`
854	ExtensionProfile *CloudServiceExtensionProfile `json:"extensionProfile,omitempty"`
855	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
856	ProvisioningState *string `json:"provisioningState,omitempty"`
857	// UniqueID - READ-ONLY; The unique identifier for the cloud service.
858	UniqueID *string `json:"uniqueId,omitempty"`
859}
860
861// MarshalJSON is the custom marshaler for CloudServiceProperties.
862func (csp CloudServiceProperties) MarshalJSON() ([]byte, error) {
863	objectMap := make(map[string]interface{})
864	if csp.PackageURL != nil {
865		objectMap["packageUrl"] = csp.PackageURL
866	}
867	if csp.Configuration != nil {
868		objectMap["configuration"] = csp.Configuration
869	}
870	if csp.ConfigurationURL != nil {
871		objectMap["configurationUrl"] = csp.ConfigurationURL
872	}
873	if csp.StartCloudService != nil {
874		objectMap["startCloudService"] = csp.StartCloudService
875	}
876	if csp.UpgradeMode != "" {
877		objectMap["upgradeMode"] = csp.UpgradeMode
878	}
879	if csp.RoleProfile != nil {
880		objectMap["roleProfile"] = csp.RoleProfile
881	}
882	if csp.OsProfile != nil {
883		objectMap["osProfile"] = csp.OsProfile
884	}
885	if csp.NetworkProfile != nil {
886		objectMap["networkProfile"] = csp.NetworkProfile
887	}
888	if csp.ExtensionProfile != nil {
889		objectMap["extensionProfile"] = csp.ExtensionProfile
890	}
891	return json.Marshal(objectMap)
892}
893
894// CloudServiceRole describes a role of the cloud service.
895type CloudServiceRole struct {
896	autorest.Response `json:"-"`
897	// ID - READ-ONLY; Resource id
898	ID *string `json:"id,omitempty"`
899	// Name - READ-ONLY; Resource name
900	Name *string `json:"name,omitempty"`
901	// Type - READ-ONLY; Resource type
902	Type *string `json:"type,omitempty"`
903	// Location - READ-ONLY; Resource location
904	Location   *string                     `json:"location,omitempty"`
905	Sku        *CloudServiceRoleSku        `json:"sku,omitempty"`
906	Properties *CloudServiceRoleProperties `json:"properties,omitempty"`
907}
908
909// MarshalJSON is the custom marshaler for CloudServiceRole.
910func (csr CloudServiceRole) MarshalJSON() ([]byte, error) {
911	objectMap := make(map[string]interface{})
912	if csr.Sku != nil {
913		objectMap["sku"] = csr.Sku
914	}
915	if csr.Properties != nil {
916		objectMap["properties"] = csr.Properties
917	}
918	return json.Marshal(objectMap)
919}
920
921// CloudServiceRoleInstancesDeleteFuture an abstraction for monitoring and retrieving the results of a
922// long-running operation.
923type CloudServiceRoleInstancesDeleteFuture struct {
924	azure.FutureAPI
925	// Result returns the result of the asynchronous operation.
926	// If the operation has not completed it will return an error.
927	Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
928}
929
930// CloudServiceRoleInstancesRebuildFuture an abstraction for monitoring and retrieving the results of a
931// long-running operation.
932type CloudServiceRoleInstancesRebuildFuture struct {
933	azure.FutureAPI
934	// Result returns the result of the asynchronous operation.
935	// If the operation has not completed it will return an error.
936	Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
937}
938
939// CloudServiceRoleInstancesReimageFuture an abstraction for monitoring and retrieving the results of a
940// long-running operation.
941type CloudServiceRoleInstancesReimageFuture struct {
942	azure.FutureAPI
943	// Result returns the result of the asynchronous operation.
944	// If the operation has not completed it will return an error.
945	Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
946}
947
948// CloudServiceRoleInstancesRestartFuture an abstraction for monitoring and retrieving the results of a
949// long-running operation.
950type CloudServiceRoleInstancesRestartFuture struct {
951	azure.FutureAPI
952	// Result returns the result of the asynchronous operation.
953	// If the operation has not completed it will return an error.
954	Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
955}
956
957// CloudServiceRoleListResult ...
958type CloudServiceRoleListResult struct {
959	autorest.Response `json:"-"`
960	Value             *[]CloudServiceRole `json:"value,omitempty"`
961	NextLink          *string             `json:"nextLink,omitempty"`
962}
963
964// CloudServiceRoleListResultIterator provides access to a complete listing of CloudServiceRole values.
965type CloudServiceRoleListResultIterator struct {
966	i    int
967	page CloudServiceRoleListResultPage
968}
969
970// NextWithContext advances to the next value.  If there was an error making
971// the request the iterator does not advance and the error is returned.
972func (iter *CloudServiceRoleListResultIterator) NextWithContext(ctx context.Context) (err error) {
973	if tracing.IsEnabled() {
974		ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleListResultIterator.NextWithContext")
975		defer func() {
976			sc := -1
977			if iter.Response().Response.Response != nil {
978				sc = iter.Response().Response.Response.StatusCode
979			}
980			tracing.EndSpan(ctx, sc, err)
981		}()
982	}
983	iter.i++
984	if iter.i < len(iter.page.Values()) {
985		return nil
986	}
987	err = iter.page.NextWithContext(ctx)
988	if err != nil {
989		iter.i--
990		return err
991	}
992	iter.i = 0
993	return nil
994}
995
996// Next advances to the next value.  If there was an error making
997// the request the iterator does not advance and the error is returned.
998// Deprecated: Use NextWithContext() instead.
999func (iter *CloudServiceRoleListResultIterator) Next() error {
1000	return iter.NextWithContext(context.Background())
1001}
1002
1003// NotDone returns true if the enumeration should be started or is not yet complete.
1004func (iter CloudServiceRoleListResultIterator) NotDone() bool {
1005	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1006}
1007
1008// Response returns the raw server response from the last page request.
1009func (iter CloudServiceRoleListResultIterator) Response() CloudServiceRoleListResult {
1010	return iter.page.Response()
1011}
1012
1013// Value returns the current value or a zero-initialized value if the
1014// iterator has advanced beyond the end of the collection.
1015func (iter CloudServiceRoleListResultIterator) Value() CloudServiceRole {
1016	if !iter.page.NotDone() {
1017		return CloudServiceRole{}
1018	}
1019	return iter.page.Values()[iter.i]
1020}
1021
1022// Creates a new instance of the CloudServiceRoleListResultIterator type.
1023func NewCloudServiceRoleListResultIterator(page CloudServiceRoleListResultPage) CloudServiceRoleListResultIterator {
1024	return CloudServiceRoleListResultIterator{page: page}
1025}
1026
1027// IsEmpty returns true if the ListResult contains no values.
1028func (csrlr CloudServiceRoleListResult) IsEmpty() bool {
1029	return csrlr.Value == nil || len(*csrlr.Value) == 0
1030}
1031
1032// hasNextLink returns true if the NextLink is not empty.
1033func (csrlr CloudServiceRoleListResult) hasNextLink() bool {
1034	return csrlr.NextLink != nil && len(*csrlr.NextLink) != 0
1035}
1036
1037// cloudServiceRoleListResultPreparer prepares a request to retrieve the next set of results.
1038// It returns nil if no more results exist.
1039func (csrlr CloudServiceRoleListResult) cloudServiceRoleListResultPreparer(ctx context.Context) (*http.Request, error) {
1040	if !csrlr.hasNextLink() {
1041		return nil, nil
1042	}
1043	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1044		autorest.AsJSON(),
1045		autorest.AsGet(),
1046		autorest.WithBaseURL(to.String(csrlr.NextLink)))
1047}
1048
1049// CloudServiceRoleListResultPage contains a page of CloudServiceRole values.
1050type CloudServiceRoleListResultPage struct {
1051	fn    func(context.Context, CloudServiceRoleListResult) (CloudServiceRoleListResult, error)
1052	csrlr CloudServiceRoleListResult
1053}
1054
1055// NextWithContext advances to the next page of values.  If there was an error making
1056// the request the page does not advance and the error is returned.
1057func (page *CloudServiceRoleListResultPage) NextWithContext(ctx context.Context) (err error) {
1058	if tracing.IsEnabled() {
1059		ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleListResultPage.NextWithContext")
1060		defer func() {
1061			sc := -1
1062			if page.Response().Response.Response != nil {
1063				sc = page.Response().Response.Response.StatusCode
1064			}
1065			tracing.EndSpan(ctx, sc, err)
1066		}()
1067	}
1068	for {
1069		next, err := page.fn(ctx, page.csrlr)
1070		if err != nil {
1071			return err
1072		}
1073		page.csrlr = next
1074		if !next.hasNextLink() || !next.IsEmpty() {
1075			break
1076		}
1077	}
1078	return nil
1079}
1080
1081// Next advances to the next page of values.  If there was an error making
1082// the request the page does not advance and the error is returned.
1083// Deprecated: Use NextWithContext() instead.
1084func (page *CloudServiceRoleListResultPage) Next() error {
1085	return page.NextWithContext(context.Background())
1086}
1087
1088// NotDone returns true if the page enumeration should be started or is not yet complete.
1089func (page CloudServiceRoleListResultPage) NotDone() bool {
1090	return !page.csrlr.IsEmpty()
1091}
1092
1093// Response returns the raw server response from the last page request.
1094func (page CloudServiceRoleListResultPage) Response() CloudServiceRoleListResult {
1095	return page.csrlr
1096}
1097
1098// Values returns the slice of values for the current page or nil if there are no values.
1099func (page CloudServiceRoleListResultPage) Values() []CloudServiceRole {
1100	if page.csrlr.IsEmpty() {
1101		return nil
1102	}
1103	return *page.csrlr.Value
1104}
1105
1106// Creates a new instance of the CloudServiceRoleListResultPage type.
1107func NewCloudServiceRoleListResultPage(cur CloudServiceRoleListResult, getNextPage func(context.Context, CloudServiceRoleListResult) (CloudServiceRoleListResult, error)) CloudServiceRoleListResultPage {
1108	return CloudServiceRoleListResultPage{
1109		fn:    getNextPage,
1110		csrlr: cur,
1111	}
1112}
1113
1114// CloudServiceRoleProfile describes the role profile for the cloud service.
1115type CloudServiceRoleProfile struct {
1116	// Roles - List of roles for the cloud service.
1117	Roles *[]CloudServiceRoleProfileProperties `json:"roles,omitempty"`
1118}
1119
1120// CloudServiceRoleProfileProperties describes the role properties.
1121type CloudServiceRoleProfileProperties struct {
1122	// Name - Resource name.
1123	Name *string              `json:"name,omitempty"`
1124	Sku  *CloudServiceRoleSku `json:"sku,omitempty"`
1125}
1126
1127// CloudServiceRoleProperties ...
1128type CloudServiceRoleProperties struct {
1129	// UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a cloud service role.
1130	UniqueID *string `json:"uniqueId,omitempty"`
1131}
1132
1133// CloudServiceRoleSku describes the cloud service role sku.
1134type CloudServiceRoleSku struct {
1135	// Name - The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku.
1136	Name *string `json:"name,omitempty"`
1137	// Tier - Specifies the tier of the cloud service. Possible Values are <br /><br /> **Standard** <br /><br /> **Basic**
1138	Tier *string `json:"tier,omitempty"`
1139	// Capacity - Specifies the number of role instances in the cloud service.
1140	Capacity *int64 `json:"capacity,omitempty"`
1141}
1142
1143// CloudServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1144// long-running operation.
1145type CloudServicesCreateOrUpdateFuture struct {
1146	azure.FutureAPI
1147	// Result returns the result of the asynchronous operation.
1148	// If the operation has not completed it will return an error.
1149	Result func(CloudServicesClient) (CloudService, error)
1150}
1151
1152// CloudServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1153// operation.
1154type CloudServicesDeleteFuture struct {
1155	azure.FutureAPI
1156	// Result returns the result of the asynchronous operation.
1157	// If the operation has not completed it will return an error.
1158	Result func(CloudServicesClient) (autorest.Response, error)
1159}
1160
1161// CloudServicesDeleteInstancesFuture an abstraction for monitoring and retrieving the results of a
1162// long-running operation.
1163type CloudServicesDeleteInstancesFuture struct {
1164	azure.FutureAPI
1165	// Result returns the result of the asynchronous operation.
1166	// If the operation has not completed it will return an error.
1167	Result func(CloudServicesClient) (autorest.Response, error)
1168}
1169
1170// CloudServicesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
1171// operation.
1172type CloudServicesPowerOffFuture struct {
1173	azure.FutureAPI
1174	// Result returns the result of the asynchronous operation.
1175	// If the operation has not completed it will return an error.
1176	Result func(CloudServicesClient) (autorest.Response, error)
1177}
1178
1179// CloudServicesRebuildFuture an abstraction for monitoring and retrieving the results of a long-running
1180// operation.
1181type CloudServicesRebuildFuture struct {
1182	azure.FutureAPI
1183	// Result returns the result of the asynchronous operation.
1184	// If the operation has not completed it will return an error.
1185	Result func(CloudServicesClient) (autorest.Response, error)
1186}
1187
1188// CloudServicesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
1189// operation.
1190type CloudServicesReimageFuture struct {
1191	azure.FutureAPI
1192	// Result returns the result of the asynchronous operation.
1193	// If the operation has not completed it will return an error.
1194	Result func(CloudServicesClient) (autorest.Response, error)
1195}
1196
1197// CloudServicesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
1198// operation.
1199type CloudServicesRestartFuture struct {
1200	azure.FutureAPI
1201	// Result returns the result of the asynchronous operation.
1202	// If the operation has not completed it will return an error.
1203	Result func(CloudServicesClient) (autorest.Response, error)
1204}
1205
1206// CloudServicesStartFuture an abstraction for monitoring and retrieving the results of a long-running
1207// operation.
1208type CloudServicesStartFuture struct {
1209	azure.FutureAPI
1210	// Result returns the result of the asynchronous operation.
1211	// If the operation has not completed it will return an error.
1212	Result func(CloudServicesClient) (autorest.Response, error)
1213}
1214
1215// CloudServicesUpdateDomainWalkUpdateDomainFuture an abstraction for monitoring and retrieving the results
1216// of a long-running operation.
1217type CloudServicesUpdateDomainWalkUpdateDomainFuture struct {
1218	azure.FutureAPI
1219	// Result returns the result of the asynchronous operation.
1220	// If the operation has not completed it will return an error.
1221	Result func(CloudServicesUpdateDomainClient) (autorest.Response, error)
1222}
1223
1224// CloudServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1225// operation.
1226type CloudServicesUpdateFuture struct {
1227	azure.FutureAPI
1228	// Result returns the result of the asynchronous operation.
1229	// If the operation has not completed it will return an error.
1230	Result func(CloudServicesClient) (CloudService, error)
1231}
1232
1233// CloudServiceUpdate ...
1234type CloudServiceUpdate struct {
1235	// Tags - Resource tags
1236	Tags map[string]*string `json:"tags"`
1237}
1238
1239// MarshalJSON is the custom marshaler for CloudServiceUpdate.
1240func (csu CloudServiceUpdate) MarshalJSON() ([]byte, error) {
1241	objectMap := make(map[string]interface{})
1242	if csu.Tags != nil {
1243		objectMap["tags"] = csu.Tags
1244	}
1245	return json.Marshal(objectMap)
1246}
1247
1248// CloudServiceVaultAndSecretReference ...
1249type CloudServiceVaultAndSecretReference struct {
1250	SourceVault *SubResource `json:"sourceVault,omitempty"`
1251	SecretURL   *string      `json:"secretUrl,omitempty"`
1252}
1253
1254// CloudServiceVaultCertificate describes a single certificate reference in a Key Vault, and where the
1255// certificate should reside on the role instance.
1256type CloudServiceVaultCertificate struct {
1257	// CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret.
1258	CertificateURL *string `json:"certificateUrl,omitempty"`
1259}
1260
1261// CloudServiceVaultSecretGroup describes a set of certificates which are all in the same Key Vault.
1262type CloudServiceVaultSecretGroup struct {
1263	// SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
1264	SourceVault *SubResource `json:"sourceVault,omitempty"`
1265	// VaultCertificates - The list of key vault references in SourceVault which contain certificates.
1266	VaultCertificates *[]CloudServiceVaultCertificate `json:"vaultCertificates,omitempty"`
1267}
1268
1269// ContainerService container service.
1270type ContainerService struct {
1271	autorest.Response           `json:"-"`
1272	*ContainerServiceProperties `json:"properties,omitempty"`
1273	// ID - READ-ONLY; Resource Id
1274	ID *string `json:"id,omitempty"`
1275	// Name - READ-ONLY; Resource name
1276	Name *string `json:"name,omitempty"`
1277	// Type - READ-ONLY; Resource type
1278	Type *string `json:"type,omitempty"`
1279	// Location - Resource location
1280	Location *string `json:"location,omitempty"`
1281	// Tags - Resource tags
1282	Tags map[string]*string `json:"tags"`
1283}
1284
1285// MarshalJSON is the custom marshaler for ContainerService.
1286func (cs ContainerService) MarshalJSON() ([]byte, error) {
1287	objectMap := make(map[string]interface{})
1288	if cs.ContainerServiceProperties != nil {
1289		objectMap["properties"] = cs.ContainerServiceProperties
1290	}
1291	if cs.Location != nil {
1292		objectMap["location"] = cs.Location
1293	}
1294	if cs.Tags != nil {
1295		objectMap["tags"] = cs.Tags
1296	}
1297	return json.Marshal(objectMap)
1298}
1299
1300// UnmarshalJSON is the custom unmarshaler for ContainerService struct.
1301func (cs *ContainerService) UnmarshalJSON(body []byte) error {
1302	var m map[string]*json.RawMessage
1303	err := json.Unmarshal(body, &m)
1304	if err != nil {
1305		return err
1306	}
1307	for k, v := range m {
1308		switch k {
1309		case "properties":
1310			if v != nil {
1311				var containerServiceProperties ContainerServiceProperties
1312				err = json.Unmarshal(*v, &containerServiceProperties)
1313				if err != nil {
1314					return err
1315				}
1316				cs.ContainerServiceProperties = &containerServiceProperties
1317			}
1318		case "id":
1319			if v != nil {
1320				var ID string
1321				err = json.Unmarshal(*v, &ID)
1322				if err != nil {
1323					return err
1324				}
1325				cs.ID = &ID
1326			}
1327		case "name":
1328			if v != nil {
1329				var name string
1330				err = json.Unmarshal(*v, &name)
1331				if err != nil {
1332					return err
1333				}
1334				cs.Name = &name
1335			}
1336		case "type":
1337			if v != nil {
1338				var typeVar string
1339				err = json.Unmarshal(*v, &typeVar)
1340				if err != nil {
1341					return err
1342				}
1343				cs.Type = &typeVar
1344			}
1345		case "location":
1346			if v != nil {
1347				var location string
1348				err = json.Unmarshal(*v, &location)
1349				if err != nil {
1350					return err
1351				}
1352				cs.Location = &location
1353			}
1354		case "tags":
1355			if v != nil {
1356				var tags map[string]*string
1357				err = json.Unmarshal(*v, &tags)
1358				if err != nil {
1359					return err
1360				}
1361				cs.Tags = tags
1362			}
1363		}
1364	}
1365
1366	return nil
1367}
1368
1369// ContainerServiceAgentPoolProfile profile for the container service agent pool.
1370type ContainerServiceAgentPoolProfile struct {
1371	// Name - Unique name of the agent pool profile in the context of the subscription and resource group.
1372	Name *string `json:"name,omitempty"`
1373	// Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
1374	Count *int32 `json:"count,omitempty"`
1375	// VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA2', 'StandardA3', 'StandardA4', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA9', 'StandardA10', 'StandardA11', 'StandardD1', 'StandardD2', 'StandardD3', 'StandardD4', 'StandardD11', 'StandardD12', 'StandardD13', 'StandardD14', 'StandardD1V2', 'StandardD2V2', 'StandardD3V2', 'StandardD4V2', 'StandardD5V2', 'StandardD11V2', 'StandardD12V2', 'StandardD13V2', 'StandardD14V2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardDS1', 'StandardDS2', 'StandardDS3', 'StandardDS4', 'StandardDS11', 'StandardDS12', 'StandardDS13', 'StandardDS14', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5'
1376	VMSize ContainerServiceVMSizeTypes `json:"vmSize,omitempty"`
1377	// DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool.
1378	DNSPrefix *string `json:"dnsPrefix,omitempty"`
1379	// Fqdn - READ-ONLY; FQDN for the agent pool.
1380	Fqdn *string `json:"fqdn,omitempty"`
1381}
1382
1383// MarshalJSON is the custom marshaler for ContainerServiceAgentPoolProfile.
1384func (csapp ContainerServiceAgentPoolProfile) MarshalJSON() ([]byte, error) {
1385	objectMap := make(map[string]interface{})
1386	if csapp.Name != nil {
1387		objectMap["name"] = csapp.Name
1388	}
1389	if csapp.Count != nil {
1390		objectMap["count"] = csapp.Count
1391	}
1392	if csapp.VMSize != "" {
1393		objectMap["vmSize"] = csapp.VMSize
1394	}
1395	if csapp.DNSPrefix != nil {
1396		objectMap["dnsPrefix"] = csapp.DNSPrefix
1397	}
1398	return json.Marshal(objectMap)
1399}
1400
1401// ContainerServiceCustomProfile properties to configure a custom container service cluster.
1402type ContainerServiceCustomProfile struct {
1403	// Orchestrator - The name of the custom orchestrator to use.
1404	Orchestrator *string `json:"orchestrator,omitempty"`
1405}
1406
1407// ContainerServiceDiagnosticsProfile ...
1408type ContainerServiceDiagnosticsProfile struct {
1409	// VMDiagnostics - Profile for the container service VM diagnostic agent.
1410	VMDiagnostics *ContainerServiceVMDiagnostics `json:"vmDiagnostics,omitempty"`
1411}
1412
1413// ContainerServiceLinuxProfile profile for Linux VMs in the container service cluster.
1414type ContainerServiceLinuxProfile struct {
1415	// AdminUsername - The administrator username to use for Linux VMs.
1416	AdminUsername *string `json:"adminUsername,omitempty"`
1417	// SSH - The ssh key configuration for Linux VMs.
1418	SSH *ContainerServiceSSHConfiguration `json:"ssh,omitempty"`
1419}
1420
1421// ContainerServiceListResult the response from the List Container Services operation.
1422type ContainerServiceListResult struct {
1423	autorest.Response `json:"-"`
1424	// Value - the list of container services.
1425	Value *[]ContainerService `json:"value,omitempty"`
1426	// NextLink - The URL to get the next set of container service results.
1427	NextLink *string `json:"nextLink,omitempty"`
1428}
1429
1430// ContainerServiceListResultIterator provides access to a complete listing of ContainerService values.
1431type ContainerServiceListResultIterator struct {
1432	i    int
1433	page ContainerServiceListResultPage
1434}
1435
1436// NextWithContext advances to the next value.  If there was an error making
1437// the request the iterator does not advance and the error is returned.
1438func (iter *ContainerServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
1439	if tracing.IsEnabled() {
1440		ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultIterator.NextWithContext")
1441		defer func() {
1442			sc := -1
1443			if iter.Response().Response.Response != nil {
1444				sc = iter.Response().Response.Response.StatusCode
1445			}
1446			tracing.EndSpan(ctx, sc, err)
1447		}()
1448	}
1449	iter.i++
1450	if iter.i < len(iter.page.Values()) {
1451		return nil
1452	}
1453	err = iter.page.NextWithContext(ctx)
1454	if err != nil {
1455		iter.i--
1456		return err
1457	}
1458	iter.i = 0
1459	return nil
1460}
1461
1462// Next advances to the next value.  If there was an error making
1463// the request the iterator does not advance and the error is returned.
1464// Deprecated: Use NextWithContext() instead.
1465func (iter *ContainerServiceListResultIterator) Next() error {
1466	return iter.NextWithContext(context.Background())
1467}
1468
1469// NotDone returns true if the enumeration should be started or is not yet complete.
1470func (iter ContainerServiceListResultIterator) NotDone() bool {
1471	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1472}
1473
1474// Response returns the raw server response from the last page request.
1475func (iter ContainerServiceListResultIterator) Response() ContainerServiceListResult {
1476	return iter.page.Response()
1477}
1478
1479// Value returns the current value or a zero-initialized value if the
1480// iterator has advanced beyond the end of the collection.
1481func (iter ContainerServiceListResultIterator) Value() ContainerService {
1482	if !iter.page.NotDone() {
1483		return ContainerService{}
1484	}
1485	return iter.page.Values()[iter.i]
1486}
1487
1488// Creates a new instance of the ContainerServiceListResultIterator type.
1489func NewContainerServiceListResultIterator(page ContainerServiceListResultPage) ContainerServiceListResultIterator {
1490	return ContainerServiceListResultIterator{page: page}
1491}
1492
1493// IsEmpty returns true if the ListResult contains no values.
1494func (cslr ContainerServiceListResult) IsEmpty() bool {
1495	return cslr.Value == nil || len(*cslr.Value) == 0
1496}
1497
1498// hasNextLink returns true if the NextLink is not empty.
1499func (cslr ContainerServiceListResult) hasNextLink() bool {
1500	return cslr.NextLink != nil && len(*cslr.NextLink) != 0
1501}
1502
1503// containerServiceListResultPreparer prepares a request to retrieve the next set of results.
1504// It returns nil if no more results exist.
1505func (cslr ContainerServiceListResult) containerServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
1506	if !cslr.hasNextLink() {
1507		return nil, nil
1508	}
1509	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1510		autorest.AsJSON(),
1511		autorest.AsGet(),
1512		autorest.WithBaseURL(to.String(cslr.NextLink)))
1513}
1514
1515// ContainerServiceListResultPage contains a page of ContainerService values.
1516type ContainerServiceListResultPage struct {
1517	fn   func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)
1518	cslr ContainerServiceListResult
1519}
1520
1521// NextWithContext advances to the next page of values.  If there was an error making
1522// the request the page does not advance and the error is returned.
1523func (page *ContainerServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
1524	if tracing.IsEnabled() {
1525		ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultPage.NextWithContext")
1526		defer func() {
1527			sc := -1
1528			if page.Response().Response.Response != nil {
1529				sc = page.Response().Response.Response.StatusCode
1530			}
1531			tracing.EndSpan(ctx, sc, err)
1532		}()
1533	}
1534	for {
1535		next, err := page.fn(ctx, page.cslr)
1536		if err != nil {
1537			return err
1538		}
1539		page.cslr = next
1540		if !next.hasNextLink() || !next.IsEmpty() {
1541			break
1542		}
1543	}
1544	return nil
1545}
1546
1547// Next advances to the next page of values.  If there was an error making
1548// the request the page does not advance and the error is returned.
1549// Deprecated: Use NextWithContext() instead.
1550func (page *ContainerServiceListResultPage) Next() error {
1551	return page.NextWithContext(context.Background())
1552}
1553
1554// NotDone returns true if the page enumeration should be started or is not yet complete.
1555func (page ContainerServiceListResultPage) NotDone() bool {
1556	return !page.cslr.IsEmpty()
1557}
1558
1559// Response returns the raw server response from the last page request.
1560func (page ContainerServiceListResultPage) Response() ContainerServiceListResult {
1561	return page.cslr
1562}
1563
1564// Values returns the slice of values for the current page or nil if there are no values.
1565func (page ContainerServiceListResultPage) Values() []ContainerService {
1566	if page.cslr.IsEmpty() {
1567		return nil
1568	}
1569	return *page.cslr.Value
1570}
1571
1572// Creates a new instance of the ContainerServiceListResultPage type.
1573func NewContainerServiceListResultPage(cur ContainerServiceListResult, getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage {
1574	return ContainerServiceListResultPage{
1575		fn:   getNextPage,
1576		cslr: cur,
1577	}
1578}
1579
1580// ContainerServiceMasterProfile profile for the container service master.
1581type ContainerServiceMasterProfile struct {
1582	// Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.
1583	Count *int32 `json:"count,omitempty"`
1584	// DNSPrefix - DNS prefix to be used to create the FQDN for master.
1585	DNSPrefix *string `json:"dnsPrefix,omitempty"`
1586	// Fqdn - READ-ONLY; FQDN for the master.
1587	Fqdn *string `json:"fqdn,omitempty"`
1588}
1589
1590// MarshalJSON is the custom marshaler for ContainerServiceMasterProfile.
1591func (csmp ContainerServiceMasterProfile) MarshalJSON() ([]byte, error) {
1592	objectMap := make(map[string]interface{})
1593	if csmp.Count != nil {
1594		objectMap["count"] = csmp.Count
1595	}
1596	if csmp.DNSPrefix != nil {
1597		objectMap["dnsPrefix"] = csmp.DNSPrefix
1598	}
1599	return json.Marshal(objectMap)
1600}
1601
1602// ContainerServiceOrchestratorProfile profile for the container service orchestrator.
1603type ContainerServiceOrchestratorProfile struct {
1604	// OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Swarm, DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', 'Kubernetes'
1605	OrchestratorType ContainerServiceOrchestratorTypes `json:"orchestratorType,omitempty"`
1606}
1607
1608// ContainerServiceProperties properties of the container service.
1609type ContainerServiceProperties struct {
1610	// ProvisioningState - READ-ONLY; the current deployment or provisioning state, which only appears in the response.
1611	ProvisioningState *string `json:"provisioningState,omitempty"`
1612	// OrchestratorProfile - Properties of the orchestrator.
1613	OrchestratorProfile *ContainerServiceOrchestratorProfile `json:"orchestratorProfile,omitempty"`
1614	// CustomProfile - Properties for custom clusters.
1615	CustomProfile *ContainerServiceCustomProfile `json:"customProfile,omitempty"`
1616	// ServicePrincipalProfile - Properties for cluster service principals.
1617	ServicePrincipalProfile *ContainerServiceServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
1618	// MasterProfile - Properties of master agents.
1619	MasterProfile *ContainerServiceMasterProfile `json:"masterProfile,omitempty"`
1620	// AgentPoolProfiles - Properties of the agent pool.
1621	AgentPoolProfiles *[]ContainerServiceAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
1622	// WindowsProfile - Properties of Windows VMs.
1623	WindowsProfile *ContainerServiceWindowsProfile `json:"windowsProfile,omitempty"`
1624	// LinuxProfile - Properties of Linux VMs.
1625	LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"`
1626	// DiagnosticsProfile - Properties of the diagnostic agent.
1627	DiagnosticsProfile *ContainerServiceDiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
1628}
1629
1630// MarshalJSON is the custom marshaler for ContainerServiceProperties.
1631func (csp ContainerServiceProperties) MarshalJSON() ([]byte, error) {
1632	objectMap := make(map[string]interface{})
1633	if csp.OrchestratorProfile != nil {
1634		objectMap["orchestratorProfile"] = csp.OrchestratorProfile
1635	}
1636	if csp.CustomProfile != nil {
1637		objectMap["customProfile"] = csp.CustomProfile
1638	}
1639	if csp.ServicePrincipalProfile != nil {
1640		objectMap["servicePrincipalProfile"] = csp.ServicePrincipalProfile
1641	}
1642	if csp.MasterProfile != nil {
1643		objectMap["masterProfile"] = csp.MasterProfile
1644	}
1645	if csp.AgentPoolProfiles != nil {
1646		objectMap["agentPoolProfiles"] = csp.AgentPoolProfiles
1647	}
1648	if csp.WindowsProfile != nil {
1649		objectMap["windowsProfile"] = csp.WindowsProfile
1650	}
1651	if csp.LinuxProfile != nil {
1652		objectMap["linuxProfile"] = csp.LinuxProfile
1653	}
1654	if csp.DiagnosticsProfile != nil {
1655		objectMap["diagnosticsProfile"] = csp.DiagnosticsProfile
1656	}
1657	return json.Marshal(objectMap)
1658}
1659
1660// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1661// long-running operation.
1662type ContainerServicesCreateOrUpdateFuture struct {
1663	azure.FutureAPI
1664	// Result returns the result of the asynchronous operation.
1665	// If the operation has not completed it will return an error.
1666	Result func(ContainerServicesClient) (ContainerService, error)
1667}
1668
1669// ContainerServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1670// operation.
1671type ContainerServicesDeleteFuture struct {
1672	azure.FutureAPI
1673	// Result returns the result of the asynchronous operation.
1674	// If the operation has not completed it will return an error.
1675	Result func(ContainerServicesClient) (autorest.Response, error)
1676}
1677
1678// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster
1679// to use for manipulating Azure APIs.
1680type ContainerServiceServicePrincipalProfile struct {
1681	// ClientID - The ID for the service principal.
1682	ClientID *string `json:"clientId,omitempty"`
1683	// Secret - The secret password associated with the service principal.
1684	Secret *string `json:"secret,omitempty"`
1685}
1686
1687// ContainerServiceSSHConfiguration SSH configuration for Linux-based VMs running on Azure.
1688type ContainerServiceSSHConfiguration struct {
1689	// PublicKeys - the list of SSH public keys used to authenticate with Linux-based VMs.
1690	PublicKeys *[]ContainerServiceSSHPublicKey `json:"publicKeys,omitempty"`
1691}
1692
1693// ContainerServiceSSHPublicKey contains information about SSH certificate public key data.
1694type ContainerServiceSSHPublicKey struct {
1695	// KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers.
1696	KeyData *string `json:"keyData,omitempty"`
1697}
1698
1699// ContainerServiceVMDiagnostics profile for diagnostics on the container service VMs.
1700type ContainerServiceVMDiagnostics struct {
1701	// Enabled - Whether the VM diagnostic agent is provisioned on the VM.
1702	Enabled *bool `json:"enabled,omitempty"`
1703	// StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored.
1704	StorageURI *string `json:"storageUri,omitempty"`
1705}
1706
1707// MarshalJSON is the custom marshaler for ContainerServiceVMDiagnostics.
1708func (csvd ContainerServiceVMDiagnostics) MarshalJSON() ([]byte, error) {
1709	objectMap := make(map[string]interface{})
1710	if csvd.Enabled != nil {
1711		objectMap["enabled"] = csvd.Enabled
1712	}
1713	return json.Marshal(objectMap)
1714}
1715
1716// ContainerServiceWindowsProfile profile for Windows VMs in the container service cluster.
1717type ContainerServiceWindowsProfile struct {
1718	// AdminUsername - The administrator username to use for Windows VMs.
1719	AdminUsername *string `json:"adminUsername,omitempty"`
1720	// AdminPassword - The administrator password to use for Windows VMs.
1721	AdminPassword *string `json:"adminPassword,omitempty"`
1722}
1723
1724// CreationData data used when creating a disk.
1725type CreationData struct {
1726	// CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload'
1727	CreateOption DiskCreateOption `json:"createOption,omitempty"`
1728	// StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
1729	StorageAccountID *string `json:"storageAccountId,omitempty"`
1730	// ImageReference - Disk source information.
1731	ImageReference *ImageDiskReference `json:"imageReference,omitempty"`
1732	// GalleryImageReference - Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
1733	GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"`
1734	// SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk.
1735	SourceURI *string `json:"sourceUri,omitempty"`
1736	// SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk.
1737	SourceResourceID *string `json:"sourceResourceId,omitempty"`
1738	// SourceUniqueID - READ-ONLY; If this field is set, this is the unique id identifying the source of this resource.
1739	SourceUniqueID *string `json:"sourceUniqueId,omitempty"`
1740	// UploadSizeBytes - If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
1741	UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"`
1742	// LogicalSectorSize - Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
1743	LogicalSectorSize *int32 `json:"logicalSectorSize,omitempty"`
1744}
1745
1746// MarshalJSON is the custom marshaler for CreationData.
1747func (cd CreationData) MarshalJSON() ([]byte, error) {
1748	objectMap := make(map[string]interface{})
1749	if cd.CreateOption != "" {
1750		objectMap["createOption"] = cd.CreateOption
1751	}
1752	if cd.StorageAccountID != nil {
1753		objectMap["storageAccountId"] = cd.StorageAccountID
1754	}
1755	if cd.ImageReference != nil {
1756		objectMap["imageReference"] = cd.ImageReference
1757	}
1758	if cd.GalleryImageReference != nil {
1759		objectMap["galleryImageReference"] = cd.GalleryImageReference
1760	}
1761	if cd.SourceURI != nil {
1762		objectMap["sourceUri"] = cd.SourceURI
1763	}
1764	if cd.SourceResourceID != nil {
1765		objectMap["sourceResourceId"] = cd.SourceResourceID
1766	}
1767	if cd.UploadSizeBytes != nil {
1768		objectMap["uploadSizeBytes"] = cd.UploadSizeBytes
1769	}
1770	if cd.LogicalSectorSize != nil {
1771		objectMap["logicalSectorSize"] = cd.LogicalSectorSize
1772	}
1773	return json.Marshal(objectMap)
1774}
1775
1776// DataDisk describes a data disk.
1777type DataDisk struct {
1778	// 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.
1779	Lun *int32 `json:"lun,omitempty"`
1780	// Name - The disk name.
1781	Name *string `json:"name,omitempty"`
1782	// Vhd - The virtual hard disk.
1783	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
1784	// 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.
1785	Image *VirtualHardDisk `json:"image,omitempty"`
1786	// 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'
1787	Caching CachingTypes `json:"caching,omitempty"`
1788	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
1789	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
1790	// 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'
1791	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
1792	// 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
1793	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
1794	// ManagedDisk - The managed disk parameters.
1795	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
1796	// ToBeDetached - Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
1797	ToBeDetached *bool `json:"toBeDetached,omitempty"`
1798	// DiskIOPSReadWrite - READ-ONLY; Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
1799	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
1800	// DiskMBpsReadWrite - READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
1801	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
1802}
1803
1804// MarshalJSON is the custom marshaler for DataDisk.
1805func (dd DataDisk) MarshalJSON() ([]byte, error) {
1806	objectMap := make(map[string]interface{})
1807	if dd.Lun != nil {
1808		objectMap["lun"] = dd.Lun
1809	}
1810	if dd.Name != nil {
1811		objectMap["name"] = dd.Name
1812	}
1813	if dd.Vhd != nil {
1814		objectMap["vhd"] = dd.Vhd
1815	}
1816	if dd.Image != nil {
1817		objectMap["image"] = dd.Image
1818	}
1819	if dd.Caching != "" {
1820		objectMap["caching"] = dd.Caching
1821	}
1822	if dd.WriteAcceleratorEnabled != nil {
1823		objectMap["writeAcceleratorEnabled"] = dd.WriteAcceleratorEnabled
1824	}
1825	if dd.CreateOption != "" {
1826		objectMap["createOption"] = dd.CreateOption
1827	}
1828	if dd.DiskSizeGB != nil {
1829		objectMap["diskSizeGB"] = dd.DiskSizeGB
1830	}
1831	if dd.ManagedDisk != nil {
1832		objectMap["managedDisk"] = dd.ManagedDisk
1833	}
1834	if dd.ToBeDetached != nil {
1835		objectMap["toBeDetached"] = dd.ToBeDetached
1836	}
1837	return json.Marshal(objectMap)
1838}
1839
1840// DataDiskImage contains the data disk images information.
1841type DataDiskImage struct {
1842	// 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.
1843	Lun *int32 `json:"lun,omitempty"`
1844}
1845
1846// DataDiskImageEncryption contains encryption settings for a data disk image.
1847type DataDiskImageEncryption struct {
1848	// Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
1849	Lun *int32 `json:"lun,omitempty"`
1850	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
1851	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
1852}
1853
1854// DedicatedHost specifies information about the Dedicated host.
1855type DedicatedHost struct {
1856	autorest.Response        `json:"-"`
1857	*DedicatedHostProperties `json:"properties,omitempty"`
1858	// Sku - SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values.
1859	Sku *Sku `json:"sku,omitempty"`
1860	// ID - READ-ONLY; Resource Id
1861	ID *string `json:"id,omitempty"`
1862	// Name - READ-ONLY; Resource name
1863	Name *string `json:"name,omitempty"`
1864	// Type - READ-ONLY; Resource type
1865	Type *string `json:"type,omitempty"`
1866	// Location - Resource location
1867	Location *string `json:"location,omitempty"`
1868	// Tags - Resource tags
1869	Tags map[string]*string `json:"tags"`
1870}
1871
1872// MarshalJSON is the custom marshaler for DedicatedHost.
1873func (dh DedicatedHost) MarshalJSON() ([]byte, error) {
1874	objectMap := make(map[string]interface{})
1875	if dh.DedicatedHostProperties != nil {
1876		objectMap["properties"] = dh.DedicatedHostProperties
1877	}
1878	if dh.Sku != nil {
1879		objectMap["sku"] = dh.Sku
1880	}
1881	if dh.Location != nil {
1882		objectMap["location"] = dh.Location
1883	}
1884	if dh.Tags != nil {
1885		objectMap["tags"] = dh.Tags
1886	}
1887	return json.Marshal(objectMap)
1888}
1889
1890// UnmarshalJSON is the custom unmarshaler for DedicatedHost struct.
1891func (dh *DedicatedHost) UnmarshalJSON(body []byte) error {
1892	var m map[string]*json.RawMessage
1893	err := json.Unmarshal(body, &m)
1894	if err != nil {
1895		return err
1896	}
1897	for k, v := range m {
1898		switch k {
1899		case "properties":
1900			if v != nil {
1901				var dedicatedHostProperties DedicatedHostProperties
1902				err = json.Unmarshal(*v, &dedicatedHostProperties)
1903				if err != nil {
1904					return err
1905				}
1906				dh.DedicatedHostProperties = &dedicatedHostProperties
1907			}
1908		case "sku":
1909			if v != nil {
1910				var sku Sku
1911				err = json.Unmarshal(*v, &sku)
1912				if err != nil {
1913					return err
1914				}
1915				dh.Sku = &sku
1916			}
1917		case "id":
1918			if v != nil {
1919				var ID string
1920				err = json.Unmarshal(*v, &ID)
1921				if err != nil {
1922					return err
1923				}
1924				dh.ID = &ID
1925			}
1926		case "name":
1927			if v != nil {
1928				var name string
1929				err = json.Unmarshal(*v, &name)
1930				if err != nil {
1931					return err
1932				}
1933				dh.Name = &name
1934			}
1935		case "type":
1936			if v != nil {
1937				var typeVar string
1938				err = json.Unmarshal(*v, &typeVar)
1939				if err != nil {
1940					return err
1941				}
1942				dh.Type = &typeVar
1943			}
1944		case "location":
1945			if v != nil {
1946				var location string
1947				err = json.Unmarshal(*v, &location)
1948				if err != nil {
1949					return err
1950				}
1951				dh.Location = &location
1952			}
1953		case "tags":
1954			if v != nil {
1955				var tags map[string]*string
1956				err = json.Unmarshal(*v, &tags)
1957				if err != nil {
1958					return err
1959				}
1960				dh.Tags = tags
1961			}
1962		}
1963	}
1964
1965	return nil
1966}
1967
1968// DedicatedHostAllocatableVM represents the dedicated host unutilized capacity in terms of a specific VM
1969// size.
1970type DedicatedHostAllocatableVM struct {
1971	// VMSize - VM size in terms of which the unutilized capacity is represented.
1972	VMSize *string `json:"vmSize,omitempty"`
1973	// Count - Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.
1974	Count *float64 `json:"count,omitempty"`
1975}
1976
1977// DedicatedHostAvailableCapacity dedicated host unutilized capacity.
1978type DedicatedHostAvailableCapacity struct {
1979	// AllocatableVMs - The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host.
1980	AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"`
1981}
1982
1983// DedicatedHostGroup specifies information about the dedicated host group that the dedicated hosts should
1984// be assigned to. <br><br> Currently, a dedicated host can only be added to a dedicated host group at
1985// creation time. An existing dedicated host cannot be added to another dedicated host group.
1986type DedicatedHostGroup struct {
1987	autorest.Response             `json:"-"`
1988	*DedicatedHostGroupProperties `json:"properties,omitempty"`
1989	// Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.
1990	Zones *[]string `json:"zones,omitempty"`
1991	// ID - READ-ONLY; Resource Id
1992	ID *string `json:"id,omitempty"`
1993	// Name - READ-ONLY; Resource name
1994	Name *string `json:"name,omitempty"`
1995	// Type - READ-ONLY; Resource type
1996	Type *string `json:"type,omitempty"`
1997	// Location - Resource location
1998	Location *string `json:"location,omitempty"`
1999	// Tags - Resource tags
2000	Tags map[string]*string `json:"tags"`
2001}
2002
2003// MarshalJSON is the custom marshaler for DedicatedHostGroup.
2004func (dhg DedicatedHostGroup) MarshalJSON() ([]byte, error) {
2005	objectMap := make(map[string]interface{})
2006	if dhg.DedicatedHostGroupProperties != nil {
2007		objectMap["properties"] = dhg.DedicatedHostGroupProperties
2008	}
2009	if dhg.Zones != nil {
2010		objectMap["zones"] = dhg.Zones
2011	}
2012	if dhg.Location != nil {
2013		objectMap["location"] = dhg.Location
2014	}
2015	if dhg.Tags != nil {
2016		objectMap["tags"] = dhg.Tags
2017	}
2018	return json.Marshal(objectMap)
2019}
2020
2021// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroup struct.
2022func (dhg *DedicatedHostGroup) UnmarshalJSON(body []byte) error {
2023	var m map[string]*json.RawMessage
2024	err := json.Unmarshal(body, &m)
2025	if err != nil {
2026		return err
2027	}
2028	for k, v := range m {
2029		switch k {
2030		case "properties":
2031			if v != nil {
2032				var dedicatedHostGroupProperties DedicatedHostGroupProperties
2033				err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
2034				if err != nil {
2035					return err
2036				}
2037				dhg.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
2038			}
2039		case "zones":
2040			if v != nil {
2041				var zones []string
2042				err = json.Unmarshal(*v, &zones)
2043				if err != nil {
2044					return err
2045				}
2046				dhg.Zones = &zones
2047			}
2048		case "id":
2049			if v != nil {
2050				var ID string
2051				err = json.Unmarshal(*v, &ID)
2052				if err != nil {
2053					return err
2054				}
2055				dhg.ID = &ID
2056			}
2057		case "name":
2058			if v != nil {
2059				var name string
2060				err = json.Unmarshal(*v, &name)
2061				if err != nil {
2062					return err
2063				}
2064				dhg.Name = &name
2065			}
2066		case "type":
2067			if v != nil {
2068				var typeVar string
2069				err = json.Unmarshal(*v, &typeVar)
2070				if err != nil {
2071					return err
2072				}
2073				dhg.Type = &typeVar
2074			}
2075		case "location":
2076			if v != nil {
2077				var location string
2078				err = json.Unmarshal(*v, &location)
2079				if err != nil {
2080					return err
2081				}
2082				dhg.Location = &location
2083			}
2084		case "tags":
2085			if v != nil {
2086				var tags map[string]*string
2087				err = json.Unmarshal(*v, &tags)
2088				if err != nil {
2089					return err
2090				}
2091				dhg.Tags = tags
2092			}
2093		}
2094	}
2095
2096	return nil
2097}
2098
2099// DedicatedHostGroupInstanceView ...
2100type DedicatedHostGroupInstanceView struct {
2101	// Hosts - List of instance view of the dedicated hosts under the dedicated host group.
2102	Hosts *[]DedicatedHostInstanceViewWithName `json:"hosts,omitempty"`
2103}
2104
2105// DedicatedHostGroupListResult the List Dedicated Host Group with resource group response.
2106type DedicatedHostGroupListResult struct {
2107	autorest.Response `json:"-"`
2108	// Value - The list of dedicated host groups
2109	Value *[]DedicatedHostGroup `json:"value,omitempty"`
2110	// NextLink - The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated Host Groups.
2111	NextLink *string `json:"nextLink,omitempty"`
2112}
2113
2114// DedicatedHostGroupListResultIterator provides access to a complete listing of DedicatedHostGroup values.
2115type DedicatedHostGroupListResultIterator struct {
2116	i    int
2117	page DedicatedHostGroupListResultPage
2118}
2119
2120// NextWithContext advances to the next value.  If there was an error making
2121// the request the iterator does not advance and the error is returned.
2122func (iter *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
2123	if tracing.IsEnabled() {
2124		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultIterator.NextWithContext")
2125		defer func() {
2126			sc := -1
2127			if iter.Response().Response.Response != nil {
2128				sc = iter.Response().Response.Response.StatusCode
2129			}
2130			tracing.EndSpan(ctx, sc, err)
2131		}()
2132	}
2133	iter.i++
2134	if iter.i < len(iter.page.Values()) {
2135		return nil
2136	}
2137	err = iter.page.NextWithContext(ctx)
2138	if err != nil {
2139		iter.i--
2140		return err
2141	}
2142	iter.i = 0
2143	return nil
2144}
2145
2146// Next advances to the next value.  If there was an error making
2147// the request the iterator does not advance and the error is returned.
2148// Deprecated: Use NextWithContext() instead.
2149func (iter *DedicatedHostGroupListResultIterator) Next() error {
2150	return iter.NextWithContext(context.Background())
2151}
2152
2153// NotDone returns true if the enumeration should be started or is not yet complete.
2154func (iter DedicatedHostGroupListResultIterator) NotDone() bool {
2155	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2156}
2157
2158// Response returns the raw server response from the last page request.
2159func (iter DedicatedHostGroupListResultIterator) Response() DedicatedHostGroupListResult {
2160	return iter.page.Response()
2161}
2162
2163// Value returns the current value or a zero-initialized value if the
2164// iterator has advanced beyond the end of the collection.
2165func (iter DedicatedHostGroupListResultIterator) Value() DedicatedHostGroup {
2166	if !iter.page.NotDone() {
2167		return DedicatedHostGroup{}
2168	}
2169	return iter.page.Values()[iter.i]
2170}
2171
2172// Creates a new instance of the DedicatedHostGroupListResultIterator type.
2173func NewDedicatedHostGroupListResultIterator(page DedicatedHostGroupListResultPage) DedicatedHostGroupListResultIterator {
2174	return DedicatedHostGroupListResultIterator{page: page}
2175}
2176
2177// IsEmpty returns true if the ListResult contains no values.
2178func (dhglr DedicatedHostGroupListResult) IsEmpty() bool {
2179	return dhglr.Value == nil || len(*dhglr.Value) == 0
2180}
2181
2182// hasNextLink returns true if the NextLink is not empty.
2183func (dhglr DedicatedHostGroupListResult) hasNextLink() bool {
2184	return dhglr.NextLink != nil && len(*dhglr.NextLink) != 0
2185}
2186
2187// dedicatedHostGroupListResultPreparer prepares a request to retrieve the next set of results.
2188// It returns nil if no more results exist.
2189func (dhglr DedicatedHostGroupListResult) dedicatedHostGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
2190	if !dhglr.hasNextLink() {
2191		return nil, nil
2192	}
2193	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2194		autorest.AsJSON(),
2195		autorest.AsGet(),
2196		autorest.WithBaseURL(to.String(dhglr.NextLink)))
2197}
2198
2199// DedicatedHostGroupListResultPage contains a page of DedicatedHostGroup values.
2200type DedicatedHostGroupListResultPage struct {
2201	fn    func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)
2202	dhglr DedicatedHostGroupListResult
2203}
2204
2205// NextWithContext advances to the next page of values.  If there was an error making
2206// the request the page does not advance and the error is returned.
2207func (page *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
2208	if tracing.IsEnabled() {
2209		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultPage.NextWithContext")
2210		defer func() {
2211			sc := -1
2212			if page.Response().Response.Response != nil {
2213				sc = page.Response().Response.Response.StatusCode
2214			}
2215			tracing.EndSpan(ctx, sc, err)
2216		}()
2217	}
2218	for {
2219		next, err := page.fn(ctx, page.dhglr)
2220		if err != nil {
2221			return err
2222		}
2223		page.dhglr = next
2224		if !next.hasNextLink() || !next.IsEmpty() {
2225			break
2226		}
2227	}
2228	return nil
2229}
2230
2231// Next advances to the next page of values.  If there was an error making
2232// the request the page does not advance and the error is returned.
2233// Deprecated: Use NextWithContext() instead.
2234func (page *DedicatedHostGroupListResultPage) Next() error {
2235	return page.NextWithContext(context.Background())
2236}
2237
2238// NotDone returns true if the page enumeration should be started or is not yet complete.
2239func (page DedicatedHostGroupListResultPage) NotDone() bool {
2240	return !page.dhglr.IsEmpty()
2241}
2242
2243// Response returns the raw server response from the last page request.
2244func (page DedicatedHostGroupListResultPage) Response() DedicatedHostGroupListResult {
2245	return page.dhglr
2246}
2247
2248// Values returns the slice of values for the current page or nil if there are no values.
2249func (page DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup {
2250	if page.dhglr.IsEmpty() {
2251		return nil
2252	}
2253	return *page.dhglr.Value
2254}
2255
2256// Creates a new instance of the DedicatedHostGroupListResultPage type.
2257func NewDedicatedHostGroupListResultPage(cur DedicatedHostGroupListResult, getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage {
2258	return DedicatedHostGroupListResultPage{
2259		fn:    getNextPage,
2260		dhglr: cur,
2261	}
2262}
2263
2264// DedicatedHostGroupProperties dedicated Host Group Properties.
2265type DedicatedHostGroupProperties struct {
2266	// PlatformFaultDomainCount - Number of fault domains that the host group can span.
2267	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
2268	// Hosts - READ-ONLY; A list of references to all dedicated hosts in the dedicated host group.
2269	Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"`
2270	// InstanceView - READ-ONLY; The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group.
2271	InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty"`
2272	// SupportAutomaticPlacement - Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. <br><br>Minimum api-version: 2020-06-01.
2273	SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"`
2274}
2275
2276// MarshalJSON is the custom marshaler for DedicatedHostGroupProperties.
2277func (dhgp DedicatedHostGroupProperties) MarshalJSON() ([]byte, error) {
2278	objectMap := make(map[string]interface{})
2279	if dhgp.PlatformFaultDomainCount != nil {
2280		objectMap["platformFaultDomainCount"] = dhgp.PlatformFaultDomainCount
2281	}
2282	if dhgp.SupportAutomaticPlacement != nil {
2283		objectMap["supportAutomaticPlacement"] = dhgp.SupportAutomaticPlacement
2284	}
2285	return json.Marshal(objectMap)
2286}
2287
2288// DedicatedHostGroupUpdate specifies information about the dedicated host group that the dedicated host
2289// should be assigned to. Only tags may be updated.
2290type DedicatedHostGroupUpdate struct {
2291	*DedicatedHostGroupProperties `json:"properties,omitempty"`
2292	// Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.
2293	Zones *[]string `json:"zones,omitempty"`
2294	// Tags - Resource tags
2295	Tags map[string]*string `json:"tags"`
2296}
2297
2298// MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate.
2299func (dhgu DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) {
2300	objectMap := make(map[string]interface{})
2301	if dhgu.DedicatedHostGroupProperties != nil {
2302		objectMap["properties"] = dhgu.DedicatedHostGroupProperties
2303	}
2304	if dhgu.Zones != nil {
2305		objectMap["zones"] = dhgu.Zones
2306	}
2307	if dhgu.Tags != nil {
2308		objectMap["tags"] = dhgu.Tags
2309	}
2310	return json.Marshal(objectMap)
2311}
2312
2313// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroupUpdate struct.
2314func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error {
2315	var m map[string]*json.RawMessage
2316	err := json.Unmarshal(body, &m)
2317	if err != nil {
2318		return err
2319	}
2320	for k, v := range m {
2321		switch k {
2322		case "properties":
2323			if v != nil {
2324				var dedicatedHostGroupProperties DedicatedHostGroupProperties
2325				err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
2326				if err != nil {
2327					return err
2328				}
2329				dhgu.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
2330			}
2331		case "zones":
2332			if v != nil {
2333				var zones []string
2334				err = json.Unmarshal(*v, &zones)
2335				if err != nil {
2336					return err
2337				}
2338				dhgu.Zones = &zones
2339			}
2340		case "tags":
2341			if v != nil {
2342				var tags map[string]*string
2343				err = json.Unmarshal(*v, &tags)
2344				if err != nil {
2345					return err
2346				}
2347				dhgu.Tags = tags
2348			}
2349		}
2350	}
2351
2352	return nil
2353}
2354
2355// DedicatedHostInstanceView the instance view of a dedicated host.
2356type DedicatedHostInstanceView struct {
2357	// AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
2358	AssetID *string `json:"assetId,omitempty"`
2359	// AvailableCapacity - Unutilized capacity of the dedicated host.
2360	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
2361	// Statuses - The resource status information.
2362	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
2363}
2364
2365// MarshalJSON is the custom marshaler for DedicatedHostInstanceView.
2366func (dhiv DedicatedHostInstanceView) MarshalJSON() ([]byte, error) {
2367	objectMap := make(map[string]interface{})
2368	if dhiv.AvailableCapacity != nil {
2369		objectMap["availableCapacity"] = dhiv.AvailableCapacity
2370	}
2371	if dhiv.Statuses != nil {
2372		objectMap["statuses"] = dhiv.Statuses
2373	}
2374	return json.Marshal(objectMap)
2375}
2376
2377// DedicatedHostInstanceViewWithName the instance view of a dedicated host that includes the name of the
2378// dedicated host. It is used for the response to the instance view of a dedicated host group.
2379type DedicatedHostInstanceViewWithName struct {
2380	// Name - READ-ONLY; The name of the dedicated host.
2381	Name *string `json:"name,omitempty"`
2382	// AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
2383	AssetID *string `json:"assetId,omitempty"`
2384	// AvailableCapacity - Unutilized capacity of the dedicated host.
2385	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
2386	// Statuses - The resource status information.
2387	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
2388}
2389
2390// MarshalJSON is the custom marshaler for DedicatedHostInstanceViewWithName.
2391func (dhivwn DedicatedHostInstanceViewWithName) MarshalJSON() ([]byte, error) {
2392	objectMap := make(map[string]interface{})
2393	if dhivwn.AvailableCapacity != nil {
2394		objectMap["availableCapacity"] = dhivwn.AvailableCapacity
2395	}
2396	if dhivwn.Statuses != nil {
2397		objectMap["statuses"] = dhivwn.Statuses
2398	}
2399	return json.Marshal(objectMap)
2400}
2401
2402// DedicatedHostListResult the list dedicated host operation response.
2403type DedicatedHostListResult struct {
2404	autorest.Response `json:"-"`
2405	// Value - The list of dedicated hosts
2406	Value *[]DedicatedHost `json:"value,omitempty"`
2407	// NextLink - The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts.
2408	NextLink *string `json:"nextLink,omitempty"`
2409}
2410
2411// DedicatedHostListResultIterator provides access to a complete listing of DedicatedHost values.
2412type DedicatedHostListResultIterator struct {
2413	i    int
2414	page DedicatedHostListResultPage
2415}
2416
2417// NextWithContext advances to the next value.  If there was an error making
2418// the request the iterator does not advance and the error is returned.
2419func (iter *DedicatedHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
2420	if tracing.IsEnabled() {
2421		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultIterator.NextWithContext")
2422		defer func() {
2423			sc := -1
2424			if iter.Response().Response.Response != nil {
2425				sc = iter.Response().Response.Response.StatusCode
2426			}
2427			tracing.EndSpan(ctx, sc, err)
2428		}()
2429	}
2430	iter.i++
2431	if iter.i < len(iter.page.Values()) {
2432		return nil
2433	}
2434	err = iter.page.NextWithContext(ctx)
2435	if err != nil {
2436		iter.i--
2437		return err
2438	}
2439	iter.i = 0
2440	return nil
2441}
2442
2443// Next advances to the next value.  If there was an error making
2444// the request the iterator does not advance and the error is returned.
2445// Deprecated: Use NextWithContext() instead.
2446func (iter *DedicatedHostListResultIterator) Next() error {
2447	return iter.NextWithContext(context.Background())
2448}
2449
2450// NotDone returns true if the enumeration should be started or is not yet complete.
2451func (iter DedicatedHostListResultIterator) NotDone() bool {
2452	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2453}
2454
2455// Response returns the raw server response from the last page request.
2456func (iter DedicatedHostListResultIterator) Response() DedicatedHostListResult {
2457	return iter.page.Response()
2458}
2459
2460// Value returns the current value or a zero-initialized value if the
2461// iterator has advanced beyond the end of the collection.
2462func (iter DedicatedHostListResultIterator) Value() DedicatedHost {
2463	if !iter.page.NotDone() {
2464		return DedicatedHost{}
2465	}
2466	return iter.page.Values()[iter.i]
2467}
2468
2469// Creates a new instance of the DedicatedHostListResultIterator type.
2470func NewDedicatedHostListResultIterator(page DedicatedHostListResultPage) DedicatedHostListResultIterator {
2471	return DedicatedHostListResultIterator{page: page}
2472}
2473
2474// IsEmpty returns true if the ListResult contains no values.
2475func (dhlr DedicatedHostListResult) IsEmpty() bool {
2476	return dhlr.Value == nil || len(*dhlr.Value) == 0
2477}
2478
2479// hasNextLink returns true if the NextLink is not empty.
2480func (dhlr DedicatedHostListResult) hasNextLink() bool {
2481	return dhlr.NextLink != nil && len(*dhlr.NextLink) != 0
2482}
2483
2484// dedicatedHostListResultPreparer prepares a request to retrieve the next set of results.
2485// It returns nil if no more results exist.
2486func (dhlr DedicatedHostListResult) dedicatedHostListResultPreparer(ctx context.Context) (*http.Request, error) {
2487	if !dhlr.hasNextLink() {
2488		return nil, nil
2489	}
2490	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2491		autorest.AsJSON(),
2492		autorest.AsGet(),
2493		autorest.WithBaseURL(to.String(dhlr.NextLink)))
2494}
2495
2496// DedicatedHostListResultPage contains a page of DedicatedHost values.
2497type DedicatedHostListResultPage struct {
2498	fn   func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)
2499	dhlr DedicatedHostListResult
2500}
2501
2502// NextWithContext advances to the next page of values.  If there was an error making
2503// the request the page does not advance and the error is returned.
2504func (page *DedicatedHostListResultPage) NextWithContext(ctx context.Context) (err error) {
2505	if tracing.IsEnabled() {
2506		ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultPage.NextWithContext")
2507		defer func() {
2508			sc := -1
2509			if page.Response().Response.Response != nil {
2510				sc = page.Response().Response.Response.StatusCode
2511			}
2512			tracing.EndSpan(ctx, sc, err)
2513		}()
2514	}
2515	for {
2516		next, err := page.fn(ctx, page.dhlr)
2517		if err != nil {
2518			return err
2519		}
2520		page.dhlr = next
2521		if !next.hasNextLink() || !next.IsEmpty() {
2522			break
2523		}
2524	}
2525	return nil
2526}
2527
2528// Next advances to the next page of values.  If there was an error making
2529// the request the page does not advance and the error is returned.
2530// Deprecated: Use NextWithContext() instead.
2531func (page *DedicatedHostListResultPage) Next() error {
2532	return page.NextWithContext(context.Background())
2533}
2534
2535// NotDone returns true if the page enumeration should be started or is not yet complete.
2536func (page DedicatedHostListResultPage) NotDone() bool {
2537	return !page.dhlr.IsEmpty()
2538}
2539
2540// Response returns the raw server response from the last page request.
2541func (page DedicatedHostListResultPage) Response() DedicatedHostListResult {
2542	return page.dhlr
2543}
2544
2545// Values returns the slice of values for the current page or nil if there are no values.
2546func (page DedicatedHostListResultPage) Values() []DedicatedHost {
2547	if page.dhlr.IsEmpty() {
2548		return nil
2549	}
2550	return *page.dhlr.Value
2551}
2552
2553// Creates a new instance of the DedicatedHostListResultPage type.
2554func NewDedicatedHostListResultPage(cur DedicatedHostListResult, getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage {
2555	return DedicatedHostListResultPage{
2556		fn:   getNextPage,
2557		dhlr: cur,
2558	}
2559}
2560
2561// DedicatedHostProperties properties of the dedicated host.
2562type DedicatedHostProperties struct {
2563	// PlatformFaultDomain - Fault domain of the dedicated host within a dedicated host group.
2564	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
2565	// AutoReplaceOnFailure - Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided.
2566	AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"`
2567	// HostID - READ-ONLY; A unique id generated and assigned to the dedicated host by the platform. <br><br> Does not change throughout the lifetime of the host.
2568	HostID *string `json:"hostId,omitempty"`
2569	// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the Dedicated Host.
2570	VirtualMachines *[]SubResourceReadOnly `json:"virtualMachines,omitempty"`
2571	// LicenseType - Specifies the software license type that will be applied to the VMs deployed on the dedicated host. <br><br> Possible values are: <br><br> **None** <br><br> **Windows_Server_Hybrid** <br><br> **Windows_Server_Perpetual** <br><br> Default: **None**. Possible values include: 'DedicatedHostLicenseTypesNone', 'DedicatedHostLicenseTypesWindowsServerHybrid', 'DedicatedHostLicenseTypesWindowsServerPerpetual'
2572	LicenseType DedicatedHostLicenseTypes `json:"licenseType,omitempty"`
2573	// ProvisioningTime - READ-ONLY; The date when the host was first provisioned.
2574	ProvisioningTime *date.Time `json:"provisioningTime,omitempty"`
2575	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
2576	ProvisioningState *string `json:"provisioningState,omitempty"`
2577	// InstanceView - READ-ONLY; The dedicated host instance view.
2578	InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty"`
2579}
2580
2581// MarshalJSON is the custom marshaler for DedicatedHostProperties.
2582func (dhp DedicatedHostProperties) MarshalJSON() ([]byte, error) {
2583	objectMap := make(map[string]interface{})
2584	if dhp.PlatformFaultDomain != nil {
2585		objectMap["platformFaultDomain"] = dhp.PlatformFaultDomain
2586	}
2587	if dhp.AutoReplaceOnFailure != nil {
2588		objectMap["autoReplaceOnFailure"] = dhp.AutoReplaceOnFailure
2589	}
2590	if dhp.LicenseType != "" {
2591		objectMap["licenseType"] = dhp.LicenseType
2592	}
2593	return json.Marshal(objectMap)
2594}
2595
2596// DedicatedHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2597// long-running operation.
2598type DedicatedHostsCreateOrUpdateFuture struct {
2599	azure.FutureAPI
2600	// Result returns the result of the asynchronous operation.
2601	// If the operation has not completed it will return an error.
2602	Result func(DedicatedHostsClient) (DedicatedHost, error)
2603}
2604
2605// DedicatedHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
2606// operation.
2607type DedicatedHostsDeleteFuture struct {
2608	azure.FutureAPI
2609	// Result returns the result of the asynchronous operation.
2610	// If the operation has not completed it will return an error.
2611	Result func(DedicatedHostsClient) (autorest.Response, error)
2612}
2613
2614// DedicatedHostsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
2615// operation.
2616type DedicatedHostsUpdateFuture struct {
2617	azure.FutureAPI
2618	// Result returns the result of the asynchronous operation.
2619	// If the operation has not completed it will return an error.
2620	Result func(DedicatedHostsClient) (DedicatedHost, error)
2621}
2622
2623// DedicatedHostUpdate specifies information about the dedicated host. Only tags, autoReplaceOnFailure and
2624// licenseType may be updated.
2625type DedicatedHostUpdate struct {
2626	*DedicatedHostProperties `json:"properties,omitempty"`
2627	// Tags - Resource tags
2628	Tags map[string]*string `json:"tags"`
2629}
2630
2631// MarshalJSON is the custom marshaler for DedicatedHostUpdate.
2632func (dhu DedicatedHostUpdate) MarshalJSON() ([]byte, error) {
2633	objectMap := make(map[string]interface{})
2634	if dhu.DedicatedHostProperties != nil {
2635		objectMap["properties"] = dhu.DedicatedHostProperties
2636	}
2637	if dhu.Tags != nil {
2638		objectMap["tags"] = dhu.Tags
2639	}
2640	return json.Marshal(objectMap)
2641}
2642
2643// UnmarshalJSON is the custom unmarshaler for DedicatedHostUpdate struct.
2644func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error {
2645	var m map[string]*json.RawMessage
2646	err := json.Unmarshal(body, &m)
2647	if err != nil {
2648		return err
2649	}
2650	for k, v := range m {
2651		switch k {
2652		case "properties":
2653			if v != nil {
2654				var dedicatedHostProperties DedicatedHostProperties
2655				err = json.Unmarshal(*v, &dedicatedHostProperties)
2656				if err != nil {
2657					return err
2658				}
2659				dhu.DedicatedHostProperties = &dedicatedHostProperties
2660			}
2661		case "tags":
2662			if v != nil {
2663				var tags map[string]*string
2664				err = json.Unmarshal(*v, &tags)
2665				if err != nil {
2666					return err
2667				}
2668				dhu.Tags = tags
2669			}
2670		}
2671	}
2672
2673	return nil
2674}
2675
2676// DiagnosticsProfile specifies the boot diagnostic settings state. <br><br>Minimum api-version:
2677// 2015-06-15.
2678type DiagnosticsProfile struct {
2679	// 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.
2680	BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
2681}
2682
2683// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating
2684// system disk. <br><br> NOTE: The ephemeral disk settings can only be specified for managed disk.
2685type DiffDiskSettings struct {
2686	// Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local'
2687	Option DiffDiskOptions `json:"option,omitempty"`
2688	// Placement - Specifies the ephemeral disk placement for operating system disk.<br><br> Possible values are: <br><br> **CacheDisk** <br><br> **ResourceDisk** <br><br> Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.<br><br> Refer to VM size documentation for Windows VM at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'CacheDisk', 'ResourceDisk'
2689	Placement DiffDiskPlacement `json:"placement,omitempty"`
2690}
2691
2692// Disallowed describes the disallowed disk types.
2693type Disallowed struct {
2694	// DiskTypes - A list of disk types.
2695	DiskTypes *[]string `json:"diskTypes,omitempty"`
2696}
2697
2698// DisallowedConfiguration specifies the disallowed configuration for a virtual machine image.
2699type DisallowedConfiguration struct {
2700	// VMDiskType - VM disk types which are disallowed. Possible values include: 'VMDiskTypesNone', 'VMDiskTypesUnmanaged'
2701	VMDiskType VMDiskTypes `json:"vmDiskType,omitempty"`
2702}
2703
2704// Disk disk resource.
2705type Disk struct {
2706	autorest.Response `json:"-"`
2707	// ManagedBy - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
2708	ManagedBy *string `json:"managedBy,omitempty"`
2709	// ManagedByExtended - READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
2710	ManagedByExtended *[]string `json:"managedByExtended,omitempty"`
2711	Sku               *DiskSku  `json:"sku,omitempty"`
2712	// Zones - The Logical zone list for Disk.
2713	Zones *[]string `json:"zones,omitempty"`
2714	// ExtendedLocation - The extended location where the disk will be created. Extended location cannot be changed.
2715	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
2716	*DiskProperties  `json:"properties,omitempty"`
2717	// ID - READ-ONLY; Resource Id
2718	ID *string `json:"id,omitempty"`
2719	// Name - READ-ONLY; Resource name
2720	Name *string `json:"name,omitempty"`
2721	// Type - READ-ONLY; Resource type
2722	Type *string `json:"type,omitempty"`
2723	// Location - Resource location
2724	Location *string `json:"location,omitempty"`
2725	// Tags - Resource tags
2726	Tags map[string]*string `json:"tags"`
2727}
2728
2729// MarshalJSON is the custom marshaler for Disk.
2730func (d Disk) MarshalJSON() ([]byte, error) {
2731	objectMap := make(map[string]interface{})
2732	if d.Sku != nil {
2733		objectMap["sku"] = d.Sku
2734	}
2735	if d.Zones != nil {
2736		objectMap["zones"] = d.Zones
2737	}
2738	if d.ExtendedLocation != nil {
2739		objectMap["extendedLocation"] = d.ExtendedLocation
2740	}
2741	if d.DiskProperties != nil {
2742		objectMap["properties"] = d.DiskProperties
2743	}
2744	if d.Location != nil {
2745		objectMap["location"] = d.Location
2746	}
2747	if d.Tags != nil {
2748		objectMap["tags"] = d.Tags
2749	}
2750	return json.Marshal(objectMap)
2751}
2752
2753// UnmarshalJSON is the custom unmarshaler for Disk struct.
2754func (d *Disk) UnmarshalJSON(body []byte) error {
2755	var m map[string]*json.RawMessage
2756	err := json.Unmarshal(body, &m)
2757	if err != nil {
2758		return err
2759	}
2760	for k, v := range m {
2761		switch k {
2762		case "managedBy":
2763			if v != nil {
2764				var managedBy string
2765				err = json.Unmarshal(*v, &managedBy)
2766				if err != nil {
2767					return err
2768				}
2769				d.ManagedBy = &managedBy
2770			}
2771		case "managedByExtended":
2772			if v != nil {
2773				var managedByExtended []string
2774				err = json.Unmarshal(*v, &managedByExtended)
2775				if err != nil {
2776					return err
2777				}
2778				d.ManagedByExtended = &managedByExtended
2779			}
2780		case "sku":
2781			if v != nil {
2782				var sku DiskSku
2783				err = json.Unmarshal(*v, &sku)
2784				if err != nil {
2785					return err
2786				}
2787				d.Sku = &sku
2788			}
2789		case "zones":
2790			if v != nil {
2791				var zones []string
2792				err = json.Unmarshal(*v, &zones)
2793				if err != nil {
2794					return err
2795				}
2796				d.Zones = &zones
2797			}
2798		case "extendedLocation":
2799			if v != nil {
2800				var extendedLocation ExtendedLocation
2801				err = json.Unmarshal(*v, &extendedLocation)
2802				if err != nil {
2803					return err
2804				}
2805				d.ExtendedLocation = &extendedLocation
2806			}
2807		case "properties":
2808			if v != nil {
2809				var diskProperties DiskProperties
2810				err = json.Unmarshal(*v, &diskProperties)
2811				if err != nil {
2812					return err
2813				}
2814				d.DiskProperties = &diskProperties
2815			}
2816		case "id":
2817			if v != nil {
2818				var ID string
2819				err = json.Unmarshal(*v, &ID)
2820				if err != nil {
2821					return err
2822				}
2823				d.ID = &ID
2824			}
2825		case "name":
2826			if v != nil {
2827				var name string
2828				err = json.Unmarshal(*v, &name)
2829				if err != nil {
2830					return err
2831				}
2832				d.Name = &name
2833			}
2834		case "type":
2835			if v != nil {
2836				var typeVar string
2837				err = json.Unmarshal(*v, &typeVar)
2838				if err != nil {
2839					return err
2840				}
2841				d.Type = &typeVar
2842			}
2843		case "location":
2844			if v != nil {
2845				var location string
2846				err = json.Unmarshal(*v, &location)
2847				if err != nil {
2848					return err
2849				}
2850				d.Location = &location
2851			}
2852		case "tags":
2853			if v != nil {
2854				var tags map[string]*string
2855				err = json.Unmarshal(*v, &tags)
2856				if err != nil {
2857					return err
2858				}
2859				d.Tags = tags
2860			}
2861		}
2862	}
2863
2864	return nil
2865}
2866
2867// DiskAccess disk access resource.
2868type DiskAccess struct {
2869	autorest.Response     `json:"-"`
2870	*DiskAccessProperties `json:"properties,omitempty"`
2871	// ID - READ-ONLY; Resource Id
2872	ID *string `json:"id,omitempty"`
2873	// Name - READ-ONLY; Resource name
2874	Name *string `json:"name,omitempty"`
2875	// Type - READ-ONLY; Resource type
2876	Type *string `json:"type,omitempty"`
2877	// Location - Resource location
2878	Location *string `json:"location,omitempty"`
2879	// Tags - Resource tags
2880	Tags map[string]*string `json:"tags"`
2881}
2882
2883// MarshalJSON is the custom marshaler for DiskAccess.
2884func (da DiskAccess) MarshalJSON() ([]byte, error) {
2885	objectMap := make(map[string]interface{})
2886	if da.DiskAccessProperties != nil {
2887		objectMap["properties"] = da.DiskAccessProperties
2888	}
2889	if da.Location != nil {
2890		objectMap["location"] = da.Location
2891	}
2892	if da.Tags != nil {
2893		objectMap["tags"] = da.Tags
2894	}
2895	return json.Marshal(objectMap)
2896}
2897
2898// UnmarshalJSON is the custom unmarshaler for DiskAccess struct.
2899func (da *DiskAccess) UnmarshalJSON(body []byte) error {
2900	var m map[string]*json.RawMessage
2901	err := json.Unmarshal(body, &m)
2902	if err != nil {
2903		return err
2904	}
2905	for k, v := range m {
2906		switch k {
2907		case "properties":
2908			if v != nil {
2909				var diskAccessProperties DiskAccessProperties
2910				err = json.Unmarshal(*v, &diskAccessProperties)
2911				if err != nil {
2912					return err
2913				}
2914				da.DiskAccessProperties = &diskAccessProperties
2915			}
2916		case "id":
2917			if v != nil {
2918				var ID string
2919				err = json.Unmarshal(*v, &ID)
2920				if err != nil {
2921					return err
2922				}
2923				da.ID = &ID
2924			}
2925		case "name":
2926			if v != nil {
2927				var name string
2928				err = json.Unmarshal(*v, &name)
2929				if err != nil {
2930					return err
2931				}
2932				da.Name = &name
2933			}
2934		case "type":
2935			if v != nil {
2936				var typeVar string
2937				err = json.Unmarshal(*v, &typeVar)
2938				if err != nil {
2939					return err
2940				}
2941				da.Type = &typeVar
2942			}
2943		case "location":
2944			if v != nil {
2945				var location string
2946				err = json.Unmarshal(*v, &location)
2947				if err != nil {
2948					return err
2949				}
2950				da.Location = &location
2951			}
2952		case "tags":
2953			if v != nil {
2954				var tags map[string]*string
2955				err = json.Unmarshal(*v, &tags)
2956				if err != nil {
2957					return err
2958				}
2959				da.Tags = tags
2960			}
2961		}
2962	}
2963
2964	return nil
2965}
2966
2967// DiskAccessesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2968// long-running operation.
2969type DiskAccessesCreateOrUpdateFuture struct {
2970	azure.FutureAPI
2971	// Result returns the result of the asynchronous operation.
2972	// If the operation has not completed it will return an error.
2973	Result func(DiskAccessesClient) (DiskAccess, error)
2974}
2975
2976// DiskAccessesDeleteAPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the
2977// results of a long-running operation.
2978type DiskAccessesDeleteAPrivateEndpointConnectionFuture struct {
2979	azure.FutureAPI
2980	// Result returns the result of the asynchronous operation.
2981	// If the operation has not completed it will return an error.
2982	Result func(DiskAccessesClient) (autorest.Response, error)
2983}
2984
2985// DiskAccessesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
2986// operation.
2987type DiskAccessesDeleteFuture struct {
2988	azure.FutureAPI
2989	// Result returns the result of the asynchronous operation.
2990	// If the operation has not completed it will return an error.
2991	Result func(DiskAccessesClient) (autorest.Response, error)
2992}
2993
2994// DiskAccessesUpdateAPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the
2995// results of a long-running operation.
2996type DiskAccessesUpdateAPrivateEndpointConnectionFuture struct {
2997	azure.FutureAPI
2998	// Result returns the result of the asynchronous operation.
2999	// If the operation has not completed it will return an error.
3000	Result func(DiskAccessesClient) (PrivateEndpointConnection, error)
3001}
3002
3003// DiskAccessesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3004// operation.
3005type DiskAccessesUpdateFuture struct {
3006	azure.FutureAPI
3007	// Result returns the result of the asynchronous operation.
3008	// If the operation has not completed it will return an error.
3009	Result func(DiskAccessesClient) (DiskAccess, error)
3010}
3011
3012// DiskAccessList the List disk access operation response.
3013type DiskAccessList struct {
3014	autorest.Response `json:"-"`
3015	// Value - A list of disk access resources.
3016	Value *[]DiskAccess `json:"value,omitempty"`
3017	// NextLink - The uri to fetch the next page of disk access resources. Call ListNext() with this to fetch the next page of disk access resources.
3018	NextLink *string `json:"nextLink,omitempty"`
3019}
3020
3021// DiskAccessListIterator provides access to a complete listing of DiskAccess values.
3022type DiskAccessListIterator struct {
3023	i    int
3024	page DiskAccessListPage
3025}
3026
3027// NextWithContext advances to the next value.  If there was an error making
3028// the request the iterator does not advance and the error is returned.
3029func (iter *DiskAccessListIterator) NextWithContext(ctx context.Context) (err error) {
3030	if tracing.IsEnabled() {
3031		ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListIterator.NextWithContext")
3032		defer func() {
3033			sc := -1
3034			if iter.Response().Response.Response != nil {
3035				sc = iter.Response().Response.Response.StatusCode
3036			}
3037			tracing.EndSpan(ctx, sc, err)
3038		}()
3039	}
3040	iter.i++
3041	if iter.i < len(iter.page.Values()) {
3042		return nil
3043	}
3044	err = iter.page.NextWithContext(ctx)
3045	if err != nil {
3046		iter.i--
3047		return err
3048	}
3049	iter.i = 0
3050	return nil
3051}
3052
3053// Next advances to the next value.  If there was an error making
3054// the request the iterator does not advance and the error is returned.
3055// Deprecated: Use NextWithContext() instead.
3056func (iter *DiskAccessListIterator) Next() error {
3057	return iter.NextWithContext(context.Background())
3058}
3059
3060// NotDone returns true if the enumeration should be started or is not yet complete.
3061func (iter DiskAccessListIterator) NotDone() bool {
3062	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3063}
3064
3065// Response returns the raw server response from the last page request.
3066func (iter DiskAccessListIterator) Response() DiskAccessList {
3067	return iter.page.Response()
3068}
3069
3070// Value returns the current value or a zero-initialized value if the
3071// iterator has advanced beyond the end of the collection.
3072func (iter DiskAccessListIterator) Value() DiskAccess {
3073	if !iter.page.NotDone() {
3074		return DiskAccess{}
3075	}
3076	return iter.page.Values()[iter.i]
3077}
3078
3079// Creates a new instance of the DiskAccessListIterator type.
3080func NewDiskAccessListIterator(page DiskAccessListPage) DiskAccessListIterator {
3081	return DiskAccessListIterator{page: page}
3082}
3083
3084// IsEmpty returns true if the ListResult contains no values.
3085func (dal DiskAccessList) IsEmpty() bool {
3086	return dal.Value == nil || len(*dal.Value) == 0
3087}
3088
3089// hasNextLink returns true if the NextLink is not empty.
3090func (dal DiskAccessList) hasNextLink() bool {
3091	return dal.NextLink != nil && len(*dal.NextLink) != 0
3092}
3093
3094// diskAccessListPreparer prepares a request to retrieve the next set of results.
3095// It returns nil if no more results exist.
3096func (dal DiskAccessList) diskAccessListPreparer(ctx context.Context) (*http.Request, error) {
3097	if !dal.hasNextLink() {
3098		return nil, nil
3099	}
3100	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3101		autorest.AsJSON(),
3102		autorest.AsGet(),
3103		autorest.WithBaseURL(to.String(dal.NextLink)))
3104}
3105
3106// DiskAccessListPage contains a page of DiskAccess values.
3107type DiskAccessListPage struct {
3108	fn  func(context.Context, DiskAccessList) (DiskAccessList, error)
3109	dal DiskAccessList
3110}
3111
3112// NextWithContext advances to the next page of values.  If there was an error making
3113// the request the page does not advance and the error is returned.
3114func (page *DiskAccessListPage) NextWithContext(ctx context.Context) (err error) {
3115	if tracing.IsEnabled() {
3116		ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListPage.NextWithContext")
3117		defer func() {
3118			sc := -1
3119			if page.Response().Response.Response != nil {
3120				sc = page.Response().Response.Response.StatusCode
3121			}
3122			tracing.EndSpan(ctx, sc, err)
3123		}()
3124	}
3125	for {
3126		next, err := page.fn(ctx, page.dal)
3127		if err != nil {
3128			return err
3129		}
3130		page.dal = next
3131		if !next.hasNextLink() || !next.IsEmpty() {
3132			break
3133		}
3134	}
3135	return nil
3136}
3137
3138// Next advances to the next page of values.  If there was an error making
3139// the request the page does not advance and the error is returned.
3140// Deprecated: Use NextWithContext() instead.
3141func (page *DiskAccessListPage) Next() error {
3142	return page.NextWithContext(context.Background())
3143}
3144
3145// NotDone returns true if the page enumeration should be started or is not yet complete.
3146func (page DiskAccessListPage) NotDone() bool {
3147	return !page.dal.IsEmpty()
3148}
3149
3150// Response returns the raw server response from the last page request.
3151func (page DiskAccessListPage) Response() DiskAccessList {
3152	return page.dal
3153}
3154
3155// Values returns the slice of values for the current page or nil if there are no values.
3156func (page DiskAccessListPage) Values() []DiskAccess {
3157	if page.dal.IsEmpty() {
3158		return nil
3159	}
3160	return *page.dal.Value
3161}
3162
3163// Creates a new instance of the DiskAccessListPage type.
3164func NewDiskAccessListPage(cur DiskAccessList, getNextPage func(context.Context, DiskAccessList) (DiskAccessList, error)) DiskAccessListPage {
3165	return DiskAccessListPage{
3166		fn:  getNextPage,
3167		dal: cur,
3168	}
3169}
3170
3171// DiskAccessProperties ...
3172type DiskAccessProperties struct {
3173	// PrivateEndpointConnections - READ-ONLY; A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection is supported.
3174	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
3175	// ProvisioningState - READ-ONLY; The disk access resource provisioning state.
3176	ProvisioningState *string `json:"provisioningState,omitempty"`
3177	// TimeCreated - READ-ONLY; The time when the disk access was created.
3178	TimeCreated *date.Time `json:"timeCreated,omitempty"`
3179}
3180
3181// DiskAccessUpdate used for updating a disk access resource.
3182type DiskAccessUpdate struct {
3183	// Tags - Resource tags
3184	Tags map[string]*string `json:"tags"`
3185}
3186
3187// MarshalJSON is the custom marshaler for DiskAccessUpdate.
3188func (dau DiskAccessUpdate) MarshalJSON() ([]byte, error) {
3189	objectMap := make(map[string]interface{})
3190	if dau.Tags != nil {
3191		objectMap["tags"] = dau.Tags
3192	}
3193	return json.Marshal(objectMap)
3194}
3195
3196// DiskEncryptionSet disk encryption set resource.
3197type DiskEncryptionSet struct {
3198	autorest.Response        `json:"-"`
3199	Identity                 *EncryptionSetIdentity `json:"identity,omitempty"`
3200	*EncryptionSetProperties `json:"properties,omitempty"`
3201	// ID - READ-ONLY; Resource Id
3202	ID *string `json:"id,omitempty"`
3203	// Name - READ-ONLY; Resource name
3204	Name *string `json:"name,omitempty"`
3205	// Type - READ-ONLY; Resource type
3206	Type *string `json:"type,omitempty"`
3207	// Location - Resource location
3208	Location *string `json:"location,omitempty"`
3209	// Tags - Resource tags
3210	Tags map[string]*string `json:"tags"`
3211}
3212
3213// MarshalJSON is the custom marshaler for DiskEncryptionSet.
3214func (desVar DiskEncryptionSet) MarshalJSON() ([]byte, error) {
3215	objectMap := make(map[string]interface{})
3216	if desVar.Identity != nil {
3217		objectMap["identity"] = desVar.Identity
3218	}
3219	if desVar.EncryptionSetProperties != nil {
3220		objectMap["properties"] = desVar.EncryptionSetProperties
3221	}
3222	if desVar.Location != nil {
3223		objectMap["location"] = desVar.Location
3224	}
3225	if desVar.Tags != nil {
3226		objectMap["tags"] = desVar.Tags
3227	}
3228	return json.Marshal(objectMap)
3229}
3230
3231// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSet struct.
3232func (desVar *DiskEncryptionSet) UnmarshalJSON(body []byte) error {
3233	var m map[string]*json.RawMessage
3234	err := json.Unmarshal(body, &m)
3235	if err != nil {
3236		return err
3237	}
3238	for k, v := range m {
3239		switch k {
3240		case "identity":
3241			if v != nil {
3242				var identity EncryptionSetIdentity
3243				err = json.Unmarshal(*v, &identity)
3244				if err != nil {
3245					return err
3246				}
3247				desVar.Identity = &identity
3248			}
3249		case "properties":
3250			if v != nil {
3251				var encryptionSetProperties EncryptionSetProperties
3252				err = json.Unmarshal(*v, &encryptionSetProperties)
3253				if err != nil {
3254					return err
3255				}
3256				desVar.EncryptionSetProperties = &encryptionSetProperties
3257			}
3258		case "id":
3259			if v != nil {
3260				var ID string
3261				err = json.Unmarshal(*v, &ID)
3262				if err != nil {
3263					return err
3264				}
3265				desVar.ID = &ID
3266			}
3267		case "name":
3268			if v != nil {
3269				var name string
3270				err = json.Unmarshal(*v, &name)
3271				if err != nil {
3272					return err
3273				}
3274				desVar.Name = &name
3275			}
3276		case "type":
3277			if v != nil {
3278				var typeVar string
3279				err = json.Unmarshal(*v, &typeVar)
3280				if err != nil {
3281					return err
3282				}
3283				desVar.Type = &typeVar
3284			}
3285		case "location":
3286			if v != nil {
3287				var location string
3288				err = json.Unmarshal(*v, &location)
3289				if err != nil {
3290					return err
3291				}
3292				desVar.Location = &location
3293			}
3294		case "tags":
3295			if v != nil {
3296				var tags map[string]*string
3297				err = json.Unmarshal(*v, &tags)
3298				if err != nil {
3299					return err
3300				}
3301				desVar.Tags = tags
3302			}
3303		}
3304	}
3305
3306	return nil
3307}
3308
3309// DiskEncryptionSetList the List disk encryption set operation response.
3310type DiskEncryptionSetList struct {
3311	autorest.Response `json:"-"`
3312	// Value - A list of disk encryption sets.
3313	Value *[]DiskEncryptionSet `json:"value,omitempty"`
3314	// NextLink - The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the next page of disk encryption sets.
3315	NextLink *string `json:"nextLink,omitempty"`
3316}
3317
3318// DiskEncryptionSetListIterator provides access to a complete listing of DiskEncryptionSet values.
3319type DiskEncryptionSetListIterator struct {
3320	i    int
3321	page DiskEncryptionSetListPage
3322}
3323
3324// NextWithContext advances to the next value.  If there was an error making
3325// the request the iterator does not advance and the error is returned.
3326func (iter *DiskEncryptionSetListIterator) NextWithContext(ctx context.Context) (err error) {
3327	if tracing.IsEnabled() {
3328		ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListIterator.NextWithContext")
3329		defer func() {
3330			sc := -1
3331			if iter.Response().Response.Response != nil {
3332				sc = iter.Response().Response.Response.StatusCode
3333			}
3334			tracing.EndSpan(ctx, sc, err)
3335		}()
3336	}
3337	iter.i++
3338	if iter.i < len(iter.page.Values()) {
3339		return nil
3340	}
3341	err = iter.page.NextWithContext(ctx)
3342	if err != nil {
3343		iter.i--
3344		return err
3345	}
3346	iter.i = 0
3347	return nil
3348}
3349
3350// Next advances to the next value.  If there was an error making
3351// the request the iterator does not advance and the error is returned.
3352// Deprecated: Use NextWithContext() instead.
3353func (iter *DiskEncryptionSetListIterator) Next() error {
3354	return iter.NextWithContext(context.Background())
3355}
3356
3357// NotDone returns true if the enumeration should be started or is not yet complete.
3358func (iter DiskEncryptionSetListIterator) NotDone() bool {
3359	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3360}
3361
3362// Response returns the raw server response from the last page request.
3363func (iter DiskEncryptionSetListIterator) Response() DiskEncryptionSetList {
3364	return iter.page.Response()
3365}
3366
3367// Value returns the current value or a zero-initialized value if the
3368// iterator has advanced beyond the end of the collection.
3369func (iter DiskEncryptionSetListIterator) Value() DiskEncryptionSet {
3370	if !iter.page.NotDone() {
3371		return DiskEncryptionSet{}
3372	}
3373	return iter.page.Values()[iter.i]
3374}
3375
3376// Creates a new instance of the DiskEncryptionSetListIterator type.
3377func NewDiskEncryptionSetListIterator(page DiskEncryptionSetListPage) DiskEncryptionSetListIterator {
3378	return DiskEncryptionSetListIterator{page: page}
3379}
3380
3381// IsEmpty returns true if the ListResult contains no values.
3382func (desl DiskEncryptionSetList) IsEmpty() bool {
3383	return desl.Value == nil || len(*desl.Value) == 0
3384}
3385
3386// hasNextLink returns true if the NextLink is not empty.
3387func (desl DiskEncryptionSetList) hasNextLink() bool {
3388	return desl.NextLink != nil && len(*desl.NextLink) != 0
3389}
3390
3391// diskEncryptionSetListPreparer prepares a request to retrieve the next set of results.
3392// It returns nil if no more results exist.
3393func (desl DiskEncryptionSetList) diskEncryptionSetListPreparer(ctx context.Context) (*http.Request, error) {
3394	if !desl.hasNextLink() {
3395		return nil, nil
3396	}
3397	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3398		autorest.AsJSON(),
3399		autorest.AsGet(),
3400		autorest.WithBaseURL(to.String(desl.NextLink)))
3401}
3402
3403// DiskEncryptionSetListPage contains a page of DiskEncryptionSet values.
3404type DiskEncryptionSetListPage struct {
3405	fn   func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)
3406	desl DiskEncryptionSetList
3407}
3408
3409// NextWithContext advances to the next page of values.  If there was an error making
3410// the request the page does not advance and the error is returned.
3411func (page *DiskEncryptionSetListPage) NextWithContext(ctx context.Context) (err error) {
3412	if tracing.IsEnabled() {
3413		ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListPage.NextWithContext")
3414		defer func() {
3415			sc := -1
3416			if page.Response().Response.Response != nil {
3417				sc = page.Response().Response.Response.StatusCode
3418			}
3419			tracing.EndSpan(ctx, sc, err)
3420		}()
3421	}
3422	for {
3423		next, err := page.fn(ctx, page.desl)
3424		if err != nil {
3425			return err
3426		}
3427		page.desl = next
3428		if !next.hasNextLink() || !next.IsEmpty() {
3429			break
3430		}
3431	}
3432	return nil
3433}
3434
3435// Next advances to the next page of values.  If there was an error making
3436// the request the page does not advance and the error is returned.
3437// Deprecated: Use NextWithContext() instead.
3438func (page *DiskEncryptionSetListPage) Next() error {
3439	return page.NextWithContext(context.Background())
3440}
3441
3442// NotDone returns true if the page enumeration should be started or is not yet complete.
3443func (page DiskEncryptionSetListPage) NotDone() bool {
3444	return !page.desl.IsEmpty()
3445}
3446
3447// Response returns the raw server response from the last page request.
3448func (page DiskEncryptionSetListPage) Response() DiskEncryptionSetList {
3449	return page.desl
3450}
3451
3452// Values returns the slice of values for the current page or nil if there are no values.
3453func (page DiskEncryptionSetListPage) Values() []DiskEncryptionSet {
3454	if page.desl.IsEmpty() {
3455		return nil
3456	}
3457	return *page.desl.Value
3458}
3459
3460// Creates a new instance of the DiskEncryptionSetListPage type.
3461func NewDiskEncryptionSetListPage(cur DiskEncryptionSetList, getNextPage func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)) DiskEncryptionSetListPage {
3462	return DiskEncryptionSetListPage{
3463		fn:   getNextPage,
3464		desl: cur,
3465	}
3466}
3467
3468// DiskEncryptionSetParameters describes the parameter of customer managed disk encryption set resource id
3469// that can be specified for disk. <br><br> NOTE: The disk encryption set resource id can only be specified
3470// for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.
3471type DiskEncryptionSetParameters struct {
3472	// ID - Resource Id
3473	ID *string `json:"id,omitempty"`
3474}
3475
3476// DiskEncryptionSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3477// long-running operation.
3478type DiskEncryptionSetsCreateOrUpdateFuture struct {
3479	azure.FutureAPI
3480	// Result returns the result of the asynchronous operation.
3481	// If the operation has not completed it will return an error.
3482	Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
3483}
3484
3485// DiskEncryptionSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
3486// long-running operation.
3487type DiskEncryptionSetsDeleteFuture struct {
3488	azure.FutureAPI
3489	// Result returns the result of the asynchronous operation.
3490	// If the operation has not completed it will return an error.
3491	Result func(DiskEncryptionSetsClient) (autorest.Response, error)
3492}
3493
3494// DiskEncryptionSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
3495// long-running operation.
3496type DiskEncryptionSetsUpdateFuture struct {
3497	azure.FutureAPI
3498	// Result returns the result of the asynchronous operation.
3499	// If the operation has not completed it will return an error.
3500	Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
3501}
3502
3503// DiskEncryptionSettings describes a Encryption Settings for a Disk
3504type DiskEncryptionSettings struct {
3505	// DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret.
3506	DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"`
3507	// KeyEncryptionKey - Specifies the location of the key encryption key in Key Vault.
3508	KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"`
3509	// Enabled - Specifies whether disk encryption should be enabled on the virtual machine.
3510	Enabled *bool `json:"enabled,omitempty"`
3511}
3512
3513// DiskEncryptionSetUpdate disk encryption set update resource.
3514type DiskEncryptionSetUpdate struct {
3515	*DiskEncryptionSetUpdateProperties `json:"properties,omitempty"`
3516	// Tags - Resource tags
3517	Tags map[string]*string `json:"tags"`
3518}
3519
3520// MarshalJSON is the custom marshaler for DiskEncryptionSetUpdate.
3521func (desu DiskEncryptionSetUpdate) MarshalJSON() ([]byte, error) {
3522	objectMap := make(map[string]interface{})
3523	if desu.DiskEncryptionSetUpdateProperties != nil {
3524		objectMap["properties"] = desu.DiskEncryptionSetUpdateProperties
3525	}
3526	if desu.Tags != nil {
3527		objectMap["tags"] = desu.Tags
3528	}
3529	return json.Marshal(objectMap)
3530}
3531
3532// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSetUpdate struct.
3533func (desu *DiskEncryptionSetUpdate) UnmarshalJSON(body []byte) error {
3534	var m map[string]*json.RawMessage
3535	err := json.Unmarshal(body, &m)
3536	if err != nil {
3537		return err
3538	}
3539	for k, v := range m {
3540		switch k {
3541		case "properties":
3542			if v != nil {
3543				var diskEncryptionSetUpdateProperties DiskEncryptionSetUpdateProperties
3544				err = json.Unmarshal(*v, &diskEncryptionSetUpdateProperties)
3545				if err != nil {
3546					return err
3547				}
3548				desu.DiskEncryptionSetUpdateProperties = &diskEncryptionSetUpdateProperties
3549			}
3550		case "tags":
3551			if v != nil {
3552				var tags map[string]*string
3553				err = json.Unmarshal(*v, &tags)
3554				if err != nil {
3555					return err
3556				}
3557				desu.Tags = tags
3558			}
3559		}
3560	}
3561
3562	return nil
3563}
3564
3565// DiskEncryptionSetUpdateProperties disk encryption set resource update properties.
3566type DiskEncryptionSetUpdateProperties struct {
3567	// EncryptionType - Possible values include: 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys'
3568	EncryptionType DiskEncryptionSetType    `json:"encryptionType,omitempty"`
3569	ActiveKey      *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`
3570}
3571
3572// DiskImageEncryption this is the disk image encryption base class.
3573type DiskImageEncryption struct {
3574	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
3575	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
3576}
3577
3578// DiskInstanceView the instance view of the disk.
3579type DiskInstanceView struct {
3580	// Name - The disk name.
3581	Name *string `json:"name,omitempty"`
3582	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
3583	EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
3584	// Statuses - The resource status information.
3585	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
3586}
3587
3588// DiskList the List Disks operation response.
3589type DiskList struct {
3590	autorest.Response `json:"-"`
3591	// Value - A list of disks.
3592	Value *[]Disk `json:"value,omitempty"`
3593	// NextLink - The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks.
3594	NextLink *string `json:"nextLink,omitempty"`
3595}
3596
3597// DiskListIterator provides access to a complete listing of Disk values.
3598type DiskListIterator struct {
3599	i    int
3600	page DiskListPage
3601}
3602
3603// NextWithContext advances to the next value.  If there was an error making
3604// the request the iterator does not advance and the error is returned.
3605func (iter *DiskListIterator) NextWithContext(ctx context.Context) (err error) {
3606	if tracing.IsEnabled() {
3607		ctx = tracing.StartSpan(ctx, fqdn+"/DiskListIterator.NextWithContext")
3608		defer func() {
3609			sc := -1
3610			if iter.Response().Response.Response != nil {
3611				sc = iter.Response().Response.Response.StatusCode
3612			}
3613			tracing.EndSpan(ctx, sc, err)
3614		}()
3615	}
3616	iter.i++
3617	if iter.i < len(iter.page.Values()) {
3618		return nil
3619	}
3620	err = iter.page.NextWithContext(ctx)
3621	if err != nil {
3622		iter.i--
3623		return err
3624	}
3625	iter.i = 0
3626	return nil
3627}
3628
3629// Next advances to the next value.  If there was an error making
3630// the request the iterator does not advance and the error is returned.
3631// Deprecated: Use NextWithContext() instead.
3632func (iter *DiskListIterator) Next() error {
3633	return iter.NextWithContext(context.Background())
3634}
3635
3636// NotDone returns true if the enumeration should be started or is not yet complete.
3637func (iter DiskListIterator) NotDone() bool {
3638	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3639}
3640
3641// Response returns the raw server response from the last page request.
3642func (iter DiskListIterator) Response() DiskList {
3643	return iter.page.Response()
3644}
3645
3646// Value returns the current value or a zero-initialized value if the
3647// iterator has advanced beyond the end of the collection.
3648func (iter DiskListIterator) Value() Disk {
3649	if !iter.page.NotDone() {
3650		return Disk{}
3651	}
3652	return iter.page.Values()[iter.i]
3653}
3654
3655// Creates a new instance of the DiskListIterator type.
3656func NewDiskListIterator(page DiskListPage) DiskListIterator {
3657	return DiskListIterator{page: page}
3658}
3659
3660// IsEmpty returns true if the ListResult contains no values.
3661func (dl DiskList) IsEmpty() bool {
3662	return dl.Value == nil || len(*dl.Value) == 0
3663}
3664
3665// hasNextLink returns true if the NextLink is not empty.
3666func (dl DiskList) hasNextLink() bool {
3667	return dl.NextLink != nil && len(*dl.NextLink) != 0
3668}
3669
3670// diskListPreparer prepares a request to retrieve the next set of results.
3671// It returns nil if no more results exist.
3672func (dl DiskList) diskListPreparer(ctx context.Context) (*http.Request, error) {
3673	if !dl.hasNextLink() {
3674		return nil, nil
3675	}
3676	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3677		autorest.AsJSON(),
3678		autorest.AsGet(),
3679		autorest.WithBaseURL(to.String(dl.NextLink)))
3680}
3681
3682// DiskListPage contains a page of Disk values.
3683type DiskListPage struct {
3684	fn func(context.Context, DiskList) (DiskList, error)
3685	dl DiskList
3686}
3687
3688// NextWithContext advances to the next page of values.  If there was an error making
3689// the request the page does not advance and the error is returned.
3690func (page *DiskListPage) NextWithContext(ctx context.Context) (err error) {
3691	if tracing.IsEnabled() {
3692		ctx = tracing.StartSpan(ctx, fqdn+"/DiskListPage.NextWithContext")
3693		defer func() {
3694			sc := -1
3695			if page.Response().Response.Response != nil {
3696				sc = page.Response().Response.Response.StatusCode
3697			}
3698			tracing.EndSpan(ctx, sc, err)
3699		}()
3700	}
3701	for {
3702		next, err := page.fn(ctx, page.dl)
3703		if err != nil {
3704			return err
3705		}
3706		page.dl = next
3707		if !next.hasNextLink() || !next.IsEmpty() {
3708			break
3709		}
3710	}
3711	return nil
3712}
3713
3714// Next advances to the next page of values.  If there was an error making
3715// the request the page does not advance and the error is returned.
3716// Deprecated: Use NextWithContext() instead.
3717func (page *DiskListPage) Next() error {
3718	return page.NextWithContext(context.Background())
3719}
3720
3721// NotDone returns true if the page enumeration should be started or is not yet complete.
3722func (page DiskListPage) NotDone() bool {
3723	return !page.dl.IsEmpty()
3724}
3725
3726// Response returns the raw server response from the last page request.
3727func (page DiskListPage) Response() DiskList {
3728	return page.dl
3729}
3730
3731// Values returns the slice of values for the current page or nil if there are no values.
3732func (page DiskListPage) Values() []Disk {
3733	if page.dl.IsEmpty() {
3734		return nil
3735	}
3736	return *page.dl.Value
3737}
3738
3739// Creates a new instance of the DiskListPage type.
3740func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
3741	return DiskListPage{
3742		fn: getNextPage,
3743		dl: cur,
3744	}
3745}
3746
3747// DiskProperties disk resource properties.
3748type DiskProperties struct {
3749	// TimeCreated - READ-ONLY; The time when the disk was created.
3750	TimeCreated *date.Time `json:"timeCreated,omitempty"`
3751	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
3752	OsType OperatingSystemTypes `json:"osType,omitempty"`
3753	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
3754	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
3755	// PurchasePlan - Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}
3756	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
3757	// CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
3758	CreationData *CreationData `json:"creationData,omitempty"`
3759	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
3760	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
3761	// DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
3762	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
3763	// UniqueID - READ-ONLY; Unique Guid identifying the resource.
3764	UniqueID *string `json:"uniqueId,omitempty"`
3765	// EncryptionSettingsCollection - Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
3766	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
3767	// ProvisioningState - READ-ONLY; The disk provisioning state.
3768	ProvisioningState *string `json:"provisioningState,omitempty"`
3769	// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
3770	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
3771	// DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
3772	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
3773	// DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
3774	DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
3775	// DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
3776	DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
3777	// DiskState - The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
3778	DiskState DiskState `json:"diskState,omitempty"`
3779	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
3780	Encryption *Encryption `json:"encryption,omitempty"`
3781	// MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
3782	MaxShares *int32 `json:"maxShares,omitempty"`
3783	// ShareInfo - READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
3784	ShareInfo *[]ShareInfoElement `json:"shareInfo,omitempty"`
3785	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
3786	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
3787	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
3788	DiskAccessID *string `json:"diskAccessId,omitempty"`
3789	// Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.
3790	Tier *string `json:"tier,omitempty"`
3791	// BurstingEnabled - Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
3792	BurstingEnabled *bool `json:"burstingEnabled,omitempty"`
3793}
3794
3795// MarshalJSON is the custom marshaler for DiskProperties.
3796func (dp DiskProperties) MarshalJSON() ([]byte, error) {
3797	objectMap := make(map[string]interface{})
3798	if dp.OsType != "" {
3799		objectMap["osType"] = dp.OsType
3800	}
3801	if dp.HyperVGeneration != "" {
3802		objectMap["hyperVGeneration"] = dp.HyperVGeneration
3803	}
3804	if dp.PurchasePlan != nil {
3805		objectMap["purchasePlan"] = dp.PurchasePlan
3806	}
3807	if dp.CreationData != nil {
3808		objectMap["creationData"] = dp.CreationData
3809	}
3810	if dp.DiskSizeGB != nil {
3811		objectMap["diskSizeGB"] = dp.DiskSizeGB
3812	}
3813	if dp.EncryptionSettingsCollection != nil {
3814		objectMap["encryptionSettingsCollection"] = dp.EncryptionSettingsCollection
3815	}
3816	if dp.DiskIOPSReadWrite != nil {
3817		objectMap["diskIOPSReadWrite"] = dp.DiskIOPSReadWrite
3818	}
3819	if dp.DiskMBpsReadWrite != nil {
3820		objectMap["diskMBpsReadWrite"] = dp.DiskMBpsReadWrite
3821	}
3822	if dp.DiskIOPSReadOnly != nil {
3823		objectMap["diskIOPSReadOnly"] = dp.DiskIOPSReadOnly
3824	}
3825	if dp.DiskMBpsReadOnly != nil {
3826		objectMap["diskMBpsReadOnly"] = dp.DiskMBpsReadOnly
3827	}
3828	if dp.DiskState != "" {
3829		objectMap["diskState"] = dp.DiskState
3830	}
3831	if dp.Encryption != nil {
3832		objectMap["encryption"] = dp.Encryption
3833	}
3834	if dp.MaxShares != nil {
3835		objectMap["maxShares"] = dp.MaxShares
3836	}
3837	if dp.NetworkAccessPolicy != "" {
3838		objectMap["networkAccessPolicy"] = dp.NetworkAccessPolicy
3839	}
3840	if dp.DiskAccessID != nil {
3841		objectMap["diskAccessId"] = dp.DiskAccessID
3842	}
3843	if dp.Tier != nil {
3844		objectMap["tier"] = dp.Tier
3845	}
3846	if dp.BurstingEnabled != nil {
3847		objectMap["burstingEnabled"] = dp.BurstingEnabled
3848	}
3849	return json.Marshal(objectMap)
3850}
3851
3852// DiskRestorePoint properties of disk restore point
3853type DiskRestorePoint struct {
3854	autorest.Response           `json:"-"`
3855	*DiskRestorePointProperties `json:"properties,omitempty"`
3856	// ID - READ-ONLY; Resource Id
3857	ID *string `json:"id,omitempty"`
3858	// Name - READ-ONLY; Resource name
3859	Name *string `json:"name,omitempty"`
3860	// Type - READ-ONLY; Resource type
3861	Type *string `json:"type,omitempty"`
3862}
3863
3864// MarshalJSON is the custom marshaler for DiskRestorePoint.
3865func (drp DiskRestorePoint) MarshalJSON() ([]byte, error) {
3866	objectMap := make(map[string]interface{})
3867	if drp.DiskRestorePointProperties != nil {
3868		objectMap["properties"] = drp.DiskRestorePointProperties
3869	}
3870	return json.Marshal(objectMap)
3871}
3872
3873// UnmarshalJSON is the custom unmarshaler for DiskRestorePoint struct.
3874func (drp *DiskRestorePoint) UnmarshalJSON(body []byte) error {
3875	var m map[string]*json.RawMessage
3876	err := json.Unmarshal(body, &m)
3877	if err != nil {
3878		return err
3879	}
3880	for k, v := range m {
3881		switch k {
3882		case "properties":
3883			if v != nil {
3884				var diskRestorePointProperties DiskRestorePointProperties
3885				err = json.Unmarshal(*v, &diskRestorePointProperties)
3886				if err != nil {
3887					return err
3888				}
3889				drp.DiskRestorePointProperties = &diskRestorePointProperties
3890			}
3891		case "id":
3892			if v != nil {
3893				var ID string
3894				err = json.Unmarshal(*v, &ID)
3895				if err != nil {
3896					return err
3897				}
3898				drp.ID = &ID
3899			}
3900		case "name":
3901			if v != nil {
3902				var name string
3903				err = json.Unmarshal(*v, &name)
3904				if err != nil {
3905					return err
3906				}
3907				drp.Name = &name
3908			}
3909		case "type":
3910			if v != nil {
3911				var typeVar string
3912				err = json.Unmarshal(*v, &typeVar)
3913				if err != nil {
3914					return err
3915				}
3916				drp.Type = &typeVar
3917			}
3918		}
3919	}
3920
3921	return nil
3922}
3923
3924// DiskRestorePointList the List Disk Restore Points operation response.
3925type DiskRestorePointList struct {
3926	autorest.Response `json:"-"`
3927	// Value - A list of disk restore points.
3928	Value *[]DiskRestorePoint `json:"value,omitempty"`
3929	// NextLink - The uri to fetch the next page of disk restore points. Call ListNext() with this to fetch the next page of disk restore points.
3930	NextLink *string `json:"nextLink,omitempty"`
3931}
3932
3933// DiskRestorePointListIterator provides access to a complete listing of DiskRestorePoint values.
3934type DiskRestorePointListIterator struct {
3935	i    int
3936	page DiskRestorePointListPage
3937}
3938
3939// NextWithContext advances to the next value.  If there was an error making
3940// the request the iterator does not advance and the error is returned.
3941func (iter *DiskRestorePointListIterator) NextWithContext(ctx context.Context) (err error) {
3942	if tracing.IsEnabled() {
3943		ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointListIterator.NextWithContext")
3944		defer func() {
3945			sc := -1
3946			if iter.Response().Response.Response != nil {
3947				sc = iter.Response().Response.Response.StatusCode
3948			}
3949			tracing.EndSpan(ctx, sc, err)
3950		}()
3951	}
3952	iter.i++
3953	if iter.i < len(iter.page.Values()) {
3954		return nil
3955	}
3956	err = iter.page.NextWithContext(ctx)
3957	if err != nil {
3958		iter.i--
3959		return err
3960	}
3961	iter.i = 0
3962	return nil
3963}
3964
3965// Next advances to the next value.  If there was an error making
3966// the request the iterator does not advance and the error is returned.
3967// Deprecated: Use NextWithContext() instead.
3968func (iter *DiskRestorePointListIterator) Next() error {
3969	return iter.NextWithContext(context.Background())
3970}
3971
3972// NotDone returns true if the enumeration should be started or is not yet complete.
3973func (iter DiskRestorePointListIterator) NotDone() bool {
3974	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3975}
3976
3977// Response returns the raw server response from the last page request.
3978func (iter DiskRestorePointListIterator) Response() DiskRestorePointList {
3979	return iter.page.Response()
3980}
3981
3982// Value returns the current value or a zero-initialized value if the
3983// iterator has advanced beyond the end of the collection.
3984func (iter DiskRestorePointListIterator) Value() DiskRestorePoint {
3985	if !iter.page.NotDone() {
3986		return DiskRestorePoint{}
3987	}
3988	return iter.page.Values()[iter.i]
3989}
3990
3991// Creates a new instance of the DiskRestorePointListIterator type.
3992func NewDiskRestorePointListIterator(page DiskRestorePointListPage) DiskRestorePointListIterator {
3993	return DiskRestorePointListIterator{page: page}
3994}
3995
3996// IsEmpty returns true if the ListResult contains no values.
3997func (drpl DiskRestorePointList) IsEmpty() bool {
3998	return drpl.Value == nil || len(*drpl.Value) == 0
3999}
4000
4001// hasNextLink returns true if the NextLink is not empty.
4002func (drpl DiskRestorePointList) hasNextLink() bool {
4003	return drpl.NextLink != nil && len(*drpl.NextLink) != 0
4004}
4005
4006// diskRestorePointListPreparer prepares a request to retrieve the next set of results.
4007// It returns nil if no more results exist.
4008func (drpl DiskRestorePointList) diskRestorePointListPreparer(ctx context.Context) (*http.Request, error) {
4009	if !drpl.hasNextLink() {
4010		return nil, nil
4011	}
4012	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4013		autorest.AsJSON(),
4014		autorest.AsGet(),
4015		autorest.WithBaseURL(to.String(drpl.NextLink)))
4016}
4017
4018// DiskRestorePointListPage contains a page of DiskRestorePoint values.
4019type DiskRestorePointListPage struct {
4020	fn   func(context.Context, DiskRestorePointList) (DiskRestorePointList, error)
4021	drpl DiskRestorePointList
4022}
4023
4024// NextWithContext advances to the next page of values.  If there was an error making
4025// the request the page does not advance and the error is returned.
4026func (page *DiskRestorePointListPage) NextWithContext(ctx context.Context) (err error) {
4027	if tracing.IsEnabled() {
4028		ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointListPage.NextWithContext")
4029		defer func() {
4030			sc := -1
4031			if page.Response().Response.Response != nil {
4032				sc = page.Response().Response.Response.StatusCode
4033			}
4034			tracing.EndSpan(ctx, sc, err)
4035		}()
4036	}
4037	for {
4038		next, err := page.fn(ctx, page.drpl)
4039		if err != nil {
4040			return err
4041		}
4042		page.drpl = next
4043		if !next.hasNextLink() || !next.IsEmpty() {
4044			break
4045		}
4046	}
4047	return nil
4048}
4049
4050// Next advances to the next page of values.  If there was an error making
4051// the request the page does not advance and the error is returned.
4052// Deprecated: Use NextWithContext() instead.
4053func (page *DiskRestorePointListPage) Next() error {
4054	return page.NextWithContext(context.Background())
4055}
4056
4057// NotDone returns true if the page enumeration should be started or is not yet complete.
4058func (page DiskRestorePointListPage) NotDone() bool {
4059	return !page.drpl.IsEmpty()
4060}
4061
4062// Response returns the raw server response from the last page request.
4063func (page DiskRestorePointListPage) Response() DiskRestorePointList {
4064	return page.drpl
4065}
4066
4067// Values returns the slice of values for the current page or nil if there are no values.
4068func (page DiskRestorePointListPage) Values() []DiskRestorePoint {
4069	if page.drpl.IsEmpty() {
4070		return nil
4071	}
4072	return *page.drpl.Value
4073}
4074
4075// Creates a new instance of the DiskRestorePointListPage type.
4076func NewDiskRestorePointListPage(cur DiskRestorePointList, getNextPage func(context.Context, DiskRestorePointList) (DiskRestorePointList, error)) DiskRestorePointListPage {
4077	return DiskRestorePointListPage{
4078		fn:   getNextPage,
4079		drpl: cur,
4080	}
4081}
4082
4083// DiskRestorePointProperties properties of an incremental disk restore point
4084type DiskRestorePointProperties struct {
4085	// TimeCreated - READ-ONLY; The timestamp of restorePoint creation
4086	TimeCreated *date.Time `json:"timeCreated,omitempty"`
4087	// SourceResourceID - READ-ONLY; arm id of source disk
4088	SourceResourceID *string `json:"sourceResourceId,omitempty"`
4089	// OsType - READ-ONLY; The Operating System type. Possible values include: 'Windows', 'Linux'
4090	OsType OperatingSystemTypes `json:"osType,omitempty"`
4091	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
4092	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
4093	// PurchasePlan - Purchase plan information for the the image from which the OS disk was created.
4094	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
4095	// FamilyID - READ-ONLY; id of the backing snapshot's MIS family
4096	FamilyID *string `json:"familyId,omitempty"`
4097	// SourceUniqueID - READ-ONLY; unique incarnation id of the source disk
4098	SourceUniqueID *string `json:"sourceUniqueId,omitempty"`
4099	// Encryption - READ-ONLY; Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
4100	Encryption *Encryption `json:"encryption,omitempty"`
4101}
4102
4103// MarshalJSON is the custom marshaler for DiskRestorePointProperties.
4104func (drpp DiskRestorePointProperties) MarshalJSON() ([]byte, error) {
4105	objectMap := make(map[string]interface{})
4106	if drpp.HyperVGeneration != "" {
4107		objectMap["hyperVGeneration"] = drpp.HyperVGeneration
4108	}
4109	if drpp.PurchasePlan != nil {
4110		objectMap["purchasePlan"] = drpp.PurchasePlan
4111	}
4112	return json.Marshal(objectMap)
4113}
4114
4115// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4116// operation.
4117type DisksCreateOrUpdateFuture struct {
4118	azure.FutureAPI
4119	// Result returns the result of the asynchronous operation.
4120	// If the operation has not completed it will return an error.
4121	Result func(DisksClient) (Disk, error)
4122}
4123
4124// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
4125type DisksDeleteFuture struct {
4126	azure.FutureAPI
4127	// Result returns the result of the asynchronous operation.
4128	// If the operation has not completed it will return an error.
4129	Result func(DisksClient) (autorest.Response, error)
4130}
4131
4132// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
4133// operation.
4134type DisksGrantAccessFuture struct {
4135	azure.FutureAPI
4136	// Result returns the result of the asynchronous operation.
4137	// If the operation has not completed it will return an error.
4138	Result func(DisksClient) (AccessURI, error)
4139}
4140
4141// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.
4142type DiskSku struct {
4143	// Name - The sku name. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS', 'UltraSSDLRS'
4144	Name DiskStorageAccountTypes `json:"name,omitempty"`
4145	// Tier - READ-ONLY; The sku tier.
4146	Tier *string `json:"tier,omitempty"`
4147}
4148
4149// MarshalJSON is the custom marshaler for DiskSku.
4150func (ds DiskSku) MarshalJSON() ([]byte, error) {
4151	objectMap := make(map[string]interface{})
4152	if ds.Name != "" {
4153		objectMap["name"] = ds.Name
4154	}
4155	return json.Marshal(objectMap)
4156}
4157
4158// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
4159// operation.
4160type DisksRevokeAccessFuture struct {
4161	azure.FutureAPI
4162	// Result returns the result of the asynchronous operation.
4163	// If the operation has not completed it will return an error.
4164	Result func(DisksClient) (autorest.Response, error)
4165}
4166
4167// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
4168type DisksUpdateFuture struct {
4169	azure.FutureAPI
4170	// Result returns the result of the asynchronous operation.
4171	// If the operation has not completed it will return an error.
4172	Result func(DisksClient) (Disk, error)
4173}
4174
4175// DiskUpdate disk update resource.
4176type DiskUpdate struct {
4177	*DiskUpdateProperties `json:"properties,omitempty"`
4178	// Tags - Resource tags
4179	Tags map[string]*string `json:"tags"`
4180	Sku  *DiskSku           `json:"sku,omitempty"`
4181}
4182
4183// MarshalJSON is the custom marshaler for DiskUpdate.
4184func (du DiskUpdate) MarshalJSON() ([]byte, error) {
4185	objectMap := make(map[string]interface{})
4186	if du.DiskUpdateProperties != nil {
4187		objectMap["properties"] = du.DiskUpdateProperties
4188	}
4189	if du.Tags != nil {
4190		objectMap["tags"] = du.Tags
4191	}
4192	if du.Sku != nil {
4193		objectMap["sku"] = du.Sku
4194	}
4195	return json.Marshal(objectMap)
4196}
4197
4198// UnmarshalJSON is the custom unmarshaler for DiskUpdate struct.
4199func (du *DiskUpdate) UnmarshalJSON(body []byte) error {
4200	var m map[string]*json.RawMessage
4201	err := json.Unmarshal(body, &m)
4202	if err != nil {
4203		return err
4204	}
4205	for k, v := range m {
4206		switch k {
4207		case "properties":
4208			if v != nil {
4209				var diskUpdateProperties DiskUpdateProperties
4210				err = json.Unmarshal(*v, &diskUpdateProperties)
4211				if err != nil {
4212					return err
4213				}
4214				du.DiskUpdateProperties = &diskUpdateProperties
4215			}
4216		case "tags":
4217			if v != nil {
4218				var tags map[string]*string
4219				err = json.Unmarshal(*v, &tags)
4220				if err != nil {
4221					return err
4222				}
4223				du.Tags = tags
4224			}
4225		case "sku":
4226			if v != nil {
4227				var sku DiskSku
4228				err = json.Unmarshal(*v, &sku)
4229				if err != nil {
4230					return err
4231				}
4232				du.Sku = &sku
4233			}
4234		}
4235	}
4236
4237	return nil
4238}
4239
4240// DiskUpdateProperties disk resource update properties.
4241type DiskUpdateProperties struct {
4242	// OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
4243	OsType OperatingSystemTypes `json:"osType,omitempty"`
4244	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
4245	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
4246	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
4247	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
4248	// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
4249	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
4250	// DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
4251	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
4252	// DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
4253	DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
4254	// DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
4255	DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
4256	// MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
4257	MaxShares *int32 `json:"maxShares,omitempty"`
4258	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
4259	Encryption *Encryption `json:"encryption,omitempty"`
4260	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
4261	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
4262	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
4263	DiskAccessID *string `json:"diskAccessId,omitempty"`
4264	// Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.
4265	Tier *string `json:"tier,omitempty"`
4266	// BurstingEnabled - Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
4267	BurstingEnabled *bool `json:"burstingEnabled,omitempty"`
4268	// PurchasePlan - Purchase plan information to be added on the OS disk
4269	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
4270}
4271
4272// Encryption encryption at rest settings for disk or snapshot
4273type Encryption struct {
4274	// DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest.
4275	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
4276	// Type - Possible values include: 'EncryptionTypeEncryptionAtRestWithPlatformKey', 'EncryptionTypeEncryptionAtRestWithCustomerKey', 'EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys'
4277	Type EncryptionType `json:"type,omitempty"`
4278}
4279
4280// EncryptionImages optional. Allows users to provide customer managed keys for encrypting the OS and data
4281// disks in the gallery artifact.
4282type EncryptionImages struct {
4283	OsDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"`
4284	// DataDiskImages - A list of encryption specifications for data disk images.
4285	DataDiskImages *[]DataDiskImageEncryption `json:"dataDiskImages,omitempty"`
4286}
4287
4288// EncryptionSetIdentity the managed identity for the disk encryption set. It should be given permission on
4289// the key vault before it can be used to encrypt disks.
4290type EncryptionSetIdentity struct {
4291	// Type - The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys. Possible values include: 'DiskEncryptionSetIdentityTypeSystemAssigned', 'DiskEncryptionSetIdentityTypeNone'
4292	Type DiskEncryptionSetIdentityType `json:"type,omitempty"`
4293	// PrincipalID - READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity
4294	PrincipalID *string `json:"principalId,omitempty"`
4295	// TenantID - READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity
4296	TenantID *string `json:"tenantId,omitempty"`
4297}
4298
4299// MarshalJSON is the custom marshaler for EncryptionSetIdentity.
4300func (esi EncryptionSetIdentity) MarshalJSON() ([]byte, error) {
4301	objectMap := make(map[string]interface{})
4302	if esi.Type != "" {
4303		objectMap["type"] = esi.Type
4304	}
4305	return json.Marshal(objectMap)
4306}
4307
4308// EncryptionSetProperties ...
4309type EncryptionSetProperties struct {
4310	// EncryptionType - Possible values include: 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys'
4311	EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"`
4312	// ActiveKey - The key vault key which is currently used by this disk encryption set.
4313	ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`
4314	// PreviousKeys - READ-ONLY; A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation.
4315	PreviousKeys *[]KeyForDiskEncryptionSet `json:"previousKeys,omitempty"`
4316	// ProvisioningState - READ-ONLY; The disk encryption set provisioning state.
4317	ProvisioningState *string `json:"provisioningState,omitempty"`
4318}
4319
4320// MarshalJSON is the custom marshaler for EncryptionSetProperties.
4321func (esp EncryptionSetProperties) MarshalJSON() ([]byte, error) {
4322	objectMap := make(map[string]interface{})
4323	if esp.EncryptionType != "" {
4324		objectMap["encryptionType"] = esp.EncryptionType
4325	}
4326	if esp.ActiveKey != nil {
4327		objectMap["activeKey"] = esp.ActiveKey
4328	}
4329	return json.Marshal(objectMap)
4330}
4331
4332// EncryptionSettingsCollection encryption settings for disk or snapshot
4333type EncryptionSettingsCollection struct {
4334	// 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.
4335	Enabled *bool `json:"enabled,omitempty"`
4336	// EncryptionSettings - A collection of encryption settings, one for each disk volume.
4337	EncryptionSettings *[]EncryptionSettingsElement `json:"encryptionSettings,omitempty"`
4338	// EncryptionSettingsVersion - Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.
4339	EncryptionSettingsVersion *string `json:"encryptionSettingsVersion,omitempty"`
4340}
4341
4342// EncryptionSettingsElement encryption settings for one disk volume.
4343type EncryptionSettingsElement struct {
4344	// DiskEncryptionKey - Key Vault Secret Url and vault id of the disk encryption key
4345	DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"`
4346	// KeyEncryptionKey - Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.
4347	KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"`
4348}
4349
4350// ExtendedLocation the complex type of the extended location.
4351type ExtendedLocation struct {
4352	// Name - The name of the extended location.
4353	Name *string `json:"name,omitempty"`
4354	// Type - The type of the extended location. Possible values include: 'EdgeZone'
4355	Type ExtendedLocationTypes `json:"type,omitempty"`
4356}
4357
4358// Extension describes a cloud service Extension.
4359type Extension struct {
4360	// Name - The name of the extension.
4361	Name       *string                          `json:"name,omitempty"`
4362	Properties *CloudServiceExtensionProperties `json:"properties,omitempty"`
4363}
4364
4365// GalleriesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4366// operation.
4367type GalleriesCreateOrUpdateFuture struct {
4368	azure.FutureAPI
4369	// Result returns the result of the asynchronous operation.
4370	// If the operation has not completed it will return an error.
4371	Result func(GalleriesClient) (Gallery, error)
4372}
4373
4374// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4375// operation.
4376type GalleriesDeleteFuture struct {
4377	azure.FutureAPI
4378	// Result returns the result of the asynchronous operation.
4379	// If the operation has not completed it will return an error.
4380	Result func(GalleriesClient) (autorest.Response, error)
4381}
4382
4383// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4384// operation.
4385type GalleriesUpdateFuture struct {
4386	azure.FutureAPI
4387	// Result returns the result of the asynchronous operation.
4388	// If the operation has not completed it will return an error.
4389	Result func(GalleriesClient) (Gallery, error)
4390}
4391
4392// Gallery specifies information about the Shared Image Gallery that you want to create or update.
4393type Gallery struct {
4394	autorest.Response  `json:"-"`
4395	*GalleryProperties `json:"properties,omitempty"`
4396	// ID - READ-ONLY; Resource Id
4397	ID *string `json:"id,omitempty"`
4398	// Name - READ-ONLY; Resource name
4399	Name *string `json:"name,omitempty"`
4400	// Type - READ-ONLY; Resource type
4401	Type *string `json:"type,omitempty"`
4402	// Location - Resource location
4403	Location *string `json:"location,omitempty"`
4404	// Tags - Resource tags
4405	Tags map[string]*string `json:"tags"`
4406}
4407
4408// MarshalJSON is the custom marshaler for Gallery.
4409func (g Gallery) MarshalJSON() ([]byte, error) {
4410	objectMap := make(map[string]interface{})
4411	if g.GalleryProperties != nil {
4412		objectMap["properties"] = g.GalleryProperties
4413	}
4414	if g.Location != nil {
4415		objectMap["location"] = g.Location
4416	}
4417	if g.Tags != nil {
4418		objectMap["tags"] = g.Tags
4419	}
4420	return json.Marshal(objectMap)
4421}
4422
4423// UnmarshalJSON is the custom unmarshaler for Gallery struct.
4424func (g *Gallery) UnmarshalJSON(body []byte) error {
4425	var m map[string]*json.RawMessage
4426	err := json.Unmarshal(body, &m)
4427	if err != nil {
4428		return err
4429	}
4430	for k, v := range m {
4431		switch k {
4432		case "properties":
4433			if v != nil {
4434				var galleryProperties GalleryProperties
4435				err = json.Unmarshal(*v, &galleryProperties)
4436				if err != nil {
4437					return err
4438				}
4439				g.GalleryProperties = &galleryProperties
4440			}
4441		case "id":
4442			if v != nil {
4443				var ID string
4444				err = json.Unmarshal(*v, &ID)
4445				if err != nil {
4446					return err
4447				}
4448				g.ID = &ID
4449			}
4450		case "name":
4451			if v != nil {
4452				var name string
4453				err = json.Unmarshal(*v, &name)
4454				if err != nil {
4455					return err
4456				}
4457				g.Name = &name
4458			}
4459		case "type":
4460			if v != nil {
4461				var typeVar string
4462				err = json.Unmarshal(*v, &typeVar)
4463				if err != nil {
4464					return err
4465				}
4466				g.Type = &typeVar
4467			}
4468		case "location":
4469			if v != nil {
4470				var location string
4471				err = json.Unmarshal(*v, &location)
4472				if err != nil {
4473					return err
4474				}
4475				g.Location = &location
4476			}
4477		case "tags":
4478			if v != nil {
4479				var tags map[string]*string
4480				err = json.Unmarshal(*v, &tags)
4481				if err != nil {
4482					return err
4483				}
4484				g.Tags = tags
4485			}
4486		}
4487	}
4488
4489	return nil
4490}
4491
4492// GalleryApplication specifies information about the gallery Application Definition that you want to
4493// create or update.
4494type GalleryApplication struct {
4495	autorest.Response             `json:"-"`
4496	*GalleryApplicationProperties `json:"properties,omitempty"`
4497	// ID - READ-ONLY; Resource Id
4498	ID *string `json:"id,omitempty"`
4499	// Name - READ-ONLY; Resource name
4500	Name *string `json:"name,omitempty"`
4501	// Type - READ-ONLY; Resource type
4502	Type *string `json:"type,omitempty"`
4503	// Location - Resource location
4504	Location *string `json:"location,omitempty"`
4505	// Tags - Resource tags
4506	Tags map[string]*string `json:"tags"`
4507}
4508
4509// MarshalJSON is the custom marshaler for GalleryApplication.
4510func (ga GalleryApplication) MarshalJSON() ([]byte, error) {
4511	objectMap := make(map[string]interface{})
4512	if ga.GalleryApplicationProperties != nil {
4513		objectMap["properties"] = ga.GalleryApplicationProperties
4514	}
4515	if ga.Location != nil {
4516		objectMap["location"] = ga.Location
4517	}
4518	if ga.Tags != nil {
4519		objectMap["tags"] = ga.Tags
4520	}
4521	return json.Marshal(objectMap)
4522}
4523
4524// UnmarshalJSON is the custom unmarshaler for GalleryApplication struct.
4525func (ga *GalleryApplication) UnmarshalJSON(body []byte) error {
4526	var m map[string]*json.RawMessage
4527	err := json.Unmarshal(body, &m)
4528	if err != nil {
4529		return err
4530	}
4531	for k, v := range m {
4532		switch k {
4533		case "properties":
4534			if v != nil {
4535				var galleryApplicationProperties GalleryApplicationProperties
4536				err = json.Unmarshal(*v, &galleryApplicationProperties)
4537				if err != nil {
4538					return err
4539				}
4540				ga.GalleryApplicationProperties = &galleryApplicationProperties
4541			}
4542		case "id":
4543			if v != nil {
4544				var ID string
4545				err = json.Unmarshal(*v, &ID)
4546				if err != nil {
4547					return err
4548				}
4549				ga.ID = &ID
4550			}
4551		case "name":
4552			if v != nil {
4553				var name string
4554				err = json.Unmarshal(*v, &name)
4555				if err != nil {
4556					return err
4557				}
4558				ga.Name = &name
4559			}
4560		case "type":
4561			if v != nil {
4562				var typeVar string
4563				err = json.Unmarshal(*v, &typeVar)
4564				if err != nil {
4565					return err
4566				}
4567				ga.Type = &typeVar
4568			}
4569		case "location":
4570			if v != nil {
4571				var location string
4572				err = json.Unmarshal(*v, &location)
4573				if err != nil {
4574					return err
4575				}
4576				ga.Location = &location
4577			}
4578		case "tags":
4579			if v != nil {
4580				var tags map[string]*string
4581				err = json.Unmarshal(*v, &tags)
4582				if err != nil {
4583					return err
4584				}
4585				ga.Tags = tags
4586			}
4587		}
4588	}
4589
4590	return nil
4591}
4592
4593// GalleryApplicationList the List Gallery Applications operation response.
4594type GalleryApplicationList struct {
4595	autorest.Response `json:"-"`
4596	// Value - A list of Gallery Applications.
4597	Value *[]GalleryApplication `json:"value,omitempty"`
4598	// NextLink - The uri to fetch the next page of Application Definitions in the Application Gallery. Call ListNext() with this to fetch the next page of gallery Application Definitions.
4599	NextLink *string `json:"nextLink,omitempty"`
4600}
4601
4602// GalleryApplicationListIterator provides access to a complete listing of GalleryApplication values.
4603type GalleryApplicationListIterator struct {
4604	i    int
4605	page GalleryApplicationListPage
4606}
4607
4608// NextWithContext advances to the next value.  If there was an error making
4609// the request the iterator does not advance and the error is returned.
4610func (iter *GalleryApplicationListIterator) NextWithContext(ctx context.Context) (err error) {
4611	if tracing.IsEnabled() {
4612		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListIterator.NextWithContext")
4613		defer func() {
4614			sc := -1
4615			if iter.Response().Response.Response != nil {
4616				sc = iter.Response().Response.Response.StatusCode
4617			}
4618			tracing.EndSpan(ctx, sc, err)
4619		}()
4620	}
4621	iter.i++
4622	if iter.i < len(iter.page.Values()) {
4623		return nil
4624	}
4625	err = iter.page.NextWithContext(ctx)
4626	if err != nil {
4627		iter.i--
4628		return err
4629	}
4630	iter.i = 0
4631	return nil
4632}
4633
4634// Next advances to the next value.  If there was an error making
4635// the request the iterator does not advance and the error is returned.
4636// Deprecated: Use NextWithContext() instead.
4637func (iter *GalleryApplicationListIterator) Next() error {
4638	return iter.NextWithContext(context.Background())
4639}
4640
4641// NotDone returns true if the enumeration should be started or is not yet complete.
4642func (iter GalleryApplicationListIterator) NotDone() bool {
4643	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4644}
4645
4646// Response returns the raw server response from the last page request.
4647func (iter GalleryApplicationListIterator) Response() GalleryApplicationList {
4648	return iter.page.Response()
4649}
4650
4651// Value returns the current value or a zero-initialized value if the
4652// iterator has advanced beyond the end of the collection.
4653func (iter GalleryApplicationListIterator) Value() GalleryApplication {
4654	if !iter.page.NotDone() {
4655		return GalleryApplication{}
4656	}
4657	return iter.page.Values()[iter.i]
4658}
4659
4660// Creates a new instance of the GalleryApplicationListIterator type.
4661func NewGalleryApplicationListIterator(page GalleryApplicationListPage) GalleryApplicationListIterator {
4662	return GalleryApplicationListIterator{page: page}
4663}
4664
4665// IsEmpty returns true if the ListResult contains no values.
4666func (gal GalleryApplicationList) IsEmpty() bool {
4667	return gal.Value == nil || len(*gal.Value) == 0
4668}
4669
4670// hasNextLink returns true if the NextLink is not empty.
4671func (gal GalleryApplicationList) hasNextLink() bool {
4672	return gal.NextLink != nil && len(*gal.NextLink) != 0
4673}
4674
4675// galleryApplicationListPreparer prepares a request to retrieve the next set of results.
4676// It returns nil if no more results exist.
4677func (gal GalleryApplicationList) galleryApplicationListPreparer(ctx context.Context) (*http.Request, error) {
4678	if !gal.hasNextLink() {
4679		return nil, nil
4680	}
4681	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4682		autorest.AsJSON(),
4683		autorest.AsGet(),
4684		autorest.WithBaseURL(to.String(gal.NextLink)))
4685}
4686
4687// GalleryApplicationListPage contains a page of GalleryApplication values.
4688type GalleryApplicationListPage struct {
4689	fn  func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)
4690	gal GalleryApplicationList
4691}
4692
4693// NextWithContext advances to the next page of values.  If there was an error making
4694// the request the page does not advance and the error is returned.
4695func (page *GalleryApplicationListPage) NextWithContext(ctx context.Context) (err error) {
4696	if tracing.IsEnabled() {
4697		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListPage.NextWithContext")
4698		defer func() {
4699			sc := -1
4700			if page.Response().Response.Response != nil {
4701				sc = page.Response().Response.Response.StatusCode
4702			}
4703			tracing.EndSpan(ctx, sc, err)
4704		}()
4705	}
4706	for {
4707		next, err := page.fn(ctx, page.gal)
4708		if err != nil {
4709			return err
4710		}
4711		page.gal = next
4712		if !next.hasNextLink() || !next.IsEmpty() {
4713			break
4714		}
4715	}
4716	return nil
4717}
4718
4719// Next advances to the next page of values.  If there was an error making
4720// the request the page does not advance and the error is returned.
4721// Deprecated: Use NextWithContext() instead.
4722func (page *GalleryApplicationListPage) Next() error {
4723	return page.NextWithContext(context.Background())
4724}
4725
4726// NotDone returns true if the page enumeration should be started or is not yet complete.
4727func (page GalleryApplicationListPage) NotDone() bool {
4728	return !page.gal.IsEmpty()
4729}
4730
4731// Response returns the raw server response from the last page request.
4732func (page GalleryApplicationListPage) Response() GalleryApplicationList {
4733	return page.gal
4734}
4735
4736// Values returns the slice of values for the current page or nil if there are no values.
4737func (page GalleryApplicationListPage) Values() []GalleryApplication {
4738	if page.gal.IsEmpty() {
4739		return nil
4740	}
4741	return *page.gal.Value
4742}
4743
4744// Creates a new instance of the GalleryApplicationListPage type.
4745func NewGalleryApplicationListPage(cur GalleryApplicationList, getNextPage func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)) GalleryApplicationListPage {
4746	return GalleryApplicationListPage{
4747		fn:  getNextPage,
4748		gal: cur,
4749	}
4750}
4751
4752// GalleryApplicationProperties describes the properties of a gallery Application Definition.
4753type GalleryApplicationProperties struct {
4754	// Description - The description of this gallery Application Definition resource. This property is updatable.
4755	Description *string `json:"description,omitempty"`
4756	// Eula - The Eula agreement for the gallery Application Definition.
4757	Eula *string `json:"eula,omitempty"`
4758	// PrivacyStatementURI - The privacy statement uri.
4759	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
4760	// ReleaseNoteURI - The release note uri.
4761	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
4762	// EndOfLifeDate - The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable.
4763	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
4764	// SupportedOSType - This property allows you to specify the supported type of the OS that application is built for. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
4765	SupportedOSType OperatingSystemTypes `json:"supportedOSType,omitempty"`
4766}
4767
4768// GalleryApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4769// long-running operation.
4770type GalleryApplicationsCreateOrUpdateFuture struct {
4771	azure.FutureAPI
4772	// Result returns the result of the asynchronous operation.
4773	// If the operation has not completed it will return an error.
4774	Result func(GalleryApplicationsClient) (GalleryApplication, error)
4775}
4776
4777// GalleryApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a
4778// long-running operation.
4779type GalleryApplicationsDeleteFuture struct {
4780	azure.FutureAPI
4781	// Result returns the result of the asynchronous operation.
4782	// If the operation has not completed it will return an error.
4783	Result func(GalleryApplicationsClient) (autorest.Response, error)
4784}
4785
4786// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a
4787// long-running operation.
4788type GalleryApplicationsUpdateFuture struct {
4789	azure.FutureAPI
4790	// Result returns the result of the asynchronous operation.
4791	// If the operation has not completed it will return an error.
4792	Result func(GalleryApplicationsClient) (GalleryApplication, error)
4793}
4794
4795// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to
4796// update.
4797type GalleryApplicationUpdate struct {
4798	*GalleryApplicationProperties `json:"properties,omitempty"`
4799	// ID - READ-ONLY; Resource Id
4800	ID *string `json:"id,omitempty"`
4801	// Name - READ-ONLY; Resource name
4802	Name *string `json:"name,omitempty"`
4803	// Type - READ-ONLY; Resource type
4804	Type *string `json:"type,omitempty"`
4805	// Tags - Resource tags
4806	Tags map[string]*string `json:"tags"`
4807}
4808
4809// MarshalJSON is the custom marshaler for GalleryApplicationUpdate.
4810func (gau GalleryApplicationUpdate) MarshalJSON() ([]byte, error) {
4811	objectMap := make(map[string]interface{})
4812	if gau.GalleryApplicationProperties != nil {
4813		objectMap["properties"] = gau.GalleryApplicationProperties
4814	}
4815	if gau.Tags != nil {
4816		objectMap["tags"] = gau.Tags
4817	}
4818	return json.Marshal(objectMap)
4819}
4820
4821// UnmarshalJSON is the custom unmarshaler for GalleryApplicationUpdate struct.
4822func (gau *GalleryApplicationUpdate) UnmarshalJSON(body []byte) error {
4823	var m map[string]*json.RawMessage
4824	err := json.Unmarshal(body, &m)
4825	if err != nil {
4826		return err
4827	}
4828	for k, v := range m {
4829		switch k {
4830		case "properties":
4831			if v != nil {
4832				var galleryApplicationProperties GalleryApplicationProperties
4833				err = json.Unmarshal(*v, &galleryApplicationProperties)
4834				if err != nil {
4835					return err
4836				}
4837				gau.GalleryApplicationProperties = &galleryApplicationProperties
4838			}
4839		case "id":
4840			if v != nil {
4841				var ID string
4842				err = json.Unmarshal(*v, &ID)
4843				if err != nil {
4844					return err
4845				}
4846				gau.ID = &ID
4847			}
4848		case "name":
4849			if v != nil {
4850				var name string
4851				err = json.Unmarshal(*v, &name)
4852				if err != nil {
4853					return err
4854				}
4855				gau.Name = &name
4856			}
4857		case "type":
4858			if v != nil {
4859				var typeVar string
4860				err = json.Unmarshal(*v, &typeVar)
4861				if err != nil {
4862					return err
4863				}
4864				gau.Type = &typeVar
4865			}
4866		case "tags":
4867			if v != nil {
4868				var tags map[string]*string
4869				err = json.Unmarshal(*v, &tags)
4870				if err != nil {
4871					return err
4872				}
4873				gau.Tags = tags
4874			}
4875		}
4876	}
4877
4878	return nil
4879}
4880
4881// GalleryApplicationVersion specifies information about the gallery Application Version that you want to
4882// create or update.
4883type GalleryApplicationVersion struct {
4884	autorest.Response                    `json:"-"`
4885	*GalleryApplicationVersionProperties `json:"properties,omitempty"`
4886	// ID - READ-ONLY; Resource Id
4887	ID *string `json:"id,omitempty"`
4888	// Name - READ-ONLY; Resource name
4889	Name *string `json:"name,omitempty"`
4890	// Type - READ-ONLY; Resource type
4891	Type *string `json:"type,omitempty"`
4892	// Location - Resource location
4893	Location *string `json:"location,omitempty"`
4894	// Tags - Resource tags
4895	Tags map[string]*string `json:"tags"`
4896}
4897
4898// MarshalJSON is the custom marshaler for GalleryApplicationVersion.
4899func (gav GalleryApplicationVersion) MarshalJSON() ([]byte, error) {
4900	objectMap := make(map[string]interface{})
4901	if gav.GalleryApplicationVersionProperties != nil {
4902		objectMap["properties"] = gav.GalleryApplicationVersionProperties
4903	}
4904	if gav.Location != nil {
4905		objectMap["location"] = gav.Location
4906	}
4907	if gav.Tags != nil {
4908		objectMap["tags"] = gav.Tags
4909	}
4910	return json.Marshal(objectMap)
4911}
4912
4913// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersion struct.
4914func (gav *GalleryApplicationVersion) UnmarshalJSON(body []byte) error {
4915	var m map[string]*json.RawMessage
4916	err := json.Unmarshal(body, &m)
4917	if err != nil {
4918		return err
4919	}
4920	for k, v := range m {
4921		switch k {
4922		case "properties":
4923			if v != nil {
4924				var galleryApplicationVersionProperties GalleryApplicationVersionProperties
4925				err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
4926				if err != nil {
4927					return err
4928				}
4929				gav.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
4930			}
4931		case "id":
4932			if v != nil {
4933				var ID string
4934				err = json.Unmarshal(*v, &ID)
4935				if err != nil {
4936					return err
4937				}
4938				gav.ID = &ID
4939			}
4940		case "name":
4941			if v != nil {
4942				var name string
4943				err = json.Unmarshal(*v, &name)
4944				if err != nil {
4945					return err
4946				}
4947				gav.Name = &name
4948			}
4949		case "type":
4950			if v != nil {
4951				var typeVar string
4952				err = json.Unmarshal(*v, &typeVar)
4953				if err != nil {
4954					return err
4955				}
4956				gav.Type = &typeVar
4957			}
4958		case "location":
4959			if v != nil {
4960				var location string
4961				err = json.Unmarshal(*v, &location)
4962				if err != nil {
4963					return err
4964				}
4965				gav.Location = &location
4966			}
4967		case "tags":
4968			if v != nil {
4969				var tags map[string]*string
4970				err = json.Unmarshal(*v, &tags)
4971				if err != nil {
4972					return err
4973				}
4974				gav.Tags = tags
4975			}
4976		}
4977	}
4978
4979	return nil
4980}
4981
4982// GalleryApplicationVersionList the List Gallery Application version operation response.
4983type GalleryApplicationVersionList struct {
4984	autorest.Response `json:"-"`
4985	// Value - A list of gallery Application Versions.
4986	Value *[]GalleryApplicationVersion `json:"value,omitempty"`
4987	// NextLink - The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to fetch the next page of gallery Application Versions.
4988	NextLink *string `json:"nextLink,omitempty"`
4989}
4990
4991// GalleryApplicationVersionListIterator provides access to a complete listing of GalleryApplicationVersion
4992// values.
4993type GalleryApplicationVersionListIterator struct {
4994	i    int
4995	page GalleryApplicationVersionListPage
4996}
4997
4998// NextWithContext advances to the next value.  If there was an error making
4999// the request the iterator does not advance and the error is returned.
5000func (iter *GalleryApplicationVersionListIterator) NextWithContext(ctx context.Context) (err error) {
5001	if tracing.IsEnabled() {
5002		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListIterator.NextWithContext")
5003		defer func() {
5004			sc := -1
5005			if iter.Response().Response.Response != nil {
5006				sc = iter.Response().Response.Response.StatusCode
5007			}
5008			tracing.EndSpan(ctx, sc, err)
5009		}()
5010	}
5011	iter.i++
5012	if iter.i < len(iter.page.Values()) {
5013		return nil
5014	}
5015	err = iter.page.NextWithContext(ctx)
5016	if err != nil {
5017		iter.i--
5018		return err
5019	}
5020	iter.i = 0
5021	return nil
5022}
5023
5024// Next advances to the next value.  If there was an error making
5025// the request the iterator does not advance and the error is returned.
5026// Deprecated: Use NextWithContext() instead.
5027func (iter *GalleryApplicationVersionListIterator) Next() error {
5028	return iter.NextWithContext(context.Background())
5029}
5030
5031// NotDone returns true if the enumeration should be started or is not yet complete.
5032func (iter GalleryApplicationVersionListIterator) NotDone() bool {
5033	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5034}
5035
5036// Response returns the raw server response from the last page request.
5037func (iter GalleryApplicationVersionListIterator) Response() GalleryApplicationVersionList {
5038	return iter.page.Response()
5039}
5040
5041// Value returns the current value or a zero-initialized value if the
5042// iterator has advanced beyond the end of the collection.
5043func (iter GalleryApplicationVersionListIterator) Value() GalleryApplicationVersion {
5044	if !iter.page.NotDone() {
5045		return GalleryApplicationVersion{}
5046	}
5047	return iter.page.Values()[iter.i]
5048}
5049
5050// Creates a new instance of the GalleryApplicationVersionListIterator type.
5051func NewGalleryApplicationVersionListIterator(page GalleryApplicationVersionListPage) GalleryApplicationVersionListIterator {
5052	return GalleryApplicationVersionListIterator{page: page}
5053}
5054
5055// IsEmpty returns true if the ListResult contains no values.
5056func (gavl GalleryApplicationVersionList) IsEmpty() bool {
5057	return gavl.Value == nil || len(*gavl.Value) == 0
5058}
5059
5060// hasNextLink returns true if the NextLink is not empty.
5061func (gavl GalleryApplicationVersionList) hasNextLink() bool {
5062	return gavl.NextLink != nil && len(*gavl.NextLink) != 0
5063}
5064
5065// galleryApplicationVersionListPreparer prepares a request to retrieve the next set of results.
5066// It returns nil if no more results exist.
5067func (gavl GalleryApplicationVersionList) galleryApplicationVersionListPreparer(ctx context.Context) (*http.Request, error) {
5068	if !gavl.hasNextLink() {
5069		return nil, nil
5070	}
5071	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5072		autorest.AsJSON(),
5073		autorest.AsGet(),
5074		autorest.WithBaseURL(to.String(gavl.NextLink)))
5075}
5076
5077// GalleryApplicationVersionListPage contains a page of GalleryApplicationVersion values.
5078type GalleryApplicationVersionListPage struct {
5079	fn   func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)
5080	gavl GalleryApplicationVersionList
5081}
5082
5083// NextWithContext advances to the next page of values.  If there was an error making
5084// the request the page does not advance and the error is returned.
5085func (page *GalleryApplicationVersionListPage) NextWithContext(ctx context.Context) (err error) {
5086	if tracing.IsEnabled() {
5087		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListPage.NextWithContext")
5088		defer func() {
5089			sc := -1
5090			if page.Response().Response.Response != nil {
5091				sc = page.Response().Response.Response.StatusCode
5092			}
5093			tracing.EndSpan(ctx, sc, err)
5094		}()
5095	}
5096	for {
5097		next, err := page.fn(ctx, page.gavl)
5098		if err != nil {
5099			return err
5100		}
5101		page.gavl = next
5102		if !next.hasNextLink() || !next.IsEmpty() {
5103			break
5104		}
5105	}
5106	return nil
5107}
5108
5109// Next advances to the next page of values.  If there was an error making
5110// the request the page does not advance and the error is returned.
5111// Deprecated: Use NextWithContext() instead.
5112func (page *GalleryApplicationVersionListPage) Next() error {
5113	return page.NextWithContext(context.Background())
5114}
5115
5116// NotDone returns true if the page enumeration should be started or is not yet complete.
5117func (page GalleryApplicationVersionListPage) NotDone() bool {
5118	return !page.gavl.IsEmpty()
5119}
5120
5121// Response returns the raw server response from the last page request.
5122func (page GalleryApplicationVersionListPage) Response() GalleryApplicationVersionList {
5123	return page.gavl
5124}
5125
5126// Values returns the slice of values for the current page or nil if there are no values.
5127func (page GalleryApplicationVersionListPage) Values() []GalleryApplicationVersion {
5128	if page.gavl.IsEmpty() {
5129		return nil
5130	}
5131	return *page.gavl.Value
5132}
5133
5134// Creates a new instance of the GalleryApplicationVersionListPage type.
5135func NewGalleryApplicationVersionListPage(cur GalleryApplicationVersionList, getNextPage func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)) GalleryApplicationVersionListPage {
5136	return GalleryApplicationVersionListPage{
5137		fn:   getNextPage,
5138		gavl: cur,
5139	}
5140}
5141
5142// GalleryApplicationVersionProperties describes the properties of a gallery Image Version.
5143type GalleryApplicationVersionProperties struct {
5144	PublishingProfile *GalleryApplicationVersionPublishingProfile `json:"publishingProfile,omitempty"`
5145	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1Updating', 'ProvisioningState1Failed', 'ProvisioningState1Succeeded', 'ProvisioningState1Deleting', 'ProvisioningState1Migrating'
5146	ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"`
5147	// ReplicationStatus - READ-ONLY
5148	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
5149}
5150
5151// MarshalJSON is the custom marshaler for GalleryApplicationVersionProperties.
5152func (gavp GalleryApplicationVersionProperties) MarshalJSON() ([]byte, error) {
5153	objectMap := make(map[string]interface{})
5154	if gavp.PublishingProfile != nil {
5155		objectMap["publishingProfile"] = gavp.PublishingProfile
5156	}
5157	return json.Marshal(objectMap)
5158}
5159
5160// GalleryApplicationVersionPublishingProfile the publishing profile of a gallery image version.
5161type GalleryApplicationVersionPublishingProfile struct {
5162	Source        *UserArtifactSource `json:"source,omitempty"`
5163	ManageActions *UserArtifactManage `json:"manageActions,omitempty"`
5164	// EnableHealthCheck - Optional. Whether or not this application reports health.
5165	EnableHealthCheck *bool `json:"enableHealthCheck,omitempty"`
5166	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
5167	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
5168	// ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
5169	ReplicaCount *int32 `json:"replicaCount,omitempty"`
5170	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
5171	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
5172	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
5173	PublishedDate *date.Time `json:"publishedDate,omitempty"`
5174	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
5175	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
5176	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
5177	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
5178}
5179
5180// MarshalJSON is the custom marshaler for GalleryApplicationVersionPublishingProfile.
5181func (gavpp GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, error) {
5182	objectMap := make(map[string]interface{})
5183	if gavpp.Source != nil {
5184		objectMap["source"] = gavpp.Source
5185	}
5186	if gavpp.ManageActions != nil {
5187		objectMap["manageActions"] = gavpp.ManageActions
5188	}
5189	if gavpp.EnableHealthCheck != nil {
5190		objectMap["enableHealthCheck"] = gavpp.EnableHealthCheck
5191	}
5192	if gavpp.TargetRegions != nil {
5193		objectMap["targetRegions"] = gavpp.TargetRegions
5194	}
5195	if gavpp.ReplicaCount != nil {
5196		objectMap["replicaCount"] = gavpp.ReplicaCount
5197	}
5198	if gavpp.ExcludeFromLatest != nil {
5199		objectMap["excludeFromLatest"] = gavpp.ExcludeFromLatest
5200	}
5201	if gavpp.EndOfLifeDate != nil {
5202		objectMap["endOfLifeDate"] = gavpp.EndOfLifeDate
5203	}
5204	if gavpp.StorageAccountType != "" {
5205		objectMap["storageAccountType"] = gavpp.StorageAccountType
5206	}
5207	return json.Marshal(objectMap)
5208}
5209
5210// GalleryApplicationVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
5211// of a long-running operation.
5212type GalleryApplicationVersionsCreateOrUpdateFuture struct {
5213	azure.FutureAPI
5214	// Result returns the result of the asynchronous operation.
5215	// If the operation has not completed it will return an error.
5216	Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
5217}
5218
5219// GalleryApplicationVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
5220// long-running operation.
5221type GalleryApplicationVersionsDeleteFuture struct {
5222	azure.FutureAPI
5223	// Result returns the result of the asynchronous operation.
5224	// If the operation has not completed it will return an error.
5225	Result func(GalleryApplicationVersionsClient) (autorest.Response, error)
5226}
5227
5228// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
5229// long-running operation.
5230type GalleryApplicationVersionsUpdateFuture struct {
5231	azure.FutureAPI
5232	// Result returns the result of the asynchronous operation.
5233	// If the operation has not completed it will return an error.
5234	Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
5235}
5236
5237// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you
5238// want to update.
5239type GalleryApplicationVersionUpdate struct {
5240	*GalleryApplicationVersionProperties `json:"properties,omitempty"`
5241	// ID - READ-ONLY; Resource Id
5242	ID *string `json:"id,omitempty"`
5243	// Name - READ-ONLY; Resource name
5244	Name *string `json:"name,omitempty"`
5245	// Type - READ-ONLY; Resource type
5246	Type *string `json:"type,omitempty"`
5247	// Tags - Resource tags
5248	Tags map[string]*string `json:"tags"`
5249}
5250
5251// MarshalJSON is the custom marshaler for GalleryApplicationVersionUpdate.
5252func (gavu GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) {
5253	objectMap := make(map[string]interface{})
5254	if gavu.GalleryApplicationVersionProperties != nil {
5255		objectMap["properties"] = gavu.GalleryApplicationVersionProperties
5256	}
5257	if gavu.Tags != nil {
5258		objectMap["tags"] = gavu.Tags
5259	}
5260	return json.Marshal(objectMap)
5261}
5262
5263// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersionUpdate struct.
5264func (gavu *GalleryApplicationVersionUpdate) UnmarshalJSON(body []byte) error {
5265	var m map[string]*json.RawMessage
5266	err := json.Unmarshal(body, &m)
5267	if err != nil {
5268		return err
5269	}
5270	for k, v := range m {
5271		switch k {
5272		case "properties":
5273			if v != nil {
5274				var galleryApplicationVersionProperties GalleryApplicationVersionProperties
5275				err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
5276				if err != nil {
5277					return err
5278				}
5279				gavu.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
5280			}
5281		case "id":
5282			if v != nil {
5283				var ID string
5284				err = json.Unmarshal(*v, &ID)
5285				if err != nil {
5286					return err
5287				}
5288				gavu.ID = &ID
5289			}
5290		case "name":
5291			if v != nil {
5292				var name string
5293				err = json.Unmarshal(*v, &name)
5294				if err != nil {
5295					return err
5296				}
5297				gavu.Name = &name
5298			}
5299		case "type":
5300			if v != nil {
5301				var typeVar string
5302				err = json.Unmarshal(*v, &typeVar)
5303				if err != nil {
5304					return err
5305				}
5306				gavu.Type = &typeVar
5307			}
5308		case "tags":
5309			if v != nil {
5310				var tags map[string]*string
5311				err = json.Unmarshal(*v, &tags)
5312				if err != nil {
5313					return err
5314				}
5315				gavu.Tags = tags
5316			}
5317		}
5318	}
5319
5320	return nil
5321}
5322
5323// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile.
5324type GalleryArtifactPublishingProfileBase struct {
5325	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
5326	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
5327	// ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
5328	ReplicaCount *int32 `json:"replicaCount,omitempty"`
5329	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
5330	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
5331	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
5332	PublishedDate *date.Time `json:"publishedDate,omitempty"`
5333	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
5334	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
5335	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
5336	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
5337}
5338
5339// MarshalJSON is the custom marshaler for GalleryArtifactPublishingProfileBase.
5340func (gappb GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error) {
5341	objectMap := make(map[string]interface{})
5342	if gappb.TargetRegions != nil {
5343		objectMap["targetRegions"] = gappb.TargetRegions
5344	}
5345	if gappb.ReplicaCount != nil {
5346		objectMap["replicaCount"] = gappb.ReplicaCount
5347	}
5348	if gappb.ExcludeFromLatest != nil {
5349		objectMap["excludeFromLatest"] = gappb.ExcludeFromLatest
5350	}
5351	if gappb.EndOfLifeDate != nil {
5352		objectMap["endOfLifeDate"] = gappb.EndOfLifeDate
5353	}
5354	if gappb.StorageAccountType != "" {
5355		objectMap["storageAccountType"] = gappb.StorageAccountType
5356	}
5357	return json.Marshal(objectMap)
5358}
5359
5360// GalleryArtifactSource the source image from which the Image Version is going to be created.
5361type GalleryArtifactSource struct {
5362	ManagedImage *ManagedArtifact `json:"managedImage,omitempty"`
5363}
5364
5365// GalleryArtifactVersionSource the gallery artifact version source.
5366type GalleryArtifactVersionSource struct {
5367	// ID - The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, or user image.
5368	ID *string `json:"id,omitempty"`
5369}
5370
5371// GalleryDataDiskImage this is the data disk image.
5372type GalleryDataDiskImage struct {
5373	// Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
5374	Lun *int32 `json:"lun,omitempty"`
5375	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
5376	SizeInGB *int32 `json:"sizeInGB,omitempty"`
5377	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
5378	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
5379	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
5380}
5381
5382// MarshalJSON is the custom marshaler for GalleryDataDiskImage.
5383func (gddi GalleryDataDiskImage) MarshalJSON() ([]byte, error) {
5384	objectMap := make(map[string]interface{})
5385	if gddi.Lun != nil {
5386		objectMap["lun"] = gddi.Lun
5387	}
5388	if gddi.HostCaching != "" {
5389		objectMap["hostCaching"] = gddi.HostCaching
5390	}
5391	if gddi.Source != nil {
5392		objectMap["source"] = gddi.Source
5393	}
5394	return json.Marshal(objectMap)
5395}
5396
5397// GalleryDiskImage this is the disk image base class.
5398type GalleryDiskImage struct {
5399	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
5400	SizeInGB *int32 `json:"sizeInGB,omitempty"`
5401	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
5402	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
5403	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
5404}
5405
5406// MarshalJSON is the custom marshaler for GalleryDiskImage.
5407func (gdi GalleryDiskImage) MarshalJSON() ([]byte, error) {
5408	objectMap := make(map[string]interface{})
5409	if gdi.HostCaching != "" {
5410		objectMap["hostCaching"] = gdi.HostCaching
5411	}
5412	if gdi.Source != nil {
5413		objectMap["source"] = gdi.Source
5414	}
5415	return json.Marshal(objectMap)
5416}
5417
5418// GalleryIdentifier describes the gallery unique name.
5419type GalleryIdentifier struct {
5420	// UniqueName - READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure.
5421	UniqueName *string `json:"uniqueName,omitempty"`
5422}
5423
5424// GalleryImage specifies information about the gallery Image Definition that you want to create or update.
5425type GalleryImage struct {
5426	autorest.Response       `json:"-"`
5427	*GalleryImageProperties `json:"properties,omitempty"`
5428	// ID - READ-ONLY; Resource Id
5429	ID *string `json:"id,omitempty"`
5430	// Name - READ-ONLY; Resource name
5431	Name *string `json:"name,omitempty"`
5432	// Type - READ-ONLY; Resource type
5433	Type *string `json:"type,omitempty"`
5434	// Location - Resource location
5435	Location *string `json:"location,omitempty"`
5436	// Tags - Resource tags
5437	Tags map[string]*string `json:"tags"`
5438}
5439
5440// MarshalJSON is the custom marshaler for GalleryImage.
5441func (gi GalleryImage) MarshalJSON() ([]byte, error) {
5442	objectMap := make(map[string]interface{})
5443	if gi.GalleryImageProperties != nil {
5444		objectMap["properties"] = gi.GalleryImageProperties
5445	}
5446	if gi.Location != nil {
5447		objectMap["location"] = gi.Location
5448	}
5449	if gi.Tags != nil {
5450		objectMap["tags"] = gi.Tags
5451	}
5452	return json.Marshal(objectMap)
5453}
5454
5455// UnmarshalJSON is the custom unmarshaler for GalleryImage struct.
5456func (gi *GalleryImage) UnmarshalJSON(body []byte) error {
5457	var m map[string]*json.RawMessage
5458	err := json.Unmarshal(body, &m)
5459	if err != nil {
5460		return err
5461	}
5462	for k, v := range m {
5463		switch k {
5464		case "properties":
5465			if v != nil {
5466				var galleryImageProperties GalleryImageProperties
5467				err = json.Unmarshal(*v, &galleryImageProperties)
5468				if err != nil {
5469					return err
5470				}
5471				gi.GalleryImageProperties = &galleryImageProperties
5472			}
5473		case "id":
5474			if v != nil {
5475				var ID string
5476				err = json.Unmarshal(*v, &ID)
5477				if err != nil {
5478					return err
5479				}
5480				gi.ID = &ID
5481			}
5482		case "name":
5483			if v != nil {
5484				var name string
5485				err = json.Unmarshal(*v, &name)
5486				if err != nil {
5487					return err
5488				}
5489				gi.Name = &name
5490			}
5491		case "type":
5492			if v != nil {
5493				var typeVar string
5494				err = json.Unmarshal(*v, &typeVar)
5495				if err != nil {
5496					return err
5497				}
5498				gi.Type = &typeVar
5499			}
5500		case "location":
5501			if v != nil {
5502				var location string
5503				err = json.Unmarshal(*v, &location)
5504				if err != nil {
5505					return err
5506				}
5507				gi.Location = &location
5508			}
5509		case "tags":
5510			if v != nil {
5511				var tags map[string]*string
5512				err = json.Unmarshal(*v, &tags)
5513				if err != nil {
5514					return err
5515				}
5516				gi.Tags = tags
5517			}
5518		}
5519	}
5520
5521	return nil
5522}
5523
5524// GalleryImageIdentifier this is the gallery Image Definition identifier.
5525type GalleryImageIdentifier struct {
5526	// Publisher - The name of the gallery Image Definition publisher.
5527	Publisher *string `json:"publisher,omitempty"`
5528	// Offer - The name of the gallery Image Definition offer.
5529	Offer *string `json:"offer,omitempty"`
5530	// Sku - The name of the gallery Image Definition SKU.
5531	Sku *string `json:"sku,omitempty"`
5532}
5533
5534// GalleryImageList the List Gallery Images operation response.
5535type GalleryImageList struct {
5536	autorest.Response `json:"-"`
5537	// Value - A list of Shared Image Gallery images.
5538	Value *[]GalleryImage `json:"value,omitempty"`
5539	// NextLink - The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call ListNext() with this to fetch the next page of gallery Image Definitions.
5540	NextLink *string `json:"nextLink,omitempty"`
5541}
5542
5543// GalleryImageListIterator provides access to a complete listing of GalleryImage values.
5544type GalleryImageListIterator struct {
5545	i    int
5546	page GalleryImageListPage
5547}
5548
5549// NextWithContext advances to the next value.  If there was an error making
5550// the request the iterator does not advance and the error is returned.
5551func (iter *GalleryImageListIterator) NextWithContext(ctx context.Context) (err error) {
5552	if tracing.IsEnabled() {
5553		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListIterator.NextWithContext")
5554		defer func() {
5555			sc := -1
5556			if iter.Response().Response.Response != nil {
5557				sc = iter.Response().Response.Response.StatusCode
5558			}
5559			tracing.EndSpan(ctx, sc, err)
5560		}()
5561	}
5562	iter.i++
5563	if iter.i < len(iter.page.Values()) {
5564		return nil
5565	}
5566	err = iter.page.NextWithContext(ctx)
5567	if err != nil {
5568		iter.i--
5569		return err
5570	}
5571	iter.i = 0
5572	return nil
5573}
5574
5575// Next advances to the next value.  If there was an error making
5576// the request the iterator does not advance and the error is returned.
5577// Deprecated: Use NextWithContext() instead.
5578func (iter *GalleryImageListIterator) Next() error {
5579	return iter.NextWithContext(context.Background())
5580}
5581
5582// NotDone returns true if the enumeration should be started or is not yet complete.
5583func (iter GalleryImageListIterator) NotDone() bool {
5584	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5585}
5586
5587// Response returns the raw server response from the last page request.
5588func (iter GalleryImageListIterator) Response() GalleryImageList {
5589	return iter.page.Response()
5590}
5591
5592// Value returns the current value or a zero-initialized value if the
5593// iterator has advanced beyond the end of the collection.
5594func (iter GalleryImageListIterator) Value() GalleryImage {
5595	if !iter.page.NotDone() {
5596		return GalleryImage{}
5597	}
5598	return iter.page.Values()[iter.i]
5599}
5600
5601// Creates a new instance of the GalleryImageListIterator type.
5602func NewGalleryImageListIterator(page GalleryImageListPage) GalleryImageListIterator {
5603	return GalleryImageListIterator{page: page}
5604}
5605
5606// IsEmpty returns true if the ListResult contains no values.
5607func (gil GalleryImageList) IsEmpty() bool {
5608	return gil.Value == nil || len(*gil.Value) == 0
5609}
5610
5611// hasNextLink returns true if the NextLink is not empty.
5612func (gil GalleryImageList) hasNextLink() bool {
5613	return gil.NextLink != nil && len(*gil.NextLink) != 0
5614}
5615
5616// galleryImageListPreparer prepares a request to retrieve the next set of results.
5617// It returns nil if no more results exist.
5618func (gil GalleryImageList) galleryImageListPreparer(ctx context.Context) (*http.Request, error) {
5619	if !gil.hasNextLink() {
5620		return nil, nil
5621	}
5622	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5623		autorest.AsJSON(),
5624		autorest.AsGet(),
5625		autorest.WithBaseURL(to.String(gil.NextLink)))
5626}
5627
5628// GalleryImageListPage contains a page of GalleryImage values.
5629type GalleryImageListPage struct {
5630	fn  func(context.Context, GalleryImageList) (GalleryImageList, error)
5631	gil GalleryImageList
5632}
5633
5634// NextWithContext advances to the next page of values.  If there was an error making
5635// the request the page does not advance and the error is returned.
5636func (page *GalleryImageListPage) NextWithContext(ctx context.Context) (err error) {
5637	if tracing.IsEnabled() {
5638		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListPage.NextWithContext")
5639		defer func() {
5640			sc := -1
5641			if page.Response().Response.Response != nil {
5642				sc = page.Response().Response.Response.StatusCode
5643			}
5644			tracing.EndSpan(ctx, sc, err)
5645		}()
5646	}
5647	for {
5648		next, err := page.fn(ctx, page.gil)
5649		if err != nil {
5650			return err
5651		}
5652		page.gil = next
5653		if !next.hasNextLink() || !next.IsEmpty() {
5654			break
5655		}
5656	}
5657	return nil
5658}
5659
5660// Next advances to the next page of values.  If there was an error making
5661// the request the page does not advance and the error is returned.
5662// Deprecated: Use NextWithContext() instead.
5663func (page *GalleryImageListPage) Next() error {
5664	return page.NextWithContext(context.Background())
5665}
5666
5667// NotDone returns true if the page enumeration should be started or is not yet complete.
5668func (page GalleryImageListPage) NotDone() bool {
5669	return !page.gil.IsEmpty()
5670}
5671
5672// Response returns the raw server response from the last page request.
5673func (page GalleryImageListPage) Response() GalleryImageList {
5674	return page.gil
5675}
5676
5677// Values returns the slice of values for the current page or nil if there are no values.
5678func (page GalleryImageListPage) Values() []GalleryImage {
5679	if page.gil.IsEmpty() {
5680		return nil
5681	}
5682	return *page.gil.Value
5683}
5684
5685// Creates a new instance of the GalleryImageListPage type.
5686func NewGalleryImageListPage(cur GalleryImageList, getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage {
5687	return GalleryImageListPage{
5688		fn:  getNextPage,
5689		gil: cur,
5690	}
5691}
5692
5693// GalleryImageProperties describes the properties of a gallery Image Definition.
5694type GalleryImageProperties struct {
5695	// Description - The description of this gallery Image Definition resource. This property is updatable.
5696	Description *string `json:"description,omitempty"`
5697	// Eula - The Eula agreement for the gallery Image Definition.
5698	Eula *string `json:"eula,omitempty"`
5699	// PrivacyStatementURI - The privacy statement uri.
5700	PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
5701	// ReleaseNoteURI - The release note uri.
5702	ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
5703	// OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
5704	OsType OperatingSystemTypes `json:"osType,omitempty"`
5705	// OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'Generalized', 'Specialized'
5706	OsState OperatingSystemStateTypes `json:"osState,omitempty"`
5707	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
5708	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
5709	// EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable.
5710	EndOfLifeDate *date.Time                       `json:"endOfLifeDate,omitempty"`
5711	Identifier    *GalleryImageIdentifier          `json:"identifier,omitempty"`
5712	Recommended   *RecommendedMachineConfiguration `json:"recommended,omitempty"`
5713	Disallowed    *Disallowed                      `json:"disallowed,omitempty"`
5714	PurchasePlan  *ImagePurchasePlan               `json:"purchasePlan,omitempty"`
5715	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState2Creating', 'ProvisioningState2Updating', 'ProvisioningState2Failed', 'ProvisioningState2Succeeded', 'ProvisioningState2Deleting', 'ProvisioningState2Migrating'
5716	ProvisioningState ProvisioningState2 `json:"provisioningState,omitempty"`
5717}
5718
5719// MarshalJSON is the custom marshaler for GalleryImageProperties.
5720func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) {
5721	objectMap := make(map[string]interface{})
5722	if gip.Description != nil {
5723		objectMap["description"] = gip.Description
5724	}
5725	if gip.Eula != nil {
5726		objectMap["eula"] = gip.Eula
5727	}
5728	if gip.PrivacyStatementURI != nil {
5729		objectMap["privacyStatementUri"] = gip.PrivacyStatementURI
5730	}
5731	if gip.ReleaseNoteURI != nil {
5732		objectMap["releaseNoteUri"] = gip.ReleaseNoteURI
5733	}
5734	if gip.OsType != "" {
5735		objectMap["osType"] = gip.OsType
5736	}
5737	if gip.OsState != "" {
5738		objectMap["osState"] = gip.OsState
5739	}
5740	if gip.HyperVGeneration != "" {
5741		objectMap["hyperVGeneration"] = gip.HyperVGeneration
5742	}
5743	if gip.EndOfLifeDate != nil {
5744		objectMap["endOfLifeDate"] = gip.EndOfLifeDate
5745	}
5746	if gip.Identifier != nil {
5747		objectMap["identifier"] = gip.Identifier
5748	}
5749	if gip.Recommended != nil {
5750		objectMap["recommended"] = gip.Recommended
5751	}
5752	if gip.Disallowed != nil {
5753		objectMap["disallowed"] = gip.Disallowed
5754	}
5755	if gip.PurchasePlan != nil {
5756		objectMap["purchasePlan"] = gip.PurchasePlan
5757	}
5758	return json.Marshal(objectMap)
5759}
5760
5761// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5762// long-running operation.
5763type GalleryImagesCreateOrUpdateFuture struct {
5764	azure.FutureAPI
5765	// Result returns the result of the asynchronous operation.
5766	// If the operation has not completed it will return an error.
5767	Result func(GalleryImagesClient) (GalleryImage, error)
5768}
5769
5770// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5771// operation.
5772type GalleryImagesDeleteFuture struct {
5773	azure.FutureAPI
5774	// Result returns the result of the asynchronous operation.
5775	// If the operation has not completed it will return an error.
5776	Result func(GalleryImagesClient) (autorest.Response, error)
5777}
5778
5779// GalleryImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
5780// operation.
5781type GalleryImagesUpdateFuture struct {
5782	azure.FutureAPI
5783	// Result returns the result of the asynchronous operation.
5784	// If the operation has not completed it will return an error.
5785	Result func(GalleryImagesClient) (GalleryImage, error)
5786}
5787
5788// GalleryImageUpdate specifies information about the gallery Image Definition that you want to update.
5789type GalleryImageUpdate struct {
5790	*GalleryImageProperties `json:"properties,omitempty"`
5791	// ID - READ-ONLY; Resource Id
5792	ID *string `json:"id,omitempty"`
5793	// Name - READ-ONLY; Resource name
5794	Name *string `json:"name,omitempty"`
5795	// Type - READ-ONLY; Resource type
5796	Type *string `json:"type,omitempty"`
5797	// Tags - Resource tags
5798	Tags map[string]*string `json:"tags"`
5799}
5800
5801// MarshalJSON is the custom marshaler for GalleryImageUpdate.
5802func (giu GalleryImageUpdate) MarshalJSON() ([]byte, error) {
5803	objectMap := make(map[string]interface{})
5804	if giu.GalleryImageProperties != nil {
5805		objectMap["properties"] = giu.GalleryImageProperties
5806	}
5807	if giu.Tags != nil {
5808		objectMap["tags"] = giu.Tags
5809	}
5810	return json.Marshal(objectMap)
5811}
5812
5813// UnmarshalJSON is the custom unmarshaler for GalleryImageUpdate struct.
5814func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error {
5815	var m map[string]*json.RawMessage
5816	err := json.Unmarshal(body, &m)
5817	if err != nil {
5818		return err
5819	}
5820	for k, v := range m {
5821		switch k {
5822		case "properties":
5823			if v != nil {
5824				var galleryImageProperties GalleryImageProperties
5825				err = json.Unmarshal(*v, &galleryImageProperties)
5826				if err != nil {
5827					return err
5828				}
5829				giu.GalleryImageProperties = &galleryImageProperties
5830			}
5831		case "id":
5832			if v != nil {
5833				var ID string
5834				err = json.Unmarshal(*v, &ID)
5835				if err != nil {
5836					return err
5837				}
5838				giu.ID = &ID
5839			}
5840		case "name":
5841			if v != nil {
5842				var name string
5843				err = json.Unmarshal(*v, &name)
5844				if err != nil {
5845					return err
5846				}
5847				giu.Name = &name
5848			}
5849		case "type":
5850			if v != nil {
5851				var typeVar string
5852				err = json.Unmarshal(*v, &typeVar)
5853				if err != nil {
5854					return err
5855				}
5856				giu.Type = &typeVar
5857			}
5858		case "tags":
5859			if v != nil {
5860				var tags map[string]*string
5861				err = json.Unmarshal(*v, &tags)
5862				if err != nil {
5863					return err
5864				}
5865				giu.Tags = tags
5866			}
5867		}
5868	}
5869
5870	return nil
5871}
5872
5873// GalleryImageVersion specifies information about the gallery Image Version that you want to create or
5874// update.
5875type GalleryImageVersion struct {
5876	autorest.Response              `json:"-"`
5877	*GalleryImageVersionProperties `json:"properties,omitempty"`
5878	// ID - READ-ONLY; Resource Id
5879	ID *string `json:"id,omitempty"`
5880	// Name - READ-ONLY; Resource name
5881	Name *string `json:"name,omitempty"`
5882	// Type - READ-ONLY; Resource type
5883	Type *string `json:"type,omitempty"`
5884	// Location - Resource location
5885	Location *string `json:"location,omitempty"`
5886	// Tags - Resource tags
5887	Tags map[string]*string `json:"tags"`
5888}
5889
5890// MarshalJSON is the custom marshaler for GalleryImageVersion.
5891func (giv GalleryImageVersion) MarshalJSON() ([]byte, error) {
5892	objectMap := make(map[string]interface{})
5893	if giv.GalleryImageVersionProperties != nil {
5894		objectMap["properties"] = giv.GalleryImageVersionProperties
5895	}
5896	if giv.Location != nil {
5897		objectMap["location"] = giv.Location
5898	}
5899	if giv.Tags != nil {
5900		objectMap["tags"] = giv.Tags
5901	}
5902	return json.Marshal(objectMap)
5903}
5904
5905// UnmarshalJSON is the custom unmarshaler for GalleryImageVersion struct.
5906func (giv *GalleryImageVersion) UnmarshalJSON(body []byte) error {
5907	var m map[string]*json.RawMessage
5908	err := json.Unmarshal(body, &m)
5909	if err != nil {
5910		return err
5911	}
5912	for k, v := range m {
5913		switch k {
5914		case "properties":
5915			if v != nil {
5916				var galleryImageVersionProperties GalleryImageVersionProperties
5917				err = json.Unmarshal(*v, &galleryImageVersionProperties)
5918				if err != nil {
5919					return err
5920				}
5921				giv.GalleryImageVersionProperties = &galleryImageVersionProperties
5922			}
5923		case "id":
5924			if v != nil {
5925				var ID string
5926				err = json.Unmarshal(*v, &ID)
5927				if err != nil {
5928					return err
5929				}
5930				giv.ID = &ID
5931			}
5932		case "name":
5933			if v != nil {
5934				var name string
5935				err = json.Unmarshal(*v, &name)
5936				if err != nil {
5937					return err
5938				}
5939				giv.Name = &name
5940			}
5941		case "type":
5942			if v != nil {
5943				var typeVar string
5944				err = json.Unmarshal(*v, &typeVar)
5945				if err != nil {
5946					return err
5947				}
5948				giv.Type = &typeVar
5949			}
5950		case "location":
5951			if v != nil {
5952				var location string
5953				err = json.Unmarshal(*v, &location)
5954				if err != nil {
5955					return err
5956				}
5957				giv.Location = &location
5958			}
5959		case "tags":
5960			if v != nil {
5961				var tags map[string]*string
5962				err = json.Unmarshal(*v, &tags)
5963				if err != nil {
5964					return err
5965				}
5966				giv.Tags = tags
5967			}
5968		}
5969	}
5970
5971	return nil
5972}
5973
5974// GalleryImageVersionList the List Gallery Image version operation response.
5975type GalleryImageVersionList struct {
5976	autorest.Response `json:"-"`
5977	// Value - A list of gallery Image Versions.
5978	Value *[]GalleryImageVersion `json:"value,omitempty"`
5979	// NextLink - The uri to fetch the next page of gallery Image Versions. Call ListNext() with this to fetch the next page of gallery Image Versions.
5980	NextLink *string `json:"nextLink,omitempty"`
5981}
5982
5983// GalleryImageVersionListIterator provides access to a complete listing of GalleryImageVersion values.
5984type GalleryImageVersionListIterator struct {
5985	i    int
5986	page GalleryImageVersionListPage
5987}
5988
5989// NextWithContext advances to the next value.  If there was an error making
5990// the request the iterator does not advance and the error is returned.
5991func (iter *GalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) {
5992	if tracing.IsEnabled() {
5993		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListIterator.NextWithContext")
5994		defer func() {
5995			sc := -1
5996			if iter.Response().Response.Response != nil {
5997				sc = iter.Response().Response.Response.StatusCode
5998			}
5999			tracing.EndSpan(ctx, sc, err)
6000		}()
6001	}
6002	iter.i++
6003	if iter.i < len(iter.page.Values()) {
6004		return nil
6005	}
6006	err = iter.page.NextWithContext(ctx)
6007	if err != nil {
6008		iter.i--
6009		return err
6010	}
6011	iter.i = 0
6012	return nil
6013}
6014
6015// Next advances to the next value.  If there was an error making
6016// the request the iterator does not advance and the error is returned.
6017// Deprecated: Use NextWithContext() instead.
6018func (iter *GalleryImageVersionListIterator) Next() error {
6019	return iter.NextWithContext(context.Background())
6020}
6021
6022// NotDone returns true if the enumeration should be started or is not yet complete.
6023func (iter GalleryImageVersionListIterator) NotDone() bool {
6024	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6025}
6026
6027// Response returns the raw server response from the last page request.
6028func (iter GalleryImageVersionListIterator) Response() GalleryImageVersionList {
6029	return iter.page.Response()
6030}
6031
6032// Value returns the current value or a zero-initialized value if the
6033// iterator has advanced beyond the end of the collection.
6034func (iter GalleryImageVersionListIterator) Value() GalleryImageVersion {
6035	if !iter.page.NotDone() {
6036		return GalleryImageVersion{}
6037	}
6038	return iter.page.Values()[iter.i]
6039}
6040
6041// Creates a new instance of the GalleryImageVersionListIterator type.
6042func NewGalleryImageVersionListIterator(page GalleryImageVersionListPage) GalleryImageVersionListIterator {
6043	return GalleryImageVersionListIterator{page: page}
6044}
6045
6046// IsEmpty returns true if the ListResult contains no values.
6047func (givl GalleryImageVersionList) IsEmpty() bool {
6048	return givl.Value == nil || len(*givl.Value) == 0
6049}
6050
6051// hasNextLink returns true if the NextLink is not empty.
6052func (givl GalleryImageVersionList) hasNextLink() bool {
6053	return givl.NextLink != nil && len(*givl.NextLink) != 0
6054}
6055
6056// galleryImageVersionListPreparer prepares a request to retrieve the next set of results.
6057// It returns nil if no more results exist.
6058func (givl GalleryImageVersionList) galleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) {
6059	if !givl.hasNextLink() {
6060		return nil, nil
6061	}
6062	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6063		autorest.AsJSON(),
6064		autorest.AsGet(),
6065		autorest.WithBaseURL(to.String(givl.NextLink)))
6066}
6067
6068// GalleryImageVersionListPage contains a page of GalleryImageVersion values.
6069type GalleryImageVersionListPage struct {
6070	fn   func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)
6071	givl GalleryImageVersionList
6072}
6073
6074// NextWithContext advances to the next page of values.  If there was an error making
6075// the request the page does not advance and the error is returned.
6076func (page *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) {
6077	if tracing.IsEnabled() {
6078		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListPage.NextWithContext")
6079		defer func() {
6080			sc := -1
6081			if page.Response().Response.Response != nil {
6082				sc = page.Response().Response.Response.StatusCode
6083			}
6084			tracing.EndSpan(ctx, sc, err)
6085		}()
6086	}
6087	for {
6088		next, err := page.fn(ctx, page.givl)
6089		if err != nil {
6090			return err
6091		}
6092		page.givl = next
6093		if !next.hasNextLink() || !next.IsEmpty() {
6094			break
6095		}
6096	}
6097	return nil
6098}
6099
6100// Next advances to the next page of values.  If there was an error making
6101// the request the page does not advance and the error is returned.
6102// Deprecated: Use NextWithContext() instead.
6103func (page *GalleryImageVersionListPage) Next() error {
6104	return page.NextWithContext(context.Background())
6105}
6106
6107// NotDone returns true if the page enumeration should be started or is not yet complete.
6108func (page GalleryImageVersionListPage) NotDone() bool {
6109	return !page.givl.IsEmpty()
6110}
6111
6112// Response returns the raw server response from the last page request.
6113func (page GalleryImageVersionListPage) Response() GalleryImageVersionList {
6114	return page.givl
6115}
6116
6117// Values returns the slice of values for the current page or nil if there are no values.
6118func (page GalleryImageVersionListPage) Values() []GalleryImageVersion {
6119	if page.givl.IsEmpty() {
6120		return nil
6121	}
6122	return *page.givl.Value
6123}
6124
6125// Creates a new instance of the GalleryImageVersionListPage type.
6126func NewGalleryImageVersionListPage(cur GalleryImageVersionList, getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage {
6127	return GalleryImageVersionListPage{
6128		fn:   getNextPage,
6129		givl: cur,
6130	}
6131}
6132
6133// GalleryImageVersionProperties describes the properties of a gallery Image Version.
6134type GalleryImageVersionProperties struct {
6135	PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"`
6136	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState3Creating', 'ProvisioningState3Updating', 'ProvisioningState3Failed', 'ProvisioningState3Succeeded', 'ProvisioningState3Deleting', 'ProvisioningState3Migrating'
6137	ProvisioningState ProvisioningState3                 `json:"provisioningState,omitempty"`
6138	StorageProfile    *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"`
6139	// ReplicationStatus - READ-ONLY
6140	ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
6141}
6142
6143// MarshalJSON is the custom marshaler for GalleryImageVersionProperties.
6144func (givp GalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
6145	objectMap := make(map[string]interface{})
6146	if givp.PublishingProfile != nil {
6147		objectMap["publishingProfile"] = givp.PublishingProfile
6148	}
6149	if givp.StorageProfile != nil {
6150		objectMap["storageProfile"] = givp.StorageProfile
6151	}
6152	return json.Marshal(objectMap)
6153}
6154
6155// GalleryImageVersionPublishingProfile the publishing profile of a gallery Image Version.
6156type GalleryImageVersionPublishingProfile struct {
6157	// TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
6158	TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
6159	// ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
6160	ReplicaCount *int32 `json:"replicaCount,omitempty"`
6161	// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
6162	ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
6163	// PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
6164	PublishedDate *date.Time `json:"publishedDate,omitempty"`
6165	// EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
6166	EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
6167	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
6168	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
6169}
6170
6171// MarshalJSON is the custom marshaler for GalleryImageVersionPublishingProfile.
6172func (givpp GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error) {
6173	objectMap := make(map[string]interface{})
6174	if givpp.TargetRegions != nil {
6175		objectMap["targetRegions"] = givpp.TargetRegions
6176	}
6177	if givpp.ReplicaCount != nil {
6178		objectMap["replicaCount"] = givpp.ReplicaCount
6179	}
6180	if givpp.ExcludeFromLatest != nil {
6181		objectMap["excludeFromLatest"] = givpp.ExcludeFromLatest
6182	}
6183	if givpp.EndOfLifeDate != nil {
6184		objectMap["endOfLifeDate"] = givpp.EndOfLifeDate
6185	}
6186	if givpp.StorageAccountType != "" {
6187		objectMap["storageAccountType"] = givpp.StorageAccountType
6188	}
6189	return json.Marshal(objectMap)
6190}
6191
6192// GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6193// long-running operation.
6194type GalleryImageVersionsCreateOrUpdateFuture struct {
6195	azure.FutureAPI
6196	// Result returns the result of the asynchronous operation.
6197	// If the operation has not completed it will return an error.
6198	Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
6199}
6200
6201// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
6202// long-running operation.
6203type GalleryImageVersionsDeleteFuture struct {
6204	azure.FutureAPI
6205	// Result returns the result of the asynchronous operation.
6206	// If the operation has not completed it will return an error.
6207	Result func(GalleryImageVersionsClient) (autorest.Response, error)
6208}
6209
6210// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version.
6211type GalleryImageVersionStorageProfile struct {
6212	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
6213	OsDiskImage *GalleryOSDiskImage           `json:"osDiskImage,omitempty"`
6214	// DataDiskImages - A list of data disk images.
6215	DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"`
6216}
6217
6218// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
6219// long-running operation.
6220type GalleryImageVersionsUpdateFuture struct {
6221	azure.FutureAPI
6222	// Result returns the result of the asynchronous operation.
6223	// If the operation has not completed it will return an error.
6224	Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
6225}
6226
6227// GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update.
6228type GalleryImageVersionUpdate struct {
6229	*GalleryImageVersionProperties `json:"properties,omitempty"`
6230	// ID - READ-ONLY; Resource Id
6231	ID *string `json:"id,omitempty"`
6232	// Name - READ-ONLY; Resource name
6233	Name *string `json:"name,omitempty"`
6234	// Type - READ-ONLY; Resource type
6235	Type *string `json:"type,omitempty"`
6236	// Tags - Resource tags
6237	Tags map[string]*string `json:"tags"`
6238}
6239
6240// MarshalJSON is the custom marshaler for GalleryImageVersionUpdate.
6241func (givu GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) {
6242	objectMap := make(map[string]interface{})
6243	if givu.GalleryImageVersionProperties != nil {
6244		objectMap["properties"] = givu.GalleryImageVersionProperties
6245	}
6246	if givu.Tags != nil {
6247		objectMap["tags"] = givu.Tags
6248	}
6249	return json.Marshal(objectMap)
6250}
6251
6252// UnmarshalJSON is the custom unmarshaler for GalleryImageVersionUpdate struct.
6253func (givu *GalleryImageVersionUpdate) UnmarshalJSON(body []byte) error {
6254	var m map[string]*json.RawMessage
6255	err := json.Unmarshal(body, &m)
6256	if err != nil {
6257		return err
6258	}
6259	for k, v := range m {
6260		switch k {
6261		case "properties":
6262			if v != nil {
6263				var galleryImageVersionProperties GalleryImageVersionProperties
6264				err = json.Unmarshal(*v, &galleryImageVersionProperties)
6265				if err != nil {
6266					return err
6267				}
6268				givu.GalleryImageVersionProperties = &galleryImageVersionProperties
6269			}
6270		case "id":
6271			if v != nil {
6272				var ID string
6273				err = json.Unmarshal(*v, &ID)
6274				if err != nil {
6275					return err
6276				}
6277				givu.ID = &ID
6278			}
6279		case "name":
6280			if v != nil {
6281				var name string
6282				err = json.Unmarshal(*v, &name)
6283				if err != nil {
6284					return err
6285				}
6286				givu.Name = &name
6287			}
6288		case "type":
6289			if v != nil {
6290				var typeVar string
6291				err = json.Unmarshal(*v, &typeVar)
6292				if err != nil {
6293					return err
6294				}
6295				givu.Type = &typeVar
6296			}
6297		case "tags":
6298			if v != nil {
6299				var tags map[string]*string
6300				err = json.Unmarshal(*v, &tags)
6301				if err != nil {
6302					return err
6303				}
6304				givu.Tags = tags
6305			}
6306		}
6307	}
6308
6309	return nil
6310}
6311
6312// GalleryList the List Galleries operation response.
6313type GalleryList struct {
6314	autorest.Response `json:"-"`
6315	// Value - A list of galleries.
6316	Value *[]Gallery `json:"value,omitempty"`
6317	// NextLink - The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries.
6318	NextLink *string `json:"nextLink,omitempty"`
6319}
6320
6321// GalleryListIterator provides access to a complete listing of Gallery values.
6322type GalleryListIterator struct {
6323	i    int
6324	page GalleryListPage
6325}
6326
6327// NextWithContext advances to the next value.  If there was an error making
6328// the request the iterator does not advance and the error is returned.
6329func (iter *GalleryListIterator) NextWithContext(ctx context.Context) (err error) {
6330	if tracing.IsEnabled() {
6331		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListIterator.NextWithContext")
6332		defer func() {
6333			sc := -1
6334			if iter.Response().Response.Response != nil {
6335				sc = iter.Response().Response.Response.StatusCode
6336			}
6337			tracing.EndSpan(ctx, sc, err)
6338		}()
6339	}
6340	iter.i++
6341	if iter.i < len(iter.page.Values()) {
6342		return nil
6343	}
6344	err = iter.page.NextWithContext(ctx)
6345	if err != nil {
6346		iter.i--
6347		return err
6348	}
6349	iter.i = 0
6350	return nil
6351}
6352
6353// Next advances to the next value.  If there was an error making
6354// the request the iterator does not advance and the error is returned.
6355// Deprecated: Use NextWithContext() instead.
6356func (iter *GalleryListIterator) Next() error {
6357	return iter.NextWithContext(context.Background())
6358}
6359
6360// NotDone returns true if the enumeration should be started or is not yet complete.
6361func (iter GalleryListIterator) NotDone() bool {
6362	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6363}
6364
6365// Response returns the raw server response from the last page request.
6366func (iter GalleryListIterator) Response() GalleryList {
6367	return iter.page.Response()
6368}
6369
6370// Value returns the current value or a zero-initialized value if the
6371// iterator has advanced beyond the end of the collection.
6372func (iter GalleryListIterator) Value() Gallery {
6373	if !iter.page.NotDone() {
6374		return Gallery{}
6375	}
6376	return iter.page.Values()[iter.i]
6377}
6378
6379// Creates a new instance of the GalleryListIterator type.
6380func NewGalleryListIterator(page GalleryListPage) GalleryListIterator {
6381	return GalleryListIterator{page: page}
6382}
6383
6384// IsEmpty returns true if the ListResult contains no values.
6385func (gl GalleryList) IsEmpty() bool {
6386	return gl.Value == nil || len(*gl.Value) == 0
6387}
6388
6389// hasNextLink returns true if the NextLink is not empty.
6390func (gl GalleryList) hasNextLink() bool {
6391	return gl.NextLink != nil && len(*gl.NextLink) != 0
6392}
6393
6394// galleryListPreparer prepares a request to retrieve the next set of results.
6395// It returns nil if no more results exist.
6396func (gl GalleryList) galleryListPreparer(ctx context.Context) (*http.Request, error) {
6397	if !gl.hasNextLink() {
6398		return nil, nil
6399	}
6400	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6401		autorest.AsJSON(),
6402		autorest.AsGet(),
6403		autorest.WithBaseURL(to.String(gl.NextLink)))
6404}
6405
6406// GalleryListPage contains a page of Gallery values.
6407type GalleryListPage struct {
6408	fn func(context.Context, GalleryList) (GalleryList, error)
6409	gl GalleryList
6410}
6411
6412// NextWithContext advances to the next page of values.  If there was an error making
6413// the request the page does not advance and the error is returned.
6414func (page *GalleryListPage) NextWithContext(ctx context.Context) (err error) {
6415	if tracing.IsEnabled() {
6416		ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListPage.NextWithContext")
6417		defer func() {
6418			sc := -1
6419			if page.Response().Response.Response != nil {
6420				sc = page.Response().Response.Response.StatusCode
6421			}
6422			tracing.EndSpan(ctx, sc, err)
6423		}()
6424	}
6425	for {
6426		next, err := page.fn(ctx, page.gl)
6427		if err != nil {
6428			return err
6429		}
6430		page.gl = next
6431		if !next.hasNextLink() || !next.IsEmpty() {
6432			break
6433		}
6434	}
6435	return nil
6436}
6437
6438// Next advances to the next page of values.  If there was an error making
6439// the request the page does not advance and the error is returned.
6440// Deprecated: Use NextWithContext() instead.
6441func (page *GalleryListPage) Next() error {
6442	return page.NextWithContext(context.Background())
6443}
6444
6445// NotDone returns true if the page enumeration should be started or is not yet complete.
6446func (page GalleryListPage) NotDone() bool {
6447	return !page.gl.IsEmpty()
6448}
6449
6450// Response returns the raw server response from the last page request.
6451func (page GalleryListPage) Response() GalleryList {
6452	return page.gl
6453}
6454
6455// Values returns the slice of values for the current page or nil if there are no values.
6456func (page GalleryListPage) Values() []Gallery {
6457	if page.gl.IsEmpty() {
6458		return nil
6459	}
6460	return *page.gl.Value
6461}
6462
6463// Creates a new instance of the GalleryListPage type.
6464func NewGalleryListPage(cur GalleryList, getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage {
6465	return GalleryListPage{
6466		fn: getNextPage,
6467		gl: cur,
6468	}
6469}
6470
6471// GalleryOSDiskImage this is the OS disk image.
6472type GalleryOSDiskImage struct {
6473	// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
6474	SizeInGB *int32 `json:"sizeInGB,omitempty"`
6475	// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
6476	HostCaching HostCaching                   `json:"hostCaching,omitempty"`
6477	Source      *GalleryArtifactVersionSource `json:"source,omitempty"`
6478}
6479
6480// MarshalJSON is the custom marshaler for GalleryOSDiskImage.
6481func (godi GalleryOSDiskImage) MarshalJSON() ([]byte, error) {
6482	objectMap := make(map[string]interface{})
6483	if godi.HostCaching != "" {
6484		objectMap["hostCaching"] = godi.HostCaching
6485	}
6486	if godi.Source != nil {
6487		objectMap["source"] = godi.Source
6488	}
6489	return json.Marshal(objectMap)
6490}
6491
6492// GalleryProperties describes the properties of a Shared Image Gallery.
6493type GalleryProperties struct {
6494	// Description - The description of this Shared Image Gallery resource. This property is updatable.
6495	Description *string            `json:"description,omitempty"`
6496	Identifier  *GalleryIdentifier `json:"identifier,omitempty"`
6497	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating'
6498	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6499}
6500
6501// MarshalJSON is the custom marshaler for GalleryProperties.
6502func (gp GalleryProperties) MarshalJSON() ([]byte, error) {
6503	objectMap := make(map[string]interface{})
6504	if gp.Description != nil {
6505		objectMap["description"] = gp.Description
6506	}
6507	if gp.Identifier != nil {
6508		objectMap["identifier"] = gp.Identifier
6509	}
6510	return json.Marshal(objectMap)
6511}
6512
6513// GalleryUpdate specifies information about the Shared Image Gallery that you want to update.
6514type GalleryUpdate struct {
6515	*GalleryProperties `json:"properties,omitempty"`
6516	// ID - READ-ONLY; Resource Id
6517	ID *string `json:"id,omitempty"`
6518	// Name - READ-ONLY; Resource name
6519	Name *string `json:"name,omitempty"`
6520	// Type - READ-ONLY; Resource type
6521	Type *string `json:"type,omitempty"`
6522	// Tags - Resource tags
6523	Tags map[string]*string `json:"tags"`
6524}
6525
6526// MarshalJSON is the custom marshaler for GalleryUpdate.
6527func (gu GalleryUpdate) MarshalJSON() ([]byte, error) {
6528	objectMap := make(map[string]interface{})
6529	if gu.GalleryProperties != nil {
6530		objectMap["properties"] = gu.GalleryProperties
6531	}
6532	if gu.Tags != nil {
6533		objectMap["tags"] = gu.Tags
6534	}
6535	return json.Marshal(objectMap)
6536}
6537
6538// UnmarshalJSON is the custom unmarshaler for GalleryUpdate struct.
6539func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error {
6540	var m map[string]*json.RawMessage
6541	err := json.Unmarshal(body, &m)
6542	if err != nil {
6543		return err
6544	}
6545	for k, v := range m {
6546		switch k {
6547		case "properties":
6548			if v != nil {
6549				var galleryProperties GalleryProperties
6550				err = json.Unmarshal(*v, &galleryProperties)
6551				if err != nil {
6552					return err
6553				}
6554				gu.GalleryProperties = &galleryProperties
6555			}
6556		case "id":
6557			if v != nil {
6558				var ID string
6559				err = json.Unmarshal(*v, &ID)
6560				if err != nil {
6561					return err
6562				}
6563				gu.ID = &ID
6564			}
6565		case "name":
6566			if v != nil {
6567				var name string
6568				err = json.Unmarshal(*v, &name)
6569				if err != nil {
6570					return err
6571				}
6572				gu.Name = &name
6573			}
6574		case "type":
6575			if v != nil {
6576				var typeVar string
6577				err = json.Unmarshal(*v, &typeVar)
6578				if err != nil {
6579					return err
6580				}
6581				gu.Type = &typeVar
6582			}
6583		case "tags":
6584			if v != nil {
6585				var tags map[string]*string
6586				err = json.Unmarshal(*v, &tags)
6587				if err != nil {
6588					return err
6589				}
6590				gu.Tags = tags
6591			}
6592		}
6593	}
6594
6595	return nil
6596}
6597
6598// GrantAccessData data used for requesting a SAS.
6599type GrantAccessData struct {
6600	// Access - Possible values include: 'None', 'Read', 'Write'
6601	Access AccessLevel `json:"access,omitempty"`
6602	// DurationInSeconds - Time duration in seconds until the SAS access expires.
6603	DurationInSeconds *int32 `json:"durationInSeconds,omitempty"`
6604}
6605
6606// HardwareProfile specifies the hardware settings for the virtual machine.
6607type HardwareProfile struct {
6608	// VMSize - Specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes). <br><br> The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:  <br><br> [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) <br><br> [List all available virtual machine sizes in a region]( https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). <br><br> This list of sizes is no longer updated and the **VirtualMachineSizeTypes** string constants will be removed from the subsequent REST API specification. Use [List all available virtual machine sizes in a region]( https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) to get the latest sizes. Possible values include: 'VirtualMachineSizeTypesBasicA0', 'VirtualMachineSizeTypesBasicA1', 'VirtualMachineSizeTypesBasicA2', 'VirtualMachineSizeTypesBasicA3', 'VirtualMachineSizeTypesBasicA4', 'VirtualMachineSizeTypesStandardA0', 'VirtualMachineSizeTypesStandardA1', 'VirtualMachineSizeTypesStandardA2', 'VirtualMachineSizeTypesStandardA3', 'VirtualMachineSizeTypesStandardA4', 'VirtualMachineSizeTypesStandardA5', 'VirtualMachineSizeTypesStandardA6', 'VirtualMachineSizeTypesStandardA7', 'VirtualMachineSizeTypesStandardA8', 'VirtualMachineSizeTypesStandardA9', 'VirtualMachineSizeTypesStandardA10', 'VirtualMachineSizeTypesStandardA11', 'VirtualMachineSizeTypesStandardA1V2', 'VirtualMachineSizeTypesStandardA2V2', 'VirtualMachineSizeTypesStandardA4V2', 'VirtualMachineSizeTypesStandardA8V2', 'VirtualMachineSizeTypesStandardA2mV2', 'VirtualMachineSizeTypesStandardA4mV2', 'VirtualMachineSizeTypesStandardA8mV2', 'VirtualMachineSizeTypesStandardB1s', 'VirtualMachineSizeTypesStandardB1ms', 'VirtualMachineSizeTypesStandardB2s', 'VirtualMachineSizeTypesStandardB2ms', 'VirtualMachineSizeTypesStandardB4ms', 'VirtualMachineSizeTypesStandardB8ms', 'VirtualMachineSizeTypesStandardD1', 'VirtualMachineSizeTypesStandardD2', 'VirtualMachineSizeTypesStandardD3', 'VirtualMachineSizeTypesStandardD4', 'VirtualMachineSizeTypesStandardD11', 'VirtualMachineSizeTypesStandardD12', 'VirtualMachineSizeTypesStandardD13', 'VirtualMachineSizeTypesStandardD14', 'VirtualMachineSizeTypesStandardD1V2', 'VirtualMachineSizeTypesStandardD2V2', 'VirtualMachineSizeTypesStandardD3V2', 'VirtualMachineSizeTypesStandardD4V2', 'VirtualMachineSizeTypesStandardD5V2', 'VirtualMachineSizeTypesStandardD2V3', 'VirtualMachineSizeTypesStandardD4V3', 'VirtualMachineSizeTypesStandardD8V3', 'VirtualMachineSizeTypesStandardD16V3', 'VirtualMachineSizeTypesStandardD32V3', 'VirtualMachineSizeTypesStandardD64V3', 'VirtualMachineSizeTypesStandardD2sV3', 'VirtualMachineSizeTypesStandardD4sV3', 'VirtualMachineSizeTypesStandardD8sV3', 'VirtualMachineSizeTypesStandardD16sV3', 'VirtualMachineSizeTypesStandardD32sV3', 'VirtualMachineSizeTypesStandardD64sV3', 'VirtualMachineSizeTypesStandardD11V2', 'VirtualMachineSizeTypesStandardD12V2', 'VirtualMachineSizeTypesStandardD13V2', 'VirtualMachineSizeTypesStandardD14V2', 'VirtualMachineSizeTypesStandardD15V2', 'VirtualMachineSizeTypesStandardDS1', 'VirtualMachineSizeTypesStandardDS2', 'VirtualMachineSizeTypesStandardDS3', 'VirtualMachineSizeTypesStandardDS4', 'VirtualMachineSizeTypesStandardDS11', 'VirtualMachineSizeTypesStandardDS12', 'VirtualMachineSizeTypesStandardDS13', 'VirtualMachineSizeTypesStandardDS14', 'VirtualMachineSizeTypesStandardDS1V2', 'VirtualMachineSizeTypesStandardDS2V2', 'VirtualMachineSizeTypesStandardDS3V2', 'VirtualMachineSizeTypesStandardDS4V2', 'VirtualMachineSizeTypesStandardDS5V2', 'VirtualMachineSizeTypesStandardDS11V2', 'VirtualMachineSizeTypesStandardDS12V2', 'VirtualMachineSizeTypesStandardDS13V2', 'VirtualMachineSizeTypesStandardDS14V2', 'VirtualMachineSizeTypesStandardDS15V2', 'VirtualMachineSizeTypesStandardDS134V2', 'VirtualMachineSizeTypesStandardDS132V2', 'VirtualMachineSizeTypesStandardDS148V2', 'VirtualMachineSizeTypesStandardDS144V2', 'VirtualMachineSizeTypesStandardE2V3', 'VirtualMachineSizeTypesStandardE4V3', 'VirtualMachineSizeTypesStandardE8V3', 'VirtualMachineSizeTypesStandardE16V3', 'VirtualMachineSizeTypesStandardE32V3', 'VirtualMachineSizeTypesStandardE64V3', 'VirtualMachineSizeTypesStandardE2sV3', 'VirtualMachineSizeTypesStandardE4sV3', 'VirtualMachineSizeTypesStandardE8sV3', 'VirtualMachineSizeTypesStandardE16sV3', 'VirtualMachineSizeTypesStandardE32sV3', 'VirtualMachineSizeTypesStandardE64sV3', 'VirtualMachineSizeTypesStandardE3216V3', 'VirtualMachineSizeTypesStandardE328sV3', 'VirtualMachineSizeTypesStandardE6432sV3', 'VirtualMachineSizeTypesStandardE6416sV3', 'VirtualMachineSizeTypesStandardF1', 'VirtualMachineSizeTypesStandardF2', 'VirtualMachineSizeTypesStandardF4', 'VirtualMachineSizeTypesStandardF8', 'VirtualMachineSizeTypesStandardF16', 'VirtualMachineSizeTypesStandardF1s', 'VirtualMachineSizeTypesStandardF2s', 'VirtualMachineSizeTypesStandardF4s', 'VirtualMachineSizeTypesStandardF8s', 'VirtualMachineSizeTypesStandardF16s', 'VirtualMachineSizeTypesStandardF2sV2', 'VirtualMachineSizeTypesStandardF4sV2', 'VirtualMachineSizeTypesStandardF8sV2', 'VirtualMachineSizeTypesStandardF16sV2', 'VirtualMachineSizeTypesStandardF32sV2', 'VirtualMachineSizeTypesStandardF64sV2', 'VirtualMachineSizeTypesStandardF72sV2', 'VirtualMachineSizeTypesStandardG1', 'VirtualMachineSizeTypesStandardG2', 'VirtualMachineSizeTypesStandardG3', 'VirtualMachineSizeTypesStandardG4', 'VirtualMachineSizeTypesStandardG5', 'VirtualMachineSizeTypesStandardGS1', 'VirtualMachineSizeTypesStandardGS2', 'VirtualMachineSizeTypesStandardGS3', 'VirtualMachineSizeTypesStandardGS4', 'VirtualMachineSizeTypesStandardGS5', 'VirtualMachineSizeTypesStandardGS48', 'VirtualMachineSizeTypesStandardGS44', 'VirtualMachineSizeTypesStandardGS516', 'VirtualMachineSizeTypesStandardGS58', 'VirtualMachineSizeTypesStandardH8', 'VirtualMachineSizeTypesStandardH16', 'VirtualMachineSizeTypesStandardH8m', 'VirtualMachineSizeTypesStandardH16m', 'VirtualMachineSizeTypesStandardH16r', 'VirtualMachineSizeTypesStandardH16mr', 'VirtualMachineSizeTypesStandardL4s', 'VirtualMachineSizeTypesStandardL8s', 'VirtualMachineSizeTypesStandardL16s', 'VirtualMachineSizeTypesStandardL32s', 'VirtualMachineSizeTypesStandardM64s', 'VirtualMachineSizeTypesStandardM64ms', 'VirtualMachineSizeTypesStandardM128s', 'VirtualMachineSizeTypesStandardM128ms', 'VirtualMachineSizeTypesStandardM6432ms', 'VirtualMachineSizeTypesStandardM6416ms', 'VirtualMachineSizeTypesStandardM12864ms', 'VirtualMachineSizeTypesStandardM12832ms', 'VirtualMachineSizeTypesStandardNC6', 'VirtualMachineSizeTypesStandardNC12', 'VirtualMachineSizeTypesStandardNC24', 'VirtualMachineSizeTypesStandardNC24r', 'VirtualMachineSizeTypesStandardNC6sV2', 'VirtualMachineSizeTypesStandardNC12sV2', 'VirtualMachineSizeTypesStandardNC24sV2', 'VirtualMachineSizeTypesStandardNC24rsV2', 'VirtualMachineSizeTypesStandardNC6sV3', 'VirtualMachineSizeTypesStandardNC12sV3', 'VirtualMachineSizeTypesStandardNC24sV3', 'VirtualMachineSizeTypesStandardNC24rsV3', 'VirtualMachineSizeTypesStandardND6s', 'VirtualMachineSizeTypesStandardND12s', 'VirtualMachineSizeTypesStandardND24s', 'VirtualMachineSizeTypesStandardND24rs', 'VirtualMachineSizeTypesStandardNV6', 'VirtualMachineSizeTypesStandardNV12', 'VirtualMachineSizeTypesStandardNV24'
6609	VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"`
6610}
6611
6612// Image the source user image virtual hard disk. The virtual hard disk will be copied before being
6613// attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not
6614// exist.
6615type Image struct {
6616	autorest.Response `json:"-"`
6617	*ImageProperties  `json:"properties,omitempty"`
6618	// ID - READ-ONLY; Resource Id
6619	ID *string `json:"id,omitempty"`
6620	// Name - READ-ONLY; Resource name
6621	Name *string `json:"name,omitempty"`
6622	// Type - READ-ONLY; Resource type
6623	Type *string `json:"type,omitempty"`
6624	// Location - Resource location
6625	Location *string `json:"location,omitempty"`
6626	// Tags - Resource tags
6627	Tags map[string]*string `json:"tags"`
6628}
6629
6630// MarshalJSON is the custom marshaler for Image.
6631func (i Image) MarshalJSON() ([]byte, error) {
6632	objectMap := make(map[string]interface{})
6633	if i.ImageProperties != nil {
6634		objectMap["properties"] = i.ImageProperties
6635	}
6636	if i.Location != nil {
6637		objectMap["location"] = i.Location
6638	}
6639	if i.Tags != nil {
6640		objectMap["tags"] = i.Tags
6641	}
6642	return json.Marshal(objectMap)
6643}
6644
6645// UnmarshalJSON is the custom unmarshaler for Image struct.
6646func (i *Image) UnmarshalJSON(body []byte) error {
6647	var m map[string]*json.RawMessage
6648	err := json.Unmarshal(body, &m)
6649	if err != nil {
6650		return err
6651	}
6652	for k, v := range m {
6653		switch k {
6654		case "properties":
6655			if v != nil {
6656				var imageProperties ImageProperties
6657				err = json.Unmarshal(*v, &imageProperties)
6658				if err != nil {
6659					return err
6660				}
6661				i.ImageProperties = &imageProperties
6662			}
6663		case "id":
6664			if v != nil {
6665				var ID string
6666				err = json.Unmarshal(*v, &ID)
6667				if err != nil {
6668					return err
6669				}
6670				i.ID = &ID
6671			}
6672		case "name":
6673			if v != nil {
6674				var name string
6675				err = json.Unmarshal(*v, &name)
6676				if err != nil {
6677					return err
6678				}
6679				i.Name = &name
6680			}
6681		case "type":
6682			if v != nil {
6683				var typeVar string
6684				err = json.Unmarshal(*v, &typeVar)
6685				if err != nil {
6686					return err
6687				}
6688				i.Type = &typeVar
6689			}
6690		case "location":
6691			if v != nil {
6692				var location string
6693				err = json.Unmarshal(*v, &location)
6694				if err != nil {
6695					return err
6696				}
6697				i.Location = &location
6698			}
6699		case "tags":
6700			if v != nil {
6701				var tags map[string]*string
6702				err = json.Unmarshal(*v, &tags)
6703				if err != nil {
6704					return err
6705				}
6706				i.Tags = tags
6707			}
6708		}
6709	}
6710
6711	return nil
6712}
6713
6714// ImageDataDisk describes a data disk.
6715type ImageDataDisk struct {
6716	// 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.
6717	Lun *int32 `json:"lun,omitempty"`
6718	// Snapshot - The snapshot.
6719	Snapshot *SubResource `json:"snapshot,omitempty"`
6720	// ManagedDisk - The managedDisk.
6721	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
6722	// BlobURI - The Virtual Hard Disk.
6723	BlobURI *string `json:"blobUri,omitempty"`
6724	// 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'
6725	Caching CachingTypes `json:"caching,omitempty"`
6726	// 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
6727	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
6728	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
6729	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
6730	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
6731	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
6732}
6733
6734// ImageDisk describes a image disk.
6735type ImageDisk struct {
6736	// Snapshot - The snapshot.
6737	Snapshot *SubResource `json:"snapshot,omitempty"`
6738	// ManagedDisk - The managedDisk.
6739	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
6740	// BlobURI - The Virtual Hard Disk.
6741	BlobURI *string `json:"blobUri,omitempty"`
6742	// 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'
6743	Caching CachingTypes `json:"caching,omitempty"`
6744	// 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
6745	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
6746	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
6747	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
6748	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
6749	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
6750}
6751
6752// ImageDiskReference the source image used for creating the disk.
6753type ImageDiskReference struct {
6754	// ID - A relative uri containing either a Platform Image Repository or user image reference.
6755	ID *string `json:"id,omitempty"`
6756	// 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.
6757	Lun *int32 `json:"lun,omitempty"`
6758}
6759
6760// ImageListResult the List Image operation response.
6761type ImageListResult struct {
6762	autorest.Response `json:"-"`
6763	// Value - The list of Images.
6764	Value *[]Image `json:"value,omitempty"`
6765	// NextLink - The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images.
6766	NextLink *string `json:"nextLink,omitempty"`
6767}
6768
6769// ImageListResultIterator provides access to a complete listing of Image values.
6770type ImageListResultIterator struct {
6771	i    int
6772	page ImageListResultPage
6773}
6774
6775// NextWithContext advances to the next value.  If there was an error making
6776// the request the iterator does not advance and the error is returned.
6777func (iter *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) {
6778	if tracing.IsEnabled() {
6779		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.NextWithContext")
6780		defer func() {
6781			sc := -1
6782			if iter.Response().Response.Response != nil {
6783				sc = iter.Response().Response.Response.StatusCode
6784			}
6785			tracing.EndSpan(ctx, sc, err)
6786		}()
6787	}
6788	iter.i++
6789	if iter.i < len(iter.page.Values()) {
6790		return nil
6791	}
6792	err = iter.page.NextWithContext(ctx)
6793	if err != nil {
6794		iter.i--
6795		return err
6796	}
6797	iter.i = 0
6798	return nil
6799}
6800
6801// Next advances to the next value.  If there was an error making
6802// the request the iterator does not advance and the error is returned.
6803// Deprecated: Use NextWithContext() instead.
6804func (iter *ImageListResultIterator) Next() error {
6805	return iter.NextWithContext(context.Background())
6806}
6807
6808// NotDone returns true if the enumeration should be started or is not yet complete.
6809func (iter ImageListResultIterator) NotDone() bool {
6810	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6811}
6812
6813// Response returns the raw server response from the last page request.
6814func (iter ImageListResultIterator) Response() ImageListResult {
6815	return iter.page.Response()
6816}
6817
6818// Value returns the current value or a zero-initialized value if the
6819// iterator has advanced beyond the end of the collection.
6820func (iter ImageListResultIterator) Value() Image {
6821	if !iter.page.NotDone() {
6822		return Image{}
6823	}
6824	return iter.page.Values()[iter.i]
6825}
6826
6827// Creates a new instance of the ImageListResultIterator type.
6828func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator {
6829	return ImageListResultIterator{page: page}
6830}
6831
6832// IsEmpty returns true if the ListResult contains no values.
6833func (ilr ImageListResult) IsEmpty() bool {
6834	return ilr.Value == nil || len(*ilr.Value) == 0
6835}
6836
6837// hasNextLink returns true if the NextLink is not empty.
6838func (ilr ImageListResult) hasNextLink() bool {
6839	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
6840}
6841
6842// imageListResultPreparer prepares a request to retrieve the next set of results.
6843// It returns nil if no more results exist.
6844func (ilr ImageListResult) imageListResultPreparer(ctx context.Context) (*http.Request, error) {
6845	if !ilr.hasNextLink() {
6846		return nil, nil
6847	}
6848	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6849		autorest.AsJSON(),
6850		autorest.AsGet(),
6851		autorest.WithBaseURL(to.String(ilr.NextLink)))
6852}
6853
6854// ImageListResultPage contains a page of Image values.
6855type ImageListResultPage struct {
6856	fn  func(context.Context, ImageListResult) (ImageListResult, error)
6857	ilr ImageListResult
6858}
6859
6860// NextWithContext advances to the next page of values.  If there was an error making
6861// the request the page does not advance and the error is returned.
6862func (page *ImageListResultPage) NextWithContext(ctx context.Context) (err error) {
6863	if tracing.IsEnabled() {
6864		ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultPage.NextWithContext")
6865		defer func() {
6866			sc := -1
6867			if page.Response().Response.Response != nil {
6868				sc = page.Response().Response.Response.StatusCode
6869			}
6870			tracing.EndSpan(ctx, sc, err)
6871		}()
6872	}
6873	for {
6874		next, err := page.fn(ctx, page.ilr)
6875		if err != nil {
6876			return err
6877		}
6878		page.ilr = next
6879		if !next.hasNextLink() || !next.IsEmpty() {
6880			break
6881		}
6882	}
6883	return nil
6884}
6885
6886// Next advances to the next page of values.  If there was an error making
6887// the request the page does not advance and the error is returned.
6888// Deprecated: Use NextWithContext() instead.
6889func (page *ImageListResultPage) Next() error {
6890	return page.NextWithContext(context.Background())
6891}
6892
6893// NotDone returns true if the page enumeration should be started or is not yet complete.
6894func (page ImageListResultPage) NotDone() bool {
6895	return !page.ilr.IsEmpty()
6896}
6897
6898// Response returns the raw server response from the last page request.
6899func (page ImageListResultPage) Response() ImageListResult {
6900	return page.ilr
6901}
6902
6903// Values returns the slice of values for the current page or nil if there are no values.
6904func (page ImageListResultPage) Values() []Image {
6905	if page.ilr.IsEmpty() {
6906		return nil
6907	}
6908	return *page.ilr.Value
6909}
6910
6911// Creates a new instance of the ImageListResultPage type.
6912func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
6913	return ImageListResultPage{
6914		fn:  getNextPage,
6915		ilr: cur,
6916	}
6917}
6918
6919// ImageOSDisk describes an Operating System disk.
6920type ImageOSDisk struct {
6921	// 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'
6922	OsType OperatingSystemTypes `json:"osType,omitempty"`
6923	// OsState - The OS State. Possible values include: 'Generalized', 'Specialized'
6924	OsState OperatingSystemStateTypes `json:"osState,omitempty"`
6925	// Snapshot - The snapshot.
6926	Snapshot *SubResource `json:"snapshot,omitempty"`
6927	// ManagedDisk - The managedDisk.
6928	ManagedDisk *SubResource `json:"managedDisk,omitempty"`
6929	// BlobURI - The Virtual Hard Disk.
6930	BlobURI *string `json:"blobUri,omitempty"`
6931	// 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'
6932	Caching CachingTypes `json:"caching,omitempty"`
6933	// 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
6934	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
6935	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
6936	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
6937	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
6938	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
6939}
6940
6941// ImageProperties describes the properties of an Image.
6942type ImageProperties struct {
6943	// SourceVirtualMachine - The source virtual machine from which Image is created.
6944	SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"`
6945	// StorageProfile - Specifies the storage settings for the virtual machine disks.
6946	StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"`
6947	// ProvisioningState - READ-ONLY; The provisioning state.
6948	ProvisioningState *string `json:"provisioningState,omitempty"`
6949	// HyperVGeneration - Gets the HyperVGenerationType of the VirtualMachine created from the image. Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
6950	HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
6951}
6952
6953// MarshalJSON is the custom marshaler for ImageProperties.
6954func (IP ImageProperties) MarshalJSON() ([]byte, error) {
6955	objectMap := make(map[string]interface{})
6956	if IP.SourceVirtualMachine != nil {
6957		objectMap["sourceVirtualMachine"] = IP.SourceVirtualMachine
6958	}
6959	if IP.StorageProfile != nil {
6960		objectMap["storageProfile"] = IP.StorageProfile
6961	}
6962	if IP.HyperVGeneration != "" {
6963		objectMap["hyperVGeneration"] = IP.HyperVGeneration
6964	}
6965	return json.Marshal(objectMap)
6966}
6967
6968// ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace
6969// images.
6970type ImagePurchasePlan struct {
6971	// Name - The plan ID.
6972	Name *string `json:"name,omitempty"`
6973	// Publisher - The publisher ID.
6974	Publisher *string `json:"publisher,omitempty"`
6975	// Product - The product ID.
6976	Product *string `json:"product,omitempty"`
6977}
6978
6979// ImageReference specifies information about the image to use. You can specify information about platform
6980// images, marketplace images, or virtual machine images. This element is required when you want to use a
6981// platform image, marketplace image, or virtual machine image, but is not used in other creation
6982// operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.
6983type ImageReference struct {
6984	// Publisher - The image publisher.
6985	Publisher *string `json:"publisher,omitempty"`
6986	// Offer - Specifies the offer of the platform image or marketplace image used to create the virtual machine.
6987	Offer *string `json:"offer,omitempty"`
6988	// Sku - The image SKU.
6989	Sku *string `json:"sku,omitempty"`
6990	// 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.
6991	Version *string `json:"version,omitempty"`
6992	// ExactVersion - READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.
6993	ExactVersion *string `json:"exactVersion,omitempty"`
6994	// ID - Resource Id
6995	ID *string `json:"id,omitempty"`
6996}
6997
6998// MarshalJSON is the custom marshaler for ImageReference.
6999func (ir ImageReference) MarshalJSON() ([]byte, error) {
7000	objectMap := make(map[string]interface{})
7001	if ir.Publisher != nil {
7002		objectMap["publisher"] = ir.Publisher
7003	}
7004	if ir.Offer != nil {
7005		objectMap["offer"] = ir.Offer
7006	}
7007	if ir.Sku != nil {
7008		objectMap["sku"] = ir.Sku
7009	}
7010	if ir.Version != nil {
7011		objectMap["version"] = ir.Version
7012	}
7013	if ir.ID != nil {
7014		objectMap["id"] = ir.ID
7015	}
7016	return json.Marshal(objectMap)
7017}
7018
7019// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
7020// operation.
7021type ImagesCreateOrUpdateFuture struct {
7022	azure.FutureAPI
7023	// Result returns the result of the asynchronous operation.
7024	// If the operation has not completed it will return an error.
7025	Result func(ImagesClient) (Image, error)
7026}
7027
7028// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
7029type ImagesDeleteFuture struct {
7030	azure.FutureAPI
7031	// Result returns the result of the asynchronous operation.
7032	// If the operation has not completed it will return an error.
7033	Result func(ImagesClient) (autorest.Response, error)
7034}
7035
7036// ImageStorageProfile describes a storage profile.
7037type ImageStorageProfile struct {
7038	// 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).
7039	OsDisk *ImageOSDisk `json:"osDisk,omitempty"`
7040	// 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).
7041	DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"`
7042	// 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).
7043	ZoneResilient *bool `json:"zoneResilient,omitempty"`
7044}
7045
7046// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
7047type ImagesUpdateFuture struct {
7048	azure.FutureAPI
7049	// Result returns the result of the asynchronous operation.
7050	// If the operation has not completed it will return an error.
7051	Result func(ImagesClient) (Image, error)
7052}
7053
7054// ImageUpdate the source user image virtual hard disk. Only tags may be updated.
7055type ImageUpdate struct {
7056	*ImageProperties `json:"properties,omitempty"`
7057	// Tags - Resource tags
7058	Tags map[string]*string `json:"tags"`
7059}
7060
7061// MarshalJSON is the custom marshaler for ImageUpdate.
7062func (iu ImageUpdate) MarshalJSON() ([]byte, error) {
7063	objectMap := make(map[string]interface{})
7064	if iu.ImageProperties != nil {
7065		objectMap["properties"] = iu.ImageProperties
7066	}
7067	if iu.Tags != nil {
7068		objectMap["tags"] = iu.Tags
7069	}
7070	return json.Marshal(objectMap)
7071}
7072
7073// UnmarshalJSON is the custom unmarshaler for ImageUpdate struct.
7074func (iu *ImageUpdate) UnmarshalJSON(body []byte) error {
7075	var m map[string]*json.RawMessage
7076	err := json.Unmarshal(body, &m)
7077	if err != nil {
7078		return err
7079	}
7080	for k, v := range m {
7081		switch k {
7082		case "properties":
7083			if v != nil {
7084				var imageProperties ImageProperties
7085				err = json.Unmarshal(*v, &imageProperties)
7086				if err != nil {
7087					return err
7088				}
7089				iu.ImageProperties = &imageProperties
7090			}
7091		case "tags":
7092			if v != nil {
7093				var tags map[string]*string
7094				err = json.Unmarshal(*v, &tags)
7095				if err != nil {
7096					return err
7097				}
7098				iu.Tags = tags
7099			}
7100		}
7101	}
7102
7103	return nil
7104}
7105
7106// InnerError inner error details.
7107type InnerError struct {
7108	// Exceptiontype - The exception type.
7109	Exceptiontype *string `json:"exceptiontype,omitempty"`
7110	// Errordetail - The internal error message or exception dump.
7111	Errordetail *string `json:"errordetail,omitempty"`
7112}
7113
7114// InstanceSku ...
7115type InstanceSku struct {
7116	// Name - READ-ONLY; The sku name.
7117	Name *string `json:"name,omitempty"`
7118	// Tier - READ-ONLY; The tier of the cloud service role instance.
7119	Tier *string `json:"tier,omitempty"`
7120}
7121
7122// InstanceViewStatus instance view status.
7123type InstanceViewStatus struct {
7124	// Code - The status code.
7125	Code *string `json:"code,omitempty"`
7126	// Level - The level code. Possible values include: 'Info', 'Warning', 'Error'
7127	Level StatusLevelTypes `json:"level,omitempty"`
7128	// DisplayStatus - The short localizable label for the status.
7129	DisplayStatus *string `json:"displayStatus,omitempty"`
7130	// Message - The detailed status message, including for alerts and error messages.
7131	Message *string `json:"message,omitempty"`
7132	// Time - The time of the status.
7133	Time *date.Time `json:"time,omitempty"`
7134}
7135
7136// InstanceViewStatusesSummary instance view statuses.
7137type InstanceViewStatusesSummary struct {
7138	// StatusesSummary - READ-ONLY
7139	StatusesSummary *[]StatusCodeCount `json:"statusesSummary,omitempty"`
7140}
7141
7142// KeyForDiskEncryptionSet key Vault Key Url to be used for server side encryption of Managed Disks and
7143// Snapshots
7144type KeyForDiskEncryptionSet struct {
7145	// SourceVault - Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription.
7146	SourceVault *SourceVault `json:"sourceVault,omitempty"`
7147	// KeyURL - Fully versioned Key Url pointing to a key in KeyVault
7148	KeyURL *string `json:"keyUrl,omitempty"`
7149}
7150
7151// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used
7152// to unwrap the encryptionKey
7153type KeyVaultAndKeyReference struct {
7154	// SourceVault - Resource id of the KeyVault containing the key or secret
7155	SourceVault *SourceVault `json:"sourceVault,omitempty"`
7156	// KeyURL - Url pointing to a key or secret in KeyVault
7157	KeyURL *string `json:"keyUrl,omitempty"`
7158}
7159
7160// KeyVaultAndSecretReference key Vault Secret Url and vault id of the encryption key
7161type KeyVaultAndSecretReference struct {
7162	// SourceVault - Resource id of the KeyVault containing the key or secret
7163	SourceVault *SourceVault `json:"sourceVault,omitempty"`
7164	// SecretURL - Url pointing to a key or secret in KeyVault
7165	SecretURL *string `json:"secretUrl,omitempty"`
7166}
7167
7168// KeyVaultKeyReference describes a reference to Key Vault Key
7169type KeyVaultKeyReference struct {
7170	// KeyURL - The URL referencing a key encryption key in Key Vault.
7171	KeyURL *string `json:"keyUrl,omitempty"`
7172	// SourceVault - The relative URL of the Key Vault containing the key.
7173	SourceVault *SubResource `json:"sourceVault,omitempty"`
7174}
7175
7176// KeyVaultSecretReference describes a reference to Key Vault Secret
7177type KeyVaultSecretReference struct {
7178	// SecretURL - The URL referencing a secret in a Key Vault.
7179	SecretURL *string `json:"secretUrl,omitempty"`
7180	// SourceVault - The relative URL of the Key Vault containing the secret.
7181	SourceVault *SubResource `json:"sourceVault,omitempty"`
7182}
7183
7184// LastPatchInstallationSummary describes the properties of the last installed patch summary.
7185type LastPatchInstallationSummary struct {
7186	// Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
7187	Status PatchOperationStatus `json:"status,omitempty"`
7188	// InstallationActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
7189	InstallationActivityID *string `json:"installationActivityId,omitempty"`
7190	// MaintenanceWindowExceeded - READ-ONLY; Describes whether the operation ran out of time before it completed all its intended actions
7191	MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"`
7192	// RebootStatus - READ-ONLY; The reboot status of the machine after the patch operation. It will be in "NotNeeded" status if reboot is not needed after the patch operation. "Required" will be the status once the patch is applied and machine is required to reboot. "Started" will be the reboot status when the machine has started to reboot. "Failed" will be the status if the machine is failed to reboot. "Completed" will be the status once the machine is rebooted successfully. Possible values include: 'RebootStatusNotNeeded', 'RebootStatusRequired', 'RebootStatusStarted', 'RebootStatusFailed', 'RebootStatusCompleted'
7193	RebootStatus RebootStatus `json:"rebootStatus,omitempty"`
7194	// NotSelectedPatchCount - READ-ONLY; The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry.
7195	NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty"`
7196	// ExcludedPatchCount - READ-ONLY; The number of all available patches but excluded explicitly by a customer-specified exclusion list match.
7197	ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty"`
7198	// PendingPatchCount - READ-ONLY; The number of all available patches expected to be installed over the course of the patch installation operation.
7199	PendingPatchCount *int32 `json:"pendingPatchCount,omitempty"`
7200	// InstalledPatchCount - READ-ONLY; The count of patches that successfully installed.
7201	InstalledPatchCount *int32 `json:"installedPatchCount,omitempty"`
7202	// FailedPatchCount - READ-ONLY; The count of patches that failed installation.
7203	FailedPatchCount *int32 `json:"failedPatchCount,omitempty"`
7204	// StartTime - READ-ONLY; The UTC timestamp when the operation began.
7205	StartTime *date.Time `json:"startTime,omitempty"`
7206	// LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began.
7207	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
7208	// StartedBy - READ-ONLY; The person or system account that started the operation
7209	StartedBy *string `json:"startedBy,omitempty"`
7210	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
7211	Error *APIError `json:"error,omitempty"`
7212}
7213
7214// LinuxConfiguration specifies the Linux operating system settings on the virtual machine. <br><br>For a
7215// list of supported Linux distributions, see [Linux on Azure-Endorsed
7216// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
7217// <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed
7218// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
7219type LinuxConfiguration struct {
7220	// DisablePasswordAuthentication - Specifies whether password authentication should be disabled.
7221	DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"`
7222	// SSH - Specifies the ssh key configuration for a Linux OS.
7223	SSH *SSHConfiguration `json:"ssh,omitempty"`
7224	// 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.
7225	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
7226}
7227
7228// ListUsagesResult the List Usages operation response.
7229type ListUsagesResult struct {
7230	autorest.Response `json:"-"`
7231	// Value - The list of compute resource usages.
7232	Value *[]Usage `json:"value,omitempty"`
7233	// 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.
7234	NextLink *string `json:"nextLink,omitempty"`
7235}
7236
7237// ListUsagesResultIterator provides access to a complete listing of Usage values.
7238type ListUsagesResultIterator struct {
7239	i    int
7240	page ListUsagesResultPage
7241}
7242
7243// NextWithContext advances to the next value.  If there was an error making
7244// the request the iterator does not advance and the error is returned.
7245func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
7246	if tracing.IsEnabled() {
7247		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
7248		defer func() {
7249			sc := -1
7250			if iter.Response().Response.Response != nil {
7251				sc = iter.Response().Response.Response.StatusCode
7252			}
7253			tracing.EndSpan(ctx, sc, err)
7254		}()
7255	}
7256	iter.i++
7257	if iter.i < len(iter.page.Values()) {
7258		return nil
7259	}
7260	err = iter.page.NextWithContext(ctx)
7261	if err != nil {
7262		iter.i--
7263		return err
7264	}
7265	iter.i = 0
7266	return nil
7267}
7268
7269// Next advances to the next value.  If there was an error making
7270// the request the iterator does not advance and the error is returned.
7271// Deprecated: Use NextWithContext() instead.
7272func (iter *ListUsagesResultIterator) Next() error {
7273	return iter.NextWithContext(context.Background())
7274}
7275
7276// NotDone returns true if the enumeration should be started or is not yet complete.
7277func (iter ListUsagesResultIterator) NotDone() bool {
7278	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7279}
7280
7281// Response returns the raw server response from the last page request.
7282func (iter ListUsagesResultIterator) Response() ListUsagesResult {
7283	return iter.page.Response()
7284}
7285
7286// Value returns the current value or a zero-initialized value if the
7287// iterator has advanced beyond the end of the collection.
7288func (iter ListUsagesResultIterator) Value() Usage {
7289	if !iter.page.NotDone() {
7290		return Usage{}
7291	}
7292	return iter.page.Values()[iter.i]
7293}
7294
7295// Creates a new instance of the ListUsagesResultIterator type.
7296func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
7297	return ListUsagesResultIterator{page: page}
7298}
7299
7300// IsEmpty returns true if the ListResult contains no values.
7301func (lur ListUsagesResult) IsEmpty() bool {
7302	return lur.Value == nil || len(*lur.Value) == 0
7303}
7304
7305// hasNextLink returns true if the NextLink is not empty.
7306func (lur ListUsagesResult) hasNextLink() bool {
7307	return lur.NextLink != nil && len(*lur.NextLink) != 0
7308}
7309
7310// listUsagesResultPreparer prepares a request to retrieve the next set of results.
7311// It returns nil if no more results exist.
7312func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
7313	if !lur.hasNextLink() {
7314		return nil, nil
7315	}
7316	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7317		autorest.AsJSON(),
7318		autorest.AsGet(),
7319		autorest.WithBaseURL(to.String(lur.NextLink)))
7320}
7321
7322// ListUsagesResultPage contains a page of Usage values.
7323type ListUsagesResultPage struct {
7324	fn  func(context.Context, ListUsagesResult) (ListUsagesResult, error)
7325	lur ListUsagesResult
7326}
7327
7328// NextWithContext advances to the next page of values.  If there was an error making
7329// the request the page does not advance and the error is returned.
7330func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
7331	if tracing.IsEnabled() {
7332		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
7333		defer func() {
7334			sc := -1
7335			if page.Response().Response.Response != nil {
7336				sc = page.Response().Response.Response.StatusCode
7337			}
7338			tracing.EndSpan(ctx, sc, err)
7339		}()
7340	}
7341	for {
7342		next, err := page.fn(ctx, page.lur)
7343		if err != nil {
7344			return err
7345		}
7346		page.lur = next
7347		if !next.hasNextLink() || !next.IsEmpty() {
7348			break
7349		}
7350	}
7351	return nil
7352}
7353
7354// Next advances to the next page of values.  If there was an error making
7355// the request the page does not advance and the error is returned.
7356// Deprecated: Use NextWithContext() instead.
7357func (page *ListUsagesResultPage) Next() error {
7358	return page.NextWithContext(context.Background())
7359}
7360
7361// NotDone returns true if the page enumeration should be started or is not yet complete.
7362func (page ListUsagesResultPage) NotDone() bool {
7363	return !page.lur.IsEmpty()
7364}
7365
7366// Response returns the raw server response from the last page request.
7367func (page ListUsagesResultPage) Response() ListUsagesResult {
7368	return page.lur
7369}
7370
7371// Values returns the slice of values for the current page or nil if there are no values.
7372func (page ListUsagesResultPage) Values() []Usage {
7373	if page.lur.IsEmpty() {
7374		return nil
7375	}
7376	return *page.lur.Value
7377}
7378
7379// Creates a new instance of the ListUsagesResultPage type.
7380func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
7381	return ListUsagesResultPage{
7382		fn:  getNextPage,
7383		lur: cur,
7384	}
7385}
7386
7387// ListVirtualMachineExtensionImage ...
7388type ListVirtualMachineExtensionImage struct {
7389	autorest.Response `json:"-"`
7390	Value             *[]VirtualMachineExtensionImage `json:"value,omitempty"`
7391}
7392
7393// ListVirtualMachineImageResource ...
7394type ListVirtualMachineImageResource struct {
7395	autorest.Response `json:"-"`
7396	Value             *[]VirtualMachineImageResource `json:"value,omitempty"`
7397}
7398
7399// LoadBalancerConfiguration describes the load balancer configuration.
7400type LoadBalancerConfiguration struct {
7401	// Name - Resource Name
7402	Name       *string                              `json:"name,omitempty"`
7403	Properties *LoadBalancerConfigurationProperties `json:"properties,omitempty"`
7404}
7405
7406// LoadBalancerConfigurationProperties ...
7407type LoadBalancerConfigurationProperties struct {
7408	// FrontendIPConfigurations - List of IP
7409	FrontendIPConfigurations *[]LoadBalancerFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
7410}
7411
7412// LoadBalancerFrontendIPConfiguration ...
7413type LoadBalancerFrontendIPConfiguration struct {
7414	Name       *string                                        `json:"name,omitempty"`
7415	Properties *LoadBalancerFrontendIPConfigurationProperties `json:"properties,omitempty"`
7416}
7417
7418// LoadBalancerFrontendIPConfigurationProperties describes a cloud service IP Configuration
7419type LoadBalancerFrontendIPConfigurationProperties struct {
7420	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
7421	Subnet          *SubResource `json:"subnet,omitempty"`
7422	// PrivateIPAddress - The private IP address referenced by the cloud service.
7423	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
7424}
7425
7426// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results
7427// of a long-running operation.
7428type LogAnalyticsExportRequestRateByIntervalFuture struct {
7429	azure.FutureAPI
7430	// Result returns the result of the asynchronous operation.
7431	// If the operation has not completed it will return an error.
7432	Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
7433}
7434
7435// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a
7436// long-running operation.
7437type LogAnalyticsExportThrottledRequestsFuture struct {
7438	azure.FutureAPI
7439	// Result returns the result of the asynchronous operation.
7440	// If the operation has not completed it will return an error.
7441	Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
7442}
7443
7444// LogAnalyticsInputBase api input base class for LogAnalytics Api.
7445type LogAnalyticsInputBase struct {
7446	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
7447	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
7448	// FromTime - From time of the query
7449	FromTime *date.Time `json:"fromTime,omitempty"`
7450	// ToTime - To time of the query
7451	ToTime *date.Time `json:"toTime,omitempty"`
7452	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
7453	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
7454	// GroupByOperationName - Group query result by Operation Name.
7455	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
7456	// GroupByResourceName - Group query result by Resource Name.
7457	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
7458	// GroupByClientApplicationID - Group query result by Client Application ID.
7459	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
7460	// GroupByUserAgent - Group query result by User Agent.
7461	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
7462}
7463
7464// LogAnalyticsOperationResult logAnalytics operation status response
7465type LogAnalyticsOperationResult struct {
7466	autorest.Response `json:"-"`
7467	// Properties - READ-ONLY; LogAnalyticsOutput
7468	Properties *LogAnalyticsOutput `json:"properties,omitempty"`
7469}
7470
7471// LogAnalyticsOutput logAnalytics output properties
7472type LogAnalyticsOutput struct {
7473	// Output - READ-ONLY; Output file Uri path to blob container.
7474	Output *string `json:"output,omitempty"`
7475}
7476
7477// MaintenanceRedeployStatus maintenance Operation Status.
7478type MaintenanceRedeployStatus struct {
7479	// IsCustomerInitiatedMaintenanceAllowed - True, if customer is allowed to perform Maintenance.
7480	IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"`
7481	// PreMaintenanceWindowStartTime - Start Time for the Pre Maintenance Window.
7482	PreMaintenanceWindowStartTime *date.Time `json:"preMaintenanceWindowStartTime,omitempty"`
7483	// PreMaintenanceWindowEndTime - End Time for the Pre Maintenance Window.
7484	PreMaintenanceWindowEndTime *date.Time `json:"preMaintenanceWindowEndTime,omitempty"`
7485	// MaintenanceWindowStartTime - Start Time for the Maintenance Window.
7486	MaintenanceWindowStartTime *date.Time `json:"maintenanceWindowStartTime,omitempty"`
7487	// MaintenanceWindowEndTime - End Time for the Maintenance Window.
7488	MaintenanceWindowEndTime *date.Time `json:"maintenanceWindowEndTime,omitempty"`
7489	// LastOperationResultCode - The Last Maintenance Operation Result Code. Possible values include: 'MaintenanceOperationResultCodeTypesNone', 'MaintenanceOperationResultCodeTypesRetryLater', 'MaintenanceOperationResultCodeTypesMaintenanceAborted', 'MaintenanceOperationResultCodeTypesMaintenanceCompleted'
7490	LastOperationResultCode MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"`
7491	// LastOperationMessage - Message returned for the last Maintenance Operation.
7492	LastOperationMessage *string `json:"lastOperationMessage,omitempty"`
7493}
7494
7495// ManagedArtifact the managed artifact.
7496type ManagedArtifact struct {
7497	// ID - The managed artifact id.
7498	ID *string `json:"id,omitempty"`
7499}
7500
7501// ManagedDiskParameters the parameters of a managed disk.
7502type ManagedDiskParameters struct {
7503	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
7504	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
7505	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
7506	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
7507	// ID - Resource Id
7508	ID *string `json:"id,omitempty"`
7509}
7510
7511// NetworkInterfaceReference describes a network interface reference.
7512type NetworkInterfaceReference struct {
7513	*NetworkInterfaceReferenceProperties `json:"properties,omitempty"`
7514	// ID - Resource Id
7515	ID *string `json:"id,omitempty"`
7516}
7517
7518// MarshalJSON is the custom marshaler for NetworkInterfaceReference.
7519func (nir NetworkInterfaceReference) MarshalJSON() ([]byte, error) {
7520	objectMap := make(map[string]interface{})
7521	if nir.NetworkInterfaceReferenceProperties != nil {
7522		objectMap["properties"] = nir.NetworkInterfaceReferenceProperties
7523	}
7524	if nir.ID != nil {
7525		objectMap["id"] = nir.ID
7526	}
7527	return json.Marshal(objectMap)
7528}
7529
7530// UnmarshalJSON is the custom unmarshaler for NetworkInterfaceReference struct.
7531func (nir *NetworkInterfaceReference) UnmarshalJSON(body []byte) error {
7532	var m map[string]*json.RawMessage
7533	err := json.Unmarshal(body, &m)
7534	if err != nil {
7535		return err
7536	}
7537	for k, v := range m {
7538		switch k {
7539		case "properties":
7540			if v != nil {
7541				var networkInterfaceReferenceProperties NetworkInterfaceReferenceProperties
7542				err = json.Unmarshal(*v, &networkInterfaceReferenceProperties)
7543				if err != nil {
7544					return err
7545				}
7546				nir.NetworkInterfaceReferenceProperties = &networkInterfaceReferenceProperties
7547			}
7548		case "id":
7549			if v != nil {
7550				var ID string
7551				err = json.Unmarshal(*v, &ID)
7552				if err != nil {
7553					return err
7554				}
7555				nir.ID = &ID
7556			}
7557		}
7558	}
7559
7560	return nil
7561}
7562
7563// NetworkInterfaceReferenceProperties describes a network interface reference properties.
7564type NetworkInterfaceReferenceProperties struct {
7565	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
7566	Primary *bool `json:"primary,omitempty"`
7567}
7568
7569// NetworkProfile specifies the network interfaces of the virtual machine.
7570type NetworkProfile struct {
7571	// NetworkInterfaces - Specifies the list of resource Ids for the network interfaces associated with the virtual machine.
7572	NetworkInterfaces *[]NetworkInterfaceReference `json:"networkInterfaces,omitempty"`
7573}
7574
7575// OperationListResult the List Compute Operation operation response.
7576type OperationListResult struct {
7577	autorest.Response `json:"-"`
7578	// Value - READ-ONLY; The list of compute operations
7579	Value *[]OperationValue `json:"value,omitempty"`
7580}
7581
7582// OperationValue describes the properties of a Compute Operation value.
7583type OperationValue struct {
7584	// Origin - READ-ONLY; The origin of the compute operation.
7585	Origin *string `json:"origin,omitempty"`
7586	// Name - READ-ONLY; The name of the compute operation.
7587	Name                   *string `json:"name,omitempty"`
7588	*OperationValueDisplay `json:"display,omitempty"`
7589}
7590
7591// MarshalJSON is the custom marshaler for OperationValue.
7592func (ov OperationValue) MarshalJSON() ([]byte, error) {
7593	objectMap := make(map[string]interface{})
7594	if ov.OperationValueDisplay != nil {
7595		objectMap["display"] = ov.OperationValueDisplay
7596	}
7597	return json.Marshal(objectMap)
7598}
7599
7600// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
7601func (ov *OperationValue) UnmarshalJSON(body []byte) error {
7602	var m map[string]*json.RawMessage
7603	err := json.Unmarshal(body, &m)
7604	if err != nil {
7605		return err
7606	}
7607	for k, v := range m {
7608		switch k {
7609		case "origin":
7610			if v != nil {
7611				var origin string
7612				err = json.Unmarshal(*v, &origin)
7613				if err != nil {
7614					return err
7615				}
7616				ov.Origin = &origin
7617			}
7618		case "name":
7619			if v != nil {
7620				var name string
7621				err = json.Unmarshal(*v, &name)
7622				if err != nil {
7623					return err
7624				}
7625				ov.Name = &name
7626			}
7627		case "display":
7628			if v != nil {
7629				var operationValueDisplay OperationValueDisplay
7630				err = json.Unmarshal(*v, &operationValueDisplay)
7631				if err != nil {
7632					return err
7633				}
7634				ov.OperationValueDisplay = &operationValueDisplay
7635			}
7636		}
7637	}
7638
7639	return nil
7640}
7641
7642// OperationValueDisplay describes the properties of a Compute Operation Value Display.
7643type OperationValueDisplay struct {
7644	// Operation - READ-ONLY; The display name of the compute operation.
7645	Operation *string `json:"operation,omitempty"`
7646	// Resource - READ-ONLY; The display name of the resource the operation applies to.
7647	Resource *string `json:"resource,omitempty"`
7648	// Description - READ-ONLY; The description of the operation.
7649	Description *string `json:"description,omitempty"`
7650	// Provider - READ-ONLY; The resource provider for the operation.
7651	Provider *string `json:"provider,omitempty"`
7652}
7653
7654// OrchestrationServiceStateInput the input for OrchestrationServiceState
7655type OrchestrationServiceStateInput struct {
7656	// ServiceName - The name of the service. Possible values include: 'AutomaticRepairs'
7657	ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
7658	// Action - The action to be performed. Possible values include: 'Resume', 'Suspend'
7659	Action OrchestrationServiceStateAction `json:"action,omitempty"`
7660}
7661
7662// OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set.
7663type OrchestrationServiceSummary struct {
7664	// ServiceName - READ-ONLY; The name of the service. Possible values include: 'AutomaticRepairs', 'DummyOrchestrationServiceName'
7665	ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
7666	// ServiceState - READ-ONLY; The current state of the service. Possible values include: 'NotRunning', 'Running', 'Suspended'
7667	ServiceState OrchestrationServiceState `json:"serviceState,omitempty"`
7668}
7669
7670// OSDisk specifies information about the operating system disk used by the virtual machine. <br><br> For
7671// more information about disks, see [About disks and VHDs for Azure virtual
7672// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
7673type OSDisk struct {
7674	// 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'
7675	OsType OperatingSystemTypes `json:"osType,omitempty"`
7676	// EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
7677	EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
7678	// Name - The disk name.
7679	Name *string `json:"name,omitempty"`
7680	// Vhd - The virtual hard disk.
7681	Vhd *VirtualHardDisk `json:"vhd,omitempty"`
7682	// 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.
7683	Image *VirtualHardDisk `json:"image,omitempty"`
7684	// 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'
7685	Caching CachingTypes `json:"caching,omitempty"`
7686	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
7687	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
7688	// DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
7689	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
7690	// 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'
7691	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
7692	// 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
7693	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
7694	// ManagedDisk - The managed disk parameters.
7695	ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
7696}
7697
7698// OSDiskImage contains the os disk image information.
7699type OSDiskImage struct {
7700	// OperatingSystem - The operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'
7701	OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"`
7702}
7703
7704// OSDiskImageEncryption contains encryption settings for an OS disk image.
7705type OSDiskImageEncryption struct {
7706	// DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
7707	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
7708}
7709
7710// OSProfile specifies the operating system settings for the virtual machine. Some of the settings cannot
7711// be changed once VM is provisioned.
7712type OSProfile struct {
7713	// 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).
7714	ComputerName *string `json:"computerName,omitempty"`
7715	// AdminUsername - Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1  character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters  <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
7716	AdminUsername *string `json:"adminUsername,omitempty"`
7717	// 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)
7718	AdminPassword *string `json:"adminPassword,omitempty"`
7719	// CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> **Note: Do not pass any secrets or passwords in customData property** <br><br> This property cannot be updated after the VM is created. <br><br> customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) <br><br> For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
7720	CustomData *string `json:"customData,omitempty"`
7721	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
7722	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
7723	// 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).
7724	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
7725	// Secrets - Specifies set of certificates that should be installed onto the virtual machine.
7726	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
7727	// AllowExtensionOperations - Specifies whether extension operations should be allowed on the virtual machine. <br><br>This may only be set to False when no extensions are present on the virtual machine.
7728	AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"`
7729	// RequireGuestProvisionSignal - Specifies whether the guest provision signal is required to infer provision success of the virtual machine.  **Note: This property is for private testing only, and all customers must not set the property to false.**
7730	RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"`
7731}
7732
7733// PatchSettings ...
7734type PatchSettings struct {
7735	// PatchMode - Specifies the mode of in-guest patching to IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **Manual** - You  control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> ** AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'InGuestPatchModeManual', 'InGuestPatchModeAutomaticByOS', 'InGuestPatchModeAutomaticByPlatform'
7736	PatchMode InGuestPatchMode `json:"patchMode,omitempty"`
7737}
7738
7739// Plan specifies information about the marketplace image used to create the virtual machine. This element
7740// is only used for marketplace images. Before you can use a marketplace image from an API, you must enable
7741// the image for programmatic use.  In the Azure portal, find the marketplace image that you want to use
7742// and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and
7743// then click **Save**.
7744type Plan struct {
7745	// Name - The plan ID.
7746	Name *string `json:"name,omitempty"`
7747	// Publisher - The publisher ID.
7748	Publisher *string `json:"publisher,omitempty"`
7749	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
7750	Product *string `json:"product,omitempty"`
7751	// PromotionCode - The promotion code.
7752	PromotionCode *string `json:"promotionCode,omitempty"`
7753}
7754
7755// PrivateEndpoint the Private Endpoint resource.
7756type PrivateEndpoint struct {
7757	// ID - READ-ONLY; The ARM identifier for Private Endpoint
7758	ID *string `json:"id,omitempty"`
7759}
7760
7761// PrivateEndpointConnection the Private Endpoint Connection resource.
7762type PrivateEndpointConnection struct {
7763	autorest.Response `json:"-"`
7764	// PrivateEndpointConnectionProperties - Resource properties.
7765	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
7766	// ID - READ-ONLY; private endpoint connection Id
7767	ID *string `json:"id,omitempty"`
7768	// Name - READ-ONLY; private endpoint connection name
7769	Name *string `json:"name,omitempty"`
7770	// Type - READ-ONLY; private endpoint connection type
7771	Type *string `json:"type,omitempty"`
7772}
7773
7774// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
7775func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
7776	objectMap := make(map[string]interface{})
7777	if pec.PrivateEndpointConnectionProperties != nil {
7778		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
7779	}
7780	return json.Marshal(objectMap)
7781}
7782
7783// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
7784func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
7785	var m map[string]*json.RawMessage
7786	err := json.Unmarshal(body, &m)
7787	if err != nil {
7788		return err
7789	}
7790	for k, v := range m {
7791		switch k {
7792		case "properties":
7793			if v != nil {
7794				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
7795				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
7796				if err != nil {
7797					return err
7798				}
7799				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
7800			}
7801		case "id":
7802			if v != nil {
7803				var ID string
7804				err = json.Unmarshal(*v, &ID)
7805				if err != nil {
7806					return err
7807				}
7808				pec.ID = &ID
7809			}
7810		case "name":
7811			if v != nil {
7812				var name string
7813				err = json.Unmarshal(*v, &name)
7814				if err != nil {
7815					return err
7816				}
7817				pec.Name = &name
7818			}
7819		case "type":
7820			if v != nil {
7821				var typeVar string
7822				err = json.Unmarshal(*v, &typeVar)
7823				if err != nil {
7824					return err
7825				}
7826				pec.Type = &typeVar
7827			}
7828		}
7829	}
7830
7831	return nil
7832}
7833
7834// PrivateEndpointConnectionListResult a list of private link resources
7835type PrivateEndpointConnectionListResult struct {
7836	autorest.Response `json:"-"`
7837	// Value - Array of private endpoint connections
7838	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
7839	// NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
7840	NextLink *string `json:"nextLink,omitempty"`
7841}
7842
7843// PrivateEndpointConnectionListResultIterator provides access to a complete listing of
7844// PrivateEndpointConnection values.
7845type PrivateEndpointConnectionListResultIterator struct {
7846	i    int
7847	page PrivateEndpointConnectionListResultPage
7848}
7849
7850// NextWithContext advances to the next value.  If there was an error making
7851// the request the iterator does not advance and the error is returned.
7852func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
7853	if tracing.IsEnabled() {
7854		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext")
7855		defer func() {
7856			sc := -1
7857			if iter.Response().Response.Response != nil {
7858				sc = iter.Response().Response.Response.StatusCode
7859			}
7860			tracing.EndSpan(ctx, sc, err)
7861		}()
7862	}
7863	iter.i++
7864	if iter.i < len(iter.page.Values()) {
7865		return nil
7866	}
7867	err = iter.page.NextWithContext(ctx)
7868	if err != nil {
7869		iter.i--
7870		return err
7871	}
7872	iter.i = 0
7873	return nil
7874}
7875
7876// Next advances to the next value.  If there was an error making
7877// the request the iterator does not advance and the error is returned.
7878// Deprecated: Use NextWithContext() instead.
7879func (iter *PrivateEndpointConnectionListResultIterator) Next() error {
7880	return iter.NextWithContext(context.Background())
7881}
7882
7883// NotDone returns true if the enumeration should be started or is not yet complete.
7884func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool {
7885	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7886}
7887
7888// Response returns the raw server response from the last page request.
7889func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult {
7890	return iter.page.Response()
7891}
7892
7893// Value returns the current value or a zero-initialized value if the
7894// iterator has advanced beyond the end of the collection.
7895func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection {
7896	if !iter.page.NotDone() {
7897		return PrivateEndpointConnection{}
7898	}
7899	return iter.page.Values()[iter.i]
7900}
7901
7902// Creates a new instance of the PrivateEndpointConnectionListResultIterator type.
7903func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator {
7904	return PrivateEndpointConnectionListResultIterator{page: page}
7905}
7906
7907// IsEmpty returns true if the ListResult contains no values.
7908func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool {
7909	return peclr.Value == nil || len(*peclr.Value) == 0
7910}
7911
7912// hasNextLink returns true if the NextLink is not empty.
7913func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool {
7914	return peclr.NextLink != nil && len(*peclr.NextLink) != 0
7915}
7916
7917// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
7918// It returns nil if no more results exist.
7919func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
7920	if !peclr.hasNextLink() {
7921		return nil, nil
7922	}
7923	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7924		autorest.AsJSON(),
7925		autorest.AsGet(),
7926		autorest.WithBaseURL(to.String(peclr.NextLink)))
7927}
7928
7929// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values.
7930type PrivateEndpointConnectionListResultPage struct {
7931	fn    func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)
7932	peclr PrivateEndpointConnectionListResult
7933}
7934
7935// NextWithContext advances to the next page of values.  If there was an error making
7936// the request the page does not advance and the error is returned.
7937func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
7938	if tracing.IsEnabled() {
7939		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext")
7940		defer func() {
7941			sc := -1
7942			if page.Response().Response.Response != nil {
7943				sc = page.Response().Response.Response.StatusCode
7944			}
7945			tracing.EndSpan(ctx, sc, err)
7946		}()
7947	}
7948	for {
7949		next, err := page.fn(ctx, page.peclr)
7950		if err != nil {
7951			return err
7952		}
7953		page.peclr = next
7954		if !next.hasNextLink() || !next.IsEmpty() {
7955			break
7956		}
7957	}
7958	return nil
7959}
7960
7961// Next advances to the next page of values.  If there was an error making
7962// the request the page does not advance and the error is returned.
7963// Deprecated: Use NextWithContext() instead.
7964func (page *PrivateEndpointConnectionListResultPage) Next() error {
7965	return page.NextWithContext(context.Background())
7966}
7967
7968// NotDone returns true if the page enumeration should be started or is not yet complete.
7969func (page PrivateEndpointConnectionListResultPage) NotDone() bool {
7970	return !page.peclr.IsEmpty()
7971}
7972
7973// Response returns the raw server response from the last page request.
7974func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult {
7975	return page.peclr
7976}
7977
7978// Values returns the slice of values for the current page or nil if there are no values.
7979func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection {
7980	if page.peclr.IsEmpty() {
7981		return nil
7982	}
7983	return *page.peclr.Value
7984}
7985
7986// Creates a new instance of the PrivateEndpointConnectionListResultPage type.
7987func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage {
7988	return PrivateEndpointConnectionListResultPage{
7989		fn:    getNextPage,
7990		peclr: cur,
7991	}
7992}
7993
7994// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
7995type PrivateEndpointConnectionProperties struct {
7996	// PrivateEndpoint - The resource of private end point.
7997	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
7998	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between DiskAccess and Virtual Network.
7999	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
8000	// ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed'
8001	ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
8002}
8003
8004// PrivateLinkResource a private link resource
8005type PrivateLinkResource struct {
8006	// PrivateLinkResourceProperties - Resource properties.
8007	*PrivateLinkResourceProperties `json:"properties,omitempty"`
8008	// ID - READ-ONLY; private link resource Id
8009	ID *string `json:"id,omitempty"`
8010	// Name - READ-ONLY; private link resource name
8011	Name *string `json:"name,omitempty"`
8012	// Type - READ-ONLY; private link resource type
8013	Type *string `json:"type,omitempty"`
8014}
8015
8016// MarshalJSON is the custom marshaler for PrivateLinkResource.
8017func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
8018	objectMap := make(map[string]interface{})
8019	if plr.PrivateLinkResourceProperties != nil {
8020		objectMap["properties"] = plr.PrivateLinkResourceProperties
8021	}
8022	return json.Marshal(objectMap)
8023}
8024
8025// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
8026func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
8027	var m map[string]*json.RawMessage
8028	err := json.Unmarshal(body, &m)
8029	if err != nil {
8030		return err
8031	}
8032	for k, v := range m {
8033		switch k {
8034		case "properties":
8035			if v != nil {
8036				var privateLinkResourceProperties PrivateLinkResourceProperties
8037				err = json.Unmarshal(*v, &privateLinkResourceProperties)
8038				if err != nil {
8039					return err
8040				}
8041				plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
8042			}
8043		case "id":
8044			if v != nil {
8045				var ID string
8046				err = json.Unmarshal(*v, &ID)
8047				if err != nil {
8048					return err
8049				}
8050				plr.ID = &ID
8051			}
8052		case "name":
8053			if v != nil {
8054				var name string
8055				err = json.Unmarshal(*v, &name)
8056				if err != nil {
8057					return err
8058				}
8059				plr.Name = &name
8060			}
8061		case "type":
8062			if v != nil {
8063				var typeVar string
8064				err = json.Unmarshal(*v, &typeVar)
8065				if err != nil {
8066					return err
8067				}
8068				plr.Type = &typeVar
8069			}
8070		}
8071	}
8072
8073	return nil
8074}
8075
8076// PrivateLinkResourceListResult a list of private link resources
8077type PrivateLinkResourceListResult struct {
8078	autorest.Response `json:"-"`
8079	// Value - Array of private link resources
8080	Value *[]PrivateLinkResource `json:"value,omitempty"`
8081}
8082
8083// PrivateLinkResourceProperties properties of a private link resource.
8084type PrivateLinkResourceProperties struct {
8085	// GroupID - READ-ONLY; The private link resource group id.
8086	GroupID *string `json:"groupId,omitempty"`
8087	// RequiredMembers - READ-ONLY; The private link resource required member names.
8088	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
8089	// RequiredZoneNames - The private link resource DNS zone name.
8090	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
8091}
8092
8093// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
8094func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
8095	objectMap := make(map[string]interface{})
8096	if plrp.RequiredZoneNames != nil {
8097		objectMap["requiredZoneNames"] = plrp.RequiredZoneNames
8098	}
8099	return json.Marshal(objectMap)
8100}
8101
8102// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
8103// service consumer and provider.
8104type PrivateLinkServiceConnectionState struct {
8105	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected'
8106	Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
8107	// Description - The reason for approval/rejection of the connection.
8108	Description *string `json:"description,omitempty"`
8109	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
8110	ActionsRequired *string `json:"actionsRequired,omitempty"`
8111}
8112
8113// ProximityPlacementGroup specifies information about the proximity placement group.
8114type ProximityPlacementGroup struct {
8115	autorest.Response `json:"-"`
8116	// ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group.
8117	*ProximityPlacementGroupProperties `json:"properties,omitempty"`
8118	// ID - READ-ONLY; Resource Id
8119	ID *string `json:"id,omitempty"`
8120	// Name - READ-ONLY; Resource name
8121	Name *string `json:"name,omitempty"`
8122	// Type - READ-ONLY; Resource type
8123	Type *string `json:"type,omitempty"`
8124	// Location - Resource location
8125	Location *string `json:"location,omitempty"`
8126	// Tags - Resource tags
8127	Tags map[string]*string `json:"tags"`
8128}
8129
8130// MarshalJSON is the custom marshaler for ProximityPlacementGroup.
8131func (ppg ProximityPlacementGroup) MarshalJSON() ([]byte, error) {
8132	objectMap := make(map[string]interface{})
8133	if ppg.ProximityPlacementGroupProperties != nil {
8134		objectMap["properties"] = ppg.ProximityPlacementGroupProperties
8135	}
8136	if ppg.Location != nil {
8137		objectMap["location"] = ppg.Location
8138	}
8139	if ppg.Tags != nil {
8140		objectMap["tags"] = ppg.Tags
8141	}
8142	return json.Marshal(objectMap)
8143}
8144
8145// UnmarshalJSON is the custom unmarshaler for ProximityPlacementGroup struct.
8146func (ppg *ProximityPlacementGroup) UnmarshalJSON(body []byte) error {
8147	var m map[string]*json.RawMessage
8148	err := json.Unmarshal(body, &m)
8149	if err != nil {
8150		return err
8151	}
8152	for k, v := range m {
8153		switch k {
8154		case "properties":
8155			if v != nil {
8156				var proximityPlacementGroupProperties ProximityPlacementGroupProperties
8157				err = json.Unmarshal(*v, &proximityPlacementGroupProperties)
8158				if err != nil {
8159					return err
8160				}
8161				ppg.ProximityPlacementGroupProperties = &proximityPlacementGroupProperties
8162			}
8163		case "id":
8164			if v != nil {
8165				var ID string
8166				err = json.Unmarshal(*v, &ID)
8167				if err != nil {
8168					return err
8169				}
8170				ppg.ID = &ID
8171			}
8172		case "name":
8173			if v != nil {
8174				var name string
8175				err = json.Unmarshal(*v, &name)
8176				if err != nil {
8177					return err
8178				}
8179				ppg.Name = &name
8180			}
8181		case "type":
8182			if v != nil {
8183				var typeVar string
8184				err = json.Unmarshal(*v, &typeVar)
8185				if err != nil {
8186					return err
8187				}
8188				ppg.Type = &typeVar
8189			}
8190		case "location":
8191			if v != nil {
8192				var location string
8193				err = json.Unmarshal(*v, &location)
8194				if err != nil {
8195					return err
8196				}
8197				ppg.Location = &location
8198			}
8199		case "tags":
8200			if v != nil {
8201				var tags map[string]*string
8202				err = json.Unmarshal(*v, &tags)
8203				if err != nil {
8204					return err
8205				}
8206				ppg.Tags = tags
8207			}
8208		}
8209	}
8210
8211	return nil
8212}
8213
8214// ProximityPlacementGroupListResult the List Proximity Placement Group operation response.
8215type ProximityPlacementGroupListResult struct {
8216	autorest.Response `json:"-"`
8217	// Value - The list of proximity placement groups
8218	Value *[]ProximityPlacementGroup `json:"value,omitempty"`
8219	// NextLink - The URI to fetch the next page of proximity placement groups.
8220	NextLink *string `json:"nextLink,omitempty"`
8221}
8222
8223// ProximityPlacementGroupListResultIterator provides access to a complete listing of
8224// ProximityPlacementGroup values.
8225type ProximityPlacementGroupListResultIterator struct {
8226	i    int
8227	page ProximityPlacementGroupListResultPage
8228}
8229
8230// NextWithContext advances to the next value.  If there was an error making
8231// the request the iterator does not advance and the error is returned.
8232func (iter *ProximityPlacementGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
8233	if tracing.IsEnabled() {
8234		ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultIterator.NextWithContext")
8235		defer func() {
8236			sc := -1
8237			if iter.Response().Response.Response != nil {
8238				sc = iter.Response().Response.Response.StatusCode
8239			}
8240			tracing.EndSpan(ctx, sc, err)
8241		}()
8242	}
8243	iter.i++
8244	if iter.i < len(iter.page.Values()) {
8245		return nil
8246	}
8247	err = iter.page.NextWithContext(ctx)
8248	if err != nil {
8249		iter.i--
8250		return err
8251	}
8252	iter.i = 0
8253	return nil
8254}
8255
8256// Next advances to the next value.  If there was an error making
8257// the request the iterator does not advance and the error is returned.
8258// Deprecated: Use NextWithContext() instead.
8259func (iter *ProximityPlacementGroupListResultIterator) Next() error {
8260	return iter.NextWithContext(context.Background())
8261}
8262
8263// NotDone returns true if the enumeration should be started or is not yet complete.
8264func (iter ProximityPlacementGroupListResultIterator) NotDone() bool {
8265	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8266}
8267
8268// Response returns the raw server response from the last page request.
8269func (iter ProximityPlacementGroupListResultIterator) Response() ProximityPlacementGroupListResult {
8270	return iter.page.Response()
8271}
8272
8273// Value returns the current value or a zero-initialized value if the
8274// iterator has advanced beyond the end of the collection.
8275func (iter ProximityPlacementGroupListResultIterator) Value() ProximityPlacementGroup {
8276	if !iter.page.NotDone() {
8277		return ProximityPlacementGroup{}
8278	}
8279	return iter.page.Values()[iter.i]
8280}
8281
8282// Creates a new instance of the ProximityPlacementGroupListResultIterator type.
8283func NewProximityPlacementGroupListResultIterator(page ProximityPlacementGroupListResultPage) ProximityPlacementGroupListResultIterator {
8284	return ProximityPlacementGroupListResultIterator{page: page}
8285}
8286
8287// IsEmpty returns true if the ListResult contains no values.
8288func (ppglr ProximityPlacementGroupListResult) IsEmpty() bool {
8289	return ppglr.Value == nil || len(*ppglr.Value) == 0
8290}
8291
8292// hasNextLink returns true if the NextLink is not empty.
8293func (ppglr ProximityPlacementGroupListResult) hasNextLink() bool {
8294	return ppglr.NextLink != nil && len(*ppglr.NextLink) != 0
8295}
8296
8297// proximityPlacementGroupListResultPreparer prepares a request to retrieve the next set of results.
8298// It returns nil if no more results exist.
8299func (ppglr ProximityPlacementGroupListResult) proximityPlacementGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
8300	if !ppglr.hasNextLink() {
8301		return nil, nil
8302	}
8303	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8304		autorest.AsJSON(),
8305		autorest.AsGet(),
8306		autorest.WithBaseURL(to.String(ppglr.NextLink)))
8307}
8308
8309// ProximityPlacementGroupListResultPage contains a page of ProximityPlacementGroup values.
8310type ProximityPlacementGroupListResultPage struct {
8311	fn    func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)
8312	ppglr ProximityPlacementGroupListResult
8313}
8314
8315// NextWithContext advances to the next page of values.  If there was an error making
8316// the request the page does not advance and the error is returned.
8317func (page *ProximityPlacementGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
8318	if tracing.IsEnabled() {
8319		ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultPage.NextWithContext")
8320		defer func() {
8321			sc := -1
8322			if page.Response().Response.Response != nil {
8323				sc = page.Response().Response.Response.StatusCode
8324			}
8325			tracing.EndSpan(ctx, sc, err)
8326		}()
8327	}
8328	for {
8329		next, err := page.fn(ctx, page.ppglr)
8330		if err != nil {
8331			return err
8332		}
8333		page.ppglr = next
8334		if !next.hasNextLink() || !next.IsEmpty() {
8335			break
8336		}
8337	}
8338	return nil
8339}
8340
8341// Next advances to the next page of values.  If there was an error making
8342// the request the page does not advance and the error is returned.
8343// Deprecated: Use NextWithContext() instead.
8344func (page *ProximityPlacementGroupListResultPage) Next() error {
8345	return page.NextWithContext(context.Background())
8346}
8347
8348// NotDone returns true if the page enumeration should be started or is not yet complete.
8349func (page ProximityPlacementGroupListResultPage) NotDone() bool {
8350	return !page.ppglr.IsEmpty()
8351}
8352
8353// Response returns the raw server response from the last page request.
8354func (page ProximityPlacementGroupListResultPage) Response() ProximityPlacementGroupListResult {
8355	return page.ppglr
8356}
8357
8358// Values returns the slice of values for the current page or nil if there are no values.
8359func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementGroup {
8360	if page.ppglr.IsEmpty() {
8361		return nil
8362	}
8363	return *page.ppglr.Value
8364}
8365
8366// Creates a new instance of the ProximityPlacementGroupListResultPage type.
8367func NewProximityPlacementGroupListResultPage(cur ProximityPlacementGroupListResult, getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage {
8368	return ProximityPlacementGroupListResultPage{
8369		fn:    getNextPage,
8370		ppglr: cur,
8371	}
8372}
8373
8374// ProximityPlacementGroupProperties describes the properties of a Proximity Placement Group.
8375type ProximityPlacementGroupProperties struct {
8376	// ProximityPlacementGroupType - Specifies the type of the proximity placement group. <br><br> Possible values are: <br><br> **Standard** : Co-locate resources within an Azure region or Availability Zone. <br><br> **Ultra** : For future use. Possible values include: 'Standard', 'Ultra'
8377	ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"`
8378	// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group.
8379	VirtualMachines *[]SubResourceWithColocationStatus `json:"virtualMachines,omitempty"`
8380	// VirtualMachineScaleSets - READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group.
8381	VirtualMachineScaleSets *[]SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty"`
8382	// AvailabilitySets - READ-ONLY; A list of references to all availability sets in the proximity placement group.
8383	AvailabilitySets *[]SubResourceWithColocationStatus `json:"availabilitySets,omitempty"`
8384	// ColocationStatus - Describes colocation status of the Proximity Placement Group.
8385	ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
8386}
8387
8388// MarshalJSON is the custom marshaler for ProximityPlacementGroupProperties.
8389func (ppgp ProximityPlacementGroupProperties) MarshalJSON() ([]byte, error) {
8390	objectMap := make(map[string]interface{})
8391	if ppgp.ProximityPlacementGroupType != "" {
8392		objectMap["proximityPlacementGroupType"] = ppgp.ProximityPlacementGroupType
8393	}
8394	if ppgp.ColocationStatus != nil {
8395		objectMap["colocationStatus"] = ppgp.ColocationStatus
8396	}
8397	return json.Marshal(objectMap)
8398}
8399
8400// ProximityPlacementGroupUpdate specifies information about the proximity placement group.
8401type ProximityPlacementGroupUpdate struct {
8402	// Tags - Resource tags
8403	Tags map[string]*string `json:"tags"`
8404}
8405
8406// MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate.
8407func (ppgu ProximityPlacementGroupUpdate) MarshalJSON() ([]byte, error) {
8408	objectMap := make(map[string]interface{})
8409	if ppgu.Tags != nil {
8410		objectMap["tags"] = ppgu.Tags
8411	}
8412	return json.Marshal(objectMap)
8413}
8414
8415// ProxyOnlyResource the ProxyOnly Resource model definition.
8416type ProxyOnlyResource struct {
8417	// ID - READ-ONLY; Resource Id
8418	ID *string `json:"id,omitempty"`
8419	// Name - READ-ONLY; Resource name
8420	Name *string `json:"name,omitempty"`
8421	// Type - READ-ONLY; Resource type
8422	Type *string `json:"type,omitempty"`
8423}
8424
8425// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
8426type PurchasePlan struct {
8427	// Publisher - The publisher ID.
8428	Publisher *string `json:"publisher,omitempty"`
8429	// Name - The plan ID.
8430	Name *string `json:"name,omitempty"`
8431	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
8432	Product *string `json:"product,omitempty"`
8433	// PromotionCode - The Offer Promotion Code.
8434	PromotionCode *string `json:"promotionCode,omitempty"`
8435}
8436
8437// ReadCloser ...
8438type ReadCloser struct {
8439	autorest.Response `json:"-"`
8440	Value             *io.ReadCloser `json:"value,omitempty"`
8441}
8442
8443// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this
8444// Image Definition. These properties are updatable.
8445type RecommendedMachineConfiguration struct {
8446	VCPUs  *ResourceRange `json:"vCPUs,omitempty"`
8447	Memory *ResourceRange `json:"memory,omitempty"`
8448}
8449
8450// RecoveryWalkResponse response after calling a manual recovery walk
8451type RecoveryWalkResponse struct {
8452	autorest.Response `json:"-"`
8453	// WalkPerformed - READ-ONLY; Whether the recovery walk was performed
8454	WalkPerformed *bool `json:"walkPerformed,omitempty"`
8455	// NextPlatformUpdateDomain - READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed
8456	NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"`
8457}
8458
8459// RegionalReplicationStatus this is the regional replication status.
8460type RegionalReplicationStatus struct {
8461	// Region - READ-ONLY; The region to which the gallery Image Version is being replicated to.
8462	Region *string `json:"region,omitempty"`
8463	// State - READ-ONLY; This is the regional replication state. Possible values include: 'ReplicationStateUnknown', 'ReplicationStateReplicating', 'ReplicationStateCompleted', 'ReplicationStateFailed'
8464	State ReplicationState `json:"state,omitempty"`
8465	// Details - READ-ONLY; The details of the replication status.
8466	Details *string `json:"details,omitempty"`
8467	// Progress - READ-ONLY; It indicates progress of the replication job.
8468	Progress *int32 `json:"progress,omitempty"`
8469}
8470
8471// ReplicationStatus this is the replication status of the gallery Image Version.
8472type ReplicationStatus struct {
8473	// AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed'
8474	AggregatedState AggregatedReplicationState `json:"aggregatedState,omitempty"`
8475	// Summary - READ-ONLY; This is a summary of replication status for each region.
8476	Summary *[]RegionalReplicationStatus `json:"summary,omitempty"`
8477}
8478
8479// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api.
8480type RequestRateByIntervalInput struct {
8481	// IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'
8482	IntervalLength IntervalInMins `json:"intervalLength,omitempty"`
8483	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
8484	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
8485	// FromTime - From time of the query
8486	FromTime *date.Time `json:"fromTime,omitempty"`
8487	// ToTime - To time of the query
8488	ToTime *date.Time `json:"toTime,omitempty"`
8489	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
8490	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
8491	// GroupByOperationName - Group query result by Operation Name.
8492	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
8493	// GroupByResourceName - Group query result by Resource Name.
8494	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
8495	// GroupByClientApplicationID - Group query result by Client Application ID.
8496	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
8497	// GroupByUserAgent - Group query result by User Agent.
8498	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
8499}
8500
8501// Resource the Resource model definition.
8502type Resource struct {
8503	// ID - READ-ONLY; Resource Id
8504	ID *string `json:"id,omitempty"`
8505	// Name - READ-ONLY; Resource name
8506	Name *string `json:"name,omitempty"`
8507	// Type - READ-ONLY; Resource type
8508	Type *string `json:"type,omitempty"`
8509	// Location - Resource location
8510	Location *string `json:"location,omitempty"`
8511	// Tags - Resource tags
8512	Tags map[string]*string `json:"tags"`
8513}
8514
8515// MarshalJSON is the custom marshaler for Resource.
8516func (r Resource) MarshalJSON() ([]byte, error) {
8517	objectMap := make(map[string]interface{})
8518	if r.Location != nil {
8519		objectMap["location"] = r.Location
8520	}
8521	if r.Tags != nil {
8522		objectMap["tags"] = r.Tags
8523	}
8524	return json.Marshal(objectMap)
8525}
8526
8527// ResourceInstanceViewStatus instance view status.
8528type ResourceInstanceViewStatus struct {
8529	// Code - READ-ONLY; The status code.
8530	Code *string `json:"code,omitempty"`
8531	// DisplayStatus - READ-ONLY; The short localizable label for the status.
8532	DisplayStatus *string `json:"displayStatus,omitempty"`
8533	// Message - READ-ONLY; The detailed status message, including for alerts and error messages.
8534	Message *string `json:"message,omitempty"`
8535	// Time - READ-ONLY; The time of the status.
8536	Time *date.Time `json:"time,omitempty"`
8537	// Level - The level code. Possible values include: 'Info', 'Warning', 'Error'
8538	Level StatusLevelTypes `json:"level,omitempty"`
8539}
8540
8541// MarshalJSON is the custom marshaler for ResourceInstanceViewStatus.
8542func (rivs ResourceInstanceViewStatus) MarshalJSON() ([]byte, error) {
8543	objectMap := make(map[string]interface{})
8544	if rivs.Level != "" {
8545		objectMap["level"] = rivs.Level
8546	}
8547	return json.Marshal(objectMap)
8548}
8549
8550// ResourceRange describes the resource range.
8551type ResourceRange struct {
8552	// Min - The minimum number of the resource.
8553	Min *int32 `json:"min,omitempty"`
8554	// Max - The maximum number of the resource.
8555	Max *int32 `json:"max,omitempty"`
8556}
8557
8558// ResourceSku describes an available Compute SKU.
8559type ResourceSku struct {
8560	// ResourceType - READ-ONLY; The type of resource the SKU applies to.
8561	ResourceType *string `json:"resourceType,omitempty"`
8562	// Name - READ-ONLY; The name of SKU.
8563	Name *string `json:"name,omitempty"`
8564	// Tier - READ-ONLY; Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
8565	Tier *string `json:"tier,omitempty"`
8566	// Size - READ-ONLY; The Size of the SKU.
8567	Size *string `json:"size,omitempty"`
8568	// Family - READ-ONLY; The Family of this particular SKU.
8569	Family *string `json:"family,omitempty"`
8570	// Kind - READ-ONLY; The Kind of resources that are supported in this SKU.
8571	Kind *string `json:"kind,omitempty"`
8572	// Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
8573	Capacity *ResourceSkuCapacity `json:"capacity,omitempty"`
8574	// Locations - READ-ONLY; The set of locations that the SKU is available.
8575	Locations *[]string `json:"locations,omitempty"`
8576	// LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
8577	LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
8578	// APIVersions - READ-ONLY; The api versions that support this SKU.
8579	APIVersions *[]string `json:"apiVersions,omitempty"`
8580	// Costs - READ-ONLY; Metadata for retrieving price info.
8581	Costs *[]ResourceSkuCosts `json:"costs,omitempty"`
8582	// Capabilities - READ-ONLY; A name value pair to describe the capability.
8583	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
8584	// Restrictions - READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
8585	Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
8586}
8587
8588// ResourceSkuCapabilities describes The SKU capabilities object.
8589type ResourceSkuCapabilities struct {
8590	// Name - READ-ONLY; An invariant to describe the feature.
8591	Name *string `json:"name,omitempty"`
8592	// Value - READ-ONLY; An invariant if the feature is measured by quantity.
8593	Value *string `json:"value,omitempty"`
8594}
8595
8596// ResourceSkuCapacity describes scaling information of a SKU.
8597type ResourceSkuCapacity struct {
8598	// Minimum - READ-ONLY; The minimum capacity.
8599	Minimum *int64 `json:"minimum,omitempty"`
8600	// Maximum - READ-ONLY; The maximum capacity that can be set.
8601	Maximum *int64 `json:"maximum,omitempty"`
8602	// Default - READ-ONLY; The default capacity.
8603	Default *int64 `json:"default,omitempty"`
8604	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone'
8605	ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
8606}
8607
8608// ResourceSkuCosts describes metadata for retrieving price info.
8609type ResourceSkuCosts struct {
8610	// MeterID - READ-ONLY; Used for querying price from commerce.
8611	MeterID *string `json:"meterID,omitempty"`
8612	// Quantity - READ-ONLY; The multiplier is needed to extend the base metered cost.
8613	Quantity *int64 `json:"quantity,omitempty"`
8614	// ExtendedUnit - READ-ONLY; An invariant to show the extended unit.
8615	ExtendedUnit *string `json:"extendedUnit,omitempty"`
8616}
8617
8618// ResourceSkuLocationInfo ...
8619type ResourceSkuLocationInfo struct {
8620	// Location - READ-ONLY; Location of the SKU
8621	Location *string `json:"location,omitempty"`
8622	// Zones - READ-ONLY; List of availability zones where the SKU is supported.
8623	Zones *[]string `json:"zones,omitempty"`
8624	// ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones.
8625	ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
8626}
8627
8628// ResourceSkuRestrictionInfo ...
8629type ResourceSkuRestrictionInfo struct {
8630	// Locations - READ-ONLY; Locations where the SKU is restricted
8631	Locations *[]string `json:"locations,omitempty"`
8632	// Zones - READ-ONLY; List of availability zones where the SKU is restricted.
8633	Zones *[]string `json:"zones,omitempty"`
8634}
8635
8636// ResourceSkuRestrictions describes scaling information of a SKU.
8637type ResourceSkuRestrictions struct {
8638	// Type - READ-ONLY; The type of restrictions. Possible values include: 'Location', 'Zone'
8639	Type ResourceSkuRestrictionsType `json:"type,omitempty"`
8640	// 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.
8641	Values *[]string `json:"values,omitempty"`
8642	// RestrictionInfo - READ-ONLY; The information about the restriction where the SKU cannot be used.
8643	RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"`
8644	// ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription'
8645	ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
8646}
8647
8648// ResourceSkusResult the List Resource Skus operation response.
8649type ResourceSkusResult struct {
8650	autorest.Response `json:"-"`
8651	// Value - The list of skus available for the subscription.
8652	Value *[]ResourceSku `json:"value,omitempty"`
8653	// NextLink - The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus
8654	NextLink *string `json:"nextLink,omitempty"`
8655}
8656
8657// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values.
8658type ResourceSkusResultIterator struct {
8659	i    int
8660	page ResourceSkusResultPage
8661}
8662
8663// NextWithContext advances to the next value.  If there was an error making
8664// the request the iterator does not advance and the error is returned.
8665func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
8666	if tracing.IsEnabled() {
8667		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext")
8668		defer func() {
8669			sc := -1
8670			if iter.Response().Response.Response != nil {
8671				sc = iter.Response().Response.Response.StatusCode
8672			}
8673			tracing.EndSpan(ctx, sc, err)
8674		}()
8675	}
8676	iter.i++
8677	if iter.i < len(iter.page.Values()) {
8678		return nil
8679	}
8680	err = iter.page.NextWithContext(ctx)
8681	if err != nil {
8682		iter.i--
8683		return err
8684	}
8685	iter.i = 0
8686	return nil
8687}
8688
8689// Next advances to the next value.  If there was an error making
8690// the request the iterator does not advance and the error is returned.
8691// Deprecated: Use NextWithContext() instead.
8692func (iter *ResourceSkusResultIterator) Next() error {
8693	return iter.NextWithContext(context.Background())
8694}
8695
8696// NotDone returns true if the enumeration should be started or is not yet complete.
8697func (iter ResourceSkusResultIterator) NotDone() bool {
8698	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8699}
8700
8701// Response returns the raw server response from the last page request.
8702func (iter ResourceSkusResultIterator) Response() ResourceSkusResult {
8703	return iter.page.Response()
8704}
8705
8706// Value returns the current value or a zero-initialized value if the
8707// iterator has advanced beyond the end of the collection.
8708func (iter ResourceSkusResultIterator) Value() ResourceSku {
8709	if !iter.page.NotDone() {
8710		return ResourceSku{}
8711	}
8712	return iter.page.Values()[iter.i]
8713}
8714
8715// Creates a new instance of the ResourceSkusResultIterator type.
8716func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator {
8717	return ResourceSkusResultIterator{page: page}
8718}
8719
8720// IsEmpty returns true if the ListResult contains no values.
8721func (rsr ResourceSkusResult) IsEmpty() bool {
8722	return rsr.Value == nil || len(*rsr.Value) == 0
8723}
8724
8725// hasNextLink returns true if the NextLink is not empty.
8726func (rsr ResourceSkusResult) hasNextLink() bool {
8727	return rsr.NextLink != nil && len(*rsr.NextLink) != 0
8728}
8729
8730// resourceSkusResultPreparer prepares a request to retrieve the next set of results.
8731// It returns nil if no more results exist.
8732func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) {
8733	if !rsr.hasNextLink() {
8734		return nil, nil
8735	}
8736	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8737		autorest.AsJSON(),
8738		autorest.AsGet(),
8739		autorest.WithBaseURL(to.String(rsr.NextLink)))
8740}
8741
8742// ResourceSkusResultPage contains a page of ResourceSku values.
8743type ResourceSkusResultPage struct {
8744	fn  func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)
8745	rsr ResourceSkusResult
8746}
8747
8748// NextWithContext advances to the next page of values.  If there was an error making
8749// the request the page does not advance and the error is returned.
8750func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) {
8751	if tracing.IsEnabled() {
8752		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext")
8753		defer func() {
8754			sc := -1
8755			if page.Response().Response.Response != nil {
8756				sc = page.Response().Response.Response.StatusCode
8757			}
8758			tracing.EndSpan(ctx, sc, err)
8759		}()
8760	}
8761	for {
8762		next, err := page.fn(ctx, page.rsr)
8763		if err != nil {
8764			return err
8765		}
8766		page.rsr = next
8767		if !next.hasNextLink() || !next.IsEmpty() {
8768			break
8769		}
8770	}
8771	return nil
8772}
8773
8774// Next advances to the next page of values.  If there was an error making
8775// the request the page does not advance and the error is returned.
8776// Deprecated: Use NextWithContext() instead.
8777func (page *ResourceSkusResultPage) Next() error {
8778	return page.NextWithContext(context.Background())
8779}
8780
8781// NotDone returns true if the page enumeration should be started or is not yet complete.
8782func (page ResourceSkusResultPage) NotDone() bool {
8783	return !page.rsr.IsEmpty()
8784}
8785
8786// Response returns the raw server response from the last page request.
8787func (page ResourceSkusResultPage) Response() ResourceSkusResult {
8788	return page.rsr
8789}
8790
8791// Values returns the slice of values for the current page or nil if there are no values.
8792func (page ResourceSkusResultPage) Values() []ResourceSku {
8793	if page.rsr.IsEmpty() {
8794		return nil
8795	}
8796	return *page.rsr.Value
8797}
8798
8799// Creates a new instance of the ResourceSkusResultPage type.
8800func NewResourceSkusResultPage(cur ResourceSkusResult, getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
8801	return ResourceSkusResultPage{
8802		fn:  getNextPage,
8803		rsr: cur,
8804	}
8805}
8806
8807// ResourceSkuZoneDetails describes The zonal capabilities of a SKU.
8808type ResourceSkuZoneDetails struct {
8809	// Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
8810	Name *[]string `json:"name,omitempty"`
8811	// Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
8812	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
8813}
8814
8815// ResourceURIList the List resources which are encrypted with the disk encryption set.
8816type ResourceURIList struct {
8817	autorest.Response `json:"-"`
8818	// Value - A list of IDs or Owner IDs of resources which are encrypted with the disk encryption set.
8819	Value *[]string `json:"value,omitempty"`
8820	// NextLink - The uri to fetch the next page of encrypted resources. Call ListNext() with this to fetch the next page of encrypted resources.
8821	NextLink *string `json:"nextLink,omitempty"`
8822}
8823
8824// ResourceURIListIterator provides access to a complete listing of string values.
8825type ResourceURIListIterator struct {
8826	i    int
8827	page ResourceURIListPage
8828}
8829
8830// NextWithContext advances to the next value.  If there was an error making
8831// the request the iterator does not advance and the error is returned.
8832func (iter *ResourceURIListIterator) NextWithContext(ctx context.Context) (err error) {
8833	if tracing.IsEnabled() {
8834		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListIterator.NextWithContext")
8835		defer func() {
8836			sc := -1
8837			if iter.Response().Response.Response != nil {
8838				sc = iter.Response().Response.Response.StatusCode
8839			}
8840			tracing.EndSpan(ctx, sc, err)
8841		}()
8842	}
8843	iter.i++
8844	if iter.i < len(iter.page.Values()) {
8845		return nil
8846	}
8847	err = iter.page.NextWithContext(ctx)
8848	if err != nil {
8849		iter.i--
8850		return err
8851	}
8852	iter.i = 0
8853	return nil
8854}
8855
8856// Next advances to the next value.  If there was an error making
8857// the request the iterator does not advance and the error is returned.
8858// Deprecated: Use NextWithContext() instead.
8859func (iter *ResourceURIListIterator) Next() error {
8860	return iter.NextWithContext(context.Background())
8861}
8862
8863// NotDone returns true if the enumeration should be started or is not yet complete.
8864func (iter ResourceURIListIterator) NotDone() bool {
8865	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8866}
8867
8868// Response returns the raw server response from the last page request.
8869func (iter ResourceURIListIterator) Response() ResourceURIList {
8870	return iter.page.Response()
8871}
8872
8873// Value returns the current value or a zero-initialized value if the
8874// iterator has advanced beyond the end of the collection.
8875func (iter ResourceURIListIterator) Value() string {
8876	if !iter.page.NotDone() {
8877		return ""
8878	}
8879	return iter.page.Values()[iter.i]
8880}
8881
8882// Creates a new instance of the ResourceURIListIterator type.
8883func NewResourceURIListIterator(page ResourceURIListPage) ResourceURIListIterator {
8884	return ResourceURIListIterator{page: page}
8885}
8886
8887// IsEmpty returns true if the ListResult contains no values.
8888func (rul ResourceURIList) IsEmpty() bool {
8889	return rul.Value == nil || len(*rul.Value) == 0
8890}
8891
8892// hasNextLink returns true if the NextLink is not empty.
8893func (rul ResourceURIList) hasNextLink() bool {
8894	return rul.NextLink != nil && len(*rul.NextLink) != 0
8895}
8896
8897// resourceURIListPreparer prepares a request to retrieve the next set of results.
8898// It returns nil if no more results exist.
8899func (rul ResourceURIList) resourceURIListPreparer(ctx context.Context) (*http.Request, error) {
8900	if !rul.hasNextLink() {
8901		return nil, nil
8902	}
8903	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8904		autorest.AsJSON(),
8905		autorest.AsGet(),
8906		autorest.WithBaseURL(to.String(rul.NextLink)))
8907}
8908
8909// ResourceURIListPage contains a page of string values.
8910type ResourceURIListPage struct {
8911	fn  func(context.Context, ResourceURIList) (ResourceURIList, error)
8912	rul ResourceURIList
8913}
8914
8915// NextWithContext advances to the next page of values.  If there was an error making
8916// the request the page does not advance and the error is returned.
8917func (page *ResourceURIListPage) NextWithContext(ctx context.Context) (err error) {
8918	if tracing.IsEnabled() {
8919		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListPage.NextWithContext")
8920		defer func() {
8921			sc := -1
8922			if page.Response().Response.Response != nil {
8923				sc = page.Response().Response.Response.StatusCode
8924			}
8925			tracing.EndSpan(ctx, sc, err)
8926		}()
8927	}
8928	for {
8929		next, err := page.fn(ctx, page.rul)
8930		if err != nil {
8931			return err
8932		}
8933		page.rul = next
8934		if !next.hasNextLink() || !next.IsEmpty() {
8935			break
8936		}
8937	}
8938	return nil
8939}
8940
8941// Next advances to the next page of values.  If there was an error making
8942// the request the page does not advance and the error is returned.
8943// Deprecated: Use NextWithContext() instead.
8944func (page *ResourceURIListPage) Next() error {
8945	return page.NextWithContext(context.Background())
8946}
8947
8948// NotDone returns true if the page enumeration should be started or is not yet complete.
8949func (page ResourceURIListPage) NotDone() bool {
8950	return !page.rul.IsEmpty()
8951}
8952
8953// Response returns the raw server response from the last page request.
8954func (page ResourceURIListPage) Response() ResourceURIList {
8955	return page.rul
8956}
8957
8958// Values returns the slice of values for the current page or nil if there are no values.
8959func (page ResourceURIListPage) Values() []string {
8960	if page.rul.IsEmpty() {
8961		return nil
8962	}
8963	return *page.rul.Value
8964}
8965
8966// Creates a new instance of the ResourceURIListPage type.
8967func NewResourceURIListPage(cur ResourceURIList, getNextPage func(context.Context, ResourceURIList) (ResourceURIList, error)) ResourceURIListPage {
8968	return ResourceURIListPage{
8969		fn:  getNextPage,
8970		rul: cur,
8971	}
8972}
8973
8974// RetrieveBootDiagnosticsDataResult the SAS URIs of the console screenshot and serial log blobs.
8975type RetrieveBootDiagnosticsDataResult struct {
8976	autorest.Response `json:"-"`
8977	// ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI
8978	ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
8979	// SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob URI.
8980	SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
8981}
8982
8983// RoleInstance ...
8984type RoleInstance struct {
8985	autorest.Response `json:"-"`
8986	// ID - READ-ONLY; Resource Id
8987	ID *string `json:"id,omitempty"`
8988	// Name - READ-ONLY; Resource Name.
8989	Name *string `json:"name,omitempty"`
8990	// Type - READ-ONLY; Resource Type.
8991	Type *string `json:"type,omitempty"`
8992	// Location - READ-ONLY; Resource Location.
8993	Location *string `json:"location,omitempty"`
8994	// Tags - READ-ONLY; Resource tags.
8995	Tags       map[string]*string      `json:"tags"`
8996	Sku        *InstanceSku            `json:"sku,omitempty"`
8997	Properties *RoleInstanceProperties `json:"properties,omitempty"`
8998}
8999
9000// MarshalJSON is the custom marshaler for RoleInstance.
9001func (ri RoleInstance) MarshalJSON() ([]byte, error) {
9002	objectMap := make(map[string]interface{})
9003	if ri.Sku != nil {
9004		objectMap["sku"] = ri.Sku
9005	}
9006	if ri.Properties != nil {
9007		objectMap["properties"] = ri.Properties
9008	}
9009	return json.Marshal(objectMap)
9010}
9011
9012// RoleInstanceInstanceView the instance view of the role instance.
9013type RoleInstanceInstanceView struct {
9014	autorest.Response `json:"-"`
9015	// PlatformUpdateDomain - READ-ONLY; The Update Domain.
9016	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
9017	// PlatformFaultDomain - READ-ONLY; The Fault Domain.
9018	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
9019	// PrivateID - READ-ONLY; Specifies a unique identifier generated internally for the cloud service associated with this role instance. <br /><br /> NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.
9020	PrivateID *string `json:"privateId,omitempty"`
9021	// Statuses - READ-ONLY
9022	Statuses *[]ResourceInstanceViewStatus `json:"statuses,omitempty"`
9023}
9024
9025// RoleInstanceListResult ...
9026type RoleInstanceListResult struct {
9027	autorest.Response `json:"-"`
9028	Value             *[]RoleInstance `json:"value,omitempty"`
9029	NextLink          *string         `json:"nextLink,omitempty"`
9030}
9031
9032// RoleInstanceListResultIterator provides access to a complete listing of RoleInstance values.
9033type RoleInstanceListResultIterator struct {
9034	i    int
9035	page RoleInstanceListResultPage
9036}
9037
9038// NextWithContext advances to the next value.  If there was an error making
9039// the request the iterator does not advance and the error is returned.
9040func (iter *RoleInstanceListResultIterator) NextWithContext(ctx context.Context) (err error) {
9041	if tracing.IsEnabled() {
9042		ctx = tracing.StartSpan(ctx, fqdn+"/RoleInstanceListResultIterator.NextWithContext")
9043		defer func() {
9044			sc := -1
9045			if iter.Response().Response.Response != nil {
9046				sc = iter.Response().Response.Response.StatusCode
9047			}
9048			tracing.EndSpan(ctx, sc, err)
9049		}()
9050	}
9051	iter.i++
9052	if iter.i < len(iter.page.Values()) {
9053		return nil
9054	}
9055	err = iter.page.NextWithContext(ctx)
9056	if err != nil {
9057		iter.i--
9058		return err
9059	}
9060	iter.i = 0
9061	return nil
9062}
9063
9064// Next advances to the next value.  If there was an error making
9065// the request the iterator does not advance and the error is returned.
9066// Deprecated: Use NextWithContext() instead.
9067func (iter *RoleInstanceListResultIterator) Next() error {
9068	return iter.NextWithContext(context.Background())
9069}
9070
9071// NotDone returns true if the enumeration should be started or is not yet complete.
9072func (iter RoleInstanceListResultIterator) NotDone() bool {
9073	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9074}
9075
9076// Response returns the raw server response from the last page request.
9077func (iter RoleInstanceListResultIterator) Response() RoleInstanceListResult {
9078	return iter.page.Response()
9079}
9080
9081// Value returns the current value or a zero-initialized value if the
9082// iterator has advanced beyond the end of the collection.
9083func (iter RoleInstanceListResultIterator) Value() RoleInstance {
9084	if !iter.page.NotDone() {
9085		return RoleInstance{}
9086	}
9087	return iter.page.Values()[iter.i]
9088}
9089
9090// Creates a new instance of the RoleInstanceListResultIterator type.
9091func NewRoleInstanceListResultIterator(page RoleInstanceListResultPage) RoleInstanceListResultIterator {
9092	return RoleInstanceListResultIterator{page: page}
9093}
9094
9095// IsEmpty returns true if the ListResult contains no values.
9096func (rilr RoleInstanceListResult) IsEmpty() bool {
9097	return rilr.Value == nil || len(*rilr.Value) == 0
9098}
9099
9100// hasNextLink returns true if the NextLink is not empty.
9101func (rilr RoleInstanceListResult) hasNextLink() bool {
9102	return rilr.NextLink != nil && len(*rilr.NextLink) != 0
9103}
9104
9105// roleInstanceListResultPreparer prepares a request to retrieve the next set of results.
9106// It returns nil if no more results exist.
9107func (rilr RoleInstanceListResult) roleInstanceListResultPreparer(ctx context.Context) (*http.Request, error) {
9108	if !rilr.hasNextLink() {
9109		return nil, nil
9110	}
9111	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9112		autorest.AsJSON(),
9113		autorest.AsGet(),
9114		autorest.WithBaseURL(to.String(rilr.NextLink)))
9115}
9116
9117// RoleInstanceListResultPage contains a page of RoleInstance values.
9118type RoleInstanceListResultPage struct {
9119	fn   func(context.Context, RoleInstanceListResult) (RoleInstanceListResult, error)
9120	rilr RoleInstanceListResult
9121}
9122
9123// NextWithContext advances to the next page of values.  If there was an error making
9124// the request the page does not advance and the error is returned.
9125func (page *RoleInstanceListResultPage) NextWithContext(ctx context.Context) (err error) {
9126	if tracing.IsEnabled() {
9127		ctx = tracing.StartSpan(ctx, fqdn+"/RoleInstanceListResultPage.NextWithContext")
9128		defer func() {
9129			sc := -1
9130			if page.Response().Response.Response != nil {
9131				sc = page.Response().Response.Response.StatusCode
9132			}
9133			tracing.EndSpan(ctx, sc, err)
9134		}()
9135	}
9136	for {
9137		next, err := page.fn(ctx, page.rilr)
9138		if err != nil {
9139			return err
9140		}
9141		page.rilr = next
9142		if !next.hasNextLink() || !next.IsEmpty() {
9143			break
9144		}
9145	}
9146	return nil
9147}
9148
9149// Next advances to the next page of values.  If there was an error making
9150// the request the page does not advance and the error is returned.
9151// Deprecated: Use NextWithContext() instead.
9152func (page *RoleInstanceListResultPage) Next() error {
9153	return page.NextWithContext(context.Background())
9154}
9155
9156// NotDone returns true if the page enumeration should be started or is not yet complete.
9157func (page RoleInstanceListResultPage) NotDone() bool {
9158	return !page.rilr.IsEmpty()
9159}
9160
9161// Response returns the raw server response from the last page request.
9162func (page RoleInstanceListResultPage) Response() RoleInstanceListResult {
9163	return page.rilr
9164}
9165
9166// Values returns the slice of values for the current page or nil if there are no values.
9167func (page RoleInstanceListResultPage) Values() []RoleInstance {
9168	if page.rilr.IsEmpty() {
9169		return nil
9170	}
9171	return *page.rilr.Value
9172}
9173
9174// Creates a new instance of the RoleInstanceListResultPage type.
9175func NewRoleInstanceListResultPage(cur RoleInstanceListResult, getNextPage func(context.Context, RoleInstanceListResult) (RoleInstanceListResult, error)) RoleInstanceListResultPage {
9176	return RoleInstanceListResultPage{
9177		fn:   getNextPage,
9178		rilr: cur,
9179	}
9180}
9181
9182// RoleInstanceNetworkProfile describes the network profile for the role instance.
9183type RoleInstanceNetworkProfile struct {
9184	// NetworkInterfaces - READ-ONLY; Specifies the list of resource Ids for the network interfaces associated with the role instance.
9185	NetworkInterfaces *[]SubResource `json:"networkInterfaces,omitempty"`
9186}
9187
9188// RoleInstanceProperties ...
9189type RoleInstanceProperties struct {
9190	NetworkProfile *RoleInstanceNetworkProfile `json:"networkProfile,omitempty"`
9191	InstanceView   *RoleInstanceInstanceView   `json:"instanceView,omitempty"`
9192}
9193
9194// RoleInstances specifies a list of role instances from the cloud service.
9195type RoleInstances struct {
9196	// RoleInstances - List of cloud service role instance names. Value of '*' will signify all role instances of the cloud service.
9197	RoleInstances *[]string `json:"roleInstances,omitempty"`
9198}
9199
9200// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
9201type RollbackStatusInfo struct {
9202	// SuccessfullyRolledbackInstanceCount - READ-ONLY; The number of instances which have been successfully rolled back.
9203	SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"`
9204	// FailedRolledbackInstanceCount - READ-ONLY; The number of instances which failed to rollback.
9205	FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"`
9206	// RollbackError - READ-ONLY; Error details if OS rollback failed.
9207	RollbackError *APIError `json:"rollbackError,omitempty"`
9208}
9209
9210// RollingUpgradePolicy the configuration parameters used while performing a rolling upgrade.
9211type RollingUpgradePolicy struct {
9212	// 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%.
9213	MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"`
9214	// 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%.
9215	MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"`
9216	// 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%.
9217	MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"`
9218	// 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).
9219	PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"`
9220}
9221
9222// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade
9223// state.
9224type RollingUpgradeProgressInfo struct {
9225	// SuccessfulInstanceCount - READ-ONLY; The number of instances that have been successfully upgraded.
9226	SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"`
9227	// FailedInstanceCount - READ-ONLY; The number of instances that have failed to be upgraded successfully.
9228	FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty"`
9229	// InProgressInstanceCount - READ-ONLY; The number of instances that are currently being upgraded.
9230	InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty"`
9231	// PendingInstanceCount - READ-ONLY; The number of instances that have not yet begun to be upgraded.
9232	PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"`
9233}
9234
9235// RollingUpgradeRunningStatus information about the current running state of the overall upgrade.
9236type RollingUpgradeRunningStatus struct {
9237	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'RollingUpgradeStatusCodeRollingForward', 'RollingUpgradeStatusCodeCancelled', 'RollingUpgradeStatusCodeCompleted', 'RollingUpgradeStatusCodeFaulted'
9238	Code RollingUpgradeStatusCode `json:"code,omitempty"`
9239	// StartTime - READ-ONLY; Start time of the upgrade.
9240	StartTime *date.Time `json:"startTime,omitempty"`
9241	// LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel'
9242	LastAction RollingUpgradeActionType `json:"lastAction,omitempty"`
9243	// LastActionTime - READ-ONLY; Last action time of the upgrade.
9244	LastActionTime *date.Time `json:"lastActionTime,omitempty"`
9245}
9246
9247// RollingUpgradeStatusInfo the status of the latest virtual machine scale set rolling upgrade.
9248type RollingUpgradeStatusInfo struct {
9249	autorest.Response                   `json:"-"`
9250	*RollingUpgradeStatusInfoProperties `json:"properties,omitempty"`
9251	// ID - READ-ONLY; Resource Id
9252	ID *string `json:"id,omitempty"`
9253	// Name - READ-ONLY; Resource name
9254	Name *string `json:"name,omitempty"`
9255	// Type - READ-ONLY; Resource type
9256	Type *string `json:"type,omitempty"`
9257	// Location - Resource location
9258	Location *string `json:"location,omitempty"`
9259	// Tags - Resource tags
9260	Tags map[string]*string `json:"tags"`
9261}
9262
9263// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfo.
9264func (rusi RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) {
9265	objectMap := make(map[string]interface{})
9266	if rusi.RollingUpgradeStatusInfoProperties != nil {
9267		objectMap["properties"] = rusi.RollingUpgradeStatusInfoProperties
9268	}
9269	if rusi.Location != nil {
9270		objectMap["location"] = rusi.Location
9271	}
9272	if rusi.Tags != nil {
9273		objectMap["tags"] = rusi.Tags
9274	}
9275	return json.Marshal(objectMap)
9276}
9277
9278// UnmarshalJSON is the custom unmarshaler for RollingUpgradeStatusInfo struct.
9279func (rusi *RollingUpgradeStatusInfo) UnmarshalJSON(body []byte) error {
9280	var m map[string]*json.RawMessage
9281	err := json.Unmarshal(body, &m)
9282	if err != nil {
9283		return err
9284	}
9285	for k, v := range m {
9286		switch k {
9287		case "properties":
9288			if v != nil {
9289				var rollingUpgradeStatusInfoProperties RollingUpgradeStatusInfoProperties
9290				err = json.Unmarshal(*v, &rollingUpgradeStatusInfoProperties)
9291				if err != nil {
9292					return err
9293				}
9294				rusi.RollingUpgradeStatusInfoProperties = &rollingUpgradeStatusInfoProperties
9295			}
9296		case "id":
9297			if v != nil {
9298				var ID string
9299				err = json.Unmarshal(*v, &ID)
9300				if err != nil {
9301					return err
9302				}
9303				rusi.ID = &ID
9304			}
9305		case "name":
9306			if v != nil {
9307				var name string
9308				err = json.Unmarshal(*v, &name)
9309				if err != nil {
9310					return err
9311				}
9312				rusi.Name = &name
9313			}
9314		case "type":
9315			if v != nil {
9316				var typeVar string
9317				err = json.Unmarshal(*v, &typeVar)
9318				if err != nil {
9319					return err
9320				}
9321				rusi.Type = &typeVar
9322			}
9323		case "location":
9324			if v != nil {
9325				var location string
9326				err = json.Unmarshal(*v, &location)
9327				if err != nil {
9328					return err
9329				}
9330				rusi.Location = &location
9331			}
9332		case "tags":
9333			if v != nil {
9334				var tags map[string]*string
9335				err = json.Unmarshal(*v, &tags)
9336				if err != nil {
9337					return err
9338				}
9339				rusi.Tags = tags
9340			}
9341		}
9342	}
9343
9344	return nil
9345}
9346
9347// RollingUpgradeStatusInfoProperties the status of the latest virtual machine scale set rolling upgrade.
9348type RollingUpgradeStatusInfoProperties struct {
9349	// Policy - READ-ONLY; The rolling upgrade policies applied for this upgrade.
9350	Policy *RollingUpgradePolicy `json:"policy,omitempty"`
9351	// RunningStatus - READ-ONLY; Information about the current running state of the overall upgrade.
9352	RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"`
9353	// Progress - READ-ONLY; Information about the number of virtual machine instances in each upgrade state.
9354	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
9355	// Error - READ-ONLY; Error details for this upgrade, if there are any.
9356	Error *APIError `json:"error,omitempty"`
9357}
9358
9359// RunCommandDocument describes the properties of a Run Command.
9360type RunCommandDocument struct {
9361	autorest.Response `json:"-"`
9362	// Script - The script to be executed.
9363	Script *[]string `json:"script,omitempty"`
9364	// Parameters - The parameters used by the script.
9365	Parameters *[]RunCommandParameterDefinition `json:"parameters,omitempty"`
9366	// Schema - The VM run command schema.
9367	Schema *string `json:"$schema,omitempty"`
9368	// ID - The VM run command id.
9369	ID *string `json:"id,omitempty"`
9370	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
9371	OsType OperatingSystemTypes `json:"osType,omitempty"`
9372	// Label - The VM run command label.
9373	Label *string `json:"label,omitempty"`
9374	// Description - The VM run command description.
9375	Description *string `json:"description,omitempty"`
9376}
9377
9378// RunCommandDocumentBase describes the properties of a Run Command metadata.
9379type RunCommandDocumentBase struct {
9380	// Schema - The VM run command schema.
9381	Schema *string `json:"$schema,omitempty"`
9382	// ID - The VM run command id.
9383	ID *string `json:"id,omitempty"`
9384	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
9385	OsType OperatingSystemTypes `json:"osType,omitempty"`
9386	// Label - The VM run command label.
9387	Label *string `json:"label,omitempty"`
9388	// Description - The VM run command description.
9389	Description *string `json:"description,omitempty"`
9390}
9391
9392// RunCommandInput capture Virtual Machine parameters.
9393type RunCommandInput struct {
9394	// CommandID - The run command id.
9395	CommandID *string `json:"commandId,omitempty"`
9396	// Script - Optional. The script to be executed.  When this value is given, the given script will override the default script of the command.
9397	Script *[]string `json:"script,omitempty"`
9398	// Parameters - The run command parameters.
9399	Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
9400}
9401
9402// RunCommandInputParameter describes the properties of a run command parameter.
9403type RunCommandInputParameter struct {
9404	// Name - The run command parameter name.
9405	Name *string `json:"name,omitempty"`
9406	// Value - The run command parameter value.
9407	Value *string `json:"value,omitempty"`
9408}
9409
9410// RunCommandListResult the List Virtual Machine operation response.
9411type RunCommandListResult struct {
9412	autorest.Response `json:"-"`
9413	// Value - The list of virtual machine run commands.
9414	Value *[]RunCommandDocumentBase `json:"value,omitempty"`
9415	// NextLink - The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands.
9416	NextLink *string `json:"nextLink,omitempty"`
9417}
9418
9419// RunCommandListResultIterator provides access to a complete listing of RunCommandDocumentBase values.
9420type RunCommandListResultIterator struct {
9421	i    int
9422	page RunCommandListResultPage
9423}
9424
9425// NextWithContext advances to the next value.  If there was an error making
9426// the request the iterator does not advance and the error is returned.
9427func (iter *RunCommandListResultIterator) NextWithContext(ctx context.Context) (err error) {
9428	if tracing.IsEnabled() {
9429		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultIterator.NextWithContext")
9430		defer func() {
9431			sc := -1
9432			if iter.Response().Response.Response != nil {
9433				sc = iter.Response().Response.Response.StatusCode
9434			}
9435			tracing.EndSpan(ctx, sc, err)
9436		}()
9437	}
9438	iter.i++
9439	if iter.i < len(iter.page.Values()) {
9440		return nil
9441	}
9442	err = iter.page.NextWithContext(ctx)
9443	if err != nil {
9444		iter.i--
9445		return err
9446	}
9447	iter.i = 0
9448	return nil
9449}
9450
9451// Next advances to the next value.  If there was an error making
9452// the request the iterator does not advance and the error is returned.
9453// Deprecated: Use NextWithContext() instead.
9454func (iter *RunCommandListResultIterator) Next() error {
9455	return iter.NextWithContext(context.Background())
9456}
9457
9458// NotDone returns true if the enumeration should be started or is not yet complete.
9459func (iter RunCommandListResultIterator) NotDone() bool {
9460	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9461}
9462
9463// Response returns the raw server response from the last page request.
9464func (iter RunCommandListResultIterator) Response() RunCommandListResult {
9465	return iter.page.Response()
9466}
9467
9468// Value returns the current value or a zero-initialized value if the
9469// iterator has advanced beyond the end of the collection.
9470func (iter RunCommandListResultIterator) Value() RunCommandDocumentBase {
9471	if !iter.page.NotDone() {
9472		return RunCommandDocumentBase{}
9473	}
9474	return iter.page.Values()[iter.i]
9475}
9476
9477// Creates a new instance of the RunCommandListResultIterator type.
9478func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator {
9479	return RunCommandListResultIterator{page: page}
9480}
9481
9482// IsEmpty returns true if the ListResult contains no values.
9483func (rclr RunCommandListResult) IsEmpty() bool {
9484	return rclr.Value == nil || len(*rclr.Value) == 0
9485}
9486
9487// hasNextLink returns true if the NextLink is not empty.
9488func (rclr RunCommandListResult) hasNextLink() bool {
9489	return rclr.NextLink != nil && len(*rclr.NextLink) != 0
9490}
9491
9492// runCommandListResultPreparer prepares a request to retrieve the next set of results.
9493// It returns nil if no more results exist.
9494func (rclr RunCommandListResult) runCommandListResultPreparer(ctx context.Context) (*http.Request, error) {
9495	if !rclr.hasNextLink() {
9496		return nil, nil
9497	}
9498	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9499		autorest.AsJSON(),
9500		autorest.AsGet(),
9501		autorest.WithBaseURL(to.String(rclr.NextLink)))
9502}
9503
9504// RunCommandListResultPage contains a page of RunCommandDocumentBase values.
9505type RunCommandListResultPage struct {
9506	fn   func(context.Context, RunCommandListResult) (RunCommandListResult, error)
9507	rclr RunCommandListResult
9508}
9509
9510// NextWithContext advances to the next page of values.  If there was an error making
9511// the request the page does not advance and the error is returned.
9512func (page *RunCommandListResultPage) NextWithContext(ctx context.Context) (err error) {
9513	if tracing.IsEnabled() {
9514		ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultPage.NextWithContext")
9515		defer func() {
9516			sc := -1
9517			if page.Response().Response.Response != nil {
9518				sc = page.Response().Response.Response.StatusCode
9519			}
9520			tracing.EndSpan(ctx, sc, err)
9521		}()
9522	}
9523	for {
9524		next, err := page.fn(ctx, page.rclr)
9525		if err != nil {
9526			return err
9527		}
9528		page.rclr = next
9529		if !next.hasNextLink() || !next.IsEmpty() {
9530			break
9531		}
9532	}
9533	return nil
9534}
9535
9536// Next advances to the next page of values.  If there was an error making
9537// the request the page does not advance and the error is returned.
9538// Deprecated: Use NextWithContext() instead.
9539func (page *RunCommandListResultPage) Next() error {
9540	return page.NextWithContext(context.Background())
9541}
9542
9543// NotDone returns true if the page enumeration should be started or is not yet complete.
9544func (page RunCommandListResultPage) NotDone() bool {
9545	return !page.rclr.IsEmpty()
9546}
9547
9548// Response returns the raw server response from the last page request.
9549func (page RunCommandListResultPage) Response() RunCommandListResult {
9550	return page.rclr
9551}
9552
9553// Values returns the slice of values for the current page or nil if there are no values.
9554func (page RunCommandListResultPage) Values() []RunCommandDocumentBase {
9555	if page.rclr.IsEmpty() {
9556		return nil
9557	}
9558	return *page.rclr.Value
9559}
9560
9561// Creates a new instance of the RunCommandListResultPage type.
9562func NewRunCommandListResultPage(cur RunCommandListResult, getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
9563	return RunCommandListResultPage{
9564		fn:   getNextPage,
9565		rclr: cur,
9566	}
9567}
9568
9569// RunCommandParameterDefinition describes the properties of a run command parameter.
9570type RunCommandParameterDefinition struct {
9571	// Name - The run command parameter name.
9572	Name *string `json:"name,omitempty"`
9573	// Type - The run command parameter type.
9574	Type *string `json:"type,omitempty"`
9575	// DefaultValue - The run command parameter default value.
9576	DefaultValue *string `json:"defaultValue,omitempty"`
9577	// Required - The run command parameter required.
9578	Required *bool `json:"required,omitempty"`
9579}
9580
9581// RunCommandResult ...
9582type RunCommandResult struct {
9583	autorest.Response `json:"-"`
9584	// Value - Run command operation response.
9585	Value *[]InstanceViewStatus `json:"value,omitempty"`
9586}
9587
9588// ScaleInPolicy describes a scale-in policy for a virtual machine scale set.
9589type ScaleInPolicy struct {
9590	// Rules - The rules to be followed when scaling-in a virtual machine scale set. <br><br> Possible values are: <br><br> **Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in. <br><br> **OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal. <br><br> **NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal. <br><br>
9591	Rules *[]VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"`
9592}
9593
9594// ScheduledEventsProfile ...
9595type ScheduledEventsProfile struct {
9596	// TerminateNotificationProfile - Specifies Terminate Scheduled Event related configurations.
9597	TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"`
9598}
9599
9600// SecurityProfile specifies the Security profile settings for the virtual machine or virtual machine scale
9601// set.
9602type SecurityProfile struct {
9603	// EncryptionAtHost - This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. <br><br> Default: The Encryption at host will be disabled unless this property is set to true for the resource.
9604	EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"`
9605}
9606
9607// ShareInfoElement ...
9608type ShareInfoElement struct {
9609	// VMURI - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
9610	VMURI *string `json:"vmUri,omitempty"`
9611}
9612
9613// Sku describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware
9614// the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU
9615// name.
9616type Sku struct {
9617	// Name - The sku name.
9618	Name *string `json:"name,omitempty"`
9619	// Tier - Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
9620	Tier *string `json:"tier,omitempty"`
9621	// Capacity - Specifies the number of virtual machines in the scale set.
9622	Capacity *int64 `json:"capacity,omitempty"`
9623}
9624
9625// Snapshot snapshot resource.
9626type Snapshot struct {
9627	autorest.Response `json:"-"`
9628	// ManagedBy - READ-ONLY; Unused. Always Null.
9629	ManagedBy *string      `json:"managedBy,omitempty"`
9630	Sku       *SnapshotSku `json:"sku,omitempty"`
9631	// ExtendedLocation - The extended location where the snapshot will be created. Extended location cannot be changed.
9632	ExtendedLocation    *ExtendedLocation `json:"extendedLocation,omitempty"`
9633	*SnapshotProperties `json:"properties,omitempty"`
9634	// ID - READ-ONLY; Resource Id
9635	ID *string `json:"id,omitempty"`
9636	// Name - READ-ONLY; Resource name
9637	Name *string `json:"name,omitempty"`
9638	// Type - READ-ONLY; Resource type
9639	Type *string `json:"type,omitempty"`
9640	// Location - Resource location
9641	Location *string `json:"location,omitempty"`
9642	// Tags - Resource tags
9643	Tags map[string]*string `json:"tags"`
9644}
9645
9646// MarshalJSON is the custom marshaler for Snapshot.
9647func (s Snapshot) MarshalJSON() ([]byte, error) {
9648	objectMap := make(map[string]interface{})
9649	if s.Sku != nil {
9650		objectMap["sku"] = s.Sku
9651	}
9652	if s.ExtendedLocation != nil {
9653		objectMap["extendedLocation"] = s.ExtendedLocation
9654	}
9655	if s.SnapshotProperties != nil {
9656		objectMap["properties"] = s.SnapshotProperties
9657	}
9658	if s.Location != nil {
9659		objectMap["location"] = s.Location
9660	}
9661	if s.Tags != nil {
9662		objectMap["tags"] = s.Tags
9663	}
9664	return json.Marshal(objectMap)
9665}
9666
9667// UnmarshalJSON is the custom unmarshaler for Snapshot struct.
9668func (s *Snapshot) UnmarshalJSON(body []byte) error {
9669	var m map[string]*json.RawMessage
9670	err := json.Unmarshal(body, &m)
9671	if err != nil {
9672		return err
9673	}
9674	for k, v := range m {
9675		switch k {
9676		case "managedBy":
9677			if v != nil {
9678				var managedBy string
9679				err = json.Unmarshal(*v, &managedBy)
9680				if err != nil {
9681					return err
9682				}
9683				s.ManagedBy = &managedBy
9684			}
9685		case "sku":
9686			if v != nil {
9687				var sku SnapshotSku
9688				err = json.Unmarshal(*v, &sku)
9689				if err != nil {
9690					return err
9691				}
9692				s.Sku = &sku
9693			}
9694		case "extendedLocation":
9695			if v != nil {
9696				var extendedLocation ExtendedLocation
9697				err = json.Unmarshal(*v, &extendedLocation)
9698				if err != nil {
9699					return err
9700				}
9701				s.ExtendedLocation = &extendedLocation
9702			}
9703		case "properties":
9704			if v != nil {
9705				var snapshotProperties SnapshotProperties
9706				err = json.Unmarshal(*v, &snapshotProperties)
9707				if err != nil {
9708					return err
9709				}
9710				s.SnapshotProperties = &snapshotProperties
9711			}
9712		case "id":
9713			if v != nil {
9714				var ID string
9715				err = json.Unmarshal(*v, &ID)
9716				if err != nil {
9717					return err
9718				}
9719				s.ID = &ID
9720			}
9721		case "name":
9722			if v != nil {
9723				var name string
9724				err = json.Unmarshal(*v, &name)
9725				if err != nil {
9726					return err
9727				}
9728				s.Name = &name
9729			}
9730		case "type":
9731			if v != nil {
9732				var typeVar string
9733				err = json.Unmarshal(*v, &typeVar)
9734				if err != nil {
9735					return err
9736				}
9737				s.Type = &typeVar
9738			}
9739		case "location":
9740			if v != nil {
9741				var location string
9742				err = json.Unmarshal(*v, &location)
9743				if err != nil {
9744					return err
9745				}
9746				s.Location = &location
9747			}
9748		case "tags":
9749			if v != nil {
9750				var tags map[string]*string
9751				err = json.Unmarshal(*v, &tags)
9752				if err != nil {
9753					return err
9754				}
9755				s.Tags = tags
9756			}
9757		}
9758	}
9759
9760	return nil
9761}
9762
9763// SnapshotList the List Snapshots operation response.
9764type SnapshotList struct {
9765	autorest.Response `json:"-"`
9766	// Value - A list of snapshots.
9767	Value *[]Snapshot `json:"value,omitempty"`
9768	// NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
9769	NextLink *string `json:"nextLink,omitempty"`
9770}
9771
9772// SnapshotListIterator provides access to a complete listing of Snapshot values.
9773type SnapshotListIterator struct {
9774	i    int
9775	page SnapshotListPage
9776}
9777
9778// NextWithContext advances to the next value.  If there was an error making
9779// the request the iterator does not advance and the error is returned.
9780func (iter *SnapshotListIterator) NextWithContext(ctx context.Context) (err error) {
9781	if tracing.IsEnabled() {
9782		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListIterator.NextWithContext")
9783		defer func() {
9784			sc := -1
9785			if iter.Response().Response.Response != nil {
9786				sc = iter.Response().Response.Response.StatusCode
9787			}
9788			tracing.EndSpan(ctx, sc, err)
9789		}()
9790	}
9791	iter.i++
9792	if iter.i < len(iter.page.Values()) {
9793		return nil
9794	}
9795	err = iter.page.NextWithContext(ctx)
9796	if err != nil {
9797		iter.i--
9798		return err
9799	}
9800	iter.i = 0
9801	return nil
9802}
9803
9804// Next advances to the next value.  If there was an error making
9805// the request the iterator does not advance and the error is returned.
9806// Deprecated: Use NextWithContext() instead.
9807func (iter *SnapshotListIterator) Next() error {
9808	return iter.NextWithContext(context.Background())
9809}
9810
9811// NotDone returns true if the enumeration should be started or is not yet complete.
9812func (iter SnapshotListIterator) NotDone() bool {
9813	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9814}
9815
9816// Response returns the raw server response from the last page request.
9817func (iter SnapshotListIterator) Response() SnapshotList {
9818	return iter.page.Response()
9819}
9820
9821// Value returns the current value or a zero-initialized value if the
9822// iterator has advanced beyond the end of the collection.
9823func (iter SnapshotListIterator) Value() Snapshot {
9824	if !iter.page.NotDone() {
9825		return Snapshot{}
9826	}
9827	return iter.page.Values()[iter.i]
9828}
9829
9830// Creates a new instance of the SnapshotListIterator type.
9831func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator {
9832	return SnapshotListIterator{page: page}
9833}
9834
9835// IsEmpty returns true if the ListResult contains no values.
9836func (sl SnapshotList) IsEmpty() bool {
9837	return sl.Value == nil || len(*sl.Value) == 0
9838}
9839
9840// hasNextLink returns true if the NextLink is not empty.
9841func (sl SnapshotList) hasNextLink() bool {
9842	return sl.NextLink != nil && len(*sl.NextLink) != 0
9843}
9844
9845// snapshotListPreparer prepares a request to retrieve the next set of results.
9846// It returns nil if no more results exist.
9847func (sl SnapshotList) snapshotListPreparer(ctx context.Context) (*http.Request, error) {
9848	if !sl.hasNextLink() {
9849		return nil, nil
9850	}
9851	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9852		autorest.AsJSON(),
9853		autorest.AsGet(),
9854		autorest.WithBaseURL(to.String(sl.NextLink)))
9855}
9856
9857// SnapshotListPage contains a page of Snapshot values.
9858type SnapshotListPage struct {
9859	fn func(context.Context, SnapshotList) (SnapshotList, error)
9860	sl SnapshotList
9861}
9862
9863// NextWithContext advances to the next page of values.  If there was an error making
9864// the request the page does not advance and the error is returned.
9865func (page *SnapshotListPage) NextWithContext(ctx context.Context) (err error) {
9866	if tracing.IsEnabled() {
9867		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListPage.NextWithContext")
9868		defer func() {
9869			sc := -1
9870			if page.Response().Response.Response != nil {
9871				sc = page.Response().Response.Response.StatusCode
9872			}
9873			tracing.EndSpan(ctx, sc, err)
9874		}()
9875	}
9876	for {
9877		next, err := page.fn(ctx, page.sl)
9878		if err != nil {
9879			return err
9880		}
9881		page.sl = next
9882		if !next.hasNextLink() || !next.IsEmpty() {
9883			break
9884		}
9885	}
9886	return nil
9887}
9888
9889// Next advances to the next page of values.  If there was an error making
9890// the request the page does not advance and the error is returned.
9891// Deprecated: Use NextWithContext() instead.
9892func (page *SnapshotListPage) Next() error {
9893	return page.NextWithContext(context.Background())
9894}
9895
9896// NotDone returns true if the page enumeration should be started or is not yet complete.
9897func (page SnapshotListPage) NotDone() bool {
9898	return !page.sl.IsEmpty()
9899}
9900
9901// Response returns the raw server response from the last page request.
9902func (page SnapshotListPage) Response() SnapshotList {
9903	return page.sl
9904}
9905
9906// Values returns the slice of values for the current page or nil if there are no values.
9907func (page SnapshotListPage) Values() []Snapshot {
9908	if page.sl.IsEmpty() {
9909		return nil
9910	}
9911	return *page.sl.Value
9912}
9913
9914// Creates a new instance of the SnapshotListPage type.
9915func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
9916	return SnapshotListPage{
9917		fn: getNextPage,
9918		sl: cur,
9919	}
9920}
9921
9922// SnapshotProperties snapshot resource properties.
9923type SnapshotProperties struct {
9924	// TimeCreated - READ-ONLY; The time when the snapshot was created.
9925	TimeCreated *date.Time `json:"timeCreated,omitempty"`
9926	// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
9927	OsType OperatingSystemTypes `json:"osType,omitempty"`
9928	// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
9929	HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
9930	// PurchasePlan - Purchase plan information for the image from which the source disk for the snapshot was originally created.
9931	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
9932	// CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
9933	CreationData *CreationData `json:"creationData,omitempty"`
9934	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
9935	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
9936	// DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
9937	DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
9938	// DiskState - The state of the snapshot. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
9939	DiskState DiskState `json:"diskState,omitempty"`
9940	// UniqueID - READ-ONLY; Unique Guid identifying the resource.
9941	UniqueID *string `json:"uniqueId,omitempty"`
9942	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
9943	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
9944	// ProvisioningState - READ-ONLY; The disk provisioning state.
9945	ProvisioningState *string `json:"provisioningState,omitempty"`
9946	// Incremental - Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.
9947	Incremental *bool `json:"incremental,omitempty"`
9948	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
9949	Encryption *Encryption `json:"encryption,omitempty"`
9950	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
9951	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
9952	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
9953	DiskAccessID *string `json:"diskAccessId,omitempty"`
9954}
9955
9956// MarshalJSON is the custom marshaler for SnapshotProperties.
9957func (sp SnapshotProperties) MarshalJSON() ([]byte, error) {
9958	objectMap := make(map[string]interface{})
9959	if sp.OsType != "" {
9960		objectMap["osType"] = sp.OsType
9961	}
9962	if sp.HyperVGeneration != "" {
9963		objectMap["hyperVGeneration"] = sp.HyperVGeneration
9964	}
9965	if sp.PurchasePlan != nil {
9966		objectMap["purchasePlan"] = sp.PurchasePlan
9967	}
9968	if sp.CreationData != nil {
9969		objectMap["creationData"] = sp.CreationData
9970	}
9971	if sp.DiskSizeGB != nil {
9972		objectMap["diskSizeGB"] = sp.DiskSizeGB
9973	}
9974	if sp.DiskState != "" {
9975		objectMap["diskState"] = sp.DiskState
9976	}
9977	if sp.EncryptionSettingsCollection != nil {
9978		objectMap["encryptionSettingsCollection"] = sp.EncryptionSettingsCollection
9979	}
9980	if sp.Incremental != nil {
9981		objectMap["incremental"] = sp.Incremental
9982	}
9983	if sp.Encryption != nil {
9984		objectMap["encryption"] = sp.Encryption
9985	}
9986	if sp.NetworkAccessPolicy != "" {
9987		objectMap["networkAccessPolicy"] = sp.NetworkAccessPolicy
9988	}
9989	if sp.DiskAccessID != nil {
9990		objectMap["diskAccessId"] = sp.DiskAccessID
9991	}
9992	return json.Marshal(objectMap)
9993}
9994
9995// SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
9996// operation.
9997type SnapshotsCreateOrUpdateFuture struct {
9998	azure.FutureAPI
9999	// Result returns the result of the asynchronous operation.
10000	// If the operation has not completed it will return an error.
10001	Result func(SnapshotsClient) (Snapshot, error)
10002}
10003
10004// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10005// operation.
10006type SnapshotsDeleteFuture struct {
10007	azure.FutureAPI
10008	// Result returns the result of the asynchronous operation.
10009	// If the operation has not completed it will return an error.
10010	Result func(SnapshotsClient) (autorest.Response, error)
10011}
10012
10013// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
10014// operation.
10015type SnapshotsGrantAccessFuture struct {
10016	azure.FutureAPI
10017	// Result returns the result of the asynchronous operation.
10018	// If the operation has not completed it will return an error.
10019	Result func(SnapshotsClient) (AccessURI, error)
10020}
10021
10022// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an
10023// optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same
10024// sku as the previous snapshot
10025type SnapshotSku struct {
10026	// Name - The sku name. Possible values include: 'SnapshotStorageAccountTypesStandardLRS', 'SnapshotStorageAccountTypesPremiumLRS', 'SnapshotStorageAccountTypesStandardZRS'
10027	Name SnapshotStorageAccountTypes `json:"name,omitempty"`
10028	// Tier - READ-ONLY; The sku tier.
10029	Tier *string `json:"tier,omitempty"`
10030}
10031
10032// MarshalJSON is the custom marshaler for SnapshotSku.
10033func (ss SnapshotSku) MarshalJSON() ([]byte, error) {
10034	objectMap := make(map[string]interface{})
10035	if ss.Name != "" {
10036		objectMap["name"] = ss.Name
10037	}
10038	return json.Marshal(objectMap)
10039}
10040
10041// SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
10042// operation.
10043type SnapshotsRevokeAccessFuture struct {
10044	azure.FutureAPI
10045	// Result returns the result of the asynchronous operation.
10046	// If the operation has not completed it will return an error.
10047	Result func(SnapshotsClient) (autorest.Response, error)
10048}
10049
10050// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
10051// operation.
10052type SnapshotsUpdateFuture struct {
10053	azure.FutureAPI
10054	// Result returns the result of the asynchronous operation.
10055	// If the operation has not completed it will return an error.
10056	Result func(SnapshotsClient) (Snapshot, error)
10057}
10058
10059// SnapshotUpdate snapshot update resource.
10060type SnapshotUpdate struct {
10061	*SnapshotUpdateProperties `json:"properties,omitempty"`
10062	// Tags - Resource tags
10063	Tags map[string]*string `json:"tags"`
10064	Sku  *SnapshotSku       `json:"sku,omitempty"`
10065}
10066
10067// MarshalJSON is the custom marshaler for SnapshotUpdate.
10068func (su SnapshotUpdate) MarshalJSON() ([]byte, error) {
10069	objectMap := make(map[string]interface{})
10070	if su.SnapshotUpdateProperties != nil {
10071		objectMap["properties"] = su.SnapshotUpdateProperties
10072	}
10073	if su.Tags != nil {
10074		objectMap["tags"] = su.Tags
10075	}
10076	if su.Sku != nil {
10077		objectMap["sku"] = su.Sku
10078	}
10079	return json.Marshal(objectMap)
10080}
10081
10082// UnmarshalJSON is the custom unmarshaler for SnapshotUpdate struct.
10083func (su *SnapshotUpdate) UnmarshalJSON(body []byte) error {
10084	var m map[string]*json.RawMessage
10085	err := json.Unmarshal(body, &m)
10086	if err != nil {
10087		return err
10088	}
10089	for k, v := range m {
10090		switch k {
10091		case "properties":
10092			if v != nil {
10093				var snapshotUpdateProperties SnapshotUpdateProperties
10094				err = json.Unmarshal(*v, &snapshotUpdateProperties)
10095				if err != nil {
10096					return err
10097				}
10098				su.SnapshotUpdateProperties = &snapshotUpdateProperties
10099			}
10100		case "tags":
10101			if v != nil {
10102				var tags map[string]*string
10103				err = json.Unmarshal(*v, &tags)
10104				if err != nil {
10105					return err
10106				}
10107				su.Tags = tags
10108			}
10109		case "sku":
10110			if v != nil {
10111				var sku SnapshotSku
10112				err = json.Unmarshal(*v, &sku)
10113				if err != nil {
10114					return err
10115				}
10116				su.Sku = &sku
10117			}
10118		}
10119	}
10120
10121	return nil
10122}
10123
10124// SnapshotUpdateProperties snapshot resource update properties.
10125type SnapshotUpdateProperties struct {
10126	// OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
10127	OsType OperatingSystemTypes `json:"osType,omitempty"`
10128	// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
10129	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
10130	// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
10131	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
10132	// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
10133	Encryption *Encryption `json:"encryption,omitempty"`
10134	// NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
10135	NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
10136	// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
10137	DiskAccessID *string `json:"diskAccessId,omitempty"`
10138}
10139
10140// SourceVault the vault id is an Azure Resource Manager Resource id in the form
10141// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
10142type SourceVault struct {
10143	// ID - Resource Id
10144	ID *string `json:"id,omitempty"`
10145}
10146
10147// SSHConfiguration SSH configuration for Linux based VMs running on Azure
10148type SSHConfiguration struct {
10149	// PublicKeys - The list of SSH public keys used to authenticate with linux based VMs.
10150	PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
10151}
10152
10153// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where
10154// the public key is placed.
10155type SSHPublicKey struct {
10156	// 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
10157	Path *string `json:"path,omitempty"`
10158	// KeyData - SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
10159	KeyData *string `json:"keyData,omitempty"`
10160}
10161
10162// SSHPublicKeyGenerateKeyPairResult response from generation of an SSH key pair.
10163type SSHPublicKeyGenerateKeyPairResult struct {
10164	autorest.Response `json:"-"`
10165	// PrivateKey - Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret.
10166	PrivateKey *string `json:"privateKey,omitempty"`
10167	// PublicKey - Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format.
10168	PublicKey *string `json:"publicKey,omitempty"`
10169	// ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}
10170	ID *string `json:"id,omitempty"`
10171}
10172
10173// SSHPublicKeyResource specifies information about the SSH public key.
10174type SSHPublicKeyResource struct {
10175	autorest.Response `json:"-"`
10176	// SSHPublicKeyResourceProperties - Properties of the SSH public key.
10177	*SSHPublicKeyResourceProperties `json:"properties,omitempty"`
10178	// ID - READ-ONLY; Resource Id
10179	ID *string `json:"id,omitempty"`
10180	// Name - READ-ONLY; Resource name
10181	Name *string `json:"name,omitempty"`
10182	// Type - READ-ONLY; Resource type
10183	Type *string `json:"type,omitempty"`
10184	// Location - Resource location
10185	Location *string `json:"location,omitempty"`
10186	// Tags - Resource tags
10187	Tags map[string]*string `json:"tags"`
10188}
10189
10190// MarshalJSON is the custom marshaler for SSHPublicKeyResource.
10191func (spkr SSHPublicKeyResource) MarshalJSON() ([]byte, error) {
10192	objectMap := make(map[string]interface{})
10193	if spkr.SSHPublicKeyResourceProperties != nil {
10194		objectMap["properties"] = spkr.SSHPublicKeyResourceProperties
10195	}
10196	if spkr.Location != nil {
10197		objectMap["location"] = spkr.Location
10198	}
10199	if spkr.Tags != nil {
10200		objectMap["tags"] = spkr.Tags
10201	}
10202	return json.Marshal(objectMap)
10203}
10204
10205// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyResource struct.
10206func (spkr *SSHPublicKeyResource) UnmarshalJSON(body []byte) error {
10207	var m map[string]*json.RawMessage
10208	err := json.Unmarshal(body, &m)
10209	if err != nil {
10210		return err
10211	}
10212	for k, v := range m {
10213		switch k {
10214		case "properties":
10215			if v != nil {
10216				var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
10217				err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
10218				if err != nil {
10219					return err
10220				}
10221				spkr.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
10222			}
10223		case "id":
10224			if v != nil {
10225				var ID string
10226				err = json.Unmarshal(*v, &ID)
10227				if err != nil {
10228					return err
10229				}
10230				spkr.ID = &ID
10231			}
10232		case "name":
10233			if v != nil {
10234				var name string
10235				err = json.Unmarshal(*v, &name)
10236				if err != nil {
10237					return err
10238				}
10239				spkr.Name = &name
10240			}
10241		case "type":
10242			if v != nil {
10243				var typeVar string
10244				err = json.Unmarshal(*v, &typeVar)
10245				if err != nil {
10246					return err
10247				}
10248				spkr.Type = &typeVar
10249			}
10250		case "location":
10251			if v != nil {
10252				var location string
10253				err = json.Unmarshal(*v, &location)
10254				if err != nil {
10255					return err
10256				}
10257				spkr.Location = &location
10258			}
10259		case "tags":
10260			if v != nil {
10261				var tags map[string]*string
10262				err = json.Unmarshal(*v, &tags)
10263				if err != nil {
10264					return err
10265				}
10266				spkr.Tags = tags
10267			}
10268		}
10269	}
10270
10271	return nil
10272}
10273
10274// SSHPublicKeyResourceProperties properties of the SSH public key.
10275type SSHPublicKeyResourceProperties struct {
10276	// PublicKey - SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
10277	PublicKey *string `json:"publicKey,omitempty"`
10278}
10279
10280// SSHPublicKeysGroupListResult the list SSH public keys operation response.
10281type SSHPublicKeysGroupListResult struct {
10282	autorest.Response `json:"-"`
10283	// Value - The list of SSH public keys
10284	Value *[]SSHPublicKeyResource `json:"value,omitempty"`
10285	// NextLink - The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys.
10286	NextLink *string `json:"nextLink,omitempty"`
10287}
10288
10289// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource
10290// values.
10291type SSHPublicKeysGroupListResultIterator struct {
10292	i    int
10293	page SSHPublicKeysGroupListResultPage
10294}
10295
10296// NextWithContext advances to the next value.  If there was an error making
10297// the request the iterator does not advance and the error is returned.
10298func (iter *SSHPublicKeysGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
10299	if tracing.IsEnabled() {
10300		ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultIterator.NextWithContext")
10301		defer func() {
10302			sc := -1
10303			if iter.Response().Response.Response != nil {
10304				sc = iter.Response().Response.Response.StatusCode
10305			}
10306			tracing.EndSpan(ctx, sc, err)
10307		}()
10308	}
10309	iter.i++
10310	if iter.i < len(iter.page.Values()) {
10311		return nil
10312	}
10313	err = iter.page.NextWithContext(ctx)
10314	if err != nil {
10315		iter.i--
10316		return err
10317	}
10318	iter.i = 0
10319	return nil
10320}
10321
10322// Next advances to the next value.  If there was an error making
10323// the request the iterator does not advance and the error is returned.
10324// Deprecated: Use NextWithContext() instead.
10325func (iter *SSHPublicKeysGroupListResultIterator) Next() error {
10326	return iter.NextWithContext(context.Background())
10327}
10328
10329// NotDone returns true if the enumeration should be started or is not yet complete.
10330func (iter SSHPublicKeysGroupListResultIterator) NotDone() bool {
10331	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10332}
10333
10334// Response returns the raw server response from the last page request.
10335func (iter SSHPublicKeysGroupListResultIterator) Response() SSHPublicKeysGroupListResult {
10336	return iter.page.Response()
10337}
10338
10339// Value returns the current value or a zero-initialized value if the
10340// iterator has advanced beyond the end of the collection.
10341func (iter SSHPublicKeysGroupListResultIterator) Value() SSHPublicKeyResource {
10342	if !iter.page.NotDone() {
10343		return SSHPublicKeyResource{}
10344	}
10345	return iter.page.Values()[iter.i]
10346}
10347
10348// Creates a new instance of the SSHPublicKeysGroupListResultIterator type.
10349func NewSSHPublicKeysGroupListResultIterator(page SSHPublicKeysGroupListResultPage) SSHPublicKeysGroupListResultIterator {
10350	return SSHPublicKeysGroupListResultIterator{page: page}
10351}
10352
10353// IsEmpty returns true if the ListResult contains no values.
10354func (spkglr SSHPublicKeysGroupListResult) IsEmpty() bool {
10355	return spkglr.Value == nil || len(*spkglr.Value) == 0
10356}
10357
10358// hasNextLink returns true if the NextLink is not empty.
10359func (spkglr SSHPublicKeysGroupListResult) hasNextLink() bool {
10360	return spkglr.NextLink != nil && len(*spkglr.NextLink) != 0
10361}
10362
10363// sSHPublicKeysGroupListResultPreparer prepares a request to retrieve the next set of results.
10364// It returns nil if no more results exist.
10365func (spkglr SSHPublicKeysGroupListResult) sSHPublicKeysGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
10366	if !spkglr.hasNextLink() {
10367		return nil, nil
10368	}
10369	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10370		autorest.AsJSON(),
10371		autorest.AsGet(),
10372		autorest.WithBaseURL(to.String(spkglr.NextLink)))
10373}
10374
10375// SSHPublicKeysGroupListResultPage contains a page of SSHPublicKeyResource values.
10376type SSHPublicKeysGroupListResultPage struct {
10377	fn     func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)
10378	spkglr SSHPublicKeysGroupListResult
10379}
10380
10381// NextWithContext advances to the next page of values.  If there was an error making
10382// the request the page does not advance and the error is returned.
10383func (page *SSHPublicKeysGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
10384	if tracing.IsEnabled() {
10385		ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultPage.NextWithContext")
10386		defer func() {
10387			sc := -1
10388			if page.Response().Response.Response != nil {
10389				sc = page.Response().Response.Response.StatusCode
10390			}
10391			tracing.EndSpan(ctx, sc, err)
10392		}()
10393	}
10394	for {
10395		next, err := page.fn(ctx, page.spkglr)
10396		if err != nil {
10397			return err
10398		}
10399		page.spkglr = next
10400		if !next.hasNextLink() || !next.IsEmpty() {
10401			break
10402		}
10403	}
10404	return nil
10405}
10406
10407// Next advances to the next page of values.  If there was an error making
10408// the request the page does not advance and the error is returned.
10409// Deprecated: Use NextWithContext() instead.
10410func (page *SSHPublicKeysGroupListResultPage) Next() error {
10411	return page.NextWithContext(context.Background())
10412}
10413
10414// NotDone returns true if the page enumeration should be started or is not yet complete.
10415func (page SSHPublicKeysGroupListResultPage) NotDone() bool {
10416	return !page.spkglr.IsEmpty()
10417}
10418
10419// Response returns the raw server response from the last page request.
10420func (page SSHPublicKeysGroupListResultPage) Response() SSHPublicKeysGroupListResult {
10421	return page.spkglr
10422}
10423
10424// Values returns the slice of values for the current page or nil if there are no values.
10425func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource {
10426	if page.spkglr.IsEmpty() {
10427		return nil
10428	}
10429	return *page.spkglr.Value
10430}
10431
10432// Creates a new instance of the SSHPublicKeysGroupListResultPage type.
10433func NewSSHPublicKeysGroupListResultPage(cur SSHPublicKeysGroupListResult, getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage {
10434	return SSHPublicKeysGroupListResultPage{
10435		fn:     getNextPage,
10436		spkglr: cur,
10437	}
10438}
10439
10440// SSHPublicKeyUpdateResource specifies information about the SSH public key.
10441type SSHPublicKeyUpdateResource struct {
10442	// SSHPublicKeyResourceProperties - Properties of the SSH public key.
10443	*SSHPublicKeyResourceProperties `json:"properties,omitempty"`
10444	// Tags - Resource tags
10445	Tags map[string]*string `json:"tags"`
10446}
10447
10448// MarshalJSON is the custom marshaler for SSHPublicKeyUpdateResource.
10449func (spkur SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) {
10450	objectMap := make(map[string]interface{})
10451	if spkur.SSHPublicKeyResourceProperties != nil {
10452		objectMap["properties"] = spkur.SSHPublicKeyResourceProperties
10453	}
10454	if spkur.Tags != nil {
10455		objectMap["tags"] = spkur.Tags
10456	}
10457	return json.Marshal(objectMap)
10458}
10459
10460// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyUpdateResource struct.
10461func (spkur *SSHPublicKeyUpdateResource) UnmarshalJSON(body []byte) error {
10462	var m map[string]*json.RawMessage
10463	err := json.Unmarshal(body, &m)
10464	if err != nil {
10465		return err
10466	}
10467	for k, v := range m {
10468		switch k {
10469		case "properties":
10470			if v != nil {
10471				var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
10472				err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
10473				if err != nil {
10474					return err
10475				}
10476				spkur.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
10477			}
10478		case "tags":
10479			if v != nil {
10480				var tags map[string]*string
10481				err = json.Unmarshal(*v, &tags)
10482				if err != nil {
10483					return err
10484				}
10485				spkur.Tags = tags
10486			}
10487		}
10488	}
10489
10490	return nil
10491}
10492
10493// StatusCodeCount ...
10494type StatusCodeCount struct {
10495	// Code - READ-ONLY; The instance view status code
10496	Code *string `json:"code,omitempty"`
10497	// Count - READ-ONLY; Number of instances having this status code
10498	Count *int32 `json:"count,omitempty"`
10499}
10500
10501// StorageProfile specifies the storage settings for the virtual machine disks.
10502type StorageProfile struct {
10503	// 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.
10504	ImageReference *ImageReference `json:"imageReference,omitempty"`
10505	// 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).
10506	OsDisk *OSDisk `json:"osDisk,omitempty"`
10507	// 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).
10508	DataDisks *[]DataDisk `json:"dataDisks,omitempty"`
10509}
10510
10511// SubResource ...
10512type SubResource struct {
10513	// ID - Resource Id
10514	ID *string `json:"id,omitempty"`
10515}
10516
10517// SubResourceReadOnly ...
10518type SubResourceReadOnly struct {
10519	// ID - READ-ONLY; Resource Id
10520	ID *string `json:"id,omitempty"`
10521}
10522
10523// SubResourceWithColocationStatus ...
10524type SubResourceWithColocationStatus struct {
10525	// ColocationStatus - Describes colocation status of a resource in the Proximity Placement Group.
10526	ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
10527	// ID - Resource Id
10528	ID *string `json:"id,omitempty"`
10529}
10530
10531// TargetRegion describes the target region information.
10532type TargetRegion struct {
10533	// Name - The name of the region.
10534	Name *string `json:"name,omitempty"`
10535	// RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable.
10536	RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"`
10537	// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
10538	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
10539	Encryption         *EncryptionImages  `json:"encryption,omitempty"`
10540}
10541
10542// TerminateNotificationProfile ...
10543type TerminateNotificationProfile struct {
10544	// NotBeforeTimeout - Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M)
10545	NotBeforeTimeout *string `json:"notBeforeTimeout,omitempty"`
10546	// Enable - Specifies whether the Terminate Scheduled event is enabled or disabled.
10547	Enable *bool `json:"enable,omitempty"`
10548}
10549
10550// ThrottledRequestsInput api request input for LogAnalytics getThrottledRequests Api.
10551type ThrottledRequestsInput struct {
10552	// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
10553	BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
10554	// FromTime - From time of the query
10555	FromTime *date.Time `json:"fromTime,omitempty"`
10556	// ToTime - To time of the query
10557	ToTime *date.Time `json:"toTime,omitempty"`
10558	// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
10559	GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
10560	// GroupByOperationName - Group query result by Operation Name.
10561	GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
10562	// GroupByResourceName - Group query result by Resource Name.
10563	GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
10564	// GroupByClientApplicationID - Group query result by Client Application ID.
10565	GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
10566	// GroupByUserAgent - Group query result by User Agent.
10567	GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
10568}
10569
10570// UpdateDomain defines an update domain for the cloud service.
10571type UpdateDomain struct {
10572	autorest.Response `json:"-"`
10573	// ID - READ-ONLY; Resource Id
10574	ID *string `json:"id,omitempty"`
10575	// Name - READ-ONLY; Resource Name
10576	Name *string `json:"name,omitempty"`
10577}
10578
10579// UpdateDomainListResult ...
10580type UpdateDomainListResult struct {
10581	autorest.Response `json:"-"`
10582	Value             *[]UpdateDomain `json:"value,omitempty"`
10583	NextLink          *string         `json:"nextLink,omitempty"`
10584}
10585
10586// UpdateDomainListResultIterator provides access to a complete listing of UpdateDomain values.
10587type UpdateDomainListResultIterator struct {
10588	i    int
10589	page UpdateDomainListResultPage
10590}
10591
10592// NextWithContext advances to the next value.  If there was an error making
10593// the request the iterator does not advance and the error is returned.
10594func (iter *UpdateDomainListResultIterator) NextWithContext(ctx context.Context) (err error) {
10595	if tracing.IsEnabled() {
10596		ctx = tracing.StartSpan(ctx, fqdn+"/UpdateDomainListResultIterator.NextWithContext")
10597		defer func() {
10598			sc := -1
10599			if iter.Response().Response.Response != nil {
10600				sc = iter.Response().Response.Response.StatusCode
10601			}
10602			tracing.EndSpan(ctx, sc, err)
10603		}()
10604	}
10605	iter.i++
10606	if iter.i < len(iter.page.Values()) {
10607		return nil
10608	}
10609	err = iter.page.NextWithContext(ctx)
10610	if err != nil {
10611		iter.i--
10612		return err
10613	}
10614	iter.i = 0
10615	return nil
10616}
10617
10618// Next advances to the next value.  If there was an error making
10619// the request the iterator does not advance and the error is returned.
10620// Deprecated: Use NextWithContext() instead.
10621func (iter *UpdateDomainListResultIterator) Next() error {
10622	return iter.NextWithContext(context.Background())
10623}
10624
10625// NotDone returns true if the enumeration should be started or is not yet complete.
10626func (iter UpdateDomainListResultIterator) NotDone() bool {
10627	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10628}
10629
10630// Response returns the raw server response from the last page request.
10631func (iter UpdateDomainListResultIterator) Response() UpdateDomainListResult {
10632	return iter.page.Response()
10633}
10634
10635// Value returns the current value or a zero-initialized value if the
10636// iterator has advanced beyond the end of the collection.
10637func (iter UpdateDomainListResultIterator) Value() UpdateDomain {
10638	if !iter.page.NotDone() {
10639		return UpdateDomain{}
10640	}
10641	return iter.page.Values()[iter.i]
10642}
10643
10644// Creates a new instance of the UpdateDomainListResultIterator type.
10645func NewUpdateDomainListResultIterator(page UpdateDomainListResultPage) UpdateDomainListResultIterator {
10646	return UpdateDomainListResultIterator{page: page}
10647}
10648
10649// IsEmpty returns true if the ListResult contains no values.
10650func (udlr UpdateDomainListResult) IsEmpty() bool {
10651	return udlr.Value == nil || len(*udlr.Value) == 0
10652}
10653
10654// hasNextLink returns true if the NextLink is not empty.
10655func (udlr UpdateDomainListResult) hasNextLink() bool {
10656	return udlr.NextLink != nil && len(*udlr.NextLink) != 0
10657}
10658
10659// updateDomainListResultPreparer prepares a request to retrieve the next set of results.
10660// It returns nil if no more results exist.
10661func (udlr UpdateDomainListResult) updateDomainListResultPreparer(ctx context.Context) (*http.Request, error) {
10662	if !udlr.hasNextLink() {
10663		return nil, nil
10664	}
10665	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10666		autorest.AsJSON(),
10667		autorest.AsGet(),
10668		autorest.WithBaseURL(to.String(udlr.NextLink)))
10669}
10670
10671// UpdateDomainListResultPage contains a page of UpdateDomain values.
10672type UpdateDomainListResultPage struct {
10673	fn   func(context.Context, UpdateDomainListResult) (UpdateDomainListResult, error)
10674	udlr UpdateDomainListResult
10675}
10676
10677// NextWithContext advances to the next page of values.  If there was an error making
10678// the request the page does not advance and the error is returned.
10679func (page *UpdateDomainListResultPage) NextWithContext(ctx context.Context) (err error) {
10680	if tracing.IsEnabled() {
10681		ctx = tracing.StartSpan(ctx, fqdn+"/UpdateDomainListResultPage.NextWithContext")
10682		defer func() {
10683			sc := -1
10684			if page.Response().Response.Response != nil {
10685				sc = page.Response().Response.Response.StatusCode
10686			}
10687			tracing.EndSpan(ctx, sc, err)
10688		}()
10689	}
10690	for {
10691		next, err := page.fn(ctx, page.udlr)
10692		if err != nil {
10693			return err
10694		}
10695		page.udlr = next
10696		if !next.hasNextLink() || !next.IsEmpty() {
10697			break
10698		}
10699	}
10700	return nil
10701}
10702
10703// Next advances to the next page of values.  If there was an error making
10704// the request the page does not advance and the error is returned.
10705// Deprecated: Use NextWithContext() instead.
10706func (page *UpdateDomainListResultPage) Next() error {
10707	return page.NextWithContext(context.Background())
10708}
10709
10710// NotDone returns true if the page enumeration should be started or is not yet complete.
10711func (page UpdateDomainListResultPage) NotDone() bool {
10712	return !page.udlr.IsEmpty()
10713}
10714
10715// Response returns the raw server response from the last page request.
10716func (page UpdateDomainListResultPage) Response() UpdateDomainListResult {
10717	return page.udlr
10718}
10719
10720// Values returns the slice of values for the current page or nil if there are no values.
10721func (page UpdateDomainListResultPage) Values() []UpdateDomain {
10722	if page.udlr.IsEmpty() {
10723		return nil
10724	}
10725	return *page.udlr.Value
10726}
10727
10728// Creates a new instance of the UpdateDomainListResultPage type.
10729func NewUpdateDomainListResultPage(cur UpdateDomainListResult, getNextPage func(context.Context, UpdateDomainListResult) (UpdateDomainListResult, error)) UpdateDomainListResultPage {
10730	return UpdateDomainListResultPage{
10731		fn:   getNextPage,
10732		udlr: cur,
10733	}
10734}
10735
10736// UpdateResource the Update Resource model definition.
10737type UpdateResource struct {
10738	// Tags - Resource tags
10739	Tags map[string]*string `json:"tags"`
10740}
10741
10742// MarshalJSON is the custom marshaler for UpdateResource.
10743func (ur UpdateResource) MarshalJSON() ([]byte, error) {
10744	objectMap := make(map[string]interface{})
10745	if ur.Tags != nil {
10746		objectMap["tags"] = ur.Tags
10747	}
10748	return json.Marshal(objectMap)
10749}
10750
10751// UpdateResourceDefinition the Update Resource model definition.
10752type UpdateResourceDefinition struct {
10753	// ID - READ-ONLY; Resource Id
10754	ID *string `json:"id,omitempty"`
10755	// Name - READ-ONLY; Resource name
10756	Name *string `json:"name,omitempty"`
10757	// Type - READ-ONLY; Resource type
10758	Type *string `json:"type,omitempty"`
10759	// Tags - Resource tags
10760	Tags map[string]*string `json:"tags"`
10761}
10762
10763// MarshalJSON is the custom marshaler for UpdateResourceDefinition.
10764func (urd UpdateResourceDefinition) MarshalJSON() ([]byte, error) {
10765	objectMap := make(map[string]interface{})
10766	if urd.Tags != nil {
10767		objectMap["tags"] = urd.Tags
10768	}
10769	return json.Marshal(objectMap)
10770}
10771
10772// UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response.
10773type UpgradeOperationHistoricalStatusInfo struct {
10774	// Properties - READ-ONLY; Information about the properties of the upgrade operation.
10775	Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty"`
10776	// Type - READ-ONLY; Resource type
10777	Type *string `json:"type,omitempty"`
10778	// Location - READ-ONLY; Resource location
10779	Location *string `json:"location,omitempty"`
10780}
10781
10782// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale
10783// Set.
10784type UpgradeOperationHistoricalStatusInfoProperties struct {
10785	// RunningStatus - READ-ONLY; Information about the overall status of the upgrade operation.
10786	RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"`
10787	// Progress - READ-ONLY; Counts of the VMs in each state.
10788	Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
10789	// Error - READ-ONLY; Error Details for this upgrade if there are any.
10790	Error *APIError `json:"error,omitempty"`
10791	// StartedBy - READ-ONLY; Invoker of the Upgrade Operation. Possible values include: 'UpgradeOperationInvokerUnknown', 'UpgradeOperationInvokerUser', 'UpgradeOperationInvokerPlatform'
10792	StartedBy UpgradeOperationInvoker `json:"startedBy,omitempty"`
10793	// TargetImageReference - READ-ONLY; Image Reference details
10794	TargetImageReference *ImageReference `json:"targetImageReference,omitempty"`
10795	// RollbackInfo - READ-ONLY; Information about OS rollback if performed
10796	RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"`
10797}
10798
10799// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade.
10800type UpgradeOperationHistoryStatus struct {
10801	// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted'
10802	Code UpgradeState `json:"code,omitempty"`
10803	// StartTime - READ-ONLY; Start time of the upgrade.
10804	StartTime *date.Time `json:"startTime,omitempty"`
10805	// EndTime - READ-ONLY; End time of the upgrade.
10806	EndTime *date.Time `json:"endTime,omitempty"`
10807}
10808
10809// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling.
10810type UpgradePolicy struct {
10811	// Mode - Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You  control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are  automatically updated at the same time. Possible values include: 'UpgradeModeAutomatic', 'UpgradeModeManual', 'UpgradeModeRolling'
10812	Mode UpgradeMode `json:"mode,omitempty"`
10813	// RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.
10814	RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"`
10815	// AutomaticOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade.
10816	AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"`
10817}
10818
10819// Usage describes Compute Resource Usage.
10820type Usage struct {
10821	// Unit - An enum describing the unit of usage measurement.
10822	Unit *string `json:"unit,omitempty"`
10823	// CurrentValue - The current usage of the resource.
10824	CurrentValue *int32 `json:"currentValue,omitempty"`
10825	// Limit - The maximum permitted usage of the resource.
10826	Limit *int64 `json:"limit,omitempty"`
10827	// Name - The name of the type of usage.
10828	Name *UsageName `json:"name,omitempty"`
10829}
10830
10831// UsageName the Usage Names.
10832type UsageName struct {
10833	// Value - The name of the resource.
10834	Value *string `json:"value,omitempty"`
10835	// LocalizedValue - The localized name of the resource.
10836	LocalizedValue *string `json:"localizedValue,omitempty"`
10837}
10838
10839// UserArtifactManage ...
10840type UserArtifactManage struct {
10841	// Install - Required. The path and arguments to install the gallery application. This is limited to 4096 characters.
10842	Install *string `json:"install,omitempty"`
10843	// Remove - Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.
10844	Remove *string `json:"remove,omitempty"`
10845	// Update - Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters.
10846	Update *string `json:"update,omitempty"`
10847}
10848
10849// UserArtifactSource the source image from which the Image Version is going to be created.
10850type UserArtifactSource struct {
10851	// MediaLink - Required. The mediaLink of the artifact, must be a readable storage page blob.
10852	MediaLink *string `json:"mediaLink,omitempty"`
10853	// DefaultConfigurationLink - Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.
10854	DefaultConfigurationLink *string `json:"defaultConfigurationLink,omitempty"`
10855}
10856
10857// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate
10858// should reside on the VM.
10859type VaultCertificate struct {
10860	// 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>}
10861	CertificateURL *string `json:"certificateUrl,omitempty"`
10862	// 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.
10863	CertificateStore *string `json:"certificateStore,omitempty"`
10864}
10865
10866// VaultSecretGroup describes a set of certificates which are all in the same Key Vault.
10867type VaultSecretGroup struct {
10868	// SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
10869	SourceVault *SubResource `json:"sourceVault,omitempty"`
10870	// VaultCertificates - The list of key vault references in SourceVault which contain certificates.
10871	VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"`
10872}
10873
10874// VirtualHardDisk describes the uri of a disk.
10875type VirtualHardDisk struct {
10876	// URI - Specifies the virtual hard disk's uri.
10877	URI *string `json:"uri,omitempty"`
10878}
10879
10880// VirtualMachine describes a Virtual Machine.
10881type VirtualMachine struct {
10882	autorest.Response `json:"-"`
10883	// 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**.
10884	Plan                      *Plan `json:"plan,omitempty"`
10885	*VirtualMachineProperties `json:"properties,omitempty"`
10886	// Resources - READ-ONLY; The virtual machine child extension resources.
10887	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
10888	// Identity - The identity of the virtual machine, if configured.
10889	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
10890	// Zones - The virtual machine zones.
10891	Zones *[]string `json:"zones,omitempty"`
10892	// ID - READ-ONLY; Resource Id
10893	ID *string `json:"id,omitempty"`
10894	// Name - READ-ONLY; Resource name
10895	Name *string `json:"name,omitempty"`
10896	// Type - READ-ONLY; Resource type
10897	Type *string `json:"type,omitempty"`
10898	// Location - Resource location
10899	Location *string `json:"location,omitempty"`
10900	// Tags - Resource tags
10901	Tags map[string]*string `json:"tags"`
10902}
10903
10904// MarshalJSON is the custom marshaler for VirtualMachine.
10905func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
10906	objectMap := make(map[string]interface{})
10907	if VM.Plan != nil {
10908		objectMap["plan"] = VM.Plan
10909	}
10910	if VM.VirtualMachineProperties != nil {
10911		objectMap["properties"] = VM.VirtualMachineProperties
10912	}
10913	if VM.Identity != nil {
10914		objectMap["identity"] = VM.Identity
10915	}
10916	if VM.Zones != nil {
10917		objectMap["zones"] = VM.Zones
10918	}
10919	if VM.Location != nil {
10920		objectMap["location"] = VM.Location
10921	}
10922	if VM.Tags != nil {
10923		objectMap["tags"] = VM.Tags
10924	}
10925	return json.Marshal(objectMap)
10926}
10927
10928// UnmarshalJSON is the custom unmarshaler for VirtualMachine struct.
10929func (VM *VirtualMachine) UnmarshalJSON(body []byte) error {
10930	var m map[string]*json.RawMessage
10931	err := json.Unmarshal(body, &m)
10932	if err != nil {
10933		return err
10934	}
10935	for k, v := range m {
10936		switch k {
10937		case "plan":
10938			if v != nil {
10939				var plan Plan
10940				err = json.Unmarshal(*v, &plan)
10941				if err != nil {
10942					return err
10943				}
10944				VM.Plan = &plan
10945			}
10946		case "properties":
10947			if v != nil {
10948				var virtualMachineProperties VirtualMachineProperties
10949				err = json.Unmarshal(*v, &virtualMachineProperties)
10950				if err != nil {
10951					return err
10952				}
10953				VM.VirtualMachineProperties = &virtualMachineProperties
10954			}
10955		case "resources":
10956			if v != nil {
10957				var resources []VirtualMachineExtension
10958				err = json.Unmarshal(*v, &resources)
10959				if err != nil {
10960					return err
10961				}
10962				VM.Resources = &resources
10963			}
10964		case "identity":
10965			if v != nil {
10966				var identity VirtualMachineIdentity
10967				err = json.Unmarshal(*v, &identity)
10968				if err != nil {
10969					return err
10970				}
10971				VM.Identity = &identity
10972			}
10973		case "zones":
10974			if v != nil {
10975				var zones []string
10976				err = json.Unmarshal(*v, &zones)
10977				if err != nil {
10978					return err
10979				}
10980				VM.Zones = &zones
10981			}
10982		case "id":
10983			if v != nil {
10984				var ID string
10985				err = json.Unmarshal(*v, &ID)
10986				if err != nil {
10987					return err
10988				}
10989				VM.ID = &ID
10990			}
10991		case "name":
10992			if v != nil {
10993				var name string
10994				err = json.Unmarshal(*v, &name)
10995				if err != nil {
10996					return err
10997				}
10998				VM.Name = &name
10999			}
11000		case "type":
11001			if v != nil {
11002				var typeVar string
11003				err = json.Unmarshal(*v, &typeVar)
11004				if err != nil {
11005					return err
11006				}
11007				VM.Type = &typeVar
11008			}
11009		case "location":
11010			if v != nil {
11011				var location string
11012				err = json.Unmarshal(*v, &location)
11013				if err != nil {
11014					return err
11015				}
11016				VM.Location = &location
11017			}
11018		case "tags":
11019			if v != nil {
11020				var tags map[string]*string
11021				err = json.Unmarshal(*v, &tags)
11022				if err != nil {
11023					return err
11024				}
11025				VM.Tags = tags
11026			}
11027		}
11028	}
11029
11030	return nil
11031}
11032
11033// VirtualMachineAgentInstanceView the instance view of the VM Agent running on the virtual machine.
11034type VirtualMachineAgentInstanceView struct {
11035	// VMAgentVersion - The VM Agent full version.
11036	VMAgentVersion *string `json:"vmAgentVersion,omitempty"`
11037	// ExtensionHandlers - The virtual machine extension handler instance view.
11038	ExtensionHandlers *[]VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"`
11039	// Statuses - The resource status information.
11040	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
11041}
11042
11043// VirtualMachineAssessPatchesResult describes the properties of an AssessPatches result.
11044type VirtualMachineAssessPatchesResult struct {
11045	autorest.Response `json:"-"`
11046	// Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
11047	Status PatchOperationStatus `json:"status,omitempty"`
11048	// AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
11049	AssessmentActivityID *string `json:"assessmentActivityId,omitempty"`
11050	// RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.
11051	RebootPending *bool `json:"rebootPending,omitempty"`
11052	// CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
11053	CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"`
11054	// OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security.
11055	OtherPatchCount *int32 `json:"otherPatchCount,omitempty"`
11056	// StartDateTime - READ-ONLY; The UTC timestamp when the operation began.
11057	StartDateTime *date.Time `json:"startDateTime,omitempty"`
11058	// Patches - READ-ONLY; The list of patches that have been detected as available for installation.
11059	Patches *[]VirtualMachineSoftwarePatchProperties `json:"patches,omitempty"`
11060	// Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
11061	Error *APIError `json:"error,omitempty"`
11062}
11063
11064// VirtualMachineCaptureParameters capture Virtual Machine parameters.
11065type VirtualMachineCaptureParameters struct {
11066	// VhdPrefix - The captured virtual hard disk's name prefix.
11067	VhdPrefix *string `json:"vhdPrefix,omitempty"`
11068	// DestinationContainerName - The destination container name.
11069	DestinationContainerName *string `json:"destinationContainerName,omitempty"`
11070	// OverwriteVhds - Specifies whether to overwrite the destination virtual hard disk, in case of conflict.
11071	OverwriteVhds *bool `json:"overwriteVhds,omitempty"`
11072}
11073
11074// VirtualMachineCaptureResult output of virtual machine capture operation.
11075type VirtualMachineCaptureResult struct {
11076	autorest.Response `json:"-"`
11077	// Schema - READ-ONLY; the schema of the captured virtual machine
11078	Schema *string `json:"$schema,omitempty"`
11079	// ContentVersion - READ-ONLY; the version of the content
11080	ContentVersion *string `json:"contentVersion,omitempty"`
11081	// Parameters - READ-ONLY; parameters of the captured virtual machine
11082	Parameters interface{} `json:"parameters,omitempty"`
11083	// Resources - READ-ONLY; a list of resource items of the captured virtual machine
11084	Resources *[]interface{} `json:"resources,omitempty"`
11085	// ID - Resource Id
11086	ID *string `json:"id,omitempty"`
11087}
11088
11089// MarshalJSON is the custom marshaler for VirtualMachineCaptureResult.
11090func (vmcr VirtualMachineCaptureResult) MarshalJSON() ([]byte, error) {
11091	objectMap := make(map[string]interface{})
11092	if vmcr.ID != nil {
11093		objectMap["id"] = vmcr.ID
11094	}
11095	return json.Marshal(objectMap)
11096}
11097
11098// VirtualMachineExtension describes a Virtual Machine Extension.
11099type VirtualMachineExtension struct {
11100	autorest.Response                  `json:"-"`
11101	*VirtualMachineExtensionProperties `json:"properties,omitempty"`
11102	// ID - READ-ONLY; Resource Id
11103	ID *string `json:"id,omitempty"`
11104	// Name - READ-ONLY; Resource name
11105	Name *string `json:"name,omitempty"`
11106	// Type - READ-ONLY; Resource type
11107	Type *string `json:"type,omitempty"`
11108	// Location - Resource location
11109	Location *string `json:"location,omitempty"`
11110	// Tags - Resource tags
11111	Tags map[string]*string `json:"tags"`
11112}
11113
11114// MarshalJSON is the custom marshaler for VirtualMachineExtension.
11115func (vme VirtualMachineExtension) MarshalJSON() ([]byte, error) {
11116	objectMap := make(map[string]interface{})
11117	if vme.VirtualMachineExtensionProperties != nil {
11118		objectMap["properties"] = vme.VirtualMachineExtensionProperties
11119	}
11120	if vme.Location != nil {
11121		objectMap["location"] = vme.Location
11122	}
11123	if vme.Tags != nil {
11124		objectMap["tags"] = vme.Tags
11125	}
11126	return json.Marshal(objectMap)
11127}
11128
11129// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtension struct.
11130func (vme *VirtualMachineExtension) UnmarshalJSON(body []byte) error {
11131	var m map[string]*json.RawMessage
11132	err := json.Unmarshal(body, &m)
11133	if err != nil {
11134		return err
11135	}
11136	for k, v := range m {
11137		switch k {
11138		case "properties":
11139			if v != nil {
11140				var virtualMachineExtensionProperties VirtualMachineExtensionProperties
11141				err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
11142				if err != nil {
11143					return err
11144				}
11145				vme.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
11146			}
11147		case "id":
11148			if v != nil {
11149				var ID string
11150				err = json.Unmarshal(*v, &ID)
11151				if err != nil {
11152					return err
11153				}
11154				vme.ID = &ID
11155			}
11156		case "name":
11157			if v != nil {
11158				var name string
11159				err = json.Unmarshal(*v, &name)
11160				if err != nil {
11161					return err
11162				}
11163				vme.Name = &name
11164			}
11165		case "type":
11166			if v != nil {
11167				var typeVar string
11168				err = json.Unmarshal(*v, &typeVar)
11169				if err != nil {
11170					return err
11171				}
11172				vme.Type = &typeVar
11173			}
11174		case "location":
11175			if v != nil {
11176				var location string
11177				err = json.Unmarshal(*v, &location)
11178				if err != nil {
11179					return err
11180				}
11181				vme.Location = &location
11182			}
11183		case "tags":
11184			if v != nil {
11185				var tags map[string]*string
11186				err = json.Unmarshal(*v, &tags)
11187				if err != nil {
11188					return err
11189				}
11190				vme.Tags = tags
11191			}
11192		}
11193	}
11194
11195	return nil
11196}
11197
11198// VirtualMachineExtensionHandlerInstanceView the instance view of a virtual machine extension handler.
11199type VirtualMachineExtensionHandlerInstanceView struct {
11200	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
11201	Type *string `json:"type,omitempty"`
11202	// TypeHandlerVersion - Specifies the version of the script handler.
11203	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
11204	// Status - The extension handler status.
11205	Status *InstanceViewStatus `json:"status,omitempty"`
11206}
11207
11208// VirtualMachineExtensionImage describes a Virtual Machine Extension Image.
11209type VirtualMachineExtensionImage struct {
11210	autorest.Response                       `json:"-"`
11211	*VirtualMachineExtensionImageProperties `json:"properties,omitempty"`
11212	// ID - READ-ONLY; Resource Id
11213	ID *string `json:"id,omitempty"`
11214	// Name - READ-ONLY; Resource name
11215	Name *string `json:"name,omitempty"`
11216	// Type - READ-ONLY; Resource type
11217	Type *string `json:"type,omitempty"`
11218	// Location - Resource location
11219	Location *string `json:"location,omitempty"`
11220	// Tags - Resource tags
11221	Tags map[string]*string `json:"tags"`
11222}
11223
11224// MarshalJSON is the custom marshaler for VirtualMachineExtensionImage.
11225func (vmei VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) {
11226	objectMap := make(map[string]interface{})
11227	if vmei.VirtualMachineExtensionImageProperties != nil {
11228		objectMap["properties"] = vmei.VirtualMachineExtensionImageProperties
11229	}
11230	if vmei.Location != nil {
11231		objectMap["location"] = vmei.Location
11232	}
11233	if vmei.Tags != nil {
11234		objectMap["tags"] = vmei.Tags
11235	}
11236	return json.Marshal(objectMap)
11237}
11238
11239// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionImage struct.
11240func (vmei *VirtualMachineExtensionImage) UnmarshalJSON(body []byte) error {
11241	var m map[string]*json.RawMessage
11242	err := json.Unmarshal(body, &m)
11243	if err != nil {
11244		return err
11245	}
11246	for k, v := range m {
11247		switch k {
11248		case "properties":
11249			if v != nil {
11250				var virtualMachineExtensionImageProperties VirtualMachineExtensionImageProperties
11251				err = json.Unmarshal(*v, &virtualMachineExtensionImageProperties)
11252				if err != nil {
11253					return err
11254				}
11255				vmei.VirtualMachineExtensionImageProperties = &virtualMachineExtensionImageProperties
11256			}
11257		case "id":
11258			if v != nil {
11259				var ID string
11260				err = json.Unmarshal(*v, &ID)
11261				if err != nil {
11262					return err
11263				}
11264				vmei.ID = &ID
11265			}
11266		case "name":
11267			if v != nil {
11268				var name string
11269				err = json.Unmarshal(*v, &name)
11270				if err != nil {
11271					return err
11272				}
11273				vmei.Name = &name
11274			}
11275		case "type":
11276			if v != nil {
11277				var typeVar string
11278				err = json.Unmarshal(*v, &typeVar)
11279				if err != nil {
11280					return err
11281				}
11282				vmei.Type = &typeVar
11283			}
11284		case "location":
11285			if v != nil {
11286				var location string
11287				err = json.Unmarshal(*v, &location)
11288				if err != nil {
11289					return err
11290				}
11291				vmei.Location = &location
11292			}
11293		case "tags":
11294			if v != nil {
11295				var tags map[string]*string
11296				err = json.Unmarshal(*v, &tags)
11297				if err != nil {
11298					return err
11299				}
11300				vmei.Tags = tags
11301			}
11302		}
11303	}
11304
11305	return nil
11306}
11307
11308// VirtualMachineExtensionImageProperties describes the properties of a Virtual Machine Extension Image.
11309type VirtualMachineExtensionImageProperties struct {
11310	// OperatingSystem - The operating system this extension supports.
11311	OperatingSystem *string `json:"operatingSystem,omitempty"`
11312	// ComputeRole - The type of role (IaaS or PaaS) this extension supports.
11313	ComputeRole *string `json:"computeRole,omitempty"`
11314	// HandlerSchema - The schema defined by publisher, where extension consumers should provide settings in a matching schema.
11315	HandlerSchema *string `json:"handlerSchema,omitempty"`
11316	// 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.
11317	VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"`
11318	// SupportsMultipleExtensions - Whether the handler can support multiple extensions.
11319	SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"`
11320}
11321
11322// VirtualMachineExtensionInstanceView the instance view of a virtual machine extension.
11323type VirtualMachineExtensionInstanceView struct {
11324	// Name - The virtual machine extension name.
11325	Name *string `json:"name,omitempty"`
11326	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
11327	Type *string `json:"type,omitempty"`
11328	// TypeHandlerVersion - Specifies the version of the script handler.
11329	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
11330	// Substatuses - The resource status information.
11331	Substatuses *[]InstanceViewStatus `json:"substatuses,omitempty"`
11332	// Statuses - The resource status information.
11333	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
11334}
11335
11336// VirtualMachineExtensionProperties describes the properties of a Virtual Machine Extension.
11337type VirtualMachineExtensionProperties struct {
11338	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
11339	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
11340	// Publisher - The name of the extension handler publisher.
11341	Publisher *string `json:"publisher,omitempty"`
11342	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
11343	Type *string `json:"type,omitempty"`
11344	// TypeHandlerVersion - Specifies the version of the script handler.
11345	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
11346	// 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.
11347	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
11348	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
11349	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
11350	// Settings - Json formatted public settings for the extension.
11351	Settings interface{} `json:"settings,omitempty"`
11352	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
11353	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
11354	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
11355	ProvisioningState *string `json:"provisioningState,omitempty"`
11356	// InstanceView - The virtual machine extension instance view.
11357	InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`
11358}
11359
11360// MarshalJSON is the custom marshaler for VirtualMachineExtensionProperties.
11361func (vmep VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) {
11362	objectMap := make(map[string]interface{})
11363	if vmep.ForceUpdateTag != nil {
11364		objectMap["forceUpdateTag"] = vmep.ForceUpdateTag
11365	}
11366	if vmep.Publisher != nil {
11367		objectMap["publisher"] = vmep.Publisher
11368	}
11369	if vmep.Type != nil {
11370		objectMap["type"] = vmep.Type
11371	}
11372	if vmep.TypeHandlerVersion != nil {
11373		objectMap["typeHandlerVersion"] = vmep.TypeHandlerVersion
11374	}
11375	if vmep.AutoUpgradeMinorVersion != nil {
11376		objectMap["autoUpgradeMinorVersion"] = vmep.AutoUpgradeMinorVersion
11377	}
11378	if vmep.EnableAutomaticUpgrade != nil {
11379		objectMap["enableAutomaticUpgrade"] = vmep.EnableAutomaticUpgrade
11380	}
11381	if vmep.Settings != nil {
11382		objectMap["settings"] = vmep.Settings
11383	}
11384	if vmep.ProtectedSettings != nil {
11385		objectMap["protectedSettings"] = vmep.ProtectedSettings
11386	}
11387	if vmep.InstanceView != nil {
11388		objectMap["instanceView"] = vmep.InstanceView
11389	}
11390	return json.Marshal(objectMap)
11391}
11392
11393// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
11394// a long-running operation.
11395type VirtualMachineExtensionsCreateOrUpdateFuture struct {
11396	azure.FutureAPI
11397	// Result returns the result of the asynchronous operation.
11398	// If the operation has not completed it will return an error.
11399	Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
11400}
11401
11402// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
11403// long-running operation.
11404type VirtualMachineExtensionsDeleteFuture struct {
11405	azure.FutureAPI
11406	// Result returns the result of the asynchronous operation.
11407	// If the operation has not completed it will return an error.
11408	Result func(VirtualMachineExtensionsClient) (autorest.Response, error)
11409}
11410
11411// VirtualMachineExtensionsListResult the List Extension operation response
11412type VirtualMachineExtensionsListResult struct {
11413	autorest.Response `json:"-"`
11414	// Value - The list of extensions
11415	Value *[]VirtualMachineExtension `json:"value,omitempty"`
11416}
11417
11418// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
11419// long-running operation.
11420type VirtualMachineExtensionsUpdateFuture struct {
11421	azure.FutureAPI
11422	// Result returns the result of the asynchronous operation.
11423	// If the operation has not completed it will return an error.
11424	Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
11425}
11426
11427// VirtualMachineExtensionUpdate describes a Virtual Machine Extension.
11428type VirtualMachineExtensionUpdate struct {
11429	*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
11430	// Tags - Resource tags
11431	Tags map[string]*string `json:"tags"`
11432}
11433
11434// MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate.
11435func (vmeu VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) {
11436	objectMap := make(map[string]interface{})
11437	if vmeu.VirtualMachineExtensionUpdateProperties != nil {
11438		objectMap["properties"] = vmeu.VirtualMachineExtensionUpdateProperties
11439	}
11440	if vmeu.Tags != nil {
11441		objectMap["tags"] = vmeu.Tags
11442	}
11443	return json.Marshal(objectMap)
11444}
11445
11446// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionUpdate struct.
11447func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error {
11448	var m map[string]*json.RawMessage
11449	err := json.Unmarshal(body, &m)
11450	if err != nil {
11451		return err
11452	}
11453	for k, v := range m {
11454		switch k {
11455		case "properties":
11456			if v != nil {
11457				var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
11458				err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
11459				if err != nil {
11460					return err
11461				}
11462				vmeu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
11463			}
11464		case "tags":
11465			if v != nil {
11466				var tags map[string]*string
11467				err = json.Unmarshal(*v, &tags)
11468				if err != nil {
11469					return err
11470				}
11471				vmeu.Tags = tags
11472			}
11473		}
11474	}
11475
11476	return nil
11477}
11478
11479// VirtualMachineExtensionUpdateProperties describes the properties of a Virtual Machine Extension.
11480type VirtualMachineExtensionUpdateProperties struct {
11481	// ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
11482	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
11483	// Publisher - The name of the extension handler publisher.
11484	Publisher *string `json:"publisher,omitempty"`
11485	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
11486	Type *string `json:"type,omitempty"`
11487	// TypeHandlerVersion - Specifies the version of the script handler.
11488	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
11489	// 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.
11490	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
11491	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
11492	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
11493	// Settings - Json formatted public settings for the extension.
11494	Settings interface{} `json:"settings,omitempty"`
11495	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
11496	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
11497}
11498
11499// VirtualMachineHealthStatus the health status of the VM.
11500type VirtualMachineHealthStatus struct {
11501	// Status - READ-ONLY; The health status information for the VM.
11502	Status *InstanceViewStatus `json:"status,omitempty"`
11503}
11504
11505// VirtualMachineIdentity identity for the virtual machine.
11506type VirtualMachineIdentity struct {
11507	// PrincipalID - READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity.
11508	PrincipalID *string `json:"principalId,omitempty"`
11509	// TenantID - READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity.
11510	TenantID *string `json:"tenantId,omitempty"`
11511	// 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'
11512	Type ResourceIdentityType `json:"type,omitempty"`
11513	// UserAssignedIdentities - The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
11514	UserAssignedIdentities map[string]*VirtualMachineIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
11515}
11516
11517// MarshalJSON is the custom marshaler for VirtualMachineIdentity.
11518func (vmi VirtualMachineIdentity) MarshalJSON() ([]byte, error) {
11519	objectMap := make(map[string]interface{})
11520	if vmi.Type != "" {
11521		objectMap["type"] = vmi.Type
11522	}
11523	if vmi.UserAssignedIdentities != nil {
11524		objectMap["userAssignedIdentities"] = vmi.UserAssignedIdentities
11525	}
11526	return json.Marshal(objectMap)
11527}
11528
11529// VirtualMachineIdentityUserAssignedIdentitiesValue ...
11530type VirtualMachineIdentityUserAssignedIdentitiesValue struct {
11531	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
11532	PrincipalID *string `json:"principalId,omitempty"`
11533	// ClientID - READ-ONLY; The client id of user assigned identity.
11534	ClientID *string `json:"clientId,omitempty"`
11535}
11536
11537// VirtualMachineImage describes a Virtual Machine Image.
11538type VirtualMachineImage struct {
11539	autorest.Response              `json:"-"`
11540	*VirtualMachineImageProperties `json:"properties,omitempty"`
11541	// Name - The name of the resource.
11542	Name *string `json:"name,omitempty"`
11543	// Location - The supported Azure location of the resource.
11544	Location *string `json:"location,omitempty"`
11545	// 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).
11546	Tags map[string]*string `json:"tags"`
11547	// ID - Resource Id
11548	ID *string `json:"id,omitempty"`
11549}
11550
11551// MarshalJSON is the custom marshaler for VirtualMachineImage.
11552func (vmi VirtualMachineImage) MarshalJSON() ([]byte, error) {
11553	objectMap := make(map[string]interface{})
11554	if vmi.VirtualMachineImageProperties != nil {
11555		objectMap["properties"] = vmi.VirtualMachineImageProperties
11556	}
11557	if vmi.Name != nil {
11558		objectMap["name"] = vmi.Name
11559	}
11560	if vmi.Location != nil {
11561		objectMap["location"] = vmi.Location
11562	}
11563	if vmi.Tags != nil {
11564		objectMap["tags"] = vmi.Tags
11565	}
11566	if vmi.ID != nil {
11567		objectMap["id"] = vmi.ID
11568	}
11569	return json.Marshal(objectMap)
11570}
11571
11572// UnmarshalJSON is the custom unmarshaler for VirtualMachineImage struct.
11573func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error {
11574	var m map[string]*json.RawMessage
11575	err := json.Unmarshal(body, &m)
11576	if err != nil {
11577		return err
11578	}
11579	for k, v := range m {
11580		switch k {
11581		case "properties":
11582			if v != nil {
11583				var virtualMachineImageProperties VirtualMachineImageProperties
11584				err = json.Unmarshal(*v, &virtualMachineImageProperties)
11585				if err != nil {
11586					return err
11587				}
11588				vmi.VirtualMachineImageProperties = &virtualMachineImageProperties
11589			}
11590		case "name":
11591			if v != nil {
11592				var name string
11593				err = json.Unmarshal(*v, &name)
11594				if err != nil {
11595					return err
11596				}
11597				vmi.Name = &name
11598			}
11599		case "location":
11600			if v != nil {
11601				var location string
11602				err = json.Unmarshal(*v, &location)
11603				if err != nil {
11604					return err
11605				}
11606				vmi.Location = &location
11607			}
11608		case "tags":
11609			if v != nil {
11610				var tags map[string]*string
11611				err = json.Unmarshal(*v, &tags)
11612				if err != nil {
11613					return err
11614				}
11615				vmi.Tags = tags
11616			}
11617		case "id":
11618			if v != nil {
11619				var ID string
11620				err = json.Unmarshal(*v, &ID)
11621				if err != nil {
11622					return err
11623				}
11624				vmi.ID = &ID
11625			}
11626		}
11627	}
11628
11629	return nil
11630}
11631
11632// VirtualMachineImageProperties describes the properties of a Virtual Machine Image.
11633type VirtualMachineImageProperties struct {
11634	Plan                         *PurchasePlan                 `json:"plan,omitempty"`
11635	OsDiskImage                  *OSDiskImage                  `json:"osDiskImage,omitempty"`
11636	DataDiskImages               *[]DataDiskImage              `json:"dataDiskImages,omitempty"`
11637	AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"`
11638	// HyperVGeneration - Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
11639	HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
11640	// Disallowed - Specifies disallowed configuration for the VirtualMachine created from the image
11641	Disallowed *DisallowedConfiguration `json:"disallowed,omitempty"`
11642}
11643
11644// VirtualMachineImageResource virtual machine image resource information.
11645type VirtualMachineImageResource struct {
11646	// Name - The name of the resource.
11647	Name *string `json:"name,omitempty"`
11648	// Location - The supported Azure location of the resource.
11649	Location *string `json:"location,omitempty"`
11650	// 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).
11651	Tags map[string]*string `json:"tags"`
11652	// ID - Resource Id
11653	ID *string `json:"id,omitempty"`
11654}
11655
11656// MarshalJSON is the custom marshaler for VirtualMachineImageResource.
11657func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) {
11658	objectMap := make(map[string]interface{})
11659	if vmir.Name != nil {
11660		objectMap["name"] = vmir.Name
11661	}
11662	if vmir.Location != nil {
11663		objectMap["location"] = vmir.Location
11664	}
11665	if vmir.Tags != nil {
11666		objectMap["tags"] = vmir.Tags
11667	}
11668	if vmir.ID != nil {
11669		objectMap["id"] = vmir.ID
11670	}
11671	return json.Marshal(objectMap)
11672}
11673
11674// VirtualMachineInstanceView the instance view of a virtual machine.
11675type VirtualMachineInstanceView struct {
11676	autorest.Response `json:"-"`
11677	// PlatformUpdateDomain - Specifies the update domain of the virtual machine.
11678	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
11679	// PlatformFaultDomain - Specifies the fault domain of the virtual machine.
11680	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
11681	// ComputerName - The computer name assigned to the virtual machine.
11682	ComputerName *string `json:"computerName,omitempty"`
11683	// OsName - The Operating System running on the virtual machine.
11684	OsName *string `json:"osName,omitempty"`
11685	// OsVersion - The version of Operating System running on the virtual machine.
11686	OsVersion *string `json:"osVersion,omitempty"`
11687	// HyperVGeneration - Specifies the HyperVGeneration Type associated with a resource. Possible values include: 'HyperVGenerationTypeV1', 'HyperVGenerationTypeV2'
11688	HyperVGeneration HyperVGenerationType `json:"hyperVGeneration,omitempty"`
11689	// RdpThumbPrint - The Remote desktop certificate thumbprint.
11690	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
11691	// VMAgent - The VM Agent running on the virtual machine.
11692	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
11693	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
11694	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
11695	// Disks - The virtual machine disk information.
11696	Disks *[]DiskInstanceView `json:"disks,omitempty"`
11697	// Extensions - The extensions information.
11698	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
11699	// VMHealth - READ-ONLY; The health status for the VM.
11700	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
11701	// 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.
11702	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
11703	// AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. <br><br>Minimum api-version: 2020-06-01.
11704	AssignedHost *string `json:"assignedHost,omitempty"`
11705	// Statuses - The resource status information.
11706	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
11707	// PatchStatus - The status of virtual machine patch operations.
11708	PatchStatus *VirtualMachinePatchStatus `json:"patchStatus,omitempty"`
11709}
11710
11711// MarshalJSON is the custom marshaler for VirtualMachineInstanceView.
11712func (vmiv VirtualMachineInstanceView) MarshalJSON() ([]byte, error) {
11713	objectMap := make(map[string]interface{})
11714	if vmiv.PlatformUpdateDomain != nil {
11715		objectMap["platformUpdateDomain"] = vmiv.PlatformUpdateDomain
11716	}
11717	if vmiv.PlatformFaultDomain != nil {
11718		objectMap["platformFaultDomain"] = vmiv.PlatformFaultDomain
11719	}
11720	if vmiv.ComputerName != nil {
11721		objectMap["computerName"] = vmiv.ComputerName
11722	}
11723	if vmiv.OsName != nil {
11724		objectMap["osName"] = vmiv.OsName
11725	}
11726	if vmiv.OsVersion != nil {
11727		objectMap["osVersion"] = vmiv.OsVersion
11728	}
11729	if vmiv.HyperVGeneration != "" {
11730		objectMap["hyperVGeneration"] = vmiv.HyperVGeneration
11731	}
11732	if vmiv.RdpThumbPrint != nil {
11733		objectMap["rdpThumbPrint"] = vmiv.RdpThumbPrint
11734	}
11735	if vmiv.VMAgent != nil {
11736		objectMap["vmAgent"] = vmiv.VMAgent
11737	}
11738	if vmiv.MaintenanceRedeployStatus != nil {
11739		objectMap["maintenanceRedeployStatus"] = vmiv.MaintenanceRedeployStatus
11740	}
11741	if vmiv.Disks != nil {
11742		objectMap["disks"] = vmiv.Disks
11743	}
11744	if vmiv.Extensions != nil {
11745		objectMap["extensions"] = vmiv.Extensions
11746	}
11747	if vmiv.BootDiagnostics != nil {
11748		objectMap["bootDiagnostics"] = vmiv.BootDiagnostics
11749	}
11750	if vmiv.Statuses != nil {
11751		objectMap["statuses"] = vmiv.Statuses
11752	}
11753	if vmiv.PatchStatus != nil {
11754		objectMap["patchStatus"] = vmiv.PatchStatus
11755	}
11756	return json.Marshal(objectMap)
11757}
11758
11759// VirtualMachineListResult the List Virtual Machine operation response.
11760type VirtualMachineListResult struct {
11761	autorest.Response `json:"-"`
11762	// Value - The list of virtual machines.
11763	Value *[]VirtualMachine `json:"value,omitempty"`
11764	// NextLink - The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines.
11765	NextLink *string `json:"nextLink,omitempty"`
11766}
11767
11768// VirtualMachineListResultIterator provides access to a complete listing of VirtualMachine values.
11769type VirtualMachineListResultIterator struct {
11770	i    int
11771	page VirtualMachineListResultPage
11772}
11773
11774// NextWithContext advances to the next value.  If there was an error making
11775// the request the iterator does not advance and the error is returned.
11776func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) {
11777	if tracing.IsEnabled() {
11778		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.NextWithContext")
11779		defer func() {
11780			sc := -1
11781			if iter.Response().Response.Response != nil {
11782				sc = iter.Response().Response.Response.StatusCode
11783			}
11784			tracing.EndSpan(ctx, sc, err)
11785		}()
11786	}
11787	iter.i++
11788	if iter.i < len(iter.page.Values()) {
11789		return nil
11790	}
11791	err = iter.page.NextWithContext(ctx)
11792	if err != nil {
11793		iter.i--
11794		return err
11795	}
11796	iter.i = 0
11797	return nil
11798}
11799
11800// Next advances to the next value.  If there was an error making
11801// the request the iterator does not advance and the error is returned.
11802// Deprecated: Use NextWithContext() instead.
11803func (iter *VirtualMachineListResultIterator) Next() error {
11804	return iter.NextWithContext(context.Background())
11805}
11806
11807// NotDone returns true if the enumeration should be started or is not yet complete.
11808func (iter VirtualMachineListResultIterator) NotDone() bool {
11809	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11810}
11811
11812// Response returns the raw server response from the last page request.
11813func (iter VirtualMachineListResultIterator) Response() VirtualMachineListResult {
11814	return iter.page.Response()
11815}
11816
11817// Value returns the current value or a zero-initialized value if the
11818// iterator has advanced beyond the end of the collection.
11819func (iter VirtualMachineListResultIterator) Value() VirtualMachine {
11820	if !iter.page.NotDone() {
11821		return VirtualMachine{}
11822	}
11823	return iter.page.Values()[iter.i]
11824}
11825
11826// Creates a new instance of the VirtualMachineListResultIterator type.
11827func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator {
11828	return VirtualMachineListResultIterator{page: page}
11829}
11830
11831// IsEmpty returns true if the ListResult contains no values.
11832func (vmlr VirtualMachineListResult) IsEmpty() bool {
11833	return vmlr.Value == nil || len(*vmlr.Value) == 0
11834}
11835
11836// hasNextLink returns true if the NextLink is not empty.
11837func (vmlr VirtualMachineListResult) hasNextLink() bool {
11838	return vmlr.NextLink != nil && len(*vmlr.NextLink) != 0
11839}
11840
11841// virtualMachineListResultPreparer prepares a request to retrieve the next set of results.
11842// It returns nil if no more results exist.
11843func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) {
11844	if !vmlr.hasNextLink() {
11845		return nil, nil
11846	}
11847	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11848		autorest.AsJSON(),
11849		autorest.AsGet(),
11850		autorest.WithBaseURL(to.String(vmlr.NextLink)))
11851}
11852
11853// VirtualMachineListResultPage contains a page of VirtualMachine values.
11854type VirtualMachineListResultPage struct {
11855	fn   func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)
11856	vmlr VirtualMachineListResult
11857}
11858
11859// NextWithContext advances to the next page of values.  If there was an error making
11860// the request the page does not advance and the error is returned.
11861func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) {
11862	if tracing.IsEnabled() {
11863		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext")
11864		defer func() {
11865			sc := -1
11866			if page.Response().Response.Response != nil {
11867				sc = page.Response().Response.Response.StatusCode
11868			}
11869			tracing.EndSpan(ctx, sc, err)
11870		}()
11871	}
11872	for {
11873		next, err := page.fn(ctx, page.vmlr)
11874		if err != nil {
11875			return err
11876		}
11877		page.vmlr = next
11878		if !next.hasNextLink() || !next.IsEmpty() {
11879			break
11880		}
11881	}
11882	return nil
11883}
11884
11885// Next advances to the next page of values.  If there was an error making
11886// the request the page does not advance and the error is returned.
11887// Deprecated: Use NextWithContext() instead.
11888func (page *VirtualMachineListResultPage) Next() error {
11889	return page.NextWithContext(context.Background())
11890}
11891
11892// NotDone returns true if the page enumeration should be started or is not yet complete.
11893func (page VirtualMachineListResultPage) NotDone() bool {
11894	return !page.vmlr.IsEmpty()
11895}
11896
11897// Response returns the raw server response from the last page request.
11898func (page VirtualMachineListResultPage) Response() VirtualMachineListResult {
11899	return page.vmlr
11900}
11901
11902// Values returns the slice of values for the current page or nil if there are no values.
11903func (page VirtualMachineListResultPage) Values() []VirtualMachine {
11904	if page.vmlr.IsEmpty() {
11905		return nil
11906	}
11907	return *page.vmlr.Value
11908}
11909
11910// Creates a new instance of the VirtualMachineListResultPage type.
11911func NewVirtualMachineListResultPage(cur VirtualMachineListResult, getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
11912	return VirtualMachineListResultPage{
11913		fn:   getNextPage,
11914		vmlr: cur,
11915	}
11916}
11917
11918// VirtualMachinePatchStatus the status of virtual machine patch operations.
11919type VirtualMachinePatchStatus struct {
11920	// AvailablePatchSummary - The available patch summary of the latest assessment operation for the virtual machine.
11921	AvailablePatchSummary *AvailablePatchSummary `json:"availablePatchSummary,omitempty"`
11922	// LastPatchInstallationSummary - The installation summary of the latest installation operation for the virtual machine.
11923	LastPatchInstallationSummary *LastPatchInstallationSummary `json:"lastPatchInstallationSummary,omitempty"`
11924}
11925
11926// VirtualMachineProperties describes the properties of a Virtual Machine.
11927type VirtualMachineProperties struct {
11928	// HardwareProfile - Specifies the hardware settings for the virtual machine.
11929	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
11930	// StorageProfile - Specifies the storage settings for the virtual machine disks.
11931	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
11932	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine.
11933	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
11934	// OsProfile - Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
11935	OsProfile *OSProfile `json:"osProfile,omitempty"`
11936	// NetworkProfile - Specifies the network interfaces of the virtual machine.
11937	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
11938	// SecurityProfile - Specifies the Security related profile settings for the virtual machine.
11939	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
11940	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
11941	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
11942	// AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
11943	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
11944	// VirtualMachineScaleSet - Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01
11945	VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"`
11946	// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.
11947	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
11948	// Priority - Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot'
11949	Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
11950	// EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
11951	EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
11952	// BillingProfile - Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
11953	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
11954	// Host - Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
11955	Host *SubResource `json:"host,omitempty"`
11956	// HostGroup - Specifies information about the dedicated host group that the virtual machine resides in. <br><br>Minimum api-version: 2020-06-01. <br><br>NOTE: User cannot specify both host and hostGroup properties.
11957	HostGroup *SubResource `json:"hostGroup,omitempty"`
11958	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
11959	ProvisioningState *string `json:"provisioningState,omitempty"`
11960	// InstanceView - READ-ONLY; The virtual machine instance view.
11961	InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"`
11962	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15
11963	LicenseType *string `json:"licenseType,omitempty"`
11964	// 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.
11965	VMID *string `json:"vmId,omitempty"`
11966	// ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01
11967	ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`
11968}
11969
11970// MarshalJSON is the custom marshaler for VirtualMachineProperties.
11971func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) {
11972	objectMap := make(map[string]interface{})
11973	if vmp.HardwareProfile != nil {
11974		objectMap["hardwareProfile"] = vmp.HardwareProfile
11975	}
11976	if vmp.StorageProfile != nil {
11977		objectMap["storageProfile"] = vmp.StorageProfile
11978	}
11979	if vmp.AdditionalCapabilities != nil {
11980		objectMap["additionalCapabilities"] = vmp.AdditionalCapabilities
11981	}
11982	if vmp.OsProfile != nil {
11983		objectMap["osProfile"] = vmp.OsProfile
11984	}
11985	if vmp.NetworkProfile != nil {
11986		objectMap["networkProfile"] = vmp.NetworkProfile
11987	}
11988	if vmp.SecurityProfile != nil {
11989		objectMap["securityProfile"] = vmp.SecurityProfile
11990	}
11991	if vmp.DiagnosticsProfile != nil {
11992		objectMap["diagnosticsProfile"] = vmp.DiagnosticsProfile
11993	}
11994	if vmp.AvailabilitySet != nil {
11995		objectMap["availabilitySet"] = vmp.AvailabilitySet
11996	}
11997	if vmp.VirtualMachineScaleSet != nil {
11998		objectMap["virtualMachineScaleSet"] = vmp.VirtualMachineScaleSet
11999	}
12000	if vmp.ProximityPlacementGroup != nil {
12001		objectMap["proximityPlacementGroup"] = vmp.ProximityPlacementGroup
12002	}
12003	if vmp.Priority != "" {
12004		objectMap["priority"] = vmp.Priority
12005	}
12006	if vmp.EvictionPolicy != "" {
12007		objectMap["evictionPolicy"] = vmp.EvictionPolicy
12008	}
12009	if vmp.BillingProfile != nil {
12010		objectMap["billingProfile"] = vmp.BillingProfile
12011	}
12012	if vmp.Host != nil {
12013		objectMap["host"] = vmp.Host
12014	}
12015	if vmp.HostGroup != nil {
12016		objectMap["hostGroup"] = vmp.HostGroup
12017	}
12018	if vmp.LicenseType != nil {
12019		objectMap["licenseType"] = vmp.LicenseType
12020	}
12021	if vmp.ExtensionsTimeBudget != nil {
12022		objectMap["extensionsTimeBudget"] = vmp.ExtensionsTimeBudget
12023	}
12024	return json.Marshal(objectMap)
12025}
12026
12027// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk
12028// will always be reimaged
12029type VirtualMachineReimageParameters struct {
12030	// TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
12031	TempDisk *bool `json:"tempDisk,omitempty"`
12032}
12033
12034// VirtualMachineRunCommand describes a Virtual Machine run command.
12035type VirtualMachineRunCommand struct {
12036	autorest.Response                   `json:"-"`
12037	*VirtualMachineRunCommandProperties `json:"properties,omitempty"`
12038	// ID - READ-ONLY; Resource Id
12039	ID *string `json:"id,omitempty"`
12040	// Name - READ-ONLY; Resource name
12041	Name *string `json:"name,omitempty"`
12042	// Type - READ-ONLY; Resource type
12043	Type *string `json:"type,omitempty"`
12044	// Location - Resource location
12045	Location *string `json:"location,omitempty"`
12046	// Tags - Resource tags
12047	Tags map[string]*string `json:"tags"`
12048}
12049
12050// MarshalJSON is the custom marshaler for VirtualMachineRunCommand.
12051func (vmrc VirtualMachineRunCommand) MarshalJSON() ([]byte, error) {
12052	objectMap := make(map[string]interface{})
12053	if vmrc.VirtualMachineRunCommandProperties != nil {
12054		objectMap["properties"] = vmrc.VirtualMachineRunCommandProperties
12055	}
12056	if vmrc.Location != nil {
12057		objectMap["location"] = vmrc.Location
12058	}
12059	if vmrc.Tags != nil {
12060		objectMap["tags"] = vmrc.Tags
12061	}
12062	return json.Marshal(objectMap)
12063}
12064
12065// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommand struct.
12066func (vmrc *VirtualMachineRunCommand) UnmarshalJSON(body []byte) error {
12067	var m map[string]*json.RawMessage
12068	err := json.Unmarshal(body, &m)
12069	if err != nil {
12070		return err
12071	}
12072	for k, v := range m {
12073		switch k {
12074		case "properties":
12075			if v != nil {
12076				var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties
12077				err = json.Unmarshal(*v, &virtualMachineRunCommandProperties)
12078				if err != nil {
12079					return err
12080				}
12081				vmrc.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties
12082			}
12083		case "id":
12084			if v != nil {
12085				var ID string
12086				err = json.Unmarshal(*v, &ID)
12087				if err != nil {
12088					return err
12089				}
12090				vmrc.ID = &ID
12091			}
12092		case "name":
12093			if v != nil {
12094				var name string
12095				err = json.Unmarshal(*v, &name)
12096				if err != nil {
12097					return err
12098				}
12099				vmrc.Name = &name
12100			}
12101		case "type":
12102			if v != nil {
12103				var typeVar string
12104				err = json.Unmarshal(*v, &typeVar)
12105				if err != nil {
12106					return err
12107				}
12108				vmrc.Type = &typeVar
12109			}
12110		case "location":
12111			if v != nil {
12112				var location string
12113				err = json.Unmarshal(*v, &location)
12114				if err != nil {
12115					return err
12116				}
12117				vmrc.Location = &location
12118			}
12119		case "tags":
12120			if v != nil {
12121				var tags map[string]*string
12122				err = json.Unmarshal(*v, &tags)
12123				if err != nil {
12124					return err
12125				}
12126				vmrc.Tags = tags
12127			}
12128		}
12129	}
12130
12131	return nil
12132}
12133
12134// VirtualMachineRunCommandInstanceView the instance view of a virtual machine run command.
12135type VirtualMachineRunCommandInstanceView struct {
12136	// ExecutionState - Script execution status. Possible values include: 'ExecutionStateUnknown', 'ExecutionStatePending', 'ExecutionStateRunning', 'ExecutionStateFailed', 'ExecutionStateSucceeded', 'ExecutionStateTimedOut', 'ExecutionStateCanceled'
12137	ExecutionState ExecutionState `json:"executionState,omitempty"`
12138	// ExecutionMessage - Communicate script configuration errors or execution messages.
12139	ExecutionMessage *string `json:"executionMessage,omitempty"`
12140	// ExitCode - Exit code returned from script execution.
12141	ExitCode *int32 `json:"exitCode,omitempty"`
12142	// Output - Script output stream.
12143	Output *string `json:"output,omitempty"`
12144	// Error - Script error stream.
12145	Error *string `json:"error,omitempty"`
12146	// StartTime - Script start time.
12147	StartTime *date.Time `json:"startTime,omitempty"`
12148	// EndTime - Script end time.
12149	EndTime *date.Time `json:"endTime,omitempty"`
12150	// Statuses - The resource status information.
12151	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
12152}
12153
12154// VirtualMachineRunCommandProperties describes the properties of a Virtual Machine run command.
12155type VirtualMachineRunCommandProperties struct {
12156	// Source - The source of the run command script.
12157	Source *VirtualMachineRunCommandScriptSource `json:"source,omitempty"`
12158	// Parameters - The parameters used by the script.
12159	Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
12160	// ProtectedParameters - The parameters used by the script.
12161	ProtectedParameters *[]RunCommandInputParameter `json:"protectedParameters,omitempty"`
12162	// AsyncExecution - Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
12163	AsyncExecution *bool `json:"asyncExecution,omitempty"`
12164	// RunAsUser - Specifies the user account on the VM when executing the run command.
12165	RunAsUser *string `json:"runAsUser,omitempty"`
12166	// RunAsPassword - Specifies the user account password on the VM when executing the run command.
12167	RunAsPassword *string `json:"runAsPassword,omitempty"`
12168	// TimeoutInSeconds - The timeout in seconds to execute the run command.
12169	TimeoutInSeconds *int32 `json:"timeoutInSeconds,omitempty"`
12170	// OutputBlobURI - Specifies the Azure storage blob where script output stream will be uploaded.
12171	OutputBlobURI *string `json:"outputBlobUri,omitempty"`
12172	// ErrorBlobURI - Specifies the Azure storage blob where script error stream will be uploaded.
12173	ErrorBlobURI *string `json:"errorBlobUri,omitempty"`
12174	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
12175	ProvisioningState *string `json:"provisioningState,omitempty"`
12176	// InstanceView - READ-ONLY; The virtual machine run command instance view.
12177	InstanceView *VirtualMachineRunCommandInstanceView `json:"instanceView,omitempty"`
12178}
12179
12180// MarshalJSON is the custom marshaler for VirtualMachineRunCommandProperties.
12181func (vmrcp VirtualMachineRunCommandProperties) MarshalJSON() ([]byte, error) {
12182	objectMap := make(map[string]interface{})
12183	if vmrcp.Source != nil {
12184		objectMap["source"] = vmrcp.Source
12185	}
12186	if vmrcp.Parameters != nil {
12187		objectMap["parameters"] = vmrcp.Parameters
12188	}
12189	if vmrcp.ProtectedParameters != nil {
12190		objectMap["protectedParameters"] = vmrcp.ProtectedParameters
12191	}
12192	if vmrcp.AsyncExecution != nil {
12193		objectMap["asyncExecution"] = vmrcp.AsyncExecution
12194	}
12195	if vmrcp.RunAsUser != nil {
12196		objectMap["runAsUser"] = vmrcp.RunAsUser
12197	}
12198	if vmrcp.RunAsPassword != nil {
12199		objectMap["runAsPassword"] = vmrcp.RunAsPassword
12200	}
12201	if vmrcp.TimeoutInSeconds != nil {
12202		objectMap["timeoutInSeconds"] = vmrcp.TimeoutInSeconds
12203	}
12204	if vmrcp.OutputBlobURI != nil {
12205		objectMap["outputBlobUri"] = vmrcp.OutputBlobURI
12206	}
12207	if vmrcp.ErrorBlobURI != nil {
12208		objectMap["errorBlobUri"] = vmrcp.ErrorBlobURI
12209	}
12210	return json.Marshal(objectMap)
12211}
12212
12213// VirtualMachineRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
12214// of a long-running operation.
12215type VirtualMachineRunCommandsCreateOrUpdateFuture struct {
12216	azure.FutureAPI
12217	// Result returns the result of the asynchronous operation.
12218	// If the operation has not completed it will return an error.
12219	Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error)
12220}
12221
12222// VirtualMachineRunCommandScriptSource describes the script sources for run command.
12223type VirtualMachineRunCommandScriptSource struct {
12224	// Script - Specifies the script content to be executed on the VM.
12225	Script *string `json:"script,omitempty"`
12226	// ScriptURI - Specifies the script download location.
12227	ScriptURI *string `json:"scriptUri,omitempty"`
12228	// CommandID - Specifies a commandId of predefined built-in script.
12229	CommandID *string `json:"commandId,omitempty"`
12230}
12231
12232// VirtualMachineRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results of a
12233// long-running operation.
12234type VirtualMachineRunCommandsDeleteFuture struct {
12235	azure.FutureAPI
12236	// Result returns the result of the asynchronous operation.
12237	// If the operation has not completed it will return an error.
12238	Result func(VirtualMachineRunCommandsClient) (autorest.Response, error)
12239}
12240
12241// VirtualMachineRunCommandsListResult the List run command operation response
12242type VirtualMachineRunCommandsListResult struct {
12243	autorest.Response `json:"-"`
12244	// Value - The list of run commands
12245	Value *[]VirtualMachineRunCommand `json:"value,omitempty"`
12246	// NextLink - The uri to fetch the next page of run commands.
12247	NextLink *string `json:"nextLink,omitempty"`
12248}
12249
12250// VirtualMachineRunCommandsListResultIterator provides access to a complete listing of
12251// VirtualMachineRunCommand values.
12252type VirtualMachineRunCommandsListResultIterator struct {
12253	i    int
12254	page VirtualMachineRunCommandsListResultPage
12255}
12256
12257// NextWithContext advances to the next value.  If there was an error making
12258// the request the iterator does not advance and the error is returned.
12259func (iter *VirtualMachineRunCommandsListResultIterator) NextWithContext(ctx context.Context) (err error) {
12260	if tracing.IsEnabled() {
12261		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultIterator.NextWithContext")
12262		defer func() {
12263			sc := -1
12264			if iter.Response().Response.Response != nil {
12265				sc = iter.Response().Response.Response.StatusCode
12266			}
12267			tracing.EndSpan(ctx, sc, err)
12268		}()
12269	}
12270	iter.i++
12271	if iter.i < len(iter.page.Values()) {
12272		return nil
12273	}
12274	err = iter.page.NextWithContext(ctx)
12275	if err != nil {
12276		iter.i--
12277		return err
12278	}
12279	iter.i = 0
12280	return nil
12281}
12282
12283// Next advances to the next value.  If there was an error making
12284// the request the iterator does not advance and the error is returned.
12285// Deprecated: Use NextWithContext() instead.
12286func (iter *VirtualMachineRunCommandsListResultIterator) Next() error {
12287	return iter.NextWithContext(context.Background())
12288}
12289
12290// NotDone returns true if the enumeration should be started or is not yet complete.
12291func (iter VirtualMachineRunCommandsListResultIterator) NotDone() bool {
12292	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12293}
12294
12295// Response returns the raw server response from the last page request.
12296func (iter VirtualMachineRunCommandsListResultIterator) Response() VirtualMachineRunCommandsListResult {
12297	return iter.page.Response()
12298}
12299
12300// Value returns the current value or a zero-initialized value if the
12301// iterator has advanced beyond the end of the collection.
12302func (iter VirtualMachineRunCommandsListResultIterator) Value() VirtualMachineRunCommand {
12303	if !iter.page.NotDone() {
12304		return VirtualMachineRunCommand{}
12305	}
12306	return iter.page.Values()[iter.i]
12307}
12308
12309// Creates a new instance of the VirtualMachineRunCommandsListResultIterator type.
12310func NewVirtualMachineRunCommandsListResultIterator(page VirtualMachineRunCommandsListResultPage) VirtualMachineRunCommandsListResultIterator {
12311	return VirtualMachineRunCommandsListResultIterator{page: page}
12312}
12313
12314// IsEmpty returns true if the ListResult contains no values.
12315func (vmrclr VirtualMachineRunCommandsListResult) IsEmpty() bool {
12316	return vmrclr.Value == nil || len(*vmrclr.Value) == 0
12317}
12318
12319// hasNextLink returns true if the NextLink is not empty.
12320func (vmrclr VirtualMachineRunCommandsListResult) hasNextLink() bool {
12321	return vmrclr.NextLink != nil && len(*vmrclr.NextLink) != 0
12322}
12323
12324// virtualMachineRunCommandsListResultPreparer prepares a request to retrieve the next set of results.
12325// It returns nil if no more results exist.
12326func (vmrclr VirtualMachineRunCommandsListResult) virtualMachineRunCommandsListResultPreparer(ctx context.Context) (*http.Request, error) {
12327	if !vmrclr.hasNextLink() {
12328		return nil, nil
12329	}
12330	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12331		autorest.AsJSON(),
12332		autorest.AsGet(),
12333		autorest.WithBaseURL(to.String(vmrclr.NextLink)))
12334}
12335
12336// VirtualMachineRunCommandsListResultPage contains a page of VirtualMachineRunCommand values.
12337type VirtualMachineRunCommandsListResultPage struct {
12338	fn     func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)
12339	vmrclr VirtualMachineRunCommandsListResult
12340}
12341
12342// NextWithContext advances to the next page of values.  If there was an error making
12343// the request the page does not advance and the error is returned.
12344func (page *VirtualMachineRunCommandsListResultPage) NextWithContext(ctx context.Context) (err error) {
12345	if tracing.IsEnabled() {
12346		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultPage.NextWithContext")
12347		defer func() {
12348			sc := -1
12349			if page.Response().Response.Response != nil {
12350				sc = page.Response().Response.Response.StatusCode
12351			}
12352			tracing.EndSpan(ctx, sc, err)
12353		}()
12354	}
12355	for {
12356		next, err := page.fn(ctx, page.vmrclr)
12357		if err != nil {
12358			return err
12359		}
12360		page.vmrclr = next
12361		if !next.hasNextLink() || !next.IsEmpty() {
12362			break
12363		}
12364	}
12365	return nil
12366}
12367
12368// Next advances to the next page of values.  If there was an error making
12369// the request the page does not advance and the error is returned.
12370// Deprecated: Use NextWithContext() instead.
12371func (page *VirtualMachineRunCommandsListResultPage) Next() error {
12372	return page.NextWithContext(context.Background())
12373}
12374
12375// NotDone returns true if the page enumeration should be started or is not yet complete.
12376func (page VirtualMachineRunCommandsListResultPage) NotDone() bool {
12377	return !page.vmrclr.IsEmpty()
12378}
12379
12380// Response returns the raw server response from the last page request.
12381func (page VirtualMachineRunCommandsListResultPage) Response() VirtualMachineRunCommandsListResult {
12382	return page.vmrclr
12383}
12384
12385// Values returns the slice of values for the current page or nil if there are no values.
12386func (page VirtualMachineRunCommandsListResultPage) Values() []VirtualMachineRunCommand {
12387	if page.vmrclr.IsEmpty() {
12388		return nil
12389	}
12390	return *page.vmrclr.Value
12391}
12392
12393// Creates a new instance of the VirtualMachineRunCommandsListResultPage type.
12394func NewVirtualMachineRunCommandsListResultPage(cur VirtualMachineRunCommandsListResult, getNextPage func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)) VirtualMachineRunCommandsListResultPage {
12395	return VirtualMachineRunCommandsListResultPage{
12396		fn:     getNextPage,
12397		vmrclr: cur,
12398	}
12399}
12400
12401// VirtualMachineRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results of a
12402// long-running operation.
12403type VirtualMachineRunCommandsUpdateFuture struct {
12404	azure.FutureAPI
12405	// Result returns the result of the asynchronous operation.
12406	// If the operation has not completed it will return an error.
12407	Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error)
12408}
12409
12410// VirtualMachineRunCommandUpdate describes a Virtual Machine run command.
12411type VirtualMachineRunCommandUpdate struct {
12412	*VirtualMachineRunCommandProperties `json:"properties,omitempty"`
12413	// Tags - Resource tags
12414	Tags map[string]*string `json:"tags"`
12415}
12416
12417// MarshalJSON is the custom marshaler for VirtualMachineRunCommandUpdate.
12418func (vmrcu VirtualMachineRunCommandUpdate) MarshalJSON() ([]byte, error) {
12419	objectMap := make(map[string]interface{})
12420	if vmrcu.VirtualMachineRunCommandProperties != nil {
12421		objectMap["properties"] = vmrcu.VirtualMachineRunCommandProperties
12422	}
12423	if vmrcu.Tags != nil {
12424		objectMap["tags"] = vmrcu.Tags
12425	}
12426	return json.Marshal(objectMap)
12427}
12428
12429// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommandUpdate struct.
12430func (vmrcu *VirtualMachineRunCommandUpdate) UnmarshalJSON(body []byte) error {
12431	var m map[string]*json.RawMessage
12432	err := json.Unmarshal(body, &m)
12433	if err != nil {
12434		return err
12435	}
12436	for k, v := range m {
12437		switch k {
12438		case "properties":
12439			if v != nil {
12440				var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties
12441				err = json.Unmarshal(*v, &virtualMachineRunCommandProperties)
12442				if err != nil {
12443					return err
12444				}
12445				vmrcu.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties
12446			}
12447		case "tags":
12448			if v != nil {
12449				var tags map[string]*string
12450				err = json.Unmarshal(*v, &tags)
12451				if err != nil {
12452					return err
12453				}
12454				vmrcu.Tags = tags
12455			}
12456		}
12457	}
12458
12459	return nil
12460}
12461
12462// VirtualMachinesAssessPatchesFuture an abstraction for monitoring and retrieving the results of a
12463// long-running operation.
12464type VirtualMachinesAssessPatchesFuture struct {
12465	azure.FutureAPI
12466	// Result returns the result of the asynchronous operation.
12467	// If the operation has not completed it will return an error.
12468	Result func(VirtualMachinesClient) (VirtualMachineAssessPatchesResult, error)
12469}
12470
12471// VirtualMachineScaleSet describes a Virtual Machine Scale Set.
12472type VirtualMachineScaleSet struct {
12473	autorest.Response `json:"-"`
12474	// Sku - The virtual machine scale set sku.
12475	Sku *Sku `json:"sku,omitempty"`
12476	// 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**.
12477	Plan                              *Plan `json:"plan,omitempty"`
12478	*VirtualMachineScaleSetProperties `json:"properties,omitempty"`
12479	// Identity - The identity of the virtual machine scale set, if configured.
12480	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
12481	// Zones - The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set
12482	Zones *[]string `json:"zones,omitempty"`
12483	// ID - READ-ONLY; Resource Id
12484	ID *string `json:"id,omitempty"`
12485	// Name - READ-ONLY; Resource name
12486	Name *string `json:"name,omitempty"`
12487	// Type - READ-ONLY; Resource type
12488	Type *string `json:"type,omitempty"`
12489	// Location - Resource location
12490	Location *string `json:"location,omitempty"`
12491	// Tags - Resource tags
12492	Tags map[string]*string `json:"tags"`
12493}
12494
12495// MarshalJSON is the custom marshaler for VirtualMachineScaleSet.
12496func (vmss VirtualMachineScaleSet) MarshalJSON() ([]byte, error) {
12497	objectMap := make(map[string]interface{})
12498	if vmss.Sku != nil {
12499		objectMap["sku"] = vmss.Sku
12500	}
12501	if vmss.Plan != nil {
12502		objectMap["plan"] = vmss.Plan
12503	}
12504	if vmss.VirtualMachineScaleSetProperties != nil {
12505		objectMap["properties"] = vmss.VirtualMachineScaleSetProperties
12506	}
12507	if vmss.Identity != nil {
12508		objectMap["identity"] = vmss.Identity
12509	}
12510	if vmss.Zones != nil {
12511		objectMap["zones"] = vmss.Zones
12512	}
12513	if vmss.Location != nil {
12514		objectMap["location"] = vmss.Location
12515	}
12516	if vmss.Tags != nil {
12517		objectMap["tags"] = vmss.Tags
12518	}
12519	return json.Marshal(objectMap)
12520}
12521
12522// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSet struct.
12523func (vmss *VirtualMachineScaleSet) UnmarshalJSON(body []byte) error {
12524	var m map[string]*json.RawMessage
12525	err := json.Unmarshal(body, &m)
12526	if err != nil {
12527		return err
12528	}
12529	for k, v := range m {
12530		switch k {
12531		case "sku":
12532			if v != nil {
12533				var sku Sku
12534				err = json.Unmarshal(*v, &sku)
12535				if err != nil {
12536					return err
12537				}
12538				vmss.Sku = &sku
12539			}
12540		case "plan":
12541			if v != nil {
12542				var plan Plan
12543				err = json.Unmarshal(*v, &plan)
12544				if err != nil {
12545					return err
12546				}
12547				vmss.Plan = &plan
12548			}
12549		case "properties":
12550			if v != nil {
12551				var virtualMachineScaleSetProperties VirtualMachineScaleSetProperties
12552				err = json.Unmarshal(*v, &virtualMachineScaleSetProperties)
12553				if err != nil {
12554					return err
12555				}
12556				vmss.VirtualMachineScaleSetProperties = &virtualMachineScaleSetProperties
12557			}
12558		case "identity":
12559			if v != nil {
12560				var identity VirtualMachineScaleSetIdentity
12561				err = json.Unmarshal(*v, &identity)
12562				if err != nil {
12563					return err
12564				}
12565				vmss.Identity = &identity
12566			}
12567		case "zones":
12568			if v != nil {
12569				var zones []string
12570				err = json.Unmarshal(*v, &zones)
12571				if err != nil {
12572					return err
12573				}
12574				vmss.Zones = &zones
12575			}
12576		case "id":
12577			if v != nil {
12578				var ID string
12579				err = json.Unmarshal(*v, &ID)
12580				if err != nil {
12581					return err
12582				}
12583				vmss.ID = &ID
12584			}
12585		case "name":
12586			if v != nil {
12587				var name string
12588				err = json.Unmarshal(*v, &name)
12589				if err != nil {
12590					return err
12591				}
12592				vmss.Name = &name
12593			}
12594		case "type":
12595			if v != nil {
12596				var typeVar string
12597				err = json.Unmarshal(*v, &typeVar)
12598				if err != nil {
12599					return err
12600				}
12601				vmss.Type = &typeVar
12602			}
12603		case "location":
12604			if v != nil {
12605				var location string
12606				err = json.Unmarshal(*v, &location)
12607				if err != nil {
12608					return err
12609				}
12610				vmss.Location = &location
12611			}
12612		case "tags":
12613			if v != nil {
12614				var tags map[string]*string
12615				err = json.Unmarshal(*v, &tags)
12616				if err != nil {
12617					return err
12618				}
12619				vmss.Tags = tags
12620			}
12621		}
12622	}
12623
12624	return nil
12625}
12626
12627// VirtualMachineScaleSetDataDisk describes a virtual machine scale set data disk.
12628type VirtualMachineScaleSetDataDisk struct {
12629	// Name - The disk name.
12630	Name *string `json:"name,omitempty"`
12631	// 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.
12632	Lun *int32 `json:"lun,omitempty"`
12633	// 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'
12634	Caching CachingTypes `json:"caching,omitempty"`
12635	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
12636	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
12637	// CreateOption - The create option. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
12638	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
12639	// 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
12640	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
12641	// ManagedDisk - The managed disk parameters.
12642	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
12643	// DiskIOPSReadWrite - Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
12644	DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
12645	// DiskMBpsReadWrite - Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
12646	DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
12647}
12648
12649// VirtualMachineScaleSetExtension describes a Virtual Machine Scale Set Extension.
12650type VirtualMachineScaleSetExtension struct {
12651	autorest.Response `json:"-"`
12652	// Name - The name of the extension.
12653	Name *string `json:"name,omitempty"`
12654	// Type - READ-ONLY; Resource type
12655	Type                                       *string `json:"type,omitempty"`
12656	*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
12657	// ID - READ-ONLY; Resource Id
12658	ID *string `json:"id,omitempty"`
12659}
12660
12661// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtension.
12662func (vmsse VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) {
12663	objectMap := make(map[string]interface{})
12664	if vmsse.Name != nil {
12665		objectMap["name"] = vmsse.Name
12666	}
12667	if vmsse.VirtualMachineScaleSetExtensionProperties != nil {
12668		objectMap["properties"] = vmsse.VirtualMachineScaleSetExtensionProperties
12669	}
12670	return json.Marshal(objectMap)
12671}
12672
12673// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtension struct.
12674func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error {
12675	var m map[string]*json.RawMessage
12676	err := json.Unmarshal(body, &m)
12677	if err != nil {
12678		return err
12679	}
12680	for k, v := range m {
12681		switch k {
12682		case "name":
12683			if v != nil {
12684				var name string
12685				err = json.Unmarshal(*v, &name)
12686				if err != nil {
12687					return err
12688				}
12689				vmsse.Name = &name
12690			}
12691		case "type":
12692			if v != nil {
12693				var typeVar string
12694				err = json.Unmarshal(*v, &typeVar)
12695				if err != nil {
12696					return err
12697				}
12698				vmsse.Type = &typeVar
12699			}
12700		case "properties":
12701			if v != nil {
12702				var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
12703				err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
12704				if err != nil {
12705					return err
12706				}
12707				vmsse.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
12708			}
12709		case "id":
12710			if v != nil {
12711				var ID string
12712				err = json.Unmarshal(*v, &ID)
12713				if err != nil {
12714					return err
12715				}
12716				vmsse.ID = &ID
12717			}
12718		}
12719	}
12720
12721	return nil
12722}
12723
12724// VirtualMachineScaleSetExtensionListResult the List VM scale set extension operation response.
12725type VirtualMachineScaleSetExtensionListResult struct {
12726	autorest.Response `json:"-"`
12727	// Value - The list of VM scale set extensions.
12728	Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"`
12729	// 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.
12730	NextLink *string `json:"nextLink,omitempty"`
12731}
12732
12733// VirtualMachineScaleSetExtensionListResultIterator provides access to a complete listing of
12734// VirtualMachineScaleSetExtension values.
12735type VirtualMachineScaleSetExtensionListResultIterator struct {
12736	i    int
12737	page VirtualMachineScaleSetExtensionListResultPage
12738}
12739
12740// NextWithContext advances to the next value.  If there was an error making
12741// the request the iterator does not advance and the error is returned.
12742func (iter *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) {
12743	if tracing.IsEnabled() {
12744		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.NextWithContext")
12745		defer func() {
12746			sc := -1
12747			if iter.Response().Response.Response != nil {
12748				sc = iter.Response().Response.Response.StatusCode
12749			}
12750			tracing.EndSpan(ctx, sc, err)
12751		}()
12752	}
12753	iter.i++
12754	if iter.i < len(iter.page.Values()) {
12755		return nil
12756	}
12757	err = iter.page.NextWithContext(ctx)
12758	if err != nil {
12759		iter.i--
12760		return err
12761	}
12762	iter.i = 0
12763	return nil
12764}
12765
12766// Next advances to the next value.  If there was an error making
12767// the request the iterator does not advance and the error is returned.
12768// Deprecated: Use NextWithContext() instead.
12769func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error {
12770	return iter.NextWithContext(context.Background())
12771}
12772
12773// NotDone returns true if the enumeration should be started or is not yet complete.
12774func (iter VirtualMachineScaleSetExtensionListResultIterator) NotDone() bool {
12775	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12776}
12777
12778// Response returns the raw server response from the last page request.
12779func (iter VirtualMachineScaleSetExtensionListResultIterator) Response() VirtualMachineScaleSetExtensionListResult {
12780	return iter.page.Response()
12781}
12782
12783// Value returns the current value or a zero-initialized value if the
12784// iterator has advanced beyond the end of the collection.
12785func (iter VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMachineScaleSetExtension {
12786	if !iter.page.NotDone() {
12787		return VirtualMachineScaleSetExtension{}
12788	}
12789	return iter.page.Values()[iter.i]
12790}
12791
12792// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type.
12793func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator {
12794	return VirtualMachineScaleSetExtensionListResultIterator{page: page}
12795}
12796
12797// IsEmpty returns true if the ListResult contains no values.
12798func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool {
12799	return vmsselr.Value == nil || len(*vmsselr.Value) == 0
12800}
12801
12802// hasNextLink returns true if the NextLink is not empty.
12803func (vmsselr VirtualMachineScaleSetExtensionListResult) hasNextLink() bool {
12804	return vmsselr.NextLink != nil && len(*vmsselr.NextLink) != 0
12805}
12806
12807// virtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results.
12808// It returns nil if no more results exist.
12809func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer(ctx context.Context) (*http.Request, error) {
12810	if !vmsselr.hasNextLink() {
12811		return nil, nil
12812	}
12813	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12814		autorest.AsJSON(),
12815		autorest.AsGet(),
12816		autorest.WithBaseURL(to.String(vmsselr.NextLink)))
12817}
12818
12819// VirtualMachineScaleSetExtensionListResultPage contains a page of VirtualMachineScaleSetExtension values.
12820type VirtualMachineScaleSetExtensionListResultPage struct {
12821	fn      func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)
12822	vmsselr VirtualMachineScaleSetExtensionListResult
12823}
12824
12825// NextWithContext advances to the next page of values.  If there was an error making
12826// the request the page does not advance and the error is returned.
12827func (page *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx context.Context) (err error) {
12828	if tracing.IsEnabled() {
12829		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultPage.NextWithContext")
12830		defer func() {
12831			sc := -1
12832			if page.Response().Response.Response != nil {
12833				sc = page.Response().Response.Response.StatusCode
12834			}
12835			tracing.EndSpan(ctx, sc, err)
12836		}()
12837	}
12838	for {
12839		next, err := page.fn(ctx, page.vmsselr)
12840		if err != nil {
12841			return err
12842		}
12843		page.vmsselr = next
12844		if !next.hasNextLink() || !next.IsEmpty() {
12845			break
12846		}
12847	}
12848	return nil
12849}
12850
12851// Next advances to the next page of values.  If there was an error making
12852// the request the page does not advance and the error is returned.
12853// Deprecated: Use NextWithContext() instead.
12854func (page *VirtualMachineScaleSetExtensionListResultPage) Next() error {
12855	return page.NextWithContext(context.Background())
12856}
12857
12858// NotDone returns true if the page enumeration should be started or is not yet complete.
12859func (page VirtualMachineScaleSetExtensionListResultPage) NotDone() bool {
12860	return !page.vmsselr.IsEmpty()
12861}
12862
12863// Response returns the raw server response from the last page request.
12864func (page VirtualMachineScaleSetExtensionListResultPage) Response() VirtualMachineScaleSetExtensionListResult {
12865	return page.vmsselr
12866}
12867
12868// Values returns the slice of values for the current page or nil if there are no values.
12869func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMachineScaleSetExtension {
12870	if page.vmsselr.IsEmpty() {
12871		return nil
12872	}
12873	return *page.vmsselr.Value
12874}
12875
12876// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type.
12877func NewVirtualMachineScaleSetExtensionListResultPage(cur VirtualMachineScaleSetExtensionListResult, getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
12878	return VirtualMachineScaleSetExtensionListResultPage{
12879		fn:      getNextPage,
12880		vmsselr: cur,
12881	}
12882}
12883
12884// VirtualMachineScaleSetExtensionProfile describes a virtual machine scale set extension profile.
12885type VirtualMachineScaleSetExtensionProfile struct {
12886	// Extensions - The virtual machine scale set child extension resources.
12887	Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"`
12888	// ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01
12889	ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`
12890}
12891
12892// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set
12893// Extension.
12894type VirtualMachineScaleSetExtensionProperties struct {
12895	// 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.
12896	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
12897	// Publisher - The name of the extension handler publisher.
12898	Publisher *string `json:"publisher,omitempty"`
12899	// Type - Specifies the type of the extension; an example is "CustomScriptExtension".
12900	Type *string `json:"type,omitempty"`
12901	// TypeHandlerVersion - Specifies the version of the script handler.
12902	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
12903	// 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.
12904	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
12905	// EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
12906	EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
12907	// Settings - Json formatted public settings for the extension.
12908	Settings interface{} `json:"settings,omitempty"`
12909	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
12910	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
12911	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
12912	ProvisioningState *string `json:"provisioningState,omitempty"`
12913	// ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
12914	ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
12915}
12916
12917// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionProperties.
12918func (vmssep VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, error) {
12919	objectMap := make(map[string]interface{})
12920	if vmssep.ForceUpdateTag != nil {
12921		objectMap["forceUpdateTag"] = vmssep.ForceUpdateTag
12922	}
12923	if vmssep.Publisher != nil {
12924		objectMap["publisher"] = vmssep.Publisher
12925	}
12926	if vmssep.Type != nil {
12927		objectMap["type"] = vmssep.Type
12928	}
12929	if vmssep.TypeHandlerVersion != nil {
12930		objectMap["typeHandlerVersion"] = vmssep.TypeHandlerVersion
12931	}
12932	if vmssep.AutoUpgradeMinorVersion != nil {
12933		objectMap["autoUpgradeMinorVersion"] = vmssep.AutoUpgradeMinorVersion
12934	}
12935	if vmssep.EnableAutomaticUpgrade != nil {
12936		objectMap["enableAutomaticUpgrade"] = vmssep.EnableAutomaticUpgrade
12937	}
12938	if vmssep.Settings != nil {
12939		objectMap["settings"] = vmssep.Settings
12940	}
12941	if vmssep.ProtectedSettings != nil {
12942		objectMap["protectedSettings"] = vmssep.ProtectedSettings
12943	}
12944	if vmssep.ProvisionAfterExtensions != nil {
12945		objectMap["provisionAfterExtensions"] = vmssep.ProvisionAfterExtensions
12946	}
12947	return json.Marshal(objectMap)
12948}
12949
12950// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
12951// results of a long-running operation.
12952type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
12953	azure.FutureAPI
12954	// Result returns the result of the asynchronous operation.
12955	// If the operation has not completed it will return an error.
12956	Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
12957}
12958
12959// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of
12960// a long-running operation.
12961type VirtualMachineScaleSetExtensionsDeleteFuture struct {
12962	azure.FutureAPI
12963	// Result returns the result of the asynchronous operation.
12964	// If the operation has not completed it will return an error.
12965	Result func(VirtualMachineScaleSetExtensionsClient) (autorest.Response, error)
12966}
12967
12968// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of
12969// a long-running operation.
12970type VirtualMachineScaleSetExtensionsUpdateFuture struct {
12971	azure.FutureAPI
12972	// Result returns the result of the asynchronous operation.
12973	// If the operation has not completed it will return an error.
12974	Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
12975}
12976
12977// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension.
12978type VirtualMachineScaleSetExtensionUpdate struct {
12979	// Name - READ-ONLY; The name of the extension.
12980	Name *string `json:"name,omitempty"`
12981	// Type - READ-ONLY; Resource type
12982	Type                                       *string `json:"type,omitempty"`
12983	*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
12984	// ID - READ-ONLY; Resource Id
12985	ID *string `json:"id,omitempty"`
12986}
12987
12988// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionUpdate.
12989func (vmsseu VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) {
12990	objectMap := make(map[string]interface{})
12991	if vmsseu.VirtualMachineScaleSetExtensionProperties != nil {
12992		objectMap["properties"] = vmsseu.VirtualMachineScaleSetExtensionProperties
12993	}
12994	return json.Marshal(objectMap)
12995}
12996
12997// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtensionUpdate struct.
12998func (vmsseu *VirtualMachineScaleSetExtensionUpdate) UnmarshalJSON(body []byte) error {
12999	var m map[string]*json.RawMessage
13000	err := json.Unmarshal(body, &m)
13001	if err != nil {
13002		return err
13003	}
13004	for k, v := range m {
13005		switch k {
13006		case "name":
13007			if v != nil {
13008				var name string
13009				err = json.Unmarshal(*v, &name)
13010				if err != nil {
13011					return err
13012				}
13013				vmsseu.Name = &name
13014			}
13015		case "type":
13016			if v != nil {
13017				var typeVar string
13018				err = json.Unmarshal(*v, &typeVar)
13019				if err != nil {
13020					return err
13021				}
13022				vmsseu.Type = &typeVar
13023			}
13024		case "properties":
13025			if v != nil {
13026				var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
13027				err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
13028				if err != nil {
13029					return err
13030				}
13031				vmsseu.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
13032			}
13033		case "id":
13034			if v != nil {
13035				var ID string
13036				err = json.Unmarshal(*v, &ID)
13037				if err != nil {
13038					return err
13039				}
13040				vmsseu.ID = &ID
13041			}
13042		}
13043	}
13044
13045	return nil
13046}
13047
13048// VirtualMachineScaleSetIdentity identity for the virtual machine scale set.
13049type VirtualMachineScaleSetIdentity struct {
13050	// PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity.
13051	PrincipalID *string `json:"principalId,omitempty"`
13052	// TenantID - READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity.
13053	TenantID *string `json:"tenantId,omitempty"`
13054	// 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'
13055	Type ResourceIdentityType `json:"type,omitempty"`
13056	// UserAssignedIdentities - The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
13057	UserAssignedIdentities map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
13058}
13059
13060// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentity.
13061func (vmssi VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) {
13062	objectMap := make(map[string]interface{})
13063	if vmssi.Type != "" {
13064		objectMap["type"] = vmssi.Type
13065	}
13066	if vmssi.UserAssignedIdentities != nil {
13067		objectMap["userAssignedIdentities"] = vmssi.UserAssignedIdentities
13068	}
13069	return json.Marshal(objectMap)
13070}
13071
13072// VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue ...
13073type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct {
13074	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
13075	PrincipalID *string `json:"principalId,omitempty"`
13076	// ClientID - READ-ONLY; The client id of user assigned identity.
13077	ClientID *string `json:"clientId,omitempty"`
13078}
13079
13080// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set.
13081type VirtualMachineScaleSetInstanceView struct {
13082	autorest.Response `json:"-"`
13083	// VirtualMachine - READ-ONLY; The instance view status summary for the virtual machine scale set.
13084	VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"`
13085	// Extensions - READ-ONLY; The extensions information.
13086	Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"`
13087	// Statuses - The resource status information.
13088	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
13089	// OrchestrationServices - READ-ONLY; The orchestration services information.
13090	OrchestrationServices *[]OrchestrationServiceSummary `json:"orchestrationServices,omitempty"`
13091}
13092
13093// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceView.
13094func (vmssiv VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) {
13095	objectMap := make(map[string]interface{})
13096	if vmssiv.Statuses != nil {
13097		objectMap["statuses"] = vmssiv.Statuses
13098	}
13099	return json.Marshal(objectMap)
13100}
13101
13102// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of
13103// a virtual machine scale set.
13104type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
13105	// StatusesSummary - READ-ONLY; The extensions information.
13106	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
13107}
13108
13109// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP
13110// configuration.
13111type VirtualMachineScaleSetIPConfiguration struct {
13112	// Name - The IP configuration name.
13113	Name                                             *string `json:"name,omitempty"`
13114	*VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"`
13115	// ID - Resource Id
13116	ID *string `json:"id,omitempty"`
13117}
13118
13119// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIPConfiguration.
13120func (vmssic VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) {
13121	objectMap := make(map[string]interface{})
13122	if vmssic.Name != nil {
13123		objectMap["name"] = vmssic.Name
13124	}
13125	if vmssic.VirtualMachineScaleSetIPConfigurationProperties != nil {
13126		objectMap["properties"] = vmssic.VirtualMachineScaleSetIPConfigurationProperties
13127	}
13128	if vmssic.ID != nil {
13129		objectMap["id"] = vmssic.ID
13130	}
13131	return json.Marshal(objectMap)
13132}
13133
13134// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetIPConfiguration struct.
13135func (vmssic *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(body []byte) error {
13136	var m map[string]*json.RawMessage
13137	err := json.Unmarshal(body, &m)
13138	if err != nil {
13139		return err
13140	}
13141	for k, v := range m {
13142		switch k {
13143		case "name":
13144			if v != nil {
13145				var name string
13146				err = json.Unmarshal(*v, &name)
13147				if err != nil {
13148					return err
13149				}
13150				vmssic.Name = &name
13151			}
13152		case "properties":
13153			if v != nil {
13154				var virtualMachineScaleSetIPConfigurationProperties VirtualMachineScaleSetIPConfigurationProperties
13155				err = json.Unmarshal(*v, &virtualMachineScaleSetIPConfigurationProperties)
13156				if err != nil {
13157					return err
13158				}
13159				vmssic.VirtualMachineScaleSetIPConfigurationProperties = &virtualMachineScaleSetIPConfigurationProperties
13160			}
13161		case "id":
13162			if v != nil {
13163				var ID string
13164				err = json.Unmarshal(*v, &ID)
13165				if err != nil {
13166					return err
13167				}
13168				vmssic.ID = &ID
13169			}
13170		}
13171	}
13172
13173	return nil
13174}
13175
13176// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's
13177// IP configuration properties.
13178type VirtualMachineScaleSetIPConfigurationProperties struct {
13179	// Subnet - Specifies the identifier of the subnet.
13180	Subnet *APIEntityReference `json:"subnet,omitempty"`
13181	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
13182	Primary *bool `json:"primary,omitempty"`
13183	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
13184	PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
13185	// 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'
13186	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
13187	// 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.
13188	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
13189	// ApplicationSecurityGroups - Specifies an array of references to application security group.
13190	ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
13191	// LoadBalancerBackendAddressPools - Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.
13192	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
13193	// LoadBalancerInboundNatPools - Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.
13194	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
13195}
13196
13197// VirtualMachineScaleSetIPTag contains the IP tag associated with the public IP address.
13198type VirtualMachineScaleSetIPTag struct {
13199	// IPTagType - IP tag type. Example: FirstPartyUsage.
13200	IPTagType *string `json:"ipTagType,omitempty"`
13201	// Tag - IP tag associated with the public IP. Example: SQL, Storage etc.
13202	Tag *string `json:"tag,omitempty"`
13203}
13204
13205// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History
13206// operation response.
13207type VirtualMachineScaleSetListOSUpgradeHistory struct {
13208	autorest.Response `json:"-"`
13209	// Value - The list of OS upgrades performed on the virtual machine scale set.
13210	Value *[]UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"`
13211	// 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.
13212	NextLink *string `json:"nextLink,omitempty"`
13213}
13214
13215// VirtualMachineScaleSetListOSUpgradeHistoryIterator provides access to a complete listing of
13216// UpgradeOperationHistoricalStatusInfo values.
13217type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct {
13218	i    int
13219	page VirtualMachineScaleSetListOSUpgradeHistoryPage
13220}
13221
13222// NextWithContext advances to the next value.  If there was an error making
13223// the request the iterator does not advance and the error is returned.
13224func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) {
13225	if tracing.IsEnabled() {
13226		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.NextWithContext")
13227		defer func() {
13228			sc := -1
13229			if iter.Response().Response.Response != nil {
13230				sc = iter.Response().Response.Response.StatusCode
13231			}
13232			tracing.EndSpan(ctx, sc, err)
13233		}()
13234	}
13235	iter.i++
13236	if iter.i < len(iter.page.Values()) {
13237		return nil
13238	}
13239	err = iter.page.NextWithContext(ctx)
13240	if err != nil {
13241		iter.i--
13242		return err
13243	}
13244	iter.i = 0
13245	return nil
13246}
13247
13248// Next advances to the next value.  If there was an error making
13249// the request the iterator does not advance and the error is returned.
13250// Deprecated: Use NextWithContext() instead.
13251func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error {
13252	return iter.NextWithContext(context.Background())
13253}
13254
13255// NotDone returns true if the enumeration should be started or is not yet complete.
13256func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) NotDone() bool {
13257	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13258}
13259
13260// Response returns the raw server response from the last page request.
13261func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Response() VirtualMachineScaleSetListOSUpgradeHistory {
13262	return iter.page.Response()
13263}
13264
13265// Value returns the current value or a zero-initialized value if the
13266// iterator has advanced beyond the end of the collection.
13267func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOperationHistoricalStatusInfo {
13268	if !iter.page.NotDone() {
13269		return UpgradeOperationHistoricalStatusInfo{}
13270	}
13271	return iter.page.Values()[iter.i]
13272}
13273
13274// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type.
13275func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator {
13276	return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page}
13277}
13278
13279// IsEmpty returns true if the ListResult contains no values.
13280func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool {
13281	return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0
13282}
13283
13284// hasNextLink returns true if the NextLink is not empty.
13285func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) hasNextLink() bool {
13286	return vmsslouh.NextLink != nil && len(*vmsslouh.NextLink) != 0
13287}
13288
13289// virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results.
13290// It returns nil if no more results exist.
13291func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) {
13292	if !vmsslouh.hasNextLink() {
13293		return nil, nil
13294	}
13295	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13296		autorest.AsJSON(),
13297		autorest.AsGet(),
13298		autorest.WithBaseURL(to.String(vmsslouh.NextLink)))
13299}
13300
13301// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo
13302// values.
13303type VirtualMachineScaleSetListOSUpgradeHistoryPage struct {
13304	fn       func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)
13305	vmsslouh VirtualMachineScaleSetListOSUpgradeHistory
13306}
13307
13308// NextWithContext advances to the next page of values.  If there was an error making
13309// the request the page does not advance and the error is returned.
13310func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) {
13311	if tracing.IsEnabled() {
13312		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.NextWithContext")
13313		defer func() {
13314			sc := -1
13315			if page.Response().Response.Response != nil {
13316				sc = page.Response().Response.Response.StatusCode
13317			}
13318			tracing.EndSpan(ctx, sc, err)
13319		}()
13320	}
13321	for {
13322		next, err := page.fn(ctx, page.vmsslouh)
13323		if err != nil {
13324			return err
13325		}
13326		page.vmsslouh = next
13327		if !next.hasNextLink() || !next.IsEmpty() {
13328			break
13329		}
13330	}
13331	return nil
13332}
13333
13334// Next advances to the next page of values.  If there was an error making
13335// the request the page does not advance and the error is returned.
13336// Deprecated: Use NextWithContext() instead.
13337func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error {
13338	return page.NextWithContext(context.Background())
13339}
13340
13341// NotDone returns true if the page enumeration should be started or is not yet complete.
13342func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool {
13343	return !page.vmsslouh.IsEmpty()
13344}
13345
13346// Response returns the raw server response from the last page request.
13347func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Response() VirtualMachineScaleSetListOSUpgradeHistory {
13348	return page.vmsslouh
13349}
13350
13351// Values returns the slice of values for the current page or nil if there are no values.
13352func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOperationHistoricalStatusInfo {
13353	if page.vmsslouh.IsEmpty() {
13354		return nil
13355	}
13356	return *page.vmsslouh.Value
13357}
13358
13359// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type.
13360func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(cur VirtualMachineScaleSetListOSUpgradeHistory, getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage {
13361	return VirtualMachineScaleSetListOSUpgradeHistoryPage{
13362		fn:       getNextPage,
13363		vmsslouh: cur,
13364	}
13365}
13366
13367// VirtualMachineScaleSetListResult the List Virtual Machine operation response.
13368type VirtualMachineScaleSetListResult struct {
13369	autorest.Response `json:"-"`
13370	// Value - The list of virtual machine scale sets.
13371	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
13372	// NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS.
13373	NextLink *string `json:"nextLink,omitempty"`
13374}
13375
13376// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet
13377// values.
13378type VirtualMachineScaleSetListResultIterator struct {
13379	i    int
13380	page VirtualMachineScaleSetListResultPage
13381}
13382
13383// NextWithContext advances to the next value.  If there was an error making
13384// the request the iterator does not advance and the error is returned.
13385func (iter *VirtualMachineScaleSetListResultIterator) NextWithContext(ctx context.Context) (err error) {
13386	if tracing.IsEnabled() {
13387		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultIterator.NextWithContext")
13388		defer func() {
13389			sc := -1
13390			if iter.Response().Response.Response != nil {
13391				sc = iter.Response().Response.Response.StatusCode
13392			}
13393			tracing.EndSpan(ctx, sc, err)
13394		}()
13395	}
13396	iter.i++
13397	if iter.i < len(iter.page.Values()) {
13398		return nil
13399	}
13400	err = iter.page.NextWithContext(ctx)
13401	if err != nil {
13402		iter.i--
13403		return err
13404	}
13405	iter.i = 0
13406	return nil
13407}
13408
13409// Next advances to the next value.  If there was an error making
13410// the request the iterator does not advance and the error is returned.
13411// Deprecated: Use NextWithContext() instead.
13412func (iter *VirtualMachineScaleSetListResultIterator) Next() error {
13413	return iter.NextWithContext(context.Background())
13414}
13415
13416// NotDone returns true if the enumeration should be started or is not yet complete.
13417func (iter VirtualMachineScaleSetListResultIterator) NotDone() bool {
13418	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13419}
13420
13421// Response returns the raw server response from the last page request.
13422func (iter VirtualMachineScaleSetListResultIterator) Response() VirtualMachineScaleSetListResult {
13423	return iter.page.Response()
13424}
13425
13426// Value returns the current value or a zero-initialized value if the
13427// iterator has advanced beyond the end of the collection.
13428func (iter VirtualMachineScaleSetListResultIterator) Value() VirtualMachineScaleSet {
13429	if !iter.page.NotDone() {
13430		return VirtualMachineScaleSet{}
13431	}
13432	return iter.page.Values()[iter.i]
13433}
13434
13435// Creates a new instance of the VirtualMachineScaleSetListResultIterator type.
13436func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator {
13437	return VirtualMachineScaleSetListResultIterator{page: page}
13438}
13439
13440// IsEmpty returns true if the ListResult contains no values.
13441func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool {
13442	return vmsslr.Value == nil || len(*vmsslr.Value) == 0
13443}
13444
13445// hasNextLink returns true if the NextLink is not empty.
13446func (vmsslr VirtualMachineScaleSetListResult) hasNextLink() bool {
13447	return vmsslr.NextLink != nil && len(*vmsslr.NextLink) != 0
13448}
13449
13450// virtualMachineScaleSetListResultPreparer prepares a request to retrieve the next set of results.
13451// It returns nil if no more results exist.
13452func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer(ctx context.Context) (*http.Request, error) {
13453	if !vmsslr.hasNextLink() {
13454		return nil, nil
13455	}
13456	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13457		autorest.AsJSON(),
13458		autorest.AsGet(),
13459		autorest.WithBaseURL(to.String(vmsslr.NextLink)))
13460}
13461
13462// VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values.
13463type VirtualMachineScaleSetListResultPage struct {
13464	fn     func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)
13465	vmsslr VirtualMachineScaleSetListResult
13466}
13467
13468// NextWithContext advances to the next page of values.  If there was an error making
13469// the request the page does not advance and the error is returned.
13470func (page *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error) {
13471	if tracing.IsEnabled() {
13472		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultPage.NextWithContext")
13473		defer func() {
13474			sc := -1
13475			if page.Response().Response.Response != nil {
13476				sc = page.Response().Response.Response.StatusCode
13477			}
13478			tracing.EndSpan(ctx, sc, err)
13479		}()
13480	}
13481	for {
13482		next, err := page.fn(ctx, page.vmsslr)
13483		if err != nil {
13484			return err
13485		}
13486		page.vmsslr = next
13487		if !next.hasNextLink() || !next.IsEmpty() {
13488			break
13489		}
13490	}
13491	return nil
13492}
13493
13494// Next advances to the next page of values.  If there was an error making
13495// the request the page does not advance and the error is returned.
13496// Deprecated: Use NextWithContext() instead.
13497func (page *VirtualMachineScaleSetListResultPage) Next() error {
13498	return page.NextWithContext(context.Background())
13499}
13500
13501// NotDone returns true if the page enumeration should be started or is not yet complete.
13502func (page VirtualMachineScaleSetListResultPage) NotDone() bool {
13503	return !page.vmsslr.IsEmpty()
13504}
13505
13506// Response returns the raw server response from the last page request.
13507func (page VirtualMachineScaleSetListResultPage) Response() VirtualMachineScaleSetListResult {
13508	return page.vmsslr
13509}
13510
13511// Values returns the slice of values for the current page or nil if there are no values.
13512func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleSet {
13513	if page.vmsslr.IsEmpty() {
13514		return nil
13515	}
13516	return *page.vmsslr.Value
13517}
13518
13519// Creates a new instance of the VirtualMachineScaleSetListResultPage type.
13520func NewVirtualMachineScaleSetListResultPage(cur VirtualMachineScaleSetListResult, getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
13521	return VirtualMachineScaleSetListResultPage{
13522		fn:     getNextPage,
13523		vmsslr: cur,
13524	}
13525}
13526
13527// VirtualMachineScaleSetListSkusResult the Virtual Machine Scale Set List Skus operation response.
13528type VirtualMachineScaleSetListSkusResult struct {
13529	autorest.Response `json:"-"`
13530	// Value - The list of skus available for the virtual machine scale set.
13531	Value *[]VirtualMachineScaleSetSku `json:"value,omitempty"`
13532	// 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.
13533	NextLink *string `json:"nextLink,omitempty"`
13534}
13535
13536// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of
13537// VirtualMachineScaleSetSku values.
13538type VirtualMachineScaleSetListSkusResultIterator struct {
13539	i    int
13540	page VirtualMachineScaleSetListSkusResultPage
13541}
13542
13543// NextWithContext advances to the next value.  If there was an error making
13544// the request the iterator does not advance and the error is returned.
13545func (iter *VirtualMachineScaleSetListSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
13546	if tracing.IsEnabled() {
13547		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultIterator.NextWithContext")
13548		defer func() {
13549			sc := -1
13550			if iter.Response().Response.Response != nil {
13551				sc = iter.Response().Response.Response.StatusCode
13552			}
13553			tracing.EndSpan(ctx, sc, err)
13554		}()
13555	}
13556	iter.i++
13557	if iter.i < len(iter.page.Values()) {
13558		return nil
13559	}
13560	err = iter.page.NextWithContext(ctx)
13561	if err != nil {
13562		iter.i--
13563		return err
13564	}
13565	iter.i = 0
13566	return nil
13567}
13568
13569// Next advances to the next value.  If there was an error making
13570// the request the iterator does not advance and the error is returned.
13571// Deprecated: Use NextWithContext() instead.
13572func (iter *VirtualMachineScaleSetListSkusResultIterator) Next() error {
13573	return iter.NextWithContext(context.Background())
13574}
13575
13576// NotDone returns true if the enumeration should be started or is not yet complete.
13577func (iter VirtualMachineScaleSetListSkusResultIterator) NotDone() bool {
13578	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13579}
13580
13581// Response returns the raw server response from the last page request.
13582func (iter VirtualMachineScaleSetListSkusResultIterator) Response() VirtualMachineScaleSetListSkusResult {
13583	return iter.page.Response()
13584}
13585
13586// Value returns the current value or a zero-initialized value if the
13587// iterator has advanced beyond the end of the collection.
13588func (iter VirtualMachineScaleSetListSkusResultIterator) Value() VirtualMachineScaleSetSku {
13589	if !iter.page.NotDone() {
13590		return VirtualMachineScaleSetSku{}
13591	}
13592	return iter.page.Values()[iter.i]
13593}
13594
13595// Creates a new instance of the VirtualMachineScaleSetListSkusResultIterator type.
13596func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator {
13597	return VirtualMachineScaleSetListSkusResultIterator{page: page}
13598}
13599
13600// IsEmpty returns true if the ListResult contains no values.
13601func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool {
13602	return vmsslsr.Value == nil || len(*vmsslsr.Value) == 0
13603}
13604
13605// hasNextLink returns true if the NextLink is not empty.
13606func (vmsslsr VirtualMachineScaleSetListSkusResult) hasNextLink() bool {
13607	return vmsslsr.NextLink != nil && len(*vmsslsr.NextLink) != 0
13608}
13609
13610// virtualMachineScaleSetListSkusResultPreparer prepares a request to retrieve the next set of results.
13611// It returns nil if no more results exist.
13612func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer(ctx context.Context) (*http.Request, error) {
13613	if !vmsslsr.hasNextLink() {
13614		return nil, nil
13615	}
13616	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13617		autorest.AsJSON(),
13618		autorest.AsGet(),
13619		autorest.WithBaseURL(to.String(vmsslsr.NextLink)))
13620}
13621
13622// VirtualMachineScaleSetListSkusResultPage contains a page of VirtualMachineScaleSetSku values.
13623type VirtualMachineScaleSetListSkusResultPage struct {
13624	fn      func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)
13625	vmsslsr VirtualMachineScaleSetListSkusResult
13626}
13627
13628// NextWithContext advances to the next page of values.  If there was an error making
13629// the request the page does not advance and the error is returned.
13630func (page *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx context.Context) (err error) {
13631	if tracing.IsEnabled() {
13632		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultPage.NextWithContext")
13633		defer func() {
13634			sc := -1
13635			if page.Response().Response.Response != nil {
13636				sc = page.Response().Response.Response.StatusCode
13637			}
13638			tracing.EndSpan(ctx, sc, err)
13639		}()
13640	}
13641	for {
13642		next, err := page.fn(ctx, page.vmsslsr)
13643		if err != nil {
13644			return err
13645		}
13646		page.vmsslsr = next
13647		if !next.hasNextLink() || !next.IsEmpty() {
13648			break
13649		}
13650	}
13651	return nil
13652}
13653
13654// Next advances to the next page of values.  If there was an error making
13655// the request the page does not advance and the error is returned.
13656// Deprecated: Use NextWithContext() instead.
13657func (page *VirtualMachineScaleSetListSkusResultPage) Next() error {
13658	return page.NextWithContext(context.Background())
13659}
13660
13661// NotDone returns true if the page enumeration should be started or is not yet complete.
13662func (page VirtualMachineScaleSetListSkusResultPage) NotDone() bool {
13663	return !page.vmsslsr.IsEmpty()
13664}
13665
13666// Response returns the raw server response from the last page request.
13667func (page VirtualMachineScaleSetListSkusResultPage) Response() VirtualMachineScaleSetListSkusResult {
13668	return page.vmsslsr
13669}
13670
13671// Values returns the slice of values for the current page or nil if there are no values.
13672func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineScaleSetSku {
13673	if page.vmsslsr.IsEmpty() {
13674		return nil
13675	}
13676	return *page.vmsslsr.Value
13677}
13678
13679// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type.
13680func NewVirtualMachineScaleSetListSkusResultPage(cur VirtualMachineScaleSetListSkusResult, getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
13681	return VirtualMachineScaleSetListSkusResultPage{
13682		fn:      getNextPage,
13683		vmsslsr: cur,
13684	}
13685}
13686
13687// VirtualMachineScaleSetListWithLinkResult the List Virtual Machine operation response.
13688type VirtualMachineScaleSetListWithLinkResult struct {
13689	autorest.Response `json:"-"`
13690	// Value - The list of virtual machine scale sets.
13691	Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
13692	// 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.
13693	NextLink *string `json:"nextLink,omitempty"`
13694}
13695
13696// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of
13697// VirtualMachineScaleSet values.
13698type VirtualMachineScaleSetListWithLinkResultIterator struct {
13699	i    int
13700	page VirtualMachineScaleSetListWithLinkResultPage
13701}
13702
13703// NextWithContext advances to the next value.  If there was an error making
13704// the request the iterator does not advance and the error is returned.
13705func (iter *VirtualMachineScaleSetListWithLinkResultIterator) NextWithContext(ctx context.Context) (err error) {
13706	if tracing.IsEnabled() {
13707		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultIterator.NextWithContext")
13708		defer func() {
13709			sc := -1
13710			if iter.Response().Response.Response != nil {
13711				sc = iter.Response().Response.Response.StatusCode
13712			}
13713			tracing.EndSpan(ctx, sc, err)
13714		}()
13715	}
13716	iter.i++
13717	if iter.i < len(iter.page.Values()) {
13718		return nil
13719	}
13720	err = iter.page.NextWithContext(ctx)
13721	if err != nil {
13722		iter.i--
13723		return err
13724	}
13725	iter.i = 0
13726	return nil
13727}
13728
13729// Next advances to the next value.  If there was an error making
13730// the request the iterator does not advance and the error is returned.
13731// Deprecated: Use NextWithContext() instead.
13732func (iter *VirtualMachineScaleSetListWithLinkResultIterator) Next() error {
13733	return iter.NextWithContext(context.Background())
13734}
13735
13736// NotDone returns true if the enumeration should be started or is not yet complete.
13737func (iter VirtualMachineScaleSetListWithLinkResultIterator) NotDone() bool {
13738	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13739}
13740
13741// Response returns the raw server response from the last page request.
13742func (iter VirtualMachineScaleSetListWithLinkResultIterator) Response() VirtualMachineScaleSetListWithLinkResult {
13743	return iter.page.Response()
13744}
13745
13746// Value returns the current value or a zero-initialized value if the
13747// iterator has advanced beyond the end of the collection.
13748func (iter VirtualMachineScaleSetListWithLinkResultIterator) Value() VirtualMachineScaleSet {
13749	if !iter.page.NotDone() {
13750		return VirtualMachineScaleSet{}
13751	}
13752	return iter.page.Values()[iter.i]
13753}
13754
13755// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultIterator type.
13756func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator {
13757	return VirtualMachineScaleSetListWithLinkResultIterator{page: page}
13758}
13759
13760// IsEmpty returns true if the ListResult contains no values.
13761func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool {
13762	return vmsslwlr.Value == nil || len(*vmsslwlr.Value) == 0
13763}
13764
13765// hasNextLink returns true if the NextLink is not empty.
13766func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) hasNextLink() bool {
13767	return vmsslwlr.NextLink != nil && len(*vmsslwlr.NextLink) != 0
13768}
13769
13770// virtualMachineScaleSetListWithLinkResultPreparer prepares a request to retrieve the next set of results.
13771// It returns nil if no more results exist.
13772func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer(ctx context.Context) (*http.Request, error) {
13773	if !vmsslwlr.hasNextLink() {
13774		return nil, nil
13775	}
13776	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13777		autorest.AsJSON(),
13778		autorest.AsGet(),
13779		autorest.WithBaseURL(to.String(vmsslwlr.NextLink)))
13780}
13781
13782// VirtualMachineScaleSetListWithLinkResultPage contains a page of VirtualMachineScaleSet values.
13783type VirtualMachineScaleSetListWithLinkResultPage struct {
13784	fn       func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)
13785	vmsslwlr VirtualMachineScaleSetListWithLinkResult
13786}
13787
13788// NextWithContext advances to the next page of values.  If there was an error making
13789// the request the page does not advance and the error is returned.
13790func (page *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx context.Context) (err error) {
13791	if tracing.IsEnabled() {
13792		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultPage.NextWithContext")
13793		defer func() {
13794			sc := -1
13795			if page.Response().Response.Response != nil {
13796				sc = page.Response().Response.Response.StatusCode
13797			}
13798			tracing.EndSpan(ctx, sc, err)
13799		}()
13800	}
13801	for {
13802		next, err := page.fn(ctx, page.vmsslwlr)
13803		if err != nil {
13804			return err
13805		}
13806		page.vmsslwlr = next
13807		if !next.hasNextLink() || !next.IsEmpty() {
13808			break
13809		}
13810	}
13811	return nil
13812}
13813
13814// Next advances to the next page of values.  If there was an error making
13815// the request the page does not advance and the error is returned.
13816// Deprecated: Use NextWithContext() instead.
13817func (page *VirtualMachineScaleSetListWithLinkResultPage) Next() error {
13818	return page.NextWithContext(context.Background())
13819}
13820
13821// NotDone returns true if the page enumeration should be started or is not yet complete.
13822func (page VirtualMachineScaleSetListWithLinkResultPage) NotDone() bool {
13823	return !page.vmsslwlr.IsEmpty()
13824}
13825
13826// Response returns the raw server response from the last page request.
13827func (page VirtualMachineScaleSetListWithLinkResultPage) Response() VirtualMachineScaleSetListWithLinkResult {
13828	return page.vmsslwlr
13829}
13830
13831// Values returns the slice of values for the current page or nil if there are no values.
13832func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachineScaleSet {
13833	if page.vmsslwlr.IsEmpty() {
13834		return nil
13835	}
13836	return *page.vmsslwlr.Value
13837}
13838
13839// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type.
13840func NewVirtualMachineScaleSetListWithLinkResultPage(cur VirtualMachineScaleSetListWithLinkResult, getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
13841	return VirtualMachineScaleSetListWithLinkResultPage{
13842		fn:       getNextPage,
13843		vmsslwlr: cur,
13844	}
13845}
13846
13847// VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk.
13848type VirtualMachineScaleSetManagedDiskParameters struct {
13849	// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
13850	StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
13851	// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
13852	DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
13853}
13854
13855// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's
13856// network configurations.
13857type VirtualMachineScaleSetNetworkConfiguration struct {
13858	// Name - The network configuration name.
13859	Name                                                  *string `json:"name,omitempty"`
13860	*VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"`
13861	// ID - Resource Id
13862	ID *string `json:"id,omitempty"`
13863}
13864
13865// MarshalJSON is the custom marshaler for VirtualMachineScaleSetNetworkConfiguration.
13866func (vmssnc VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) {
13867	objectMap := make(map[string]interface{})
13868	if vmssnc.Name != nil {
13869		objectMap["name"] = vmssnc.Name
13870	}
13871	if vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties != nil {
13872		objectMap["properties"] = vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties
13873	}
13874	if vmssnc.ID != nil {
13875		objectMap["id"] = vmssnc.ID
13876	}
13877	return json.Marshal(objectMap)
13878}
13879
13880// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetNetworkConfiguration struct.
13881func (vmssnc *VirtualMachineScaleSetNetworkConfiguration) UnmarshalJSON(body []byte) error {
13882	var m map[string]*json.RawMessage
13883	err := json.Unmarshal(body, &m)
13884	if err != nil {
13885		return err
13886	}
13887	for k, v := range m {
13888		switch k {
13889		case "name":
13890			if v != nil {
13891				var name string
13892				err = json.Unmarshal(*v, &name)
13893				if err != nil {
13894					return err
13895				}
13896				vmssnc.Name = &name
13897			}
13898		case "properties":
13899			if v != nil {
13900				var virtualMachineScaleSetNetworkConfigurationProperties VirtualMachineScaleSetNetworkConfigurationProperties
13901				err = json.Unmarshal(*v, &virtualMachineScaleSetNetworkConfigurationProperties)
13902				if err != nil {
13903					return err
13904				}
13905				vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties = &virtualMachineScaleSetNetworkConfigurationProperties
13906			}
13907		case "id":
13908			if v != nil {
13909				var ID string
13910				err = json.Unmarshal(*v, &ID)
13911				if err != nil {
13912					return err
13913				}
13914				vmssnc.ID = &ID
13915			}
13916		}
13917	}
13918
13919	return nil
13920}
13921
13922// VirtualMachineScaleSetNetworkConfigurationDNSSettings describes a virtual machines scale sets network
13923// configuration's DNS settings.
13924type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
13925	// DNSServers - List of DNS servers IP addresses
13926	DNSServers *[]string `json:"dnsServers,omitempty"`
13927}
13928
13929// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network
13930// profile's IP configuration.
13931type VirtualMachineScaleSetNetworkConfigurationProperties struct {
13932	// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
13933	Primary *bool `json:"primary,omitempty"`
13934	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
13935	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
13936	// EnableFpga - Specifies whether the network interface is FPGA networking-enabled.
13937	EnableFpga *bool `json:"enableFpga,omitempty"`
13938	// NetworkSecurityGroup - The network security group.
13939	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
13940	// DNSSettings - The dns settings to be applied on the network interfaces.
13941	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
13942	// IPConfigurations - Specifies the IP configurations of the network interface.
13943	IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"`
13944	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
13945	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
13946}
13947
13948// VirtualMachineScaleSetNetworkProfile describes a virtual machine scale set network profile.
13949type VirtualMachineScaleSetNetworkProfile struct {
13950	// 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}'.
13951	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
13952	// NetworkInterfaceConfigurations - The list of network configurations.
13953	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
13954}
13955
13956// VirtualMachineScaleSetOSDisk describes a virtual machine scale set operating system disk.
13957type VirtualMachineScaleSetOSDisk struct {
13958	// Name - The disk name.
13959	Name *string `json:"name,omitempty"`
13960	// 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'
13961	Caching CachingTypes `json:"caching,omitempty"`
13962	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
13963	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
13964	// 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'
13965	CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
13966	// DiffDiskSettings - Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
13967	DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
13968	// DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
13969	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
13970	// 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'
13971	OsType OperatingSystemTypes `json:"osType,omitempty"`
13972	// Image - Specifies information about the unmanaged user image to base the scale set on.
13973	Image *VirtualHardDisk `json:"image,omitempty"`
13974	// VhdContainers - Specifies the container urls that are used to store operating system disks for the scale set.
13975	VhdContainers *[]string `json:"vhdContainers,omitempty"`
13976	// ManagedDisk - The managed disk parameters.
13977	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
13978}
13979
13980// VirtualMachineScaleSetOSProfile describes a virtual machine scale set OS profile.
13981type VirtualMachineScaleSetOSProfile struct {
13982	// 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.
13983	ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"`
13984	// 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)
13985	AdminUsername *string `json:"adminUsername,omitempty"`
13986	// 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)
13987	AdminPassword *string `json:"adminPassword,omitempty"`
13988	// 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)
13989	CustomData *string `json:"customData,omitempty"`
13990	// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
13991	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
13992	// 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).
13993	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
13994	// Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set.
13995	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
13996}
13997
13998// VirtualMachineScaleSetProperties describes the properties of a Virtual Machine Scale Set.
13999type VirtualMachineScaleSetProperties struct {
14000	// UpgradePolicy - The upgrade policy.
14001	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
14002	// AutomaticRepairsPolicy - Policy for automatic repairs.
14003	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
14004	// VirtualMachineProfile - The virtual machine profile.
14005	VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"`
14006	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
14007	ProvisioningState *string `json:"provisioningState,omitempty"`
14008	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
14009	Overprovision *bool `json:"overprovision,omitempty"`
14010	// DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
14011	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
14012	// UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
14013	UniqueID *string `json:"uniqueId,omitempty"`
14014	// 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.
14015	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
14016	// ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.
14017	ZoneBalance *bool `json:"zoneBalance,omitempty"`
14018	// PlatformFaultDomainCount - Fault Domain count for each placement group.
14019	PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
14020	// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. <br><br>Minimum api-version: 2018-04-01.
14021	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
14022	// HostGroup - Specifies information about the dedicated host group that the virtual machine scale set resides in. <br><br>Minimum api-version: 2020-06-01.
14023	HostGroup *SubResource `json:"hostGroup,omitempty"`
14024	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
14025	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
14026	// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
14027	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
14028}
14029
14030// MarshalJSON is the custom marshaler for VirtualMachineScaleSetProperties.
14031func (vmssp VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) {
14032	objectMap := make(map[string]interface{})
14033	if vmssp.UpgradePolicy != nil {
14034		objectMap["upgradePolicy"] = vmssp.UpgradePolicy
14035	}
14036	if vmssp.AutomaticRepairsPolicy != nil {
14037		objectMap["automaticRepairsPolicy"] = vmssp.AutomaticRepairsPolicy
14038	}
14039	if vmssp.VirtualMachineProfile != nil {
14040		objectMap["virtualMachineProfile"] = vmssp.VirtualMachineProfile
14041	}
14042	if vmssp.Overprovision != nil {
14043		objectMap["overprovision"] = vmssp.Overprovision
14044	}
14045	if vmssp.DoNotRunExtensionsOnOverprovisionedVMs != nil {
14046		objectMap["doNotRunExtensionsOnOverprovisionedVMs"] = vmssp.DoNotRunExtensionsOnOverprovisionedVMs
14047	}
14048	if vmssp.SinglePlacementGroup != nil {
14049		objectMap["singlePlacementGroup"] = vmssp.SinglePlacementGroup
14050	}
14051	if vmssp.ZoneBalance != nil {
14052		objectMap["zoneBalance"] = vmssp.ZoneBalance
14053	}
14054	if vmssp.PlatformFaultDomainCount != nil {
14055		objectMap["platformFaultDomainCount"] = vmssp.PlatformFaultDomainCount
14056	}
14057	if vmssp.ProximityPlacementGroup != nil {
14058		objectMap["proximityPlacementGroup"] = vmssp.ProximityPlacementGroup
14059	}
14060	if vmssp.HostGroup != nil {
14061		objectMap["hostGroup"] = vmssp.HostGroup
14062	}
14063	if vmssp.AdditionalCapabilities != nil {
14064		objectMap["additionalCapabilities"] = vmssp.AdditionalCapabilities
14065	}
14066	if vmssp.ScaleInPolicy != nil {
14067		objectMap["scaleInPolicy"] = vmssp.ScaleInPolicy
14068	}
14069	return json.Marshal(objectMap)
14070}
14071
14072// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP
14073// Configuration's PublicIPAddress configuration
14074type VirtualMachineScaleSetPublicIPAddressConfiguration struct {
14075	// Name - The publicIP address configuration name.
14076	Name                                                          *string `json:"name,omitempty"`
14077	*VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"`
14078}
14079
14080// MarshalJSON is the custom marshaler for VirtualMachineScaleSetPublicIPAddressConfiguration.
14081func (vmsspiac VirtualMachineScaleSetPublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
14082	objectMap := make(map[string]interface{})
14083	if vmsspiac.Name != nil {
14084		objectMap["name"] = vmsspiac.Name
14085	}
14086	if vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties != nil {
14087		objectMap["properties"] = vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties
14088	}
14089	return json.Marshal(objectMap)
14090}
14091
14092// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetPublicIPAddressConfiguration struct.
14093func (vmsspiac *VirtualMachineScaleSetPublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
14094	var m map[string]*json.RawMessage
14095	err := json.Unmarshal(body, &m)
14096	if err != nil {
14097		return err
14098	}
14099	for k, v := range m {
14100		switch k {
14101		case "name":
14102			if v != nil {
14103				var name string
14104				err = json.Unmarshal(*v, &name)
14105				if err != nil {
14106					return err
14107				}
14108				vmsspiac.Name = &name
14109			}
14110		case "properties":
14111			if v != nil {
14112				var virtualMachineScaleSetPublicIPAddressConfigurationProperties VirtualMachineScaleSetPublicIPAddressConfigurationProperties
14113				err = json.Unmarshal(*v, &virtualMachineScaleSetPublicIPAddressConfigurationProperties)
14114				if err != nil {
14115					return err
14116				}
14117				vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties = &virtualMachineScaleSetPublicIPAddressConfigurationProperties
14118			}
14119		}
14120	}
14121
14122	return nil
14123}
14124
14125// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets
14126// network configuration's DNS settings.
14127type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct {
14128	// 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
14129	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
14130}
14131
14132// VirtualMachineScaleSetPublicIPAddressConfigurationProperties describes a virtual machines scale set IP
14133// Configuration's PublicIPAddress configuration
14134type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
14135	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
14136	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
14137	// DNSSettings - The dns settings to be applied on the publicIP addresses .
14138	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
14139	// IPTags - The list of IP tags associated with the public IP address.
14140	IPTags *[]VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"`
14141	// PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses.
14142	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
14143	// PublicIPAddressVersion - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
14144	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
14145}
14146
14147// VirtualMachineScaleSetReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
14148type VirtualMachineScaleSetReimageParameters struct {
14149	// 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.
14150	InstanceIds *[]string `json:"instanceIds,omitempty"`
14151	// TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
14152	TempDisk *bool `json:"tempDisk,omitempty"`
14153}
14154
14155// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the
14156// results of a long-running operation.
14157type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
14158	azure.FutureAPI
14159	// Result returns the result of the asynchronous operation.
14160	// If the operation has not completed it will return an error.
14161	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
14162}
14163
14164// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and
14165// retrieving the results of a long-running operation.
14166type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct {
14167	azure.FutureAPI
14168	// Result returns the result of the asynchronous operation.
14169	// If the operation has not completed it will return an error.
14170	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
14171}
14172
14173// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving
14174// the results of a long-running operation.
14175type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
14176	azure.FutureAPI
14177	// Result returns the result of the asynchronous operation.
14178	// If the operation has not completed it will return an error.
14179	Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
14180}
14181
14182// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
14183// a long-running operation.
14184type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
14185	azure.FutureAPI
14186	// Result returns the result of the asynchronous operation.
14187	// If the operation has not completed it will return an error.
14188	Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
14189}
14190
14191// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a
14192// long-running operation.
14193type VirtualMachineScaleSetsDeallocateFuture struct {
14194	azure.FutureAPI
14195	// Result returns the result of the asynchronous operation.
14196	// If the operation has not completed it will return an error.
14197	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14198}
14199
14200// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
14201// long-running operation.
14202type VirtualMachineScaleSetsDeleteFuture struct {
14203	azure.FutureAPI
14204	// Result returns the result of the asynchronous operation.
14205	// If the operation has not completed it will return an error.
14206	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14207}
14208
14209// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of
14210// a long-running operation.
14211type VirtualMachineScaleSetsDeleteInstancesFuture struct {
14212	azure.FutureAPI
14213	// Result returns the result of the asynchronous operation.
14214	// If the operation has not completed it will return an error.
14215	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14216}
14217
14218// VirtualMachineScaleSetSku describes an available virtual machine scale set sku.
14219type VirtualMachineScaleSetSku struct {
14220	// ResourceType - READ-ONLY; The type of resource the sku applies to.
14221	ResourceType *string `json:"resourceType,omitempty"`
14222	// Sku - READ-ONLY; The Sku.
14223	Sku *Sku `json:"sku,omitempty"`
14224	// Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
14225	Capacity *VirtualMachineScaleSetSkuCapacity `json:"capacity,omitempty"`
14226}
14227
14228// VirtualMachineScaleSetSkuCapacity describes scaling information of a sku.
14229type VirtualMachineScaleSetSkuCapacity struct {
14230	// Minimum - READ-ONLY; The minimum capacity.
14231	Minimum *int64 `json:"minimum,omitempty"`
14232	// Maximum - READ-ONLY; The maximum capacity that can be set.
14233	Maximum *int64 `json:"maximum,omitempty"`
14234	// DefaultCapacity - READ-ONLY; The default capacity.
14235	DefaultCapacity *int64 `json:"defaultCapacity,omitempty"`
14236	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'VirtualMachineScaleSetSkuScaleTypeAutomatic', 'VirtualMachineScaleSetSkuScaleTypeNone'
14237	ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"`
14238}
14239
14240// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results
14241// of a long-running operation.
14242type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
14243	azure.FutureAPI
14244	// Result returns the result of the asynchronous operation.
14245	// If the operation has not completed it will return an error.
14246	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14247}
14248
14249// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a
14250// long-running operation.
14251type VirtualMachineScaleSetsPowerOffFuture struct {
14252	azure.FutureAPI
14253	// Result returns the result of the asynchronous operation.
14254	// If the operation has not completed it will return an error.
14255	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14256}
14257
14258// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a
14259// long-running operation.
14260type VirtualMachineScaleSetsRedeployFuture struct {
14261	azure.FutureAPI
14262	// Result returns the result of the asynchronous operation.
14263	// If the operation has not completed it will return an error.
14264	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14265}
14266
14267// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a
14268// long-running operation.
14269type VirtualMachineScaleSetsReimageAllFuture struct {
14270	azure.FutureAPI
14271	// Result returns the result of the asynchronous operation.
14272	// If the operation has not completed it will return an error.
14273	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14274}
14275
14276// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a
14277// long-running operation.
14278type VirtualMachineScaleSetsReimageFuture struct {
14279	azure.FutureAPI
14280	// Result returns the result of the asynchronous operation.
14281	// If the operation has not completed it will return an error.
14282	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14283}
14284
14285// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a
14286// long-running operation.
14287type VirtualMachineScaleSetsRestartFuture struct {
14288	azure.FutureAPI
14289	// Result returns the result of the asynchronous operation.
14290	// If the operation has not completed it will return an error.
14291	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14292}
14293
14294// VirtualMachineScaleSetsSetOrchestrationServiceStateFuture an abstraction for monitoring and retrieving
14295// the results of a long-running operation.
14296type VirtualMachineScaleSetsSetOrchestrationServiceStateFuture struct {
14297	azure.FutureAPI
14298	// Result returns the result of the asynchronous operation.
14299	// If the operation has not completed it will return an error.
14300	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14301}
14302
14303// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a
14304// long-running operation.
14305type VirtualMachineScaleSetsStartFuture struct {
14306	azure.FutureAPI
14307	// Result returns the result of the asynchronous operation.
14308	// If the operation has not completed it will return an error.
14309	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14310}
14311
14312// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile.
14313type VirtualMachineScaleSetStorageProfile struct {
14314	// 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.
14315	ImageReference *ImageReference `json:"imageReference,omitempty"`
14316	// 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).
14317	OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"`
14318	// 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).
14319	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
14320}
14321
14322// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
14323// long-running operation.
14324type VirtualMachineScaleSetsUpdateFuture struct {
14325	azure.FutureAPI
14326	// Result returns the result of the asynchronous operation.
14327	// If the operation has not completed it will return an error.
14328	Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
14329}
14330
14331// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of
14332// a long-running operation.
14333type VirtualMachineScaleSetsUpdateInstancesFuture struct {
14334	azure.FutureAPI
14335	// Result returns the result of the asynchronous operation.
14336	// If the operation has not completed it will return an error.
14337	Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
14338}
14339
14340// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set.
14341type VirtualMachineScaleSetUpdate struct {
14342	// Sku - The virtual machine scale set sku.
14343	Sku *Sku `json:"sku,omitempty"`
14344	// Plan - The purchase plan when deploying a virtual machine scale set from VM Marketplace images.
14345	Plan                                    *Plan `json:"plan,omitempty"`
14346	*VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"`
14347	// Identity - The identity of the virtual machine scale set, if configured.
14348	Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
14349	// Tags - Resource tags
14350	Tags map[string]*string `json:"tags"`
14351}
14352
14353// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate.
14354func (vmssu VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) {
14355	objectMap := make(map[string]interface{})
14356	if vmssu.Sku != nil {
14357		objectMap["sku"] = vmssu.Sku
14358	}
14359	if vmssu.Plan != nil {
14360		objectMap["plan"] = vmssu.Plan
14361	}
14362	if vmssu.VirtualMachineScaleSetUpdateProperties != nil {
14363		objectMap["properties"] = vmssu.VirtualMachineScaleSetUpdateProperties
14364	}
14365	if vmssu.Identity != nil {
14366		objectMap["identity"] = vmssu.Identity
14367	}
14368	if vmssu.Tags != nil {
14369		objectMap["tags"] = vmssu.Tags
14370	}
14371	return json.Marshal(objectMap)
14372}
14373
14374// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdate struct.
14375func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error {
14376	var m map[string]*json.RawMessage
14377	err := json.Unmarshal(body, &m)
14378	if err != nil {
14379		return err
14380	}
14381	for k, v := range m {
14382		switch k {
14383		case "sku":
14384			if v != nil {
14385				var sku Sku
14386				err = json.Unmarshal(*v, &sku)
14387				if err != nil {
14388					return err
14389				}
14390				vmssu.Sku = &sku
14391			}
14392		case "plan":
14393			if v != nil {
14394				var plan Plan
14395				err = json.Unmarshal(*v, &plan)
14396				if err != nil {
14397					return err
14398				}
14399				vmssu.Plan = &plan
14400			}
14401		case "properties":
14402			if v != nil {
14403				var virtualMachineScaleSetUpdateProperties VirtualMachineScaleSetUpdateProperties
14404				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateProperties)
14405				if err != nil {
14406					return err
14407				}
14408				vmssu.VirtualMachineScaleSetUpdateProperties = &virtualMachineScaleSetUpdateProperties
14409			}
14410		case "identity":
14411			if v != nil {
14412				var identity VirtualMachineScaleSetIdentity
14413				err = json.Unmarshal(*v, &identity)
14414				if err != nil {
14415					return err
14416				}
14417				vmssu.Identity = &identity
14418			}
14419		case "tags":
14420			if v != nil {
14421				var tags map[string]*string
14422				err = json.Unmarshal(*v, &tags)
14423				if err != nil {
14424					return err
14425				}
14426				vmssu.Tags = tags
14427			}
14428		}
14429	}
14430
14431	return nil
14432}
14433
14434// VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP
14435// configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the
14436// new subnet are in the same virtual network
14437type VirtualMachineScaleSetUpdateIPConfiguration struct {
14438	// Name - The IP configuration name.
14439	Name                                                   *string `json:"name,omitempty"`
14440	*VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"`
14441	// ID - Resource Id
14442	ID *string `json:"id,omitempty"`
14443}
14444
14445// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateIPConfiguration.
14446func (vmssuic VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) {
14447	objectMap := make(map[string]interface{})
14448	if vmssuic.Name != nil {
14449		objectMap["name"] = vmssuic.Name
14450	}
14451	if vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties != nil {
14452		objectMap["properties"] = vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties
14453	}
14454	if vmssuic.ID != nil {
14455		objectMap["id"] = vmssuic.ID
14456	}
14457	return json.Marshal(objectMap)
14458}
14459
14460// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateIPConfiguration struct.
14461func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body []byte) error {
14462	var m map[string]*json.RawMessage
14463	err := json.Unmarshal(body, &m)
14464	if err != nil {
14465		return err
14466	}
14467	for k, v := range m {
14468		switch k {
14469		case "name":
14470			if v != nil {
14471				var name string
14472				err = json.Unmarshal(*v, &name)
14473				if err != nil {
14474					return err
14475				}
14476				vmssuic.Name = &name
14477			}
14478		case "properties":
14479			if v != nil {
14480				var virtualMachineScaleSetUpdateIPConfigurationProperties VirtualMachineScaleSetUpdateIPConfigurationProperties
14481				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateIPConfigurationProperties)
14482				if err != nil {
14483					return err
14484				}
14485				vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties = &virtualMachineScaleSetUpdateIPConfigurationProperties
14486			}
14487		case "id":
14488			if v != nil {
14489				var ID string
14490				err = json.Unmarshal(*v, &ID)
14491				if err != nil {
14492					return err
14493				}
14494				vmssuic.ID = &ID
14495			}
14496		}
14497	}
14498
14499	return nil
14500}
14501
14502// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network
14503// profile's IP configuration properties.
14504type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
14505	// Subnet - The subnet.
14506	Subnet *APIEntityReference `json:"subnet,omitempty"`
14507	// Primary - Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.
14508	Primary *bool `json:"primary,omitempty"`
14509	// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
14510	PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
14511	// 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'
14512	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
14513	// ApplicationGatewayBackendAddressPools - The application gateway backend address pools.
14514	ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
14515	// ApplicationSecurityGroups - Specifies an array of references to application security group.
14516	ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
14517	// LoadBalancerBackendAddressPools - The load balancer backend address pools.
14518	LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
14519	// LoadBalancerInboundNatPools - The load balancer inbound nat pools.
14520	LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
14521}
14522
14523// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's
14524// network configurations.
14525type VirtualMachineScaleSetUpdateNetworkConfiguration struct {
14526	// Name - The network configuration name.
14527	Name                                                        *string `json:"name,omitempty"`
14528	*VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"`
14529	// ID - Resource Id
14530	ID *string `json:"id,omitempty"`
14531}
14532
14533// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateNetworkConfiguration.
14534func (vmssunc VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) {
14535	objectMap := make(map[string]interface{})
14536	if vmssunc.Name != nil {
14537		objectMap["name"] = vmssunc.Name
14538	}
14539	if vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties != nil {
14540		objectMap["properties"] = vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties
14541	}
14542	if vmssunc.ID != nil {
14543		objectMap["id"] = vmssunc.ID
14544	}
14545	return json.Marshal(objectMap)
14546}
14547
14548// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateNetworkConfiguration struct.
14549func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(body []byte) error {
14550	var m map[string]*json.RawMessage
14551	err := json.Unmarshal(body, &m)
14552	if err != nil {
14553		return err
14554	}
14555	for k, v := range m {
14556		switch k {
14557		case "name":
14558			if v != nil {
14559				var name string
14560				err = json.Unmarshal(*v, &name)
14561				if err != nil {
14562					return err
14563				}
14564				vmssunc.Name = &name
14565			}
14566		case "properties":
14567			if v != nil {
14568				var virtualMachineScaleSetUpdateNetworkConfigurationProperties VirtualMachineScaleSetUpdateNetworkConfigurationProperties
14569				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateNetworkConfigurationProperties)
14570				if err != nil {
14571					return err
14572				}
14573				vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties = &virtualMachineScaleSetUpdateNetworkConfigurationProperties
14574			}
14575		case "id":
14576			if v != nil {
14577				var ID string
14578				err = json.Unmarshal(*v, &ID)
14579				if err != nil {
14580					return err
14581				}
14582				vmssunc.ID = &ID
14583			}
14584		}
14585	}
14586
14587	return nil
14588}
14589
14590// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set
14591// updatable network profile's IP configuration.Use this object for updating network profile's IP
14592// Configuration.
14593type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct {
14594	// Primary - Whether this is a primary NIC on a virtual machine.
14595	Primary *bool `json:"primary,omitempty"`
14596	// EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
14597	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
14598	// EnableFpga - Specifies whether the network interface is FPGA networking-enabled.
14599	EnableFpga *bool `json:"enableFpga,omitempty"`
14600	// NetworkSecurityGroup - The network security group.
14601	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
14602	// DNSSettings - The dns settings to be applied on the network interfaces.
14603	DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
14604	// IPConfigurations - The virtual machine scale set IP Configuration.
14605	IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"`
14606	// EnableIPForwarding - Whether IP forwarding enabled on this NIC.
14607	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
14608}
14609
14610// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile.
14611type VirtualMachineScaleSetUpdateNetworkProfile struct {
14612	// 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}'.
14613	HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
14614	// NetworkInterfaceConfigurations - The list of network configurations.
14615	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
14616}
14617
14618// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update
14619// Object. This should be used for Updating VMSS OS Disk.
14620type VirtualMachineScaleSetUpdateOSDisk struct {
14621	// Caching - The caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
14622	Caching CachingTypes `json:"caching,omitempty"`
14623	// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
14624	WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
14625	// DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
14626	DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
14627	// 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.
14628	Image *VirtualHardDisk `json:"image,omitempty"`
14629	// VhdContainers - The list of virtual hard disk container uris.
14630	VhdContainers *[]string `json:"vhdContainers,omitempty"`
14631	// ManagedDisk - The managed disk parameters.
14632	ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
14633}
14634
14635// VirtualMachineScaleSetUpdateOSProfile describes a virtual machine scale set OS profile.
14636type VirtualMachineScaleSetUpdateOSProfile struct {
14637	// CustomData - A base-64 encoded string of custom data.
14638	CustomData *string `json:"customData,omitempty"`
14639	// WindowsConfiguration - The Windows Configuration of the OS profile.
14640	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
14641	// LinuxConfiguration - The Linux Configuration of the OS profile.
14642	LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
14643	// Secrets - The List of certificates for addition to the VM.
14644	Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
14645}
14646
14647// VirtualMachineScaleSetUpdateProperties describes the properties of a Virtual Machine Scale Set.
14648type VirtualMachineScaleSetUpdateProperties struct {
14649	// UpgradePolicy - The upgrade policy.
14650	UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
14651	// AutomaticRepairsPolicy - Policy for automatic repairs.
14652	AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
14653	// VirtualMachineProfile - The virtual machine profile.
14654	VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"`
14655	// Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
14656	Overprovision *bool `json:"overprovision,omitempty"`
14657	// DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
14658	DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
14659	// 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.
14660	SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
14661	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
14662	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
14663	// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
14664	ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
14665	// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. <br><br>Minimum api-version: 2018-04-01.
14666	ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
14667}
14668
14669// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP
14670// Configuration's PublicIPAddress configuration
14671type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct {
14672	// Name - The publicIP address configuration name.
14673	Name                                                                *string `json:"name,omitempty"`
14674	*VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"`
14675}
14676
14677// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.
14678func (vmssupiac VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
14679	objectMap := make(map[string]interface{})
14680	if vmssupiac.Name != nil {
14681		objectMap["name"] = vmssupiac.Name
14682	}
14683	if vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties != nil {
14684		objectMap["properties"] = vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
14685	}
14686	return json.Marshal(objectMap)
14687}
14688
14689// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct.
14690func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
14691	var m map[string]*json.RawMessage
14692	err := json.Unmarshal(body, &m)
14693	if err != nil {
14694		return err
14695	}
14696	for k, v := range m {
14697		switch k {
14698		case "name":
14699			if v != nil {
14700				var name string
14701				err = json.Unmarshal(*v, &name)
14702				if err != nil {
14703					return err
14704				}
14705				vmssupiac.Name = &name
14706			}
14707		case "properties":
14708			if v != nil {
14709				var virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
14710				err = json.Unmarshal(*v, &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties)
14711				if err != nil {
14712					return err
14713				}
14714				vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
14715			}
14716		}
14717	}
14718
14719	return nil
14720}
14721
14722// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale
14723// set IP Configuration's PublicIPAddress configuration
14724type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct {
14725	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
14726	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
14727	// DNSSettings - The dns settings to be applied on the publicIP addresses .
14728	DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
14729}
14730
14731// VirtualMachineScaleSetUpdateStorageProfile describes a virtual machine scale set storage profile.
14732type VirtualMachineScaleSetUpdateStorageProfile struct {
14733	// ImageReference - The image reference.
14734	ImageReference *ImageReference `json:"imageReference,omitempty"`
14735	// OsDisk - The OS disk.
14736	OsDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"`
14737	// DataDisks - The data disks.
14738	DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
14739}
14740
14741// VirtualMachineScaleSetUpdateVMProfile describes a virtual machine scale set virtual machine profile.
14742type VirtualMachineScaleSetUpdateVMProfile struct {
14743	// OsProfile - The virtual machine scale set OS profile.
14744	OsProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"`
14745	// StorageProfile - The virtual machine scale set storage profile.
14746	StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"`
14747	// NetworkProfile - The virtual machine scale set network profile.
14748	NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"`
14749	// SecurityProfile - The virtual machine scale set Security profile
14750	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
14751	// DiagnosticsProfile - The virtual machine scale set diagnostics profile.
14752	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
14753	// ExtensionProfile - The virtual machine scale set extension profile.
14754	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
14755	// LicenseType - The license type, which is for bring your own license scenario.
14756	LicenseType *string `json:"licenseType,omitempty"`
14757	// BillingProfile - Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01.
14758	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
14759	// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
14760	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
14761}
14762
14763// VirtualMachineScaleSetVM describes a virtual machine scale set virtual machine.
14764type VirtualMachineScaleSetVM struct {
14765	autorest.Response `json:"-"`
14766	// InstanceID - READ-ONLY; The virtual machine instance ID.
14767	InstanceID *string `json:"instanceId,omitempty"`
14768	// Sku - READ-ONLY; The virtual machine SKU.
14769	Sku                                 *Sku `json:"sku,omitempty"`
14770	*VirtualMachineScaleSetVMProperties `json:"properties,omitempty"`
14771	// 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**.
14772	Plan *Plan `json:"plan,omitempty"`
14773	// Resources - READ-ONLY; The virtual machine child extension resources.
14774	Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
14775	// Zones - READ-ONLY; The virtual machine zones.
14776	Zones *[]string `json:"zones,omitempty"`
14777	// ID - READ-ONLY; Resource Id
14778	ID *string `json:"id,omitempty"`
14779	// Name - READ-ONLY; Resource name
14780	Name *string `json:"name,omitempty"`
14781	// Type - READ-ONLY; Resource type
14782	Type *string `json:"type,omitempty"`
14783	// Location - Resource location
14784	Location *string `json:"location,omitempty"`
14785	// Tags - Resource tags
14786	Tags map[string]*string `json:"tags"`
14787}
14788
14789// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVM.
14790func (vmssv VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) {
14791	objectMap := make(map[string]interface{})
14792	if vmssv.VirtualMachineScaleSetVMProperties != nil {
14793		objectMap["properties"] = vmssv.VirtualMachineScaleSetVMProperties
14794	}
14795	if vmssv.Plan != nil {
14796		objectMap["plan"] = vmssv.Plan
14797	}
14798	if vmssv.Location != nil {
14799		objectMap["location"] = vmssv.Location
14800	}
14801	if vmssv.Tags != nil {
14802		objectMap["tags"] = vmssv.Tags
14803	}
14804	return json.Marshal(objectMap)
14805}
14806
14807// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVM struct.
14808func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error {
14809	var m map[string]*json.RawMessage
14810	err := json.Unmarshal(body, &m)
14811	if err != nil {
14812		return err
14813	}
14814	for k, v := range m {
14815		switch k {
14816		case "instanceId":
14817			if v != nil {
14818				var instanceID string
14819				err = json.Unmarshal(*v, &instanceID)
14820				if err != nil {
14821					return err
14822				}
14823				vmssv.InstanceID = &instanceID
14824			}
14825		case "sku":
14826			if v != nil {
14827				var sku Sku
14828				err = json.Unmarshal(*v, &sku)
14829				if err != nil {
14830					return err
14831				}
14832				vmssv.Sku = &sku
14833			}
14834		case "properties":
14835			if v != nil {
14836				var virtualMachineScaleSetVMProperties VirtualMachineScaleSetVMProperties
14837				err = json.Unmarshal(*v, &virtualMachineScaleSetVMProperties)
14838				if err != nil {
14839					return err
14840				}
14841				vmssv.VirtualMachineScaleSetVMProperties = &virtualMachineScaleSetVMProperties
14842			}
14843		case "plan":
14844			if v != nil {
14845				var plan Plan
14846				err = json.Unmarshal(*v, &plan)
14847				if err != nil {
14848					return err
14849				}
14850				vmssv.Plan = &plan
14851			}
14852		case "resources":
14853			if v != nil {
14854				var resources []VirtualMachineExtension
14855				err = json.Unmarshal(*v, &resources)
14856				if err != nil {
14857					return err
14858				}
14859				vmssv.Resources = &resources
14860			}
14861		case "zones":
14862			if v != nil {
14863				var zones []string
14864				err = json.Unmarshal(*v, &zones)
14865				if err != nil {
14866					return err
14867				}
14868				vmssv.Zones = &zones
14869			}
14870		case "id":
14871			if v != nil {
14872				var ID string
14873				err = json.Unmarshal(*v, &ID)
14874				if err != nil {
14875					return err
14876				}
14877				vmssv.ID = &ID
14878			}
14879		case "name":
14880			if v != nil {
14881				var name string
14882				err = json.Unmarshal(*v, &name)
14883				if err != nil {
14884					return err
14885				}
14886				vmssv.Name = &name
14887			}
14888		case "type":
14889			if v != nil {
14890				var typeVar string
14891				err = json.Unmarshal(*v, &typeVar)
14892				if err != nil {
14893					return err
14894				}
14895				vmssv.Type = &typeVar
14896			}
14897		case "location":
14898			if v != nil {
14899				var location string
14900				err = json.Unmarshal(*v, &location)
14901				if err != nil {
14902					return err
14903				}
14904				vmssv.Location = &location
14905			}
14906		case "tags":
14907			if v != nil {
14908				var tags map[string]*string
14909				err = json.Unmarshal(*v, &tags)
14910				if err != nil {
14911					return err
14912				}
14913				vmssv.Tags = tags
14914			}
14915		}
14916	}
14917
14918	return nil
14919}
14920
14921// VirtualMachineScaleSetVMExtension describes a VMSS VM Extension.
14922type VirtualMachineScaleSetVMExtension struct {
14923	autorest.Response `json:"-"`
14924	// Name - READ-ONLY; The name of the extension.
14925	Name *string `json:"name,omitempty"`
14926	// Type - READ-ONLY; Resource type
14927	Type                               *string `json:"type,omitempty"`
14928	*VirtualMachineExtensionProperties `json:"properties,omitempty"`
14929	// ID - READ-ONLY; Resource Id
14930	ID *string `json:"id,omitempty"`
14931}
14932
14933// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtension.
14934func (vmssve VirtualMachineScaleSetVMExtension) MarshalJSON() ([]byte, error) {
14935	objectMap := make(map[string]interface{})
14936	if vmssve.VirtualMachineExtensionProperties != nil {
14937		objectMap["properties"] = vmssve.VirtualMachineExtensionProperties
14938	}
14939	return json.Marshal(objectMap)
14940}
14941
14942// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtension struct.
14943func (vmssve *VirtualMachineScaleSetVMExtension) UnmarshalJSON(body []byte) error {
14944	var m map[string]*json.RawMessage
14945	err := json.Unmarshal(body, &m)
14946	if err != nil {
14947		return err
14948	}
14949	for k, v := range m {
14950		switch k {
14951		case "name":
14952			if v != nil {
14953				var name string
14954				err = json.Unmarshal(*v, &name)
14955				if err != nil {
14956					return err
14957				}
14958				vmssve.Name = &name
14959			}
14960		case "type":
14961			if v != nil {
14962				var typeVar string
14963				err = json.Unmarshal(*v, &typeVar)
14964				if err != nil {
14965					return err
14966				}
14967				vmssve.Type = &typeVar
14968			}
14969		case "properties":
14970			if v != nil {
14971				var virtualMachineExtensionProperties VirtualMachineExtensionProperties
14972				err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
14973				if err != nil {
14974					return err
14975				}
14976				vmssve.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
14977			}
14978		case "id":
14979			if v != nil {
14980				var ID string
14981				err = json.Unmarshal(*v, &ID)
14982				if err != nil {
14983					return err
14984				}
14985				vmssve.ID = &ID
14986			}
14987		}
14988	}
14989
14990	return nil
14991}
14992
14993// VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
14994// results of a long-running operation.
14995type VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture struct {
14996	azure.FutureAPI
14997	// Result returns the result of the asynchronous operation.
14998	// If the operation has not completed it will return an error.
14999	Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error)
15000}
15001
15002// VirtualMachineScaleSetVMExtensionsDeleteFuture an abstraction for monitoring and retrieving the results
15003// of a long-running operation.
15004type VirtualMachineScaleSetVMExtensionsDeleteFuture struct {
15005	azure.FutureAPI
15006	// Result returns the result of the asynchronous operation.
15007	// If the operation has not completed it will return an error.
15008	Result func(VirtualMachineScaleSetVMExtensionsClient) (autorest.Response, error)
15009}
15010
15011// VirtualMachineScaleSetVMExtensionsListResult the List VMSS VM Extension operation response
15012type VirtualMachineScaleSetVMExtensionsListResult struct {
15013	autorest.Response `json:"-"`
15014	// Value - The list of VMSS VM extensions
15015	Value *[]VirtualMachineScaleSetVMExtension `json:"value,omitempty"`
15016}
15017
15018// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine
15019// scale set.
15020type VirtualMachineScaleSetVMExtensionsSummary struct {
15021	// Name - READ-ONLY; The extension name.
15022	Name *string `json:"name,omitempty"`
15023	// StatusesSummary - READ-ONLY; The extensions information.
15024	StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
15025}
15026
15027// VirtualMachineScaleSetVMExtensionsUpdateFuture an abstraction for monitoring and retrieving the results
15028// of a long-running operation.
15029type VirtualMachineScaleSetVMExtensionsUpdateFuture struct {
15030	azure.FutureAPI
15031	// Result returns the result of the asynchronous operation.
15032	// If the operation has not completed it will return an error.
15033	Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error)
15034}
15035
15036// VirtualMachineScaleSetVMExtensionUpdate describes a VMSS VM Extension.
15037type VirtualMachineScaleSetVMExtensionUpdate struct {
15038	// Name - READ-ONLY; The name of the extension.
15039	Name *string `json:"name,omitempty"`
15040	// Type - READ-ONLY; Resource type
15041	Type                                     *string `json:"type,omitempty"`
15042	*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
15043	// ID - READ-ONLY; Resource Id
15044	ID *string `json:"id,omitempty"`
15045}
15046
15047// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionUpdate.
15048func (vmssveu VirtualMachineScaleSetVMExtensionUpdate) MarshalJSON() ([]byte, error) {
15049	objectMap := make(map[string]interface{})
15050	if vmssveu.VirtualMachineExtensionUpdateProperties != nil {
15051		objectMap["properties"] = vmssveu.VirtualMachineExtensionUpdateProperties
15052	}
15053	return json.Marshal(objectMap)
15054}
15055
15056// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtensionUpdate struct.
15057func (vmssveu *VirtualMachineScaleSetVMExtensionUpdate) UnmarshalJSON(body []byte) error {
15058	var m map[string]*json.RawMessage
15059	err := json.Unmarshal(body, &m)
15060	if err != nil {
15061		return err
15062	}
15063	for k, v := range m {
15064		switch k {
15065		case "name":
15066			if v != nil {
15067				var name string
15068				err = json.Unmarshal(*v, &name)
15069				if err != nil {
15070					return err
15071				}
15072				vmssveu.Name = &name
15073			}
15074		case "type":
15075			if v != nil {
15076				var typeVar string
15077				err = json.Unmarshal(*v, &typeVar)
15078				if err != nil {
15079					return err
15080				}
15081				vmssveu.Type = &typeVar
15082			}
15083		case "properties":
15084			if v != nil {
15085				var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
15086				err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
15087				if err != nil {
15088					return err
15089				}
15090				vmssveu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
15091			}
15092		case "id":
15093			if v != nil {
15094				var ID string
15095				err = json.Unmarshal(*v, &ID)
15096				if err != nil {
15097					return err
15098				}
15099				vmssveu.ID = &ID
15100			}
15101		}
15102	}
15103
15104	return nil
15105}
15106
15107// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale
15108// set.
15109type VirtualMachineScaleSetVMInstanceIDs struct {
15110	// 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.
15111	InstanceIds *[]string `json:"instanceIds,omitempty"`
15112}
15113
15114// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM
15115// scale set.
15116type VirtualMachineScaleSetVMInstanceRequiredIDs struct {
15117	// InstanceIds - The virtual machine scale set instance ids.
15118	InstanceIds *[]string `json:"instanceIds,omitempty"`
15119}
15120
15121// VirtualMachineScaleSetVMInstanceView the instance view of a virtual machine scale set VM.
15122type VirtualMachineScaleSetVMInstanceView struct {
15123	autorest.Response `json:"-"`
15124	// PlatformUpdateDomain - The Update Domain count.
15125	PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
15126	// PlatformFaultDomain - The Fault Domain count.
15127	PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
15128	// RdpThumbPrint - The Remote desktop certificate thumbprint.
15129	RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
15130	// VMAgent - The VM Agent running on the virtual machine.
15131	VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
15132	// MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
15133	MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
15134	// Disks - The disks information.
15135	Disks *[]DiskInstanceView `json:"disks,omitempty"`
15136	// Extensions - The extensions information.
15137	Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
15138	// VMHealth - READ-ONLY; The health status for the VM.
15139	VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
15140	// 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.
15141	BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
15142	// Statuses - The resource status information.
15143	Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
15144	// AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. <br><br>Minimum api-version: 2020-06-01.
15145	AssignedHost *string `json:"assignedHost,omitempty"`
15146	// PlacementGroupID - The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId.
15147	PlacementGroupID *string `json:"placementGroupId,omitempty"`
15148}
15149
15150// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMInstanceView.
15151func (vmssviv VirtualMachineScaleSetVMInstanceView) MarshalJSON() ([]byte, error) {
15152	objectMap := make(map[string]interface{})
15153	if vmssviv.PlatformUpdateDomain != nil {
15154		objectMap["platformUpdateDomain"] = vmssviv.PlatformUpdateDomain
15155	}
15156	if vmssviv.PlatformFaultDomain != nil {
15157		objectMap["platformFaultDomain"] = vmssviv.PlatformFaultDomain
15158	}
15159	if vmssviv.RdpThumbPrint != nil {
15160		objectMap["rdpThumbPrint"] = vmssviv.RdpThumbPrint
15161	}
15162	if vmssviv.VMAgent != nil {
15163		objectMap["vmAgent"] = vmssviv.VMAgent
15164	}
15165	if vmssviv.MaintenanceRedeployStatus != nil {
15166		objectMap["maintenanceRedeployStatus"] = vmssviv.MaintenanceRedeployStatus
15167	}
15168	if vmssviv.Disks != nil {
15169		objectMap["disks"] = vmssviv.Disks
15170	}
15171	if vmssviv.Extensions != nil {
15172		objectMap["extensions"] = vmssviv.Extensions
15173	}
15174	if vmssviv.BootDiagnostics != nil {
15175		objectMap["bootDiagnostics"] = vmssviv.BootDiagnostics
15176	}
15177	if vmssviv.Statuses != nil {
15178		objectMap["statuses"] = vmssviv.Statuses
15179	}
15180	if vmssviv.PlacementGroupID != nil {
15181		objectMap["placementGroupId"] = vmssviv.PlacementGroupID
15182	}
15183	return json.Marshal(objectMap)
15184}
15185
15186// VirtualMachineScaleSetVMListResult the List Virtual Machine Scale Set VMs operation response.
15187type VirtualMachineScaleSetVMListResult struct {
15188	autorest.Response `json:"-"`
15189	// Value - The list of virtual machine scale sets VMs.
15190	Value *[]VirtualMachineScaleSetVM `json:"value,omitempty"`
15191	// 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
15192	NextLink *string `json:"nextLink,omitempty"`
15193}
15194
15195// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of
15196// VirtualMachineScaleSetVM values.
15197type VirtualMachineScaleSetVMListResultIterator struct {
15198	i    int
15199	page VirtualMachineScaleSetVMListResultPage
15200}
15201
15202// NextWithContext advances to the next value.  If there was an error making
15203// the request the iterator does not advance and the error is returned.
15204func (iter *VirtualMachineScaleSetVMListResultIterator) NextWithContext(ctx context.Context) (err error) {
15205	if tracing.IsEnabled() {
15206		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultIterator.NextWithContext")
15207		defer func() {
15208			sc := -1
15209			if iter.Response().Response.Response != nil {
15210				sc = iter.Response().Response.Response.StatusCode
15211			}
15212			tracing.EndSpan(ctx, sc, err)
15213		}()
15214	}
15215	iter.i++
15216	if iter.i < len(iter.page.Values()) {
15217		return nil
15218	}
15219	err = iter.page.NextWithContext(ctx)
15220	if err != nil {
15221		iter.i--
15222		return err
15223	}
15224	iter.i = 0
15225	return nil
15226}
15227
15228// Next advances to the next value.  If there was an error making
15229// the request the iterator does not advance and the error is returned.
15230// Deprecated: Use NextWithContext() instead.
15231func (iter *VirtualMachineScaleSetVMListResultIterator) Next() error {
15232	return iter.NextWithContext(context.Background())
15233}
15234
15235// NotDone returns true if the enumeration should be started or is not yet complete.
15236func (iter VirtualMachineScaleSetVMListResultIterator) NotDone() bool {
15237	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15238}
15239
15240// Response returns the raw server response from the last page request.
15241func (iter VirtualMachineScaleSetVMListResultIterator) Response() VirtualMachineScaleSetVMListResult {
15242	return iter.page.Response()
15243}
15244
15245// Value returns the current value or a zero-initialized value if the
15246// iterator has advanced beyond the end of the collection.
15247func (iter VirtualMachineScaleSetVMListResultIterator) Value() VirtualMachineScaleSetVM {
15248	if !iter.page.NotDone() {
15249		return VirtualMachineScaleSetVM{}
15250	}
15251	return iter.page.Values()[iter.i]
15252}
15253
15254// Creates a new instance of the VirtualMachineScaleSetVMListResultIterator type.
15255func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator {
15256	return VirtualMachineScaleSetVMListResultIterator{page: page}
15257}
15258
15259// IsEmpty returns true if the ListResult contains no values.
15260func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool {
15261	return vmssvlr.Value == nil || len(*vmssvlr.Value) == 0
15262}
15263
15264// hasNextLink returns true if the NextLink is not empty.
15265func (vmssvlr VirtualMachineScaleSetVMListResult) hasNextLink() bool {
15266	return vmssvlr.NextLink != nil && len(*vmssvlr.NextLink) != 0
15267}
15268
15269// virtualMachineScaleSetVMListResultPreparer prepares a request to retrieve the next set of results.
15270// It returns nil if no more results exist.
15271func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer(ctx context.Context) (*http.Request, error) {
15272	if !vmssvlr.hasNextLink() {
15273		return nil, nil
15274	}
15275	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15276		autorest.AsJSON(),
15277		autorest.AsGet(),
15278		autorest.WithBaseURL(to.String(vmssvlr.NextLink)))
15279}
15280
15281// VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values.
15282type VirtualMachineScaleSetVMListResultPage struct {
15283	fn      func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)
15284	vmssvlr VirtualMachineScaleSetVMListResult
15285}
15286
15287// NextWithContext advances to the next page of values.  If there was an error making
15288// the request the page does not advance and the error is returned.
15289func (page *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context.Context) (err error) {
15290	if tracing.IsEnabled() {
15291		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultPage.NextWithContext")
15292		defer func() {
15293			sc := -1
15294			if page.Response().Response.Response != nil {
15295				sc = page.Response().Response.Response.StatusCode
15296			}
15297			tracing.EndSpan(ctx, sc, err)
15298		}()
15299	}
15300	for {
15301		next, err := page.fn(ctx, page.vmssvlr)
15302		if err != nil {
15303			return err
15304		}
15305		page.vmssvlr = next
15306		if !next.hasNextLink() || !next.IsEmpty() {
15307			break
15308		}
15309	}
15310	return nil
15311}
15312
15313// Next advances to the next page of values.  If there was an error making
15314// the request the page does not advance and the error is returned.
15315// Deprecated: Use NextWithContext() instead.
15316func (page *VirtualMachineScaleSetVMListResultPage) Next() error {
15317	return page.NextWithContext(context.Background())
15318}
15319
15320// NotDone returns true if the page enumeration should be started or is not yet complete.
15321func (page VirtualMachineScaleSetVMListResultPage) NotDone() bool {
15322	return !page.vmssvlr.IsEmpty()
15323}
15324
15325// Response returns the raw server response from the last page request.
15326func (page VirtualMachineScaleSetVMListResultPage) Response() VirtualMachineScaleSetVMListResult {
15327	return page.vmssvlr
15328}
15329
15330// Values returns the slice of values for the current page or nil if there are no values.
15331func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScaleSetVM {
15332	if page.vmssvlr.IsEmpty() {
15333		return nil
15334	}
15335	return *page.vmssvlr.Value
15336}
15337
15338// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type.
15339func NewVirtualMachineScaleSetVMListResultPage(cur VirtualMachineScaleSetVMListResult, getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
15340	return VirtualMachineScaleSetVMListResultPage{
15341		fn:      getNextPage,
15342		vmssvlr: cur,
15343	}
15344}
15345
15346// VirtualMachineScaleSetVMNetworkProfileConfiguration describes a virtual machine scale set VM network
15347// profile.
15348type VirtualMachineScaleSetVMNetworkProfileConfiguration struct {
15349	// NetworkInterfaceConfigurations - The list of network configurations.
15350	NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
15351}
15352
15353// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile.
15354type VirtualMachineScaleSetVMProfile struct {
15355	// OsProfile - Specifies the operating system settings for the virtual machines in the scale set.
15356	OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"`
15357	// StorageProfile - Specifies the storage settings for the virtual machine disks.
15358	StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"`
15359	// NetworkProfile - Specifies properties of the network interfaces of the virtual machines in the scale set.
15360	NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"`
15361	// SecurityProfile - Specifies the Security related profile settings for the virtual machines in the scale set.
15362	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
15363	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
15364	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
15365	// ExtensionProfile - Specifies a collection of settings for extensions installed on virtual machines in the scale set.
15366	ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
15367	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15
15368	LicenseType *string `json:"licenseType,omitempty"`
15369	// Priority - Specifies the priority for the virtual machines in the scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot'
15370	Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
15371	// EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
15372	EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
15373	// BillingProfile - Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01.
15374	BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
15375	// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
15376	ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
15377}
15378
15379// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual
15380// machine.
15381type VirtualMachineScaleSetVMProperties struct {
15382	// LatestModelApplied - READ-ONLY; Specifies whether the latest model has been applied to the virtual machine.
15383	LatestModelApplied *bool `json:"latestModelApplied,omitempty"`
15384	// VMID - READ-ONLY; Azure VM unique ID.
15385	VMID *string `json:"vmId,omitempty"`
15386	// InstanceView - READ-ONLY; The virtual machine instance view.
15387	InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty"`
15388	// HardwareProfile - Specifies the hardware settings for the virtual machine.
15389	HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
15390	// StorageProfile - Specifies the storage settings for the virtual machine disks.
15391	StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
15392	// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
15393	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
15394	// OsProfile - Specifies the operating system settings for the virtual machine.
15395	OsProfile *OSProfile `json:"osProfile,omitempty"`
15396	// SecurityProfile - Specifies the Security related profile settings for the virtual machine.
15397	SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
15398	// NetworkProfile - Specifies the network interfaces of the virtual machine.
15399	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
15400	// NetworkProfileConfiguration - Specifies the network profile configuration of the virtual machine.
15401	NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration `json:"networkProfileConfiguration,omitempty"`
15402	// DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
15403	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
15404	// 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.
15405	AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
15406	// ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
15407	ProvisioningState *string `json:"provisioningState,omitempty"`
15408	// LicenseType - Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15
15409	LicenseType *string `json:"licenseType,omitempty"`
15410	// ModelDefinitionApplied - READ-ONLY; Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine.
15411	ModelDefinitionApplied *string `json:"modelDefinitionApplied,omitempty"`
15412	// ProtectionPolicy - Specifies the protection policy of the virtual machine.
15413	ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy `json:"protectionPolicy,omitempty"`
15414}
15415
15416// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMProperties.
15417func (vmssvp VirtualMachineScaleSetVMProperties) MarshalJSON() ([]byte, error) {
15418	objectMap := make(map[string]interface{})
15419	if vmssvp.HardwareProfile != nil {
15420		objectMap["hardwareProfile"] = vmssvp.HardwareProfile
15421	}
15422	if vmssvp.StorageProfile != nil {
15423		objectMap["storageProfile"] = vmssvp.StorageProfile
15424	}
15425	if vmssvp.AdditionalCapabilities != nil {
15426		objectMap["additionalCapabilities"] = vmssvp.AdditionalCapabilities
15427	}
15428	if vmssvp.OsProfile != nil {
15429		objectMap["osProfile"] = vmssvp.OsProfile
15430	}
15431	if vmssvp.SecurityProfile != nil {
15432		objectMap["securityProfile"] = vmssvp.SecurityProfile
15433	}
15434	if vmssvp.NetworkProfile != nil {
15435		objectMap["networkProfile"] = vmssvp.NetworkProfile
15436	}
15437	if vmssvp.NetworkProfileConfiguration != nil {
15438		objectMap["networkProfileConfiguration"] = vmssvp.NetworkProfileConfiguration
15439	}
15440	if vmssvp.DiagnosticsProfile != nil {
15441		objectMap["diagnosticsProfile"] = vmssvp.DiagnosticsProfile
15442	}
15443	if vmssvp.AvailabilitySet != nil {
15444		objectMap["availabilitySet"] = vmssvp.AvailabilitySet
15445	}
15446	if vmssvp.LicenseType != nil {
15447		objectMap["licenseType"] = vmssvp.LicenseType
15448	}
15449	if vmssvp.ProtectionPolicy != nil {
15450		objectMap["protectionPolicy"] = vmssvp.ProtectionPolicy
15451	}
15452	return json.Marshal(objectMap)
15453}
15454
15455// VirtualMachineScaleSetVMProtectionPolicy the protection policy of a virtual machine scale set VM.
15456type VirtualMachineScaleSetVMProtectionPolicy struct {
15457	// ProtectFromScaleIn - Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.
15458	ProtectFromScaleIn *bool `json:"protectFromScaleIn,omitempty"`
15459	// ProtectFromScaleSetActions - Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM.
15460	ProtectFromScaleSetActions *bool `json:"protectFromScaleSetActions,omitempty"`
15461}
15462
15463// VirtualMachineScaleSetVMReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
15464type VirtualMachineScaleSetVMReimageParameters struct {
15465	// TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
15466	TempDisk *bool `json:"tempDisk,omitempty"`
15467}
15468
15469// VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
15470// results of a long-running operation.
15471type VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture struct {
15472	azure.FutureAPI
15473	// Result returns the result of the asynchronous operation.
15474	// If the operation has not completed it will return an error.
15475	Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error)
15476}
15477
15478// VirtualMachineScaleSetVMRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results
15479// of a long-running operation.
15480type VirtualMachineScaleSetVMRunCommandsDeleteFuture struct {
15481	azure.FutureAPI
15482	// Result returns the result of the asynchronous operation.
15483	// If the operation has not completed it will return an error.
15484	Result func(VirtualMachineScaleSetVMRunCommandsClient) (autorest.Response, error)
15485}
15486
15487// VirtualMachineScaleSetVMRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results
15488// of a long-running operation.
15489type VirtualMachineScaleSetVMRunCommandsUpdateFuture struct {
15490	azure.FutureAPI
15491	// Result returns the result of the asynchronous operation.
15492	// If the operation has not completed it will return an error.
15493	Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error)
15494}
15495
15496// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a
15497// long-running operation.
15498type VirtualMachineScaleSetVMsDeallocateFuture struct {
15499	azure.FutureAPI
15500	// Result returns the result of the asynchronous operation.
15501	// If the operation has not completed it will return an error.
15502	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
15503}
15504
15505// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
15506// long-running operation.
15507type VirtualMachineScaleSetVMsDeleteFuture struct {
15508	azure.FutureAPI
15509	// Result returns the result of the asynchronous operation.
15510	// If the operation has not completed it will return an error.
15511	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
15512}
15513
15514// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the
15515// results of a long-running operation.
15516type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
15517	azure.FutureAPI
15518	// Result returns the result of the asynchronous operation.
15519	// If the operation has not completed it will return an error.
15520	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
15521}
15522
15523// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a
15524// long-running operation.
15525type VirtualMachineScaleSetVMsPowerOffFuture struct {
15526	azure.FutureAPI
15527	// Result returns the result of the asynchronous operation.
15528	// If the operation has not completed it will return an error.
15529	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
15530}
15531
15532// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a
15533// long-running operation.
15534type VirtualMachineScaleSetVMsRedeployFuture struct {
15535	azure.FutureAPI
15536	// Result returns the result of the asynchronous operation.
15537	// If the operation has not completed it will return an error.
15538	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
15539}
15540
15541// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a
15542// long-running operation.
15543type VirtualMachineScaleSetVMsReimageAllFuture struct {
15544	azure.FutureAPI
15545	// Result returns the result of the asynchronous operation.
15546	// If the operation has not completed it will return an error.
15547	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
15548}
15549
15550// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a
15551// long-running operation.
15552type VirtualMachineScaleSetVMsReimageFuture struct {
15553	azure.FutureAPI
15554	// Result returns the result of the asynchronous operation.
15555	// If the operation has not completed it will return an error.
15556	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
15557}
15558
15559// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a
15560// long-running operation.
15561type VirtualMachineScaleSetVMsRestartFuture struct {
15562	azure.FutureAPI
15563	// Result returns the result of the asynchronous operation.
15564	// If the operation has not completed it will return an error.
15565	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
15566}
15567
15568// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a
15569// long-running operation.
15570type VirtualMachineScaleSetVMsRunCommandFuture struct {
15571	azure.FutureAPI
15572	// Result returns the result of the asynchronous operation.
15573	// If the operation has not completed it will return an error.
15574	Result func(VirtualMachineScaleSetVMsClient) (RunCommandResult, error)
15575}
15576
15577// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a
15578// long-running operation.
15579type VirtualMachineScaleSetVMsStartFuture struct {
15580	azure.FutureAPI
15581	// Result returns the result of the asynchronous operation.
15582	// If the operation has not completed it will return an error.
15583	Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
15584}
15585
15586// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a
15587// long-running operation.
15588type VirtualMachineScaleSetVMsUpdateFuture struct {
15589	azure.FutureAPI
15590	// Result returns the result of the asynchronous operation.
15591	// If the operation has not completed it will return an error.
15592	Result func(VirtualMachineScaleSetVMsClient) (VirtualMachineScaleSetVM, error)
15593}
15594
15595// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running
15596// operation.
15597type VirtualMachinesCaptureFuture struct {
15598	azure.FutureAPI
15599	// Result returns the result of the asynchronous operation.
15600	// If the operation has not completed it will return an error.
15601	Result func(VirtualMachinesClient) (VirtualMachineCaptureResult, error)
15602}
15603
15604// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a
15605// long-running operation.
15606type VirtualMachinesConvertToManagedDisksFuture struct {
15607	azure.FutureAPI
15608	// Result returns the result of the asynchronous operation.
15609	// If the operation has not completed it will return an error.
15610	Result func(VirtualMachinesClient) (autorest.Response, error)
15611}
15612
15613// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15614// long-running operation.
15615type VirtualMachinesCreateOrUpdateFuture struct {
15616	azure.FutureAPI
15617	// Result returns the result of the asynchronous operation.
15618	// If the operation has not completed it will return an error.
15619	Result func(VirtualMachinesClient) (VirtualMachine, error)
15620}
15621
15622// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a
15623// long-running operation.
15624type VirtualMachinesDeallocateFuture struct {
15625	azure.FutureAPI
15626	// Result returns the result of the asynchronous operation.
15627	// If the operation has not completed it will return an error.
15628	Result func(VirtualMachinesClient) (autorest.Response, error)
15629}
15630
15631// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15632// operation.
15633type VirtualMachinesDeleteFuture struct {
15634	azure.FutureAPI
15635	// Result returns the result of the asynchronous operation.
15636	// If the operation has not completed it will return an error.
15637	Result func(VirtualMachinesClient) (autorest.Response, error)
15638}
15639
15640// VirtualMachineSize describes the properties of a VM size.
15641type VirtualMachineSize struct {
15642	// Name - The name of the virtual machine size.
15643	Name *string `json:"name,omitempty"`
15644	// NumberOfCores - The number of cores supported by the virtual machine size.
15645	NumberOfCores *int32 `json:"numberOfCores,omitempty"`
15646	// OsDiskSizeInMB - The OS disk size, in MB, allowed by the virtual machine size.
15647	OsDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"`
15648	// ResourceDiskSizeInMB - The resource disk size, in MB, allowed by the virtual machine size.
15649	ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"`
15650	// MemoryInMB - The amount of memory, in MB, supported by the virtual machine size.
15651	MemoryInMB *int32 `json:"memoryInMB,omitempty"`
15652	// MaxDataDiskCount - The maximum number of data disks that can be attached to the virtual machine size.
15653	MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"`
15654}
15655
15656// VirtualMachineSizeListResult the List Virtual Machine operation response.
15657type VirtualMachineSizeListResult struct {
15658	autorest.Response `json:"-"`
15659	// Value - The list of virtual machine sizes.
15660	Value *[]VirtualMachineSize `json:"value,omitempty"`
15661}
15662
15663// VirtualMachineSoftwarePatchProperties describes the properties of a Virtual Machine software patch.
15664type VirtualMachineSoftwarePatchProperties struct {
15665	// PatchID - READ-ONLY; A unique identifier for the patch.
15666	PatchID *string `json:"patchId,omitempty"`
15667	// Name - READ-ONLY; The friendly name of the patch.
15668	Name *string `json:"name,omitempty"`
15669	// Version - READ-ONLY; The version number of the patch. This property applies only to Linux patches.
15670	Version *string `json:"version,omitempty"`
15671	// Kbid - READ-ONLY; The KBID of the patch. Only applies to Windows patches.
15672	Kbid *string `json:"kbid,omitempty"`
15673	// Classifications - READ-ONLY; The classification(s) of the patch as provided by the patch publisher.
15674	Classifications *[]string `json:"classifications,omitempty"`
15675	// RebootBehavior - READ-ONLY; Describes the reboot requirements of the patch. Possible values include: 'NeverReboots', 'AlwaysRequiresReboot', 'CanRequestReboot'
15676	RebootBehavior SoftwareUpdateRebootBehavior `json:"rebootBehavior,omitempty"`
15677	// ActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
15678	ActivityID *string `json:"activityId,omitempty"`
15679	// PublishedDate - READ-ONLY; The UTC timestamp when the repository published this patch.
15680	PublishedDate *date.Time `json:"publishedDate,omitempty"`
15681	// LastModifiedDateTime - READ-ONLY; The UTC timestamp of the last update to this patch record.
15682	LastModifiedDateTime *date.Time `json:"lastModifiedDateTime,omitempty"`
15683	// AssessmentState - READ-ONLY; Describes the outcome of an install operation for a given patch. Possible values include: 'PatchAssessmentStateInstalled', 'PatchAssessmentStateFailed', 'PatchAssessmentStateExcluded', 'PatchAssessmentStateNotSelected', 'PatchAssessmentStatePending', 'PatchAssessmentStateAvailable'
15684	AssessmentState PatchAssessmentState `json:"assessmentState,omitempty"`
15685}
15686
15687// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a
15688// long-running operation.
15689type VirtualMachinesPerformMaintenanceFuture struct {
15690	azure.FutureAPI
15691	// Result returns the result of the asynchronous operation.
15692	// If the operation has not completed it will return an error.
15693	Result func(VirtualMachinesClient) (autorest.Response, error)
15694}
15695
15696// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
15697// operation.
15698type VirtualMachinesPowerOffFuture struct {
15699	azure.FutureAPI
15700	// Result returns the result of the asynchronous operation.
15701	// If the operation has not completed it will return an error.
15702	Result func(VirtualMachinesClient) (autorest.Response, error)
15703}
15704
15705// VirtualMachinesReapplyFuture an abstraction for monitoring and retrieving the results of a long-running
15706// operation.
15707type VirtualMachinesReapplyFuture struct {
15708	azure.FutureAPI
15709	// Result returns the result of the asynchronous operation.
15710	// If the operation has not completed it will return an error.
15711	Result func(VirtualMachinesClient) (autorest.Response, error)
15712}
15713
15714// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running
15715// operation.
15716type VirtualMachinesRedeployFuture struct {
15717	azure.FutureAPI
15718	// Result returns the result of the asynchronous operation.
15719	// If the operation has not completed it will return an error.
15720	Result func(VirtualMachinesClient) (autorest.Response, error)
15721}
15722
15723// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
15724// operation.
15725type VirtualMachinesReimageFuture struct {
15726	azure.FutureAPI
15727	// Result returns the result of the asynchronous operation.
15728	// If the operation has not completed it will return an error.
15729	Result func(VirtualMachinesClient) (autorest.Response, error)
15730}
15731
15732// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
15733// operation.
15734type VirtualMachinesRestartFuture struct {
15735	azure.FutureAPI
15736	// Result returns the result of the asynchronous operation.
15737	// If the operation has not completed it will return an error.
15738	Result func(VirtualMachinesClient) (autorest.Response, error)
15739}
15740
15741// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a
15742// long-running operation.
15743type VirtualMachinesRunCommandFuture struct {
15744	azure.FutureAPI
15745	// Result returns the result of the asynchronous operation.
15746	// If the operation has not completed it will return an error.
15747	Result func(VirtualMachinesClient) (RunCommandResult, error)
15748}
15749
15750// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
15751// operation.
15752type VirtualMachinesStartFuture struct {
15753	azure.FutureAPI
15754	// Result returns the result of the asynchronous operation.
15755	// If the operation has not completed it will return an error.
15756	Result func(VirtualMachinesClient) (autorest.Response, error)
15757}
15758
15759// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view
15760// status summary.
15761type VirtualMachineStatusCodeCount struct {
15762	// Code - READ-ONLY; The instance view status code.
15763	Code *string `json:"code,omitempty"`
15764	// Count - READ-ONLY; The number of instances having a particular status code.
15765	Count *int32 `json:"count,omitempty"`
15766}
15767
15768// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15769// operation.
15770type VirtualMachinesUpdateFuture struct {
15771	azure.FutureAPI
15772	// Result returns the result of the asynchronous operation.
15773	// If the operation has not completed it will return an error.
15774	Result func(VirtualMachinesClient) (VirtualMachine, error)
15775}
15776
15777// VirtualMachineUpdate describes a Virtual Machine Update.
15778type VirtualMachineUpdate struct {
15779	// 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**.
15780	Plan                      *Plan `json:"plan,omitempty"`
15781	*VirtualMachineProperties `json:"properties,omitempty"`
15782	// Identity - The identity of the virtual machine, if configured.
15783	Identity *VirtualMachineIdentity `json:"identity,omitempty"`
15784	// Zones - The virtual machine zones.
15785	Zones *[]string `json:"zones,omitempty"`
15786	// Tags - Resource tags
15787	Tags map[string]*string `json:"tags"`
15788}
15789
15790// MarshalJSON is the custom marshaler for VirtualMachineUpdate.
15791func (vmu VirtualMachineUpdate) MarshalJSON() ([]byte, error) {
15792	objectMap := make(map[string]interface{})
15793	if vmu.Plan != nil {
15794		objectMap["plan"] = vmu.Plan
15795	}
15796	if vmu.VirtualMachineProperties != nil {
15797		objectMap["properties"] = vmu.VirtualMachineProperties
15798	}
15799	if vmu.Identity != nil {
15800		objectMap["identity"] = vmu.Identity
15801	}
15802	if vmu.Zones != nil {
15803		objectMap["zones"] = vmu.Zones
15804	}
15805	if vmu.Tags != nil {
15806		objectMap["tags"] = vmu.Tags
15807	}
15808	return json.Marshal(objectMap)
15809}
15810
15811// UnmarshalJSON is the custom unmarshaler for VirtualMachineUpdate struct.
15812func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error {
15813	var m map[string]*json.RawMessage
15814	err := json.Unmarshal(body, &m)
15815	if err != nil {
15816		return err
15817	}
15818	for k, v := range m {
15819		switch k {
15820		case "plan":
15821			if v != nil {
15822				var plan Plan
15823				err = json.Unmarshal(*v, &plan)
15824				if err != nil {
15825					return err
15826				}
15827				vmu.Plan = &plan
15828			}
15829		case "properties":
15830			if v != nil {
15831				var virtualMachineProperties VirtualMachineProperties
15832				err = json.Unmarshal(*v, &virtualMachineProperties)
15833				if err != nil {
15834					return err
15835				}
15836				vmu.VirtualMachineProperties = &virtualMachineProperties
15837			}
15838		case "identity":
15839			if v != nil {
15840				var identity VirtualMachineIdentity
15841				err = json.Unmarshal(*v, &identity)
15842				if err != nil {
15843					return err
15844				}
15845				vmu.Identity = &identity
15846			}
15847		case "zones":
15848			if v != nil {
15849				var zones []string
15850				err = json.Unmarshal(*v, &zones)
15851				if err != nil {
15852					return err
15853				}
15854				vmu.Zones = &zones
15855			}
15856		case "tags":
15857			if v != nil {
15858				var tags map[string]*string
15859				err = json.Unmarshal(*v, &tags)
15860				if err != nil {
15861					return err
15862				}
15863				vmu.Tags = tags
15864			}
15865		}
15866	}
15867
15868	return nil
15869}
15870
15871// VMScaleSetConvertToSinglePlacementGroupInput ...
15872type VMScaleSetConvertToSinglePlacementGroupInput struct {
15873	// ActivePlacementGroupID - Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances.
15874	ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"`
15875}
15876
15877// WindowsConfiguration specifies Windows operating system settings on the virtual machine.
15878type WindowsConfiguration struct {
15879	// 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.
15880	ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
15881	// EnableAutomaticUpdates - Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. <br><br> For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.
15882	EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
15883	// TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". <br><br> Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.getsystemtimezones).
15884	TimeZone *string `json:"timeZone,omitempty"`
15885	// AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.
15886	AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"`
15887	// PatchSettings - Specifies settings related to in-guest patching (KBs).
15888	PatchSettings *PatchSettings `json:"patchSettings,omitempty"`
15889	// WinRM - Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.
15890	WinRM *WinRMConfiguration `json:"winRM,omitempty"`
15891}
15892
15893// WinRMConfiguration describes Windows Remote Management configuration of the VM
15894type WinRMConfiguration struct {
15895	// Listeners - The list of Windows Remote Management listeners
15896	Listeners *[]WinRMListener `json:"listeners,omitempty"`
15897}
15898
15899// WinRMListener describes Protocol and thumbprint of Windows Remote Management listener
15900type WinRMListener struct {
15901	// Protocol - Specifies the protocol of WinRM listener. <br><br> Possible values are: <br>**http** <br><br> **https**. Possible values include: 'HTTP', 'HTTPS'
15902	Protocol ProtocolTypes `json:"protocol,omitempty"`
15903	// 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>}
15904	CertificateURL *string `json:"certificateUrl,omitempty"`
15905}
15906