1package resourcemover
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/to"
15	"github.com/Azure/go-autorest/tracing"
16	"net/http"
17)
18
19// The package's fully qualified name.
20const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover"
21
22// AffectedMoveResource the RP custom operation error info.
23type AffectedMoveResource struct {
24	// ID - READ-ONLY; The affected move resource id.
25	ID *string `json:"id,omitempty"`
26	// SourceID - READ-ONLY; The affected move resource source id.
27	SourceID *string `json:"sourceId,omitempty"`
28	// MoveResources - READ-ONLY; The affected move resources.
29	MoveResources *[]AffectedMoveResource `json:"moveResources,omitempty"`
30}
31
32// MarshalJSON is the custom marshaler for AffectedMoveResource.
33func (amr AffectedMoveResource) MarshalJSON() ([]byte, error) {
34	objectMap := make(map[string]interface{})
35	return json.Marshal(objectMap)
36}
37
38// AutomaticResolutionProperties defines the properties for automatic resolution.
39type AutomaticResolutionProperties struct {
40	// MoveResourceID - Gets the MoveResource ARM ID of
41	// the dependent resource if the resolution type is Automatic.
42	MoveResourceID *string `json:"moveResourceId,omitempty"`
43}
44
45// AvailabilitySetResourceSettings gets or sets the availability set resource settings.
46type AvailabilitySetResourceSettings struct {
47	// FaultDomain - Gets or sets the target fault domain.
48	FaultDomain *int32 `json:"faultDomain,omitempty"`
49	// UpdateDomain - Gets or sets the target update domain.
50	UpdateDomain *int32 `json:"updateDomain,omitempty"`
51	// TargetResourceName - Gets or sets the target Resource name.
52	TargetResourceName *string `json:"targetResourceName,omitempty"`
53	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
54	ResourceType ResourceType `json:"resourceType,omitempty"`
55}
56
57// MarshalJSON is the custom marshaler for AvailabilitySetResourceSettings.
58func (asrs AvailabilitySetResourceSettings) MarshalJSON() ([]byte, error) {
59	asrs.ResourceType = ResourceTypeMicrosoftComputeavailabilitySets
60	objectMap := make(map[string]interface{})
61	if asrs.FaultDomain != nil {
62		objectMap["faultDomain"] = asrs.FaultDomain
63	}
64	if asrs.UpdateDomain != nil {
65		objectMap["updateDomain"] = asrs.UpdateDomain
66	}
67	if asrs.TargetResourceName != nil {
68		objectMap["targetResourceName"] = asrs.TargetResourceName
69	}
70	if asrs.ResourceType != "" {
71		objectMap["resourceType"] = asrs.ResourceType
72	}
73	return json.Marshal(objectMap)
74}
75
76// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
77func (asrs AvailabilitySetResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
78	return nil, false
79}
80
81// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
82func (asrs AvailabilitySetResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
83	return &asrs, true
84}
85
86// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
87func (asrs AvailabilitySetResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
88	return nil, false
89}
90
91// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
92func (asrs AvailabilitySetResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
93	return nil, false
94}
95
96// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
97func (asrs AvailabilitySetResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
98	return nil, false
99}
100
101// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
102func (asrs AvailabilitySetResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
103	return nil, false
104}
105
106// AsSQLServerResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
107func (asrs AvailabilitySetResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
108	return nil, false
109}
110
111// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
112func (asrs AvailabilitySetResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
113	return nil, false
114}
115
116// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
117func (asrs AvailabilitySetResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
118	return nil, false
119}
120
121// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
122func (asrs AvailabilitySetResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
123	return nil, false
124}
125
126// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
127func (asrs AvailabilitySetResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
128	return nil, false
129}
130
131// AsResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
132func (asrs AvailabilitySetResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
133	return nil, false
134}
135
136// AsBasicResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings.
137func (asrs AvailabilitySetResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
138	return &asrs, true
139}
140
141// AzureResourceReference defines reference to an Azure resource.
142type AzureResourceReference struct {
143	// SourceArmResourceID - Gets the ARM resource ID of the tracked resource being referenced.
144	SourceArmResourceID *string `json:"sourceArmResourceId,omitempty"`
145}
146
147// BulkRemoveRequest defines the request body for bulk remove of move resources operation.
148type BulkRemoveRequest struct {
149	// ValidateOnly - Gets or sets a value indicating whether the operation needs to only run pre-requisite.
150	ValidateOnly *bool `json:"validateOnly,omitempty"`
151	// MoveResources - Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property.
152	MoveResources *[]string `json:"moveResources,omitempty"`
153	// MoveResourceInputType - Possible values include: 'MoveResourceID', 'MoveResourceSourceID'
154	MoveResourceInputType MoveResourceInputType `json:"moveResourceInputType,omitempty"`
155}
156
157// CloudError an error response from the service.
158type CloudError struct {
159	// Error - Cloud error body.
160	Error *CloudErrorBody `json:"error,omitempty"`
161}
162
163// CloudErrorBody an error response from the service.
164type CloudErrorBody struct {
165	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
166	Code *string `json:"code,omitempty"`
167	// Message - A message describing the error, intended to be suitable for display in a user interface.
168	Message *string `json:"message,omitempty"`
169	// Target - The target of the particular error. For example, the name of the property in error.
170	Target *string `json:"target,omitempty"`
171	// Details - A list of additional details about the error.
172	Details *[]CloudErrorBody `json:"details,omitempty"`
173}
174
175// CommitRequest defines the request body for commit operation.
176type CommitRequest struct {
177	// ValidateOnly - Gets or sets a value indicating whether the operation needs to only run pre-requisite.
178	ValidateOnly *bool `json:"validateOnly,omitempty"`
179	// MoveResources - Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property.
180	MoveResources *[]string `json:"moveResources,omitempty"`
181	// MoveResourceInputType - Possible values include: 'MoveResourceID', 'MoveResourceSourceID'
182	MoveResourceInputType MoveResourceInputType `json:"moveResourceInputType,omitempty"`
183}
184
185// DiscardRequest defines the request body for discard operation.
186type DiscardRequest struct {
187	// ValidateOnly - Gets or sets a value indicating whether the operation needs to only run pre-requisite.
188	ValidateOnly *bool `json:"validateOnly,omitempty"`
189	// MoveResources - Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property.
190	MoveResources *[]string `json:"moveResources,omitempty"`
191	// MoveResourceInputType - Possible values include: 'MoveResourceID', 'MoveResourceSourceID'
192	MoveResourceInputType MoveResourceInputType `json:"moveResourceInputType,omitempty"`
193}
194
195// Display contains the localized display information for this particular operation / action. These
196// value will be used by several clients for
197// (1) custom role definitions for RBAC;
198// (2) complex query filters for the event service; and
199// (3) audit history / records for management operations.
200type Display struct {
201	// Provider - Gets or sets the provider.
202	// The localized friendly form of the resource provider name – it is expected to also
203	// include the publisher/company responsible.
204	// It should use Title Casing and begin with "Microsoft" for 1st party services.
205	// e.g. "Microsoft Monitoring Insights" or "Microsoft Compute.".
206	Provider *string `json:"provider,omitempty"`
207	// Resource - Gets or sets the resource.
208	// The localized friendly form of the resource related to this action/operation – it
209	// should match the public documentation for the resource provider.
210	// It should use Title Casing.
211	// This value should be unique for a particular URL type (e.g. nested types should *not*
212	// reuse their parent’s display.resource field)
213	// e.g. "Virtual Machines" or "Scheduler Job Collections", or "Virtual Machine VM Sizes"
214	// or "Scheduler Jobs".
215	Resource *string `json:"resource,omitempty"`
216	// Operation - Gets or sets the operation.
217	// The localized friendly name for the operation, as it should be shown to the user.
218	// It should be concise (to fit in drop downs) but clear (i.e. self-documenting).
219	// It should use Title Casing.
220	// Prescriptive guidance: Read Create or Update Delete 'ActionName'.
221	Operation *string `json:"operation,omitempty"`
222	// Description - Gets or sets the description.
223	// The localized friendly description for the operation, as it should be shown to the
224	// user.
225	// It should be thorough, yet concise – it will be used in tool tips and detailed views.
226	// Prescriptive guidance for namespace:
227	// Read any 'display.provider'  resource
228	// Create or Update any  'display.provider'  resource
229	// Delete any  'display.provider'  resource
230	// Perform any other action on any  'display.provider'  resource
231	// Prescriptive guidance for namespace:
232	// Read any 'display.resource' Create or Update any  'display.resource' Delete any
233	//  'display.resource' 'ActionName' any 'display.resources'.
234	Description *string `json:"description,omitempty"`
235}
236
237// Identity defines the MSI properties of the Move Collection.
238type Identity struct {
239	// Type - Possible values include: 'None', 'SystemAssigned', 'UserAssigned'
240	Type ResourceIdentityType `json:"type,omitempty"`
241	// PrincipalID - Gets or sets the principal id.
242	PrincipalID *string `json:"principalId,omitempty"`
243	// TenantID - Gets or sets the tenant id.
244	TenantID *string `json:"tenantId,omitempty"`
245}
246
247// JobStatus defines the job status.
248type JobStatus struct {
249	// JobName - Possible values include: 'InitialSync'
250	JobName JobName `json:"jobName,omitempty"`
251	// JobProgress - READ-ONLY; Gets or sets the monitoring job percentage.
252	JobProgress *string `json:"jobProgress,omitempty"`
253}
254
255// MarshalJSON is the custom marshaler for JobStatus.
256func (js JobStatus) MarshalJSON() ([]byte, error) {
257	objectMap := make(map[string]interface{})
258	if js.JobName != "" {
259		objectMap["jobName"] = js.JobName
260	}
261	return json.Marshal(objectMap)
262}
263
264// LBBackendAddressPoolResourceSettings defines load balancer backend address pool properties.
265type LBBackendAddressPoolResourceSettings struct {
266	// Name - Gets or sets the backend address pool name.
267	Name *string `json:"name,omitempty"`
268}
269
270// LBFrontendIPConfigurationResourceSettings defines load balancer frontend IP configuration properties.
271type LBFrontendIPConfigurationResourceSettings struct {
272	// Name - Gets or sets the frontend IP configuration name.
273	Name *string `json:"name,omitempty"`
274	// PrivateIPAddress - Gets or sets the IP address of the Load Balancer.This is only specified if a specific
275	// private IP address shall be allocated from the subnet specified in subnetRef.
276	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
277	// PrivateIPAllocationMethod - Gets or sets PrivateIP allocation method (Static/Dynamic).
278	PrivateIPAllocationMethod *string          `json:"privateIpAllocationMethod,omitempty"`
279	Subnet                    *SubnetReference `json:"subnet,omitempty"`
280	// Zones - Gets or sets the csv list of zones.
281	Zones *string `json:"zones,omitempty"`
282}
283
284// LoadBalancerBackendAddressPoolReference defines reference to load balancer backend address pools.
285type LoadBalancerBackendAddressPoolReference struct {
286	// Name - Gets the name of the proxy resource on the target side.
287	Name *string `json:"name,omitempty"`
288	// SourceArmResourceID - Gets the ARM resource ID of the tracked resource being referenced.
289	SourceArmResourceID *string `json:"sourceArmResourceId,omitempty"`
290}
291
292// LoadBalancerNatRuleReference defines reference to load balancer NAT rules.
293type LoadBalancerNatRuleReference struct {
294	// Name - Gets the name of the proxy resource on the target side.
295	Name *string `json:"name,omitempty"`
296	// SourceArmResourceID - Gets the ARM resource ID of the tracked resource being referenced.
297	SourceArmResourceID *string `json:"sourceArmResourceId,omitempty"`
298}
299
300// LoadBalancerResourceSettings defines the load balancer resource settings.
301type LoadBalancerResourceSettings struct {
302	// Sku - Gets or sets load balancer sku (Basic/Standard).
303	Sku *string `json:"sku,omitempty"`
304	// FrontendIPConfigurations - Gets or sets the frontend IP configurations of the load balancer.
305	FrontendIPConfigurations *[]LBFrontendIPConfigurationResourceSettings `json:"frontendIPConfigurations,omitempty"`
306	// BackendAddressPools - Gets or sets the backend address pools of the load balancer.
307	BackendAddressPools *[]LBBackendAddressPoolResourceSettings `json:"backendAddressPools,omitempty"`
308	// Zones - Gets or sets the csv list of zones common for all frontend IP configurations. Note this is given
309	//  precedence only if frontend IP configurations settings are not present.
310	Zones *string `json:"zones,omitempty"`
311	// TargetResourceName - Gets or sets the target Resource name.
312	TargetResourceName *string `json:"targetResourceName,omitempty"`
313	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
314	ResourceType ResourceType `json:"resourceType,omitempty"`
315}
316
317// MarshalJSON is the custom marshaler for LoadBalancerResourceSettings.
318func (lbrs LoadBalancerResourceSettings) MarshalJSON() ([]byte, error) {
319	lbrs.ResourceType = ResourceTypeMicrosoftNetworkloadBalancers
320	objectMap := make(map[string]interface{})
321	if lbrs.Sku != nil {
322		objectMap["sku"] = lbrs.Sku
323	}
324	if lbrs.FrontendIPConfigurations != nil {
325		objectMap["frontendIPConfigurations"] = lbrs.FrontendIPConfigurations
326	}
327	if lbrs.BackendAddressPools != nil {
328		objectMap["backendAddressPools"] = lbrs.BackendAddressPools
329	}
330	if lbrs.Zones != nil {
331		objectMap["zones"] = lbrs.Zones
332	}
333	if lbrs.TargetResourceName != nil {
334		objectMap["targetResourceName"] = lbrs.TargetResourceName
335	}
336	if lbrs.ResourceType != "" {
337		objectMap["resourceType"] = lbrs.ResourceType
338	}
339	return json.Marshal(objectMap)
340}
341
342// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
343func (lbrs LoadBalancerResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
344	return nil, false
345}
346
347// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
348func (lbrs LoadBalancerResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
349	return nil, false
350}
351
352// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
353func (lbrs LoadBalancerResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
354	return nil, false
355}
356
357// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
358func (lbrs LoadBalancerResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
359	return nil, false
360}
361
362// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
363func (lbrs LoadBalancerResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
364	return nil, false
365}
366
367// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
368func (lbrs LoadBalancerResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
369	return &lbrs, true
370}
371
372// AsSQLServerResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
373func (lbrs LoadBalancerResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
374	return nil, false
375}
376
377// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
378func (lbrs LoadBalancerResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
379	return nil, false
380}
381
382// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
383func (lbrs LoadBalancerResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
384	return nil, false
385}
386
387// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
388func (lbrs LoadBalancerResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
389	return nil, false
390}
391
392// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
393func (lbrs LoadBalancerResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
394	return nil, false
395}
396
397// AsResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
398func (lbrs LoadBalancerResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
399	return nil, false
400}
401
402// AsBasicResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings.
403func (lbrs LoadBalancerResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
404	return &lbrs, true
405}
406
407// ManualResolutionProperties defines the properties for manual resolution.
408type ManualResolutionProperties struct {
409	// TargetID - Gets or sets the target resource ARM ID of the dependent resource if the resource type is Manual.
410	TargetID *string `json:"targetId,omitempty"`
411}
412
413// MoveCollection define the move collection.
414type MoveCollection struct {
415	autorest.Response `json:"-"`
416	// ID - READ-ONLY; Fully qualified resource Id for the resource.
417	ID *string `json:"id,omitempty"`
418	// Name - READ-ONLY; The name of the resource
419	Name *string `json:"name,omitempty"`
420	// Type - READ-ONLY; The type of the resource.
421	Type *string `json:"type,omitempty"`
422	// Tags - Resource tags.
423	Tags map[string]*string `json:"tags"`
424	// Location - The geo-location where the resource lives.
425	Location   *string                   `json:"location,omitempty"`
426	Identity   *Identity                 `json:"identity,omitempty"`
427	Properties *MoveCollectionProperties `json:"properties,omitempty"`
428}
429
430// MarshalJSON is the custom marshaler for MoveCollection.
431func (mc MoveCollection) MarshalJSON() ([]byte, error) {
432	objectMap := make(map[string]interface{})
433	if mc.Tags != nil {
434		objectMap["tags"] = mc.Tags
435	}
436	if mc.Location != nil {
437		objectMap["location"] = mc.Location
438	}
439	if mc.Identity != nil {
440		objectMap["identity"] = mc.Identity
441	}
442	if mc.Properties != nil {
443		objectMap["properties"] = mc.Properties
444	}
445	return json.Marshal(objectMap)
446}
447
448// MoveCollectionProperties defines the move collection properties.
449type MoveCollectionProperties struct {
450	// SourceRegion - Gets or sets the source region.
451	SourceRegion *string `json:"sourceRegion,omitempty"`
452	// TargetRegion - Gets or sets the target region.
453	TargetRegion *string `json:"targetRegion,omitempty"`
454	// ProvisioningState - Possible values include: 'Succeeded', 'Updating', 'Creating', 'Failed'
455	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
456}
457
458// MoveCollectionResultList defines the collection of move collections.
459type MoveCollectionResultList struct {
460	autorest.Response `json:"-"`
461	// Value - Gets the list of move collections.
462	Value *[]MoveCollection `json:"value,omitempty"`
463	// NextLink - Gets the value of  next link.
464	NextLink *string `json:"nextLink,omitempty"`
465}
466
467// MoveCollectionResultListIterator provides access to a complete listing of MoveCollection values.
468type MoveCollectionResultListIterator struct {
469	i    int
470	page MoveCollectionResultListPage
471}
472
473// NextWithContext advances to the next value.  If there was an error making
474// the request the iterator does not advance and the error is returned.
475func (iter *MoveCollectionResultListIterator) NextWithContext(ctx context.Context) (err error) {
476	if tracing.IsEnabled() {
477		ctx = tracing.StartSpan(ctx, fqdn+"/MoveCollectionResultListIterator.NextWithContext")
478		defer func() {
479			sc := -1
480			if iter.Response().Response.Response != nil {
481				sc = iter.Response().Response.Response.StatusCode
482			}
483			tracing.EndSpan(ctx, sc, err)
484		}()
485	}
486	iter.i++
487	if iter.i < len(iter.page.Values()) {
488		return nil
489	}
490	err = iter.page.NextWithContext(ctx)
491	if err != nil {
492		iter.i--
493		return err
494	}
495	iter.i = 0
496	return nil
497}
498
499// Next advances to the next value.  If there was an error making
500// the request the iterator does not advance and the error is returned.
501// Deprecated: Use NextWithContext() instead.
502func (iter *MoveCollectionResultListIterator) Next() error {
503	return iter.NextWithContext(context.Background())
504}
505
506// NotDone returns true if the enumeration should be started or is not yet complete.
507func (iter MoveCollectionResultListIterator) NotDone() bool {
508	return iter.page.NotDone() && iter.i < len(iter.page.Values())
509}
510
511// Response returns the raw server response from the last page request.
512func (iter MoveCollectionResultListIterator) Response() MoveCollectionResultList {
513	return iter.page.Response()
514}
515
516// Value returns the current value or a zero-initialized value if the
517// iterator has advanced beyond the end of the collection.
518func (iter MoveCollectionResultListIterator) Value() MoveCollection {
519	if !iter.page.NotDone() {
520		return MoveCollection{}
521	}
522	return iter.page.Values()[iter.i]
523}
524
525// Creates a new instance of the MoveCollectionResultListIterator type.
526func NewMoveCollectionResultListIterator(page MoveCollectionResultListPage) MoveCollectionResultListIterator {
527	return MoveCollectionResultListIterator{page: page}
528}
529
530// IsEmpty returns true if the ListResult contains no values.
531func (mcrl MoveCollectionResultList) IsEmpty() bool {
532	return mcrl.Value == nil || len(*mcrl.Value) == 0
533}
534
535// hasNextLink returns true if the NextLink is not empty.
536func (mcrl MoveCollectionResultList) hasNextLink() bool {
537	return mcrl.NextLink != nil && len(*mcrl.NextLink) != 0
538}
539
540// moveCollectionResultListPreparer prepares a request to retrieve the next set of results.
541// It returns nil if no more results exist.
542func (mcrl MoveCollectionResultList) moveCollectionResultListPreparer(ctx context.Context) (*http.Request, error) {
543	if !mcrl.hasNextLink() {
544		return nil, nil
545	}
546	return autorest.Prepare((&http.Request{}).WithContext(ctx),
547		autorest.AsJSON(),
548		autorest.AsGet(),
549		autorest.WithBaseURL(to.String(mcrl.NextLink)))
550}
551
552// MoveCollectionResultListPage contains a page of MoveCollection values.
553type MoveCollectionResultListPage struct {
554	fn   func(context.Context, MoveCollectionResultList) (MoveCollectionResultList, error)
555	mcrl MoveCollectionResultList
556}
557
558// NextWithContext advances to the next page of values.  If there was an error making
559// the request the page does not advance and the error is returned.
560func (page *MoveCollectionResultListPage) NextWithContext(ctx context.Context) (err error) {
561	if tracing.IsEnabled() {
562		ctx = tracing.StartSpan(ctx, fqdn+"/MoveCollectionResultListPage.NextWithContext")
563		defer func() {
564			sc := -1
565			if page.Response().Response.Response != nil {
566				sc = page.Response().Response.Response.StatusCode
567			}
568			tracing.EndSpan(ctx, sc, err)
569		}()
570	}
571	for {
572		next, err := page.fn(ctx, page.mcrl)
573		if err != nil {
574			return err
575		}
576		page.mcrl = next
577		if !next.hasNextLink() || !next.IsEmpty() {
578			break
579		}
580	}
581	return nil
582}
583
584// Next advances to the next page of values.  If there was an error making
585// the request the page does not advance and the error is returned.
586// Deprecated: Use NextWithContext() instead.
587func (page *MoveCollectionResultListPage) Next() error {
588	return page.NextWithContext(context.Background())
589}
590
591// NotDone returns true if the page enumeration should be started or is not yet complete.
592func (page MoveCollectionResultListPage) NotDone() bool {
593	return !page.mcrl.IsEmpty()
594}
595
596// Response returns the raw server response from the last page request.
597func (page MoveCollectionResultListPage) Response() MoveCollectionResultList {
598	return page.mcrl
599}
600
601// Values returns the slice of values for the current page or nil if there are no values.
602func (page MoveCollectionResultListPage) Values() []MoveCollection {
603	if page.mcrl.IsEmpty() {
604		return nil
605	}
606	return *page.mcrl.Value
607}
608
609// Creates a new instance of the MoveCollectionResultListPage type.
610func NewMoveCollectionResultListPage(cur MoveCollectionResultList, getNextPage func(context.Context, MoveCollectionResultList) (MoveCollectionResultList, error)) MoveCollectionResultListPage {
611	return MoveCollectionResultListPage{
612		fn:   getNextPage,
613		mcrl: cur,
614	}
615}
616
617// MoveCollectionsBulkRemoveFuture an abstraction for monitoring and retrieving the results of a
618// long-running operation.
619type MoveCollectionsBulkRemoveFuture struct {
620	azure.FutureAPI
621	// Result returns the result of the asynchronous operation.
622	// If the operation has not completed it will return an error.
623	Result func(MoveCollectionsClient) (OperationStatus, error)
624}
625
626// UnmarshalJSON is the custom unmarshaller for CreateFuture.
627func (future *MoveCollectionsBulkRemoveFuture) UnmarshalJSON(body []byte) error {
628	var azFuture azure.Future
629	if err := json.Unmarshal(body, &azFuture); err != nil {
630		return err
631	}
632	future.FutureAPI = &azFuture
633	future.Result = future.result
634	return nil
635}
636
637// result is the default implementation for MoveCollectionsBulkRemoveFuture.Result.
638func (future *MoveCollectionsBulkRemoveFuture) result(client MoveCollectionsClient) (osVar OperationStatus, err error) {
639	var done bool
640	done, err = future.DoneWithContext(context.Background(), client)
641	if err != nil {
642		err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsBulkRemoveFuture", "Result", future.Response(), "Polling failure")
643		return
644	}
645	if !done {
646		osVar.Response.Response = future.Response()
647		err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsBulkRemoveFuture")
648		return
649	}
650	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
651	if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent {
652		osVar, err = client.BulkRemoveResponder(osVar.Response.Response)
653		if err != nil {
654			err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsBulkRemoveFuture", "Result", osVar.Response.Response, "Failure responding to request")
655		}
656	}
657	return
658}
659
660// MoveCollectionsCommitFuture an abstraction for monitoring and retrieving the results of a long-running
661// operation.
662type MoveCollectionsCommitFuture struct {
663	azure.FutureAPI
664	// Result returns the result of the asynchronous operation.
665	// If the operation has not completed it will return an error.
666	Result func(MoveCollectionsClient) (OperationStatus, error)
667}
668
669// UnmarshalJSON is the custom unmarshaller for CreateFuture.
670func (future *MoveCollectionsCommitFuture) UnmarshalJSON(body []byte) error {
671	var azFuture azure.Future
672	if err := json.Unmarshal(body, &azFuture); err != nil {
673		return err
674	}
675	future.FutureAPI = &azFuture
676	future.Result = future.result
677	return nil
678}
679
680// result is the default implementation for MoveCollectionsCommitFuture.Result.
681func (future *MoveCollectionsCommitFuture) result(client MoveCollectionsClient) (osVar OperationStatus, err error) {
682	var done bool
683	done, err = future.DoneWithContext(context.Background(), client)
684	if err != nil {
685		err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsCommitFuture", "Result", future.Response(), "Polling failure")
686		return
687	}
688	if !done {
689		osVar.Response.Response = future.Response()
690		err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsCommitFuture")
691		return
692	}
693	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
694	if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent {
695		osVar, err = client.CommitResponder(osVar.Response.Response)
696		if err != nil {
697			err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsCommitFuture", "Result", osVar.Response.Response, "Failure responding to request")
698		}
699	}
700	return
701}
702
703// MoveCollectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
704// operation.
705type MoveCollectionsDeleteFuture struct {
706	azure.FutureAPI
707	// Result returns the result of the asynchronous operation.
708	// If the operation has not completed it will return an error.
709	Result func(MoveCollectionsClient) (OperationStatus, error)
710}
711
712// UnmarshalJSON is the custom unmarshaller for CreateFuture.
713func (future *MoveCollectionsDeleteFuture) UnmarshalJSON(body []byte) error {
714	var azFuture azure.Future
715	if err := json.Unmarshal(body, &azFuture); err != nil {
716		return err
717	}
718	future.FutureAPI = &azFuture
719	future.Result = future.result
720	return nil
721}
722
723// result is the default implementation for MoveCollectionsDeleteFuture.Result.
724func (future *MoveCollectionsDeleteFuture) result(client MoveCollectionsClient) (osVar OperationStatus, err error) {
725	var done bool
726	done, err = future.DoneWithContext(context.Background(), client)
727	if err != nil {
728		err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsDeleteFuture", "Result", future.Response(), "Polling failure")
729		return
730	}
731	if !done {
732		osVar.Response.Response = future.Response()
733		err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsDeleteFuture")
734		return
735	}
736	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
737	if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent {
738		osVar, err = client.DeleteResponder(osVar.Response.Response)
739		if err != nil {
740			err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsDeleteFuture", "Result", osVar.Response.Response, "Failure responding to request")
741		}
742	}
743	return
744}
745
746// MoveCollectionsDiscardFuture an abstraction for monitoring and retrieving the results of a long-running
747// operation.
748type MoveCollectionsDiscardFuture struct {
749	azure.FutureAPI
750	// Result returns the result of the asynchronous operation.
751	// If the operation has not completed it will return an error.
752	Result func(MoveCollectionsClient) (OperationStatus, error)
753}
754
755// UnmarshalJSON is the custom unmarshaller for CreateFuture.
756func (future *MoveCollectionsDiscardFuture) UnmarshalJSON(body []byte) error {
757	var azFuture azure.Future
758	if err := json.Unmarshal(body, &azFuture); err != nil {
759		return err
760	}
761	future.FutureAPI = &azFuture
762	future.Result = future.result
763	return nil
764}
765
766// result is the default implementation for MoveCollectionsDiscardFuture.Result.
767func (future *MoveCollectionsDiscardFuture) result(client MoveCollectionsClient) (osVar OperationStatus, err error) {
768	var done bool
769	done, err = future.DoneWithContext(context.Background(), client)
770	if err != nil {
771		err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsDiscardFuture", "Result", future.Response(), "Polling failure")
772		return
773	}
774	if !done {
775		osVar.Response.Response = future.Response()
776		err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsDiscardFuture")
777		return
778	}
779	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
780	if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent {
781		osVar, err = client.DiscardResponder(osVar.Response.Response)
782		if err != nil {
783			err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsDiscardFuture", "Result", osVar.Response.Response, "Failure responding to request")
784		}
785	}
786	return
787}
788
789// MoveCollectionsInitiateMoveFuture an abstraction for monitoring and retrieving the results of a
790// long-running operation.
791type MoveCollectionsInitiateMoveFuture struct {
792	azure.FutureAPI
793	// Result returns the result of the asynchronous operation.
794	// If the operation has not completed it will return an error.
795	Result func(MoveCollectionsClient) (OperationStatus, error)
796}
797
798// UnmarshalJSON is the custom unmarshaller for CreateFuture.
799func (future *MoveCollectionsInitiateMoveFuture) UnmarshalJSON(body []byte) error {
800	var azFuture azure.Future
801	if err := json.Unmarshal(body, &azFuture); err != nil {
802		return err
803	}
804	future.FutureAPI = &azFuture
805	future.Result = future.result
806	return nil
807}
808
809// result is the default implementation for MoveCollectionsInitiateMoveFuture.Result.
810func (future *MoveCollectionsInitiateMoveFuture) result(client MoveCollectionsClient) (osVar OperationStatus, err error) {
811	var done bool
812	done, err = future.DoneWithContext(context.Background(), client)
813	if err != nil {
814		err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsInitiateMoveFuture", "Result", future.Response(), "Polling failure")
815		return
816	}
817	if !done {
818		osVar.Response.Response = future.Response()
819		err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsInitiateMoveFuture")
820		return
821	}
822	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
823	if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent {
824		osVar, err = client.InitiateMoveResponder(osVar.Response.Response)
825		if err != nil {
826			err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsInitiateMoveFuture", "Result", osVar.Response.Response, "Failure responding to request")
827		}
828	}
829	return
830}
831
832// MoveCollectionsPrepareFuture an abstraction for monitoring and retrieving the results of a long-running
833// operation.
834type MoveCollectionsPrepareFuture struct {
835	azure.FutureAPI
836	// Result returns the result of the asynchronous operation.
837	// If the operation has not completed it will return an error.
838	Result func(MoveCollectionsClient) (OperationStatus, error)
839}
840
841// UnmarshalJSON is the custom unmarshaller for CreateFuture.
842func (future *MoveCollectionsPrepareFuture) UnmarshalJSON(body []byte) error {
843	var azFuture azure.Future
844	if err := json.Unmarshal(body, &azFuture); err != nil {
845		return err
846	}
847	future.FutureAPI = &azFuture
848	future.Result = future.result
849	return nil
850}
851
852// result is the default implementation for MoveCollectionsPrepareFuture.Result.
853func (future *MoveCollectionsPrepareFuture) result(client MoveCollectionsClient) (osVar OperationStatus, err error) {
854	var done bool
855	done, err = future.DoneWithContext(context.Background(), client)
856	if err != nil {
857		err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsPrepareFuture", "Result", future.Response(), "Polling failure")
858		return
859	}
860	if !done {
861		osVar.Response.Response = future.Response()
862		err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsPrepareFuture")
863		return
864	}
865	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
866	if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent {
867		osVar, err = client.PrepareResponder(osVar.Response.Response)
868		if err != nil {
869			err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsPrepareFuture", "Result", osVar.Response.Response, "Failure responding to request")
870		}
871	}
872	return
873}
874
875// MoveCollectionsResolveDependenciesFuture an abstraction for monitoring and retrieving the results of a
876// long-running operation.
877type MoveCollectionsResolveDependenciesFuture struct {
878	azure.FutureAPI
879	// Result returns the result of the asynchronous operation.
880	// If the operation has not completed it will return an error.
881	Result func(MoveCollectionsClient) (OperationStatus, error)
882}
883
884// UnmarshalJSON is the custom unmarshaller for CreateFuture.
885func (future *MoveCollectionsResolveDependenciesFuture) UnmarshalJSON(body []byte) error {
886	var azFuture azure.Future
887	if err := json.Unmarshal(body, &azFuture); err != nil {
888		return err
889	}
890	future.FutureAPI = &azFuture
891	future.Result = future.result
892	return nil
893}
894
895// result is the default implementation for MoveCollectionsResolveDependenciesFuture.Result.
896func (future *MoveCollectionsResolveDependenciesFuture) result(client MoveCollectionsClient) (osVar OperationStatus, err error) {
897	var done bool
898	done, err = future.DoneWithContext(context.Background(), client)
899	if err != nil {
900		err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsResolveDependenciesFuture", "Result", future.Response(), "Polling failure")
901		return
902	}
903	if !done {
904		osVar.Response.Response = future.Response()
905		err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsResolveDependenciesFuture")
906		return
907	}
908	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
909	if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent {
910		osVar, err = client.ResolveDependenciesResponder(osVar.Response.Response)
911		if err != nil {
912			err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsResolveDependenciesFuture", "Result", osVar.Response.Response, "Failure responding to request")
913		}
914	}
915	return
916}
917
918// MoveErrorInfo the move custom error info.
919type MoveErrorInfo struct {
920	// MoveResources - READ-ONLY; The affected move resources.
921	MoveResources *[]AffectedMoveResource `json:"moveResources,omitempty"`
922}
923
924// MarshalJSON is the custom marshaler for MoveErrorInfo.
925func (mei MoveErrorInfo) MarshalJSON() ([]byte, error) {
926	objectMap := make(map[string]interface{})
927	return json.Marshal(objectMap)
928}
929
930// MoveResource defines the move resource.
931type MoveResource struct {
932	autorest.Response `json:"-"`
933	// ID - READ-ONLY; Fully qualified resource Id for the resource.
934	ID *string `json:"id,omitempty"`
935	// Name - READ-ONLY; The name of the resource
936	Name *string `json:"name,omitempty"`
937	// Type - READ-ONLY; The type of the resource.
938	Type       *string                 `json:"type,omitempty"`
939	Properties *MoveResourceProperties `json:"properties,omitempty"`
940}
941
942// MarshalJSON is the custom marshaler for MoveResource.
943func (mr MoveResource) MarshalJSON() ([]byte, error) {
944	objectMap := make(map[string]interface{})
945	if mr.Properties != nil {
946		objectMap["properties"] = mr.Properties
947	}
948	return json.Marshal(objectMap)
949}
950
951// MoveResourceCollection defines the collection of move resources.
952type MoveResourceCollection struct {
953	autorest.Response `json:"-"`
954	// Value - Gets the list of move resources.
955	Value *[]MoveResource `json:"value,omitempty"`
956	// NextLink - Gets the value of  next link.
957	NextLink *string `json:"nextLink,omitempty"`
958	// Summary - Gets or the list of summary items.
959	Summary *[]SummaryItem `json:"summary,omitempty"`
960}
961
962// MoveResourceCollectionIterator provides access to a complete listing of MoveResource values.
963type MoveResourceCollectionIterator struct {
964	i    int
965	page MoveResourceCollectionPage
966}
967
968// NextWithContext advances to the next value.  If there was an error making
969// the request the iterator does not advance and the error is returned.
970func (iter *MoveResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
971	if tracing.IsEnabled() {
972		ctx = tracing.StartSpan(ctx, fqdn+"/MoveResourceCollectionIterator.NextWithContext")
973		defer func() {
974			sc := -1
975			if iter.Response().Response.Response != nil {
976				sc = iter.Response().Response.Response.StatusCode
977			}
978			tracing.EndSpan(ctx, sc, err)
979		}()
980	}
981	iter.i++
982	if iter.i < len(iter.page.Values()) {
983		return nil
984	}
985	err = iter.page.NextWithContext(ctx)
986	if err != nil {
987		iter.i--
988		return err
989	}
990	iter.i = 0
991	return nil
992}
993
994// Next advances to the next value.  If there was an error making
995// the request the iterator does not advance and the error is returned.
996// Deprecated: Use NextWithContext() instead.
997func (iter *MoveResourceCollectionIterator) Next() error {
998	return iter.NextWithContext(context.Background())
999}
1000
1001// NotDone returns true if the enumeration should be started or is not yet complete.
1002func (iter MoveResourceCollectionIterator) NotDone() bool {
1003	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1004}
1005
1006// Response returns the raw server response from the last page request.
1007func (iter MoveResourceCollectionIterator) Response() MoveResourceCollection {
1008	return iter.page.Response()
1009}
1010
1011// Value returns the current value or a zero-initialized value if the
1012// iterator has advanced beyond the end of the collection.
1013func (iter MoveResourceCollectionIterator) Value() MoveResource {
1014	if !iter.page.NotDone() {
1015		return MoveResource{}
1016	}
1017	return iter.page.Values()[iter.i]
1018}
1019
1020// Creates a new instance of the MoveResourceCollectionIterator type.
1021func NewMoveResourceCollectionIterator(page MoveResourceCollectionPage) MoveResourceCollectionIterator {
1022	return MoveResourceCollectionIterator{page: page}
1023}
1024
1025// IsEmpty returns true if the ListResult contains no values.
1026func (mrc MoveResourceCollection) IsEmpty() bool {
1027	return mrc.Value == nil || len(*mrc.Value) == 0
1028}
1029
1030// hasNextLink returns true if the NextLink is not empty.
1031func (mrc MoveResourceCollection) hasNextLink() bool {
1032	return mrc.NextLink != nil && len(*mrc.NextLink) != 0
1033}
1034
1035// moveResourceCollectionPreparer prepares a request to retrieve the next set of results.
1036// It returns nil if no more results exist.
1037func (mrc MoveResourceCollection) moveResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
1038	if !mrc.hasNextLink() {
1039		return nil, nil
1040	}
1041	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1042		autorest.AsJSON(),
1043		autorest.AsGet(),
1044		autorest.WithBaseURL(to.String(mrc.NextLink)))
1045}
1046
1047// MoveResourceCollectionPage contains a page of MoveResource values.
1048type MoveResourceCollectionPage struct {
1049	fn  func(context.Context, MoveResourceCollection) (MoveResourceCollection, error)
1050	mrc MoveResourceCollection
1051}
1052
1053// NextWithContext advances to the next page of values.  If there was an error making
1054// the request the page does not advance and the error is returned.
1055func (page *MoveResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
1056	if tracing.IsEnabled() {
1057		ctx = tracing.StartSpan(ctx, fqdn+"/MoveResourceCollectionPage.NextWithContext")
1058		defer func() {
1059			sc := -1
1060			if page.Response().Response.Response != nil {
1061				sc = page.Response().Response.Response.StatusCode
1062			}
1063			tracing.EndSpan(ctx, sc, err)
1064		}()
1065	}
1066	for {
1067		next, err := page.fn(ctx, page.mrc)
1068		if err != nil {
1069			return err
1070		}
1071		page.mrc = next
1072		if !next.hasNextLink() || !next.IsEmpty() {
1073			break
1074		}
1075	}
1076	return nil
1077}
1078
1079// Next advances to the next page of values.  If there was an error making
1080// the request the page does not advance and the error is returned.
1081// Deprecated: Use NextWithContext() instead.
1082func (page *MoveResourceCollectionPage) Next() error {
1083	return page.NextWithContext(context.Background())
1084}
1085
1086// NotDone returns true if the page enumeration should be started or is not yet complete.
1087func (page MoveResourceCollectionPage) NotDone() bool {
1088	return !page.mrc.IsEmpty()
1089}
1090
1091// Response returns the raw server response from the last page request.
1092func (page MoveResourceCollectionPage) Response() MoveResourceCollection {
1093	return page.mrc
1094}
1095
1096// Values returns the slice of values for the current page or nil if there are no values.
1097func (page MoveResourceCollectionPage) Values() []MoveResource {
1098	if page.mrc.IsEmpty() {
1099		return nil
1100	}
1101	return *page.mrc.Value
1102}
1103
1104// Creates a new instance of the MoveResourceCollectionPage type.
1105func NewMoveResourceCollectionPage(cur MoveResourceCollection, getNextPage func(context.Context, MoveResourceCollection) (MoveResourceCollection, error)) MoveResourceCollectionPage {
1106	return MoveResourceCollectionPage{
1107		fn:  getNextPage,
1108		mrc: cur,
1109	}
1110}
1111
1112// MoveResourceDependency defines the dependency of the move resource.
1113type MoveResourceDependency struct {
1114	// ID - Gets the source ARM ID of the dependent resource.
1115	ID *string `json:"id,omitempty"`
1116	// ResolutionStatus - Gets the dependency resolution status.
1117	ResolutionStatus *string `json:"resolutionStatus,omitempty"`
1118	// ResolutionType - Possible values include: 'Manual', 'Automatic'
1119	ResolutionType ResolutionType `json:"resolutionType,omitempty"`
1120	// DependencyType - Possible values include: 'RequiredForPrepare', 'RequiredForMove'
1121	DependencyType      DependencyType                 `json:"dependencyType,omitempty"`
1122	ManualResolution    *ManualResolutionProperties    `json:"manualResolution,omitempty"`
1123	AutomaticResolution *AutomaticResolutionProperties `json:"automaticResolution,omitempty"`
1124	// IsOptional - Gets or sets a value indicating whether the dependency is optional.
1125	IsOptional *string `json:"isOptional,omitempty"`
1126}
1127
1128// MoveResourceDependencyOverride defines the dependency override of the move resource.
1129type MoveResourceDependencyOverride struct {
1130	// ID - Gets or sets the ARM ID of the dependent resource.
1131	ID *string `json:"id,omitempty"`
1132	// TargetID - Gets or sets the resource ARM id of either the MoveResource or the resource ARM ID of
1133	// the dependent resource.
1134	TargetID *string `json:"targetId,omitempty"`
1135}
1136
1137// MoveResourceError an error response from the azure resource mover service.
1138type MoveResourceError struct {
1139	// Properties - The move resource error body.
1140	Properties *MoveResourceErrorBody `json:"properties,omitempty"`
1141}
1142
1143// MoveResourceErrorBody an error response from the Azure Migrate service.
1144type MoveResourceErrorBody struct {
1145	// Code - READ-ONLY; An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
1146	Code *string `json:"code,omitempty"`
1147	// Message - READ-ONLY; A message describing the error, intended to be suitable for display in a user interface.
1148	Message *string `json:"message,omitempty"`
1149	// Target - READ-ONLY; The target of the particular error. For example, the name of the property in error.
1150	Target *string `json:"target,omitempty"`
1151	// Details - READ-ONLY; A list of additional details about the error.
1152	Details *[]MoveResourceErrorBody `json:"details,omitempty"`
1153}
1154
1155// MarshalJSON is the custom marshaler for MoveResourceErrorBody.
1156func (mreb MoveResourceErrorBody) MarshalJSON() ([]byte, error) {
1157	objectMap := make(map[string]interface{})
1158	return json.Marshal(objectMap)
1159}
1160
1161// MoveResourceFilter move resource filter.
1162type MoveResourceFilter struct {
1163	Properties *MoveResourceFilterProperties `json:"properties,omitempty"`
1164}
1165
1166// MoveResourceFilterProperties ...
1167type MoveResourceFilterProperties struct {
1168	// ProvisioningState - The provisioning state.
1169	ProvisioningState *string `json:"provisioningState,omitempty"`
1170}
1171
1172// MoveResourceProperties defines the move resource properties.
1173type MoveResourceProperties struct {
1174	// ProvisioningState - Possible values include: 'Succeeded', 'Updating', 'Creating', 'Failed'
1175	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1176	// SourceID - Gets or sets the Source ARM Id of the resource.
1177	SourceID *string `json:"sourceId,omitempty"`
1178	// TargetID - READ-ONLY; Gets or sets the Target ARM Id of the resource.
1179	TargetID *string `json:"targetId,omitempty"`
1180	// ExistingTargetID - Gets or sets the existing target ARM Id of the resource.
1181	ExistingTargetID *string `json:"existingTargetId,omitempty"`
1182	// ResourceSettings - Gets or sets the resource settings.
1183	ResourceSettings BasicResourceSettings `json:"resourceSettings,omitempty"`
1184	// SourceResourceSettings - READ-ONLY; Gets or sets the source resource settings.
1185	SourceResourceSettings BasicResourceSettings `json:"sourceResourceSettings,omitempty"`
1186	// MoveStatus - READ-ONLY; Defines the move resource status.
1187	MoveStatus *MoveResourcePropertiesMoveStatus `json:"moveStatus,omitempty"`
1188	// DependsOn - READ-ONLY; Gets or sets the move resource dependencies.
1189	DependsOn *[]MoveResourceDependency `json:"dependsOn,omitempty"`
1190	// DependsOnOverrides - Gets or sets the move resource dependencies overrides.
1191	DependsOnOverrides *[]MoveResourceDependencyOverride `json:"dependsOnOverrides,omitempty"`
1192	// Errors - READ-ONLY; Defines the move resource errors.
1193	Errors *MoveResourcePropertiesErrors `json:"errors,omitempty"`
1194}
1195
1196// MarshalJSON is the custom marshaler for MoveResourceProperties.
1197func (mrp MoveResourceProperties) MarshalJSON() ([]byte, error) {
1198	objectMap := make(map[string]interface{})
1199	if mrp.ProvisioningState != "" {
1200		objectMap["provisioningState"] = mrp.ProvisioningState
1201	}
1202	if mrp.SourceID != nil {
1203		objectMap["sourceId"] = mrp.SourceID
1204	}
1205	if mrp.ExistingTargetID != nil {
1206		objectMap["existingTargetId"] = mrp.ExistingTargetID
1207	}
1208	objectMap["resourceSettings"] = mrp.ResourceSettings
1209	if mrp.DependsOnOverrides != nil {
1210		objectMap["dependsOnOverrides"] = mrp.DependsOnOverrides
1211	}
1212	return json.Marshal(objectMap)
1213}
1214
1215// UnmarshalJSON is the custom unmarshaler for MoveResourceProperties struct.
1216func (mrp *MoveResourceProperties) UnmarshalJSON(body []byte) error {
1217	var m map[string]*json.RawMessage
1218	err := json.Unmarshal(body, &m)
1219	if err != nil {
1220		return err
1221	}
1222	for k, v := range m {
1223		switch k {
1224		case "provisioningState":
1225			if v != nil {
1226				var provisioningState ProvisioningState
1227				err = json.Unmarshal(*v, &provisioningState)
1228				if err != nil {
1229					return err
1230				}
1231				mrp.ProvisioningState = provisioningState
1232			}
1233		case "sourceId":
1234			if v != nil {
1235				var sourceID string
1236				err = json.Unmarshal(*v, &sourceID)
1237				if err != nil {
1238					return err
1239				}
1240				mrp.SourceID = &sourceID
1241			}
1242		case "targetId":
1243			if v != nil {
1244				var targetID string
1245				err = json.Unmarshal(*v, &targetID)
1246				if err != nil {
1247					return err
1248				}
1249				mrp.TargetID = &targetID
1250			}
1251		case "existingTargetId":
1252			if v != nil {
1253				var existingTargetID string
1254				err = json.Unmarshal(*v, &existingTargetID)
1255				if err != nil {
1256					return err
1257				}
1258				mrp.ExistingTargetID = &existingTargetID
1259			}
1260		case "resourceSettings":
1261			if v != nil {
1262				resourceSettings, err := unmarshalBasicResourceSettings(*v)
1263				if err != nil {
1264					return err
1265				}
1266				mrp.ResourceSettings = resourceSettings
1267			}
1268		case "sourceResourceSettings":
1269			if v != nil {
1270				sourceResourceSettings, err := unmarshalBasicResourceSettings(*v)
1271				if err != nil {
1272					return err
1273				}
1274				mrp.SourceResourceSettings = sourceResourceSettings
1275			}
1276		case "moveStatus":
1277			if v != nil {
1278				var moveStatus MoveResourcePropertiesMoveStatus
1279				err = json.Unmarshal(*v, &moveStatus)
1280				if err != nil {
1281					return err
1282				}
1283				mrp.MoveStatus = &moveStatus
1284			}
1285		case "dependsOn":
1286			if v != nil {
1287				var dependsOn []MoveResourceDependency
1288				err = json.Unmarshal(*v, &dependsOn)
1289				if err != nil {
1290					return err
1291				}
1292				mrp.DependsOn = &dependsOn
1293			}
1294		case "dependsOnOverrides":
1295			if v != nil {
1296				var dependsOnOverrides []MoveResourceDependencyOverride
1297				err = json.Unmarshal(*v, &dependsOnOverrides)
1298				if err != nil {
1299					return err
1300				}
1301				mrp.DependsOnOverrides = &dependsOnOverrides
1302			}
1303		case "errors":
1304			if v != nil {
1305				var errorsVar MoveResourcePropertiesErrors
1306				err = json.Unmarshal(*v, &errorsVar)
1307				if err != nil {
1308					return err
1309				}
1310				mrp.Errors = &errorsVar
1311			}
1312		}
1313	}
1314
1315	return nil
1316}
1317
1318// MoveResourcePropertiesErrors defines the move resource errors.
1319type MoveResourcePropertiesErrors struct {
1320	// Properties - The move resource error body.
1321	Properties *MoveResourceErrorBody `json:"properties,omitempty"`
1322}
1323
1324// MoveResourcePropertiesMoveStatus defines the move resource status.
1325type MoveResourcePropertiesMoveStatus struct {
1326	// MoveState - Possible values include: 'AssignmentPending', 'PreparePending', 'PrepareInProgress', 'PrepareFailed', 'MovePending', 'MoveInProgress', 'MoveFailed', 'DiscardInProgress', 'DiscardFailed', 'CommitPending', 'CommitInProgress', 'CommitFailed', 'Committed'
1327	MoveState MoveState          `json:"moveState,omitempty"`
1328	JobStatus *JobStatus         `json:"jobStatus,omitempty"`
1329	Errors    *MoveResourceError `json:"errors,omitempty"`
1330	// TargetID - READ-ONLY; Gets the Target ARM Id of the resource.
1331	TargetID *string `json:"targetId,omitempty"`
1332}
1333
1334// MarshalJSON is the custom marshaler for MoveResourcePropertiesMoveStatus.
1335func (mrpS MoveResourcePropertiesMoveStatus) MarshalJSON() ([]byte, error) {
1336	objectMap := make(map[string]interface{})
1337	if mrpS.MoveState != "" {
1338		objectMap["moveState"] = mrpS.MoveState
1339	}
1340	if mrpS.JobStatus != nil {
1341		objectMap["jobStatus"] = mrpS.JobStatus
1342	}
1343	if mrpS.Errors != nil {
1344		objectMap["errors"] = mrpS.Errors
1345	}
1346	return json.Marshal(objectMap)
1347}
1348
1349// MoveResourcesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
1350// operation.
1351type MoveResourcesCreateFuture struct {
1352	azure.FutureAPI
1353	// Result returns the result of the asynchronous operation.
1354	// If the operation has not completed it will return an error.
1355	Result func(MoveResourcesClient) (MoveResource, error)
1356}
1357
1358// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1359func (future *MoveResourcesCreateFuture) UnmarshalJSON(body []byte) error {
1360	var azFuture azure.Future
1361	if err := json.Unmarshal(body, &azFuture); err != nil {
1362		return err
1363	}
1364	future.FutureAPI = &azFuture
1365	future.Result = future.result
1366	return nil
1367}
1368
1369// result is the default implementation for MoveResourcesCreateFuture.Result.
1370func (future *MoveResourcesCreateFuture) result(client MoveResourcesClient) (mr MoveResource, err error) {
1371	var done bool
1372	done, err = future.DoneWithContext(context.Background(), client)
1373	if err != nil {
1374		err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesCreateFuture", "Result", future.Response(), "Polling failure")
1375		return
1376	}
1377	if !done {
1378		mr.Response.Response = future.Response()
1379		err = azure.NewAsyncOpIncompleteError("resourcemover.MoveResourcesCreateFuture")
1380		return
1381	}
1382	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1383	if mr.Response.Response, err = future.GetResult(sender); err == nil && mr.Response.Response.StatusCode != http.StatusNoContent {
1384		mr, err = client.CreateResponder(mr.Response.Response)
1385		if err != nil {
1386			err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesCreateFuture", "Result", mr.Response.Response, "Failure responding to request")
1387		}
1388	}
1389	return
1390}
1391
1392// MoveResourcesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1393// operation.
1394type MoveResourcesDeleteFuture struct {
1395	azure.FutureAPI
1396	// Result returns the result of the asynchronous operation.
1397	// If the operation has not completed it will return an error.
1398	Result func(MoveResourcesClient) (OperationStatus, error)
1399}
1400
1401// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1402func (future *MoveResourcesDeleteFuture) UnmarshalJSON(body []byte) error {
1403	var azFuture azure.Future
1404	if err := json.Unmarshal(body, &azFuture); err != nil {
1405		return err
1406	}
1407	future.FutureAPI = &azFuture
1408	future.Result = future.result
1409	return nil
1410}
1411
1412// result is the default implementation for MoveResourcesDeleteFuture.Result.
1413func (future *MoveResourcesDeleteFuture) result(client MoveResourcesClient) (osVar OperationStatus, err error) {
1414	var done bool
1415	done, err = future.DoneWithContext(context.Background(), client)
1416	if err != nil {
1417		err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesDeleteFuture", "Result", future.Response(), "Polling failure")
1418		return
1419	}
1420	if !done {
1421		osVar.Response.Response = future.Response()
1422		err = azure.NewAsyncOpIncompleteError("resourcemover.MoveResourcesDeleteFuture")
1423		return
1424	}
1425	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1426	if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent {
1427		osVar, err = client.DeleteResponder(osVar.Response.Response)
1428		if err != nil {
1429			err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesDeleteFuture", "Result", osVar.Response.Response, "Failure responding to request")
1430		}
1431	}
1432	return
1433}
1434
1435// MoveResourceStatus defines the move resource status.
1436type MoveResourceStatus struct {
1437	// MoveState - Possible values include: 'AssignmentPending', 'PreparePending', 'PrepareInProgress', 'PrepareFailed', 'MovePending', 'MoveInProgress', 'MoveFailed', 'DiscardInProgress', 'DiscardFailed', 'CommitPending', 'CommitInProgress', 'CommitFailed', 'Committed'
1438	MoveState MoveState          `json:"moveState,omitempty"`
1439	JobStatus *JobStatus         `json:"jobStatus,omitempty"`
1440	Errors    *MoveResourceError `json:"errors,omitempty"`
1441	// TargetID - READ-ONLY; Gets the Target ARM Id of the resource.
1442	TargetID *string `json:"targetId,omitempty"`
1443}
1444
1445// MarshalJSON is the custom marshaler for MoveResourceStatus.
1446func (mrs MoveResourceStatus) MarshalJSON() ([]byte, error) {
1447	objectMap := make(map[string]interface{})
1448	if mrs.MoveState != "" {
1449		objectMap["moveState"] = mrs.MoveState
1450	}
1451	if mrs.JobStatus != nil {
1452		objectMap["jobStatus"] = mrs.JobStatus
1453	}
1454	if mrs.Errors != nil {
1455		objectMap["errors"] = mrs.Errors
1456	}
1457	return json.Marshal(objectMap)
1458}
1459
1460// NetworkInterfaceResourceSettings defines the network interface resource settings.
1461type NetworkInterfaceResourceSettings struct {
1462	// IPConfigurations - Gets or sets the IP configurations of the NIC.
1463	IPConfigurations *[]NicIPConfigurationResourceSettings `json:"ipConfigurations,omitempty"`
1464	// EnableAcceleratedNetworking - Gets or sets a value indicating whether accelerated networking is enabled.
1465	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
1466	// TargetResourceName - Gets or sets the target Resource name.
1467	TargetResourceName *string `json:"targetResourceName,omitempty"`
1468	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
1469	ResourceType ResourceType `json:"resourceType,omitempty"`
1470}
1471
1472// MarshalJSON is the custom marshaler for NetworkInterfaceResourceSettings.
1473func (nirs NetworkInterfaceResourceSettings) MarshalJSON() ([]byte, error) {
1474	nirs.ResourceType = ResourceTypeMicrosoftNetworknetworkInterfaces
1475	objectMap := make(map[string]interface{})
1476	if nirs.IPConfigurations != nil {
1477		objectMap["ipConfigurations"] = nirs.IPConfigurations
1478	}
1479	if nirs.EnableAcceleratedNetworking != nil {
1480		objectMap["enableAcceleratedNetworking"] = nirs.EnableAcceleratedNetworking
1481	}
1482	if nirs.TargetResourceName != nil {
1483		objectMap["targetResourceName"] = nirs.TargetResourceName
1484	}
1485	if nirs.ResourceType != "" {
1486		objectMap["resourceType"] = nirs.ResourceType
1487	}
1488	return json.Marshal(objectMap)
1489}
1490
1491// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1492func (nirs NetworkInterfaceResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
1493	return nil, false
1494}
1495
1496// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1497func (nirs NetworkInterfaceResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
1498	return nil, false
1499}
1500
1501// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1502func (nirs NetworkInterfaceResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
1503	return nil, false
1504}
1505
1506// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1507func (nirs NetworkInterfaceResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
1508	return &nirs, true
1509}
1510
1511// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1512func (nirs NetworkInterfaceResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
1513	return nil, false
1514}
1515
1516// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1517func (nirs NetworkInterfaceResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
1518	return nil, false
1519}
1520
1521// AsSQLServerResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1522func (nirs NetworkInterfaceResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
1523	return nil, false
1524}
1525
1526// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1527func (nirs NetworkInterfaceResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
1528	return nil, false
1529}
1530
1531// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1532func (nirs NetworkInterfaceResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
1533	return nil, false
1534}
1535
1536// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1537func (nirs NetworkInterfaceResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
1538	return nil, false
1539}
1540
1541// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1542func (nirs NetworkInterfaceResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
1543	return nil, false
1544}
1545
1546// AsResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1547func (nirs NetworkInterfaceResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
1548	return nil, false
1549}
1550
1551// AsBasicResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings.
1552func (nirs NetworkInterfaceResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
1553	return &nirs, true
1554}
1555
1556// NetworkSecurityGroupResourceSettings defines the NSG resource settings.
1557type NetworkSecurityGroupResourceSettings struct {
1558	// SecurityRules - Gets or sets Security rules of network security group.
1559	SecurityRules *[]NsgSecurityRule `json:"securityRules,omitempty"`
1560	// TargetResourceName - Gets or sets the target Resource name.
1561	TargetResourceName *string `json:"targetResourceName,omitempty"`
1562	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
1563	ResourceType ResourceType `json:"resourceType,omitempty"`
1564}
1565
1566// MarshalJSON is the custom marshaler for NetworkSecurityGroupResourceSettings.
1567func (nsgrs NetworkSecurityGroupResourceSettings) MarshalJSON() ([]byte, error) {
1568	nsgrs.ResourceType = ResourceTypeMicrosoftNetworknetworkSecurityGroups
1569	objectMap := make(map[string]interface{})
1570	if nsgrs.SecurityRules != nil {
1571		objectMap["securityRules"] = nsgrs.SecurityRules
1572	}
1573	if nsgrs.TargetResourceName != nil {
1574		objectMap["targetResourceName"] = nsgrs.TargetResourceName
1575	}
1576	if nsgrs.ResourceType != "" {
1577		objectMap["resourceType"] = nsgrs.ResourceType
1578	}
1579	return json.Marshal(objectMap)
1580}
1581
1582// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1583func (nsgrs NetworkSecurityGroupResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
1584	return nil, false
1585}
1586
1587// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1588func (nsgrs NetworkSecurityGroupResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
1589	return nil, false
1590}
1591
1592// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1593func (nsgrs NetworkSecurityGroupResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
1594	return nil, false
1595}
1596
1597// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1598func (nsgrs NetworkSecurityGroupResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
1599	return nil, false
1600}
1601
1602// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1603func (nsgrs NetworkSecurityGroupResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
1604	return &nsgrs, true
1605}
1606
1607// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1608func (nsgrs NetworkSecurityGroupResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
1609	return nil, false
1610}
1611
1612// AsSQLServerResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1613func (nsgrs NetworkSecurityGroupResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
1614	return nil, false
1615}
1616
1617// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1618func (nsgrs NetworkSecurityGroupResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
1619	return nil, false
1620}
1621
1622// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1623func (nsgrs NetworkSecurityGroupResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
1624	return nil, false
1625}
1626
1627// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1628func (nsgrs NetworkSecurityGroupResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
1629	return nil, false
1630}
1631
1632// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1633func (nsgrs NetworkSecurityGroupResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
1634	return nil, false
1635}
1636
1637// AsResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1638func (nsgrs NetworkSecurityGroupResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
1639	return nil, false
1640}
1641
1642// AsBasicResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings.
1643func (nsgrs NetworkSecurityGroupResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
1644	return &nsgrs, true
1645}
1646
1647// NicIPConfigurationResourceSettings defines NIC IP configuration properties.
1648type NicIPConfigurationResourceSettings struct {
1649	// Name - Gets or sets the IP configuration name.
1650	Name *string `json:"name,omitempty"`
1651	// PrivateIPAddress - Gets or sets the private IP address of the network interface IP Configuration.
1652	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
1653	// PrivateIPAllocationMethod - Gets or sets the private IP address allocation method.
1654	PrivateIPAllocationMethod *string          `json:"privateIpAllocationMethod,omitempty"`
1655	Subnet                    *SubnetReference `json:"subnet,omitempty"`
1656	// Primary - Gets or sets a value indicating whether this IP configuration is the primary.
1657	Primary *bool `json:"primary,omitempty"`
1658	// LoadBalancerBackendAddressPools - Gets or sets the references of the load balancer backend address pools.
1659	LoadBalancerBackendAddressPools *[]LoadBalancerBackendAddressPoolReference `json:"loadBalancerBackendAddressPools,omitempty"`
1660}
1661
1662// NsgSecurityRule security Rule data model for Network Security Groups.
1663type NsgSecurityRule struct {
1664	// Name - Gets or sets the Security rule name.
1665	Name *string `json:"name,omitempty"`
1666	// Access - Gets or sets whether network traffic is allowed or denied.
1667	// Possible values are “Allow” and “Deny”.
1668	Access *string `json:"access,omitempty"`
1669	// Description - Gets or sets a description for this rule. Restricted to 140 chars.
1670	Description *string `json:"description,omitempty"`
1671	// DestinationAddressPrefix - Gets or sets destination address prefix. CIDR or source IP range.
1672	//  A “*” can also be used to match all source IPs. Default tags such
1673	// as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used.
1674	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
1675	// DestinationPortRange - Gets or sets Destination Port or Range. Integer or range between
1676	// 0 and 65535. A “*” can also be used to match all ports.
1677	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
1678	// Direction - Gets or sets the direction of the rule.InBound or Outbound. The
1679	// direction specifies if rule will be evaluated on incoming or outgoing traffic.
1680	Direction *string `json:"direction,omitempty"`
1681	// Priority - Gets or sets the priority of the rule. The value can be between
1682	// 100 and 4096. The priority number must be unique for each rule in the collection.
1683	// The lower the priority number, the higher the priority of the rule.
1684	Priority *int32 `json:"priority,omitempty"`
1685	// Protocol - Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*).
1686	Protocol *string `json:"protocol,omitempty"`
1687	// SourceAddressPrefix - Gets or sets source address prefix. CIDR or source IP range. A
1688	// “*” can also be used to match all source IPs.  Default tags such as ‘VirtualNetwork’,
1689	// ‘AzureLoadBalancer’ and ‘Internet’ can also be used. If this is an ingress
1690	// rule, specifies where network traffic originates from.
1691	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
1692	// SourcePortRange - Gets or sets Source Port or Range. Integer or range between 0 and
1693	// 65535. A “*” can also be used to match all ports.
1694	SourcePortRange *string `json:"sourcePortRange,omitempty"`
1695}
1696
1697// OperationErrorAdditionalInfo the operation error info.
1698type OperationErrorAdditionalInfo struct {
1699	// Type - READ-ONLY; The error type.
1700	Type *string `json:"type,omitempty"`
1701	// Info - READ-ONLY; The operation error info.
1702	Info *MoveErrorInfo `json:"info,omitempty"`
1703}
1704
1705// MarshalJSON is the custom marshaler for OperationErrorAdditionalInfo.
1706func (oeai OperationErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
1707	objectMap := make(map[string]interface{})
1708	return json.Marshal(objectMap)
1709}
1710
1711// OperationsDiscovery operations discovery class.
1712type OperationsDiscovery struct {
1713	// Name - Gets or sets Name of the API.
1714	// The name of the operation being performed on this particular object. It should
1715	// match the action name that appears in RBAC / the event service.
1716	// Examples of operations include:
1717	// * Microsoft.Compute/virtualMachine/capture/action
1718	// * Microsoft.Compute/virtualMachine/restart/action
1719	// * Microsoft.Compute/virtualMachine/write
1720	// * Microsoft.Compute/virtualMachine/read
1721	// * Microsoft.Compute/virtualMachine/delete
1722	// Each action should include, in order:
1723	// (1) Resource Provider Namespace
1724	// (2) Type hierarchy for which the action applies (e.g. server/databases for a SQL
1725	// Azure database)
1726	// (3) Read, Write, Action or Delete indicating which type applies. If it is a PUT/PATCH
1727	// on a collection or named value, Write should be used.
1728	// If it is a GET, Read should be used. If it is a DELETE, Delete should be used. If it
1729	// is a POST, Action should be used.
1730	// As a note: all resource providers would need to include the "{Resource Provider
1731	// Namespace}/register/action" operation in their response.
1732	// This API is used to register for their service, and should include details about the
1733	// operation (e.g. a localized name for the resource provider + any special
1734	// considerations like PII release).
1735	Name *string `json:"name,omitempty"`
1736	// IsDataAction - Indicates whether the operation is a data action
1737	IsDataAction *bool    `json:"isDataAction,omitempty"`
1738	Display      *Display `json:"display,omitempty"`
1739	// Origin - Gets or sets Origin.
1740	// The intended executor of the operation; governs the display of the operation in the
1741	// RBAC UX and the audit logs UX.
1742	// Default value is "user,system".
1743	Origin     *string     `json:"origin,omitempty"`
1744	Properties interface{} `json:"properties,omitempty"`
1745}
1746
1747// OperationsDiscoveryCollection collection of ClientDiscovery details.
1748type OperationsDiscoveryCollection struct {
1749	autorest.Response `json:"-"`
1750	// Value - Gets or sets the ClientDiscovery details.
1751	Value *[]OperationsDiscovery `json:"value,omitempty"`
1752	// NextLink - Gets or sets the value of next link.
1753	NextLink *string `json:"nextLink,omitempty"`
1754}
1755
1756// OperationStatus operation status REST resource.
1757type OperationStatus struct {
1758	autorest.Response `json:"-"`
1759	// ID - READ-ONLY; Resource Id.
1760	ID *string `json:"id,omitempty"`
1761	// Name - READ-ONLY; Operation name.
1762	Name *string `json:"name,omitempty"`
1763	// Status - READ-ONLY; Status of the operation. ARM expects the terminal status to be one of Succeeded/ Failed/ Canceled. All other values imply that the operation is still running.
1764	Status *string `json:"status,omitempty"`
1765	// StartTime - READ-ONLY; Start time.
1766	StartTime *string `json:"startTime,omitempty"`
1767	// EndTime - READ-ONLY; End time.
1768	EndTime *string `json:"endTime,omitempty"`
1769	// Error - READ-ONLY; Error stating all error details for the operation.
1770	Error *OperationStatusError `json:"error,omitempty"`
1771	// Properties - READ-ONLY; Custom data.
1772	Properties interface{} `json:"properties,omitempty"`
1773}
1774
1775// MarshalJSON is the custom marshaler for OperationStatus.
1776func (osVar OperationStatus) MarshalJSON() ([]byte, error) {
1777	objectMap := make(map[string]interface{})
1778	return json.Marshal(objectMap)
1779}
1780
1781// OperationStatusError class for operation status errors.
1782type OperationStatusError struct {
1783	// Code - READ-ONLY; The error code.
1784	Code *string `json:"code,omitempty"`
1785	// Message - READ-ONLY; The error message.
1786	Message *string `json:"message,omitempty"`
1787	// Details - READ-ONLY; The error details.
1788	Details *[]OperationStatusError `json:"details,omitempty"`
1789	// AdditionalInfo - READ-ONLY; The additional info.
1790	AdditionalInfo *[]OperationErrorAdditionalInfo `json:"additionalInfo,omitempty"`
1791}
1792
1793// MarshalJSON is the custom marshaler for OperationStatusError.
1794func (ose OperationStatusError) MarshalJSON() ([]byte, error) {
1795	objectMap := make(map[string]interface{})
1796	return json.Marshal(objectMap)
1797}
1798
1799// PrepareRequest defines the request body for initiate prepare operation.
1800type PrepareRequest struct {
1801	// ValidateOnly - Gets or sets a value indicating whether the operation needs to only run pre-requisite.
1802	ValidateOnly *bool `json:"validateOnly,omitempty"`
1803	// MoveResources - Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property.
1804	MoveResources *[]string `json:"moveResources,omitempty"`
1805	// MoveResourceInputType - Possible values include: 'MoveResourceID', 'MoveResourceSourceID'
1806	MoveResourceInputType MoveResourceInputType `json:"moveResourceInputType,omitempty"`
1807}
1808
1809// ProxyResourceReference defines reference to a proxy resource.
1810type ProxyResourceReference struct {
1811	// Name - Gets the name of the proxy resource on the target side.
1812	Name *string `json:"name,omitempty"`
1813	// SourceArmResourceID - Gets the ARM resource ID of the tracked resource being referenced.
1814	SourceArmResourceID *string `json:"sourceArmResourceId,omitempty"`
1815}
1816
1817// PublicIPAddressResourceSettings defines the public IP address resource settings.
1818type PublicIPAddressResourceSettings struct {
1819	// DomainNameLabel - Gets or sets the domain name label.
1820	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
1821	// FQDN - Gets or sets the fully qualified domain name.
1822	FQDN *string `json:"fQDN,omitempty"`
1823	// PublicIPAllocationMethod - Gets or sets public IP allocation method.
1824	PublicIPAllocationMethod *string `json:"publicIpAllocationMethod,omitempty"`
1825	// Sku - Gets or sets public IP sku.
1826	Sku *string `json:"sku,omitempty"`
1827	// Zones - Gets or sets public IP zones.
1828	Zones *string `json:"zones,omitempty"`
1829	// TargetResourceName - Gets or sets the target Resource name.
1830	TargetResourceName *string `json:"targetResourceName,omitempty"`
1831	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
1832	ResourceType ResourceType `json:"resourceType,omitempty"`
1833}
1834
1835// MarshalJSON is the custom marshaler for PublicIPAddressResourceSettings.
1836func (piars PublicIPAddressResourceSettings) MarshalJSON() ([]byte, error) {
1837	piars.ResourceType = ResourceTypeMicrosoftNetworkpublicIPAddresses
1838	objectMap := make(map[string]interface{})
1839	if piars.DomainNameLabel != nil {
1840		objectMap["domainNameLabel"] = piars.DomainNameLabel
1841	}
1842	if piars.FQDN != nil {
1843		objectMap["fQDN"] = piars.FQDN
1844	}
1845	if piars.PublicIPAllocationMethod != nil {
1846		objectMap["publicIpAllocationMethod"] = piars.PublicIPAllocationMethod
1847	}
1848	if piars.Sku != nil {
1849		objectMap["sku"] = piars.Sku
1850	}
1851	if piars.Zones != nil {
1852		objectMap["zones"] = piars.Zones
1853	}
1854	if piars.TargetResourceName != nil {
1855		objectMap["targetResourceName"] = piars.TargetResourceName
1856	}
1857	if piars.ResourceType != "" {
1858		objectMap["resourceType"] = piars.ResourceType
1859	}
1860	return json.Marshal(objectMap)
1861}
1862
1863// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1864func (piars PublicIPAddressResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
1865	return nil, false
1866}
1867
1868// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1869func (piars PublicIPAddressResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
1870	return nil, false
1871}
1872
1873// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1874func (piars PublicIPAddressResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
1875	return nil, false
1876}
1877
1878// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1879func (piars PublicIPAddressResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
1880	return nil, false
1881}
1882
1883// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1884func (piars PublicIPAddressResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
1885	return nil, false
1886}
1887
1888// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1889func (piars PublicIPAddressResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
1890	return nil, false
1891}
1892
1893// AsSQLServerResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1894func (piars PublicIPAddressResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
1895	return nil, false
1896}
1897
1898// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1899func (piars PublicIPAddressResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
1900	return nil, false
1901}
1902
1903// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1904func (piars PublicIPAddressResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
1905	return nil, false
1906}
1907
1908// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1909func (piars PublicIPAddressResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
1910	return nil, false
1911}
1912
1913// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1914func (piars PublicIPAddressResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
1915	return &piars, true
1916}
1917
1918// AsResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1919func (piars PublicIPAddressResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
1920	return nil, false
1921}
1922
1923// AsBasicResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings.
1924func (piars PublicIPAddressResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
1925	return &piars, true
1926}
1927
1928// ResourceGroupResourceSettings defines the resource group resource settings.
1929type ResourceGroupResourceSettings struct {
1930	// TargetResourceName - Gets or sets the target Resource name.
1931	TargetResourceName *string `json:"targetResourceName,omitempty"`
1932	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
1933	ResourceType ResourceType `json:"resourceType,omitempty"`
1934}
1935
1936// MarshalJSON is the custom marshaler for ResourceGroupResourceSettings.
1937func (rgrs ResourceGroupResourceSettings) MarshalJSON() ([]byte, error) {
1938	rgrs.ResourceType = ResourceTypeResourceGroups
1939	objectMap := make(map[string]interface{})
1940	if rgrs.TargetResourceName != nil {
1941		objectMap["targetResourceName"] = rgrs.TargetResourceName
1942	}
1943	if rgrs.ResourceType != "" {
1944		objectMap["resourceType"] = rgrs.ResourceType
1945	}
1946	return json.Marshal(objectMap)
1947}
1948
1949// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
1950func (rgrs ResourceGroupResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
1951	return nil, false
1952}
1953
1954// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
1955func (rgrs ResourceGroupResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
1956	return nil, false
1957}
1958
1959// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
1960func (rgrs ResourceGroupResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
1961	return nil, false
1962}
1963
1964// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
1965func (rgrs ResourceGroupResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
1966	return nil, false
1967}
1968
1969// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
1970func (rgrs ResourceGroupResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
1971	return nil, false
1972}
1973
1974// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
1975func (rgrs ResourceGroupResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
1976	return nil, false
1977}
1978
1979// AsSQLServerResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
1980func (rgrs ResourceGroupResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
1981	return nil, false
1982}
1983
1984// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
1985func (rgrs ResourceGroupResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
1986	return nil, false
1987}
1988
1989// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
1990func (rgrs ResourceGroupResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
1991	return nil, false
1992}
1993
1994// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
1995func (rgrs ResourceGroupResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
1996	return &rgrs, true
1997}
1998
1999// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
2000func (rgrs ResourceGroupResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
2001	return nil, false
2002}
2003
2004// AsResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
2005func (rgrs ResourceGroupResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
2006	return nil, false
2007}
2008
2009// AsBasicResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings.
2010func (rgrs ResourceGroupResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
2011	return &rgrs, true
2012}
2013
2014// ResourceMoveRequestType defines the request body for resource move operation.
2015type ResourceMoveRequestType struct {
2016	// ValidateOnly - Gets or sets a value indicating whether the operation needs to only run pre-requisite.
2017	ValidateOnly *bool `json:"validateOnly,omitempty"`
2018	// MoveResources - Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property.
2019	MoveResources *[]string `json:"moveResources,omitempty"`
2020	// MoveResourceInputType - Possible values include: 'MoveResourceID', 'MoveResourceSourceID'
2021	MoveResourceInputType MoveResourceInputType `json:"moveResourceInputType,omitempty"`
2022}
2023
2024// BasicResourceSettings gets or sets the resource settings.
2025type BasicResourceSettings interface {
2026	AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool)
2027	AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool)
2028	AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool)
2029	AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool)
2030	AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool)
2031	AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool)
2032	AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool)
2033	AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool)
2034	AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool)
2035	AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool)
2036	AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool)
2037	AsResourceSettings() (*ResourceSettings, bool)
2038}
2039
2040// ResourceSettings gets or sets the resource settings.
2041type ResourceSettings struct {
2042	// TargetResourceName - Gets or sets the target Resource name.
2043	TargetResourceName *string `json:"targetResourceName,omitempty"`
2044	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
2045	ResourceType ResourceType `json:"resourceType,omitempty"`
2046}
2047
2048func unmarshalBasicResourceSettings(body []byte) (BasicResourceSettings, error) {
2049	var m map[string]interface{}
2050	err := json.Unmarshal(body, &m)
2051	if err != nil {
2052		return nil, err
2053	}
2054
2055	switch m["resourceType"] {
2056	case string(ResourceTypeMicrosoftComputevirtualMachines):
2057		var vmrs VirtualMachineResourceSettings
2058		err := json.Unmarshal(body, &vmrs)
2059		return vmrs, err
2060	case string(ResourceTypeMicrosoftComputeavailabilitySets):
2061		var asrs AvailabilitySetResourceSettings
2062		err := json.Unmarshal(body, &asrs)
2063		return asrs, err
2064	case string(ResourceTypeMicrosoftNetworkvirtualNetworks):
2065		var vnrs VirtualNetworkResourceSettings
2066		err := json.Unmarshal(body, &vnrs)
2067		return vnrs, err
2068	case string(ResourceTypeMicrosoftNetworknetworkInterfaces):
2069		var nirs NetworkInterfaceResourceSettings
2070		err := json.Unmarshal(body, &nirs)
2071		return nirs, err
2072	case string(ResourceTypeMicrosoftNetworknetworkSecurityGroups):
2073		var nsgrs NetworkSecurityGroupResourceSettings
2074		err := json.Unmarshal(body, &nsgrs)
2075		return nsgrs, err
2076	case string(ResourceTypeMicrosoftNetworkloadBalancers):
2077		var lbrs LoadBalancerResourceSettings
2078		err := json.Unmarshal(body, &lbrs)
2079		return lbrs, err
2080	case string(ResourceTypeMicrosoftSqlservers):
2081		var ssrs SQLServerResourceSettings
2082		err := json.Unmarshal(body, &ssrs)
2083		return ssrs, err
2084	case string(ResourceTypeMicrosoftSqlserverselasticPools):
2085		var seprs SQLElasticPoolResourceSettings
2086		err := json.Unmarshal(body, &seprs)
2087		return seprs, err
2088	case string(ResourceTypeMicrosoftSqlserversdatabases):
2089		var sdrs SQLDatabaseResourceSettings
2090		err := json.Unmarshal(body, &sdrs)
2091		return sdrs, err
2092	case string(ResourceTypeResourceGroups):
2093		var rgrs ResourceGroupResourceSettings
2094		err := json.Unmarshal(body, &rgrs)
2095		return rgrs, err
2096	case string(ResourceTypeMicrosoftNetworkpublicIPAddresses):
2097		var piars PublicIPAddressResourceSettings
2098		err := json.Unmarshal(body, &piars)
2099		return piars, err
2100	default:
2101		var rs ResourceSettings
2102		err := json.Unmarshal(body, &rs)
2103		return rs, err
2104	}
2105}
2106func unmarshalBasicResourceSettingsArray(body []byte) ([]BasicResourceSettings, error) {
2107	var rawMessages []*json.RawMessage
2108	err := json.Unmarshal(body, &rawMessages)
2109	if err != nil {
2110		return nil, err
2111	}
2112
2113	rsArray := make([]BasicResourceSettings, len(rawMessages))
2114
2115	for index, rawMessage := range rawMessages {
2116		rs, err := unmarshalBasicResourceSettings(*rawMessage)
2117		if err != nil {
2118			return nil, err
2119		}
2120		rsArray[index] = rs
2121	}
2122	return rsArray, nil
2123}
2124
2125// MarshalJSON is the custom marshaler for ResourceSettings.
2126func (rs ResourceSettings) MarshalJSON() ([]byte, error) {
2127	rs.ResourceType = ResourceTypeResourceSettings
2128	objectMap := make(map[string]interface{})
2129	if rs.TargetResourceName != nil {
2130		objectMap["targetResourceName"] = rs.TargetResourceName
2131	}
2132	if rs.ResourceType != "" {
2133		objectMap["resourceType"] = rs.ResourceType
2134	}
2135	return json.Marshal(objectMap)
2136}
2137
2138// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2139func (rs ResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
2140	return nil, false
2141}
2142
2143// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2144func (rs ResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
2145	return nil, false
2146}
2147
2148// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2149func (rs ResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
2150	return nil, false
2151}
2152
2153// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2154func (rs ResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
2155	return nil, false
2156}
2157
2158// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2159func (rs ResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
2160	return nil, false
2161}
2162
2163// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2164func (rs ResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
2165	return nil, false
2166}
2167
2168// AsSQLServerResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2169func (rs ResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
2170	return nil, false
2171}
2172
2173// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2174func (rs ResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
2175	return nil, false
2176}
2177
2178// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2179func (rs ResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
2180	return nil, false
2181}
2182
2183// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2184func (rs ResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
2185	return nil, false
2186}
2187
2188// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2189func (rs ResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
2190	return nil, false
2191}
2192
2193// AsResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2194func (rs ResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
2195	return &rs, true
2196}
2197
2198// AsBasicResourceSettings is the BasicResourceSettings implementation for ResourceSettings.
2199func (rs ResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
2200	return &rs, true
2201}
2202
2203// SQLDatabaseResourceSettings defines the Sql Database resource settings.
2204type SQLDatabaseResourceSettings struct {
2205	// ZoneRedundant - Possible values include: 'Enable', 'Disable'
2206	ZoneRedundant ZoneRedundant `json:"zoneRedundant,omitempty"`
2207	// TargetResourceName - Gets or sets the target Resource name.
2208	TargetResourceName *string `json:"targetResourceName,omitempty"`
2209	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
2210	ResourceType ResourceType `json:"resourceType,omitempty"`
2211}
2212
2213// MarshalJSON is the custom marshaler for SQLDatabaseResourceSettings.
2214func (sdrs SQLDatabaseResourceSettings) MarshalJSON() ([]byte, error) {
2215	sdrs.ResourceType = ResourceTypeMicrosoftSqlserversdatabases
2216	objectMap := make(map[string]interface{})
2217	if sdrs.ZoneRedundant != "" {
2218		objectMap["zoneRedundant"] = sdrs.ZoneRedundant
2219	}
2220	if sdrs.TargetResourceName != nil {
2221		objectMap["targetResourceName"] = sdrs.TargetResourceName
2222	}
2223	if sdrs.ResourceType != "" {
2224		objectMap["resourceType"] = sdrs.ResourceType
2225	}
2226	return json.Marshal(objectMap)
2227}
2228
2229// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2230func (sdrs SQLDatabaseResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
2231	return nil, false
2232}
2233
2234// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2235func (sdrs SQLDatabaseResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
2236	return nil, false
2237}
2238
2239// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2240func (sdrs SQLDatabaseResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
2241	return nil, false
2242}
2243
2244// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2245func (sdrs SQLDatabaseResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
2246	return nil, false
2247}
2248
2249// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2250func (sdrs SQLDatabaseResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
2251	return nil, false
2252}
2253
2254// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2255func (sdrs SQLDatabaseResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
2256	return nil, false
2257}
2258
2259// AsSQLServerResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2260func (sdrs SQLDatabaseResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
2261	return nil, false
2262}
2263
2264// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2265func (sdrs SQLDatabaseResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
2266	return nil, false
2267}
2268
2269// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2270func (sdrs SQLDatabaseResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
2271	return &sdrs, true
2272}
2273
2274// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2275func (sdrs SQLDatabaseResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
2276	return nil, false
2277}
2278
2279// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2280func (sdrs SQLDatabaseResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
2281	return nil, false
2282}
2283
2284// AsResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2285func (sdrs SQLDatabaseResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
2286	return nil, false
2287}
2288
2289// AsBasicResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings.
2290func (sdrs SQLDatabaseResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
2291	return &sdrs, true
2292}
2293
2294// SQLElasticPoolResourceSettings defines the Sql ElasticPool resource settings.
2295type SQLElasticPoolResourceSettings struct {
2296	// ZoneRedundant - Possible values include: 'Enable', 'Disable'
2297	ZoneRedundant ZoneRedundant `json:"zoneRedundant,omitempty"`
2298	// TargetResourceName - Gets or sets the target Resource name.
2299	TargetResourceName *string `json:"targetResourceName,omitempty"`
2300	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
2301	ResourceType ResourceType `json:"resourceType,omitempty"`
2302}
2303
2304// MarshalJSON is the custom marshaler for SQLElasticPoolResourceSettings.
2305func (seprs SQLElasticPoolResourceSettings) MarshalJSON() ([]byte, error) {
2306	seprs.ResourceType = ResourceTypeMicrosoftSqlserverselasticPools
2307	objectMap := make(map[string]interface{})
2308	if seprs.ZoneRedundant != "" {
2309		objectMap["zoneRedundant"] = seprs.ZoneRedundant
2310	}
2311	if seprs.TargetResourceName != nil {
2312		objectMap["targetResourceName"] = seprs.TargetResourceName
2313	}
2314	if seprs.ResourceType != "" {
2315		objectMap["resourceType"] = seprs.ResourceType
2316	}
2317	return json.Marshal(objectMap)
2318}
2319
2320// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2321func (seprs SQLElasticPoolResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
2322	return nil, false
2323}
2324
2325// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2326func (seprs SQLElasticPoolResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
2327	return nil, false
2328}
2329
2330// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2331func (seprs SQLElasticPoolResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
2332	return nil, false
2333}
2334
2335// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2336func (seprs SQLElasticPoolResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
2337	return nil, false
2338}
2339
2340// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2341func (seprs SQLElasticPoolResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
2342	return nil, false
2343}
2344
2345// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2346func (seprs SQLElasticPoolResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
2347	return nil, false
2348}
2349
2350// AsSQLServerResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2351func (seprs SQLElasticPoolResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
2352	return nil, false
2353}
2354
2355// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2356func (seprs SQLElasticPoolResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
2357	return &seprs, true
2358}
2359
2360// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2361func (seprs SQLElasticPoolResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
2362	return nil, false
2363}
2364
2365// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2366func (seprs SQLElasticPoolResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
2367	return nil, false
2368}
2369
2370// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2371func (seprs SQLElasticPoolResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
2372	return nil, false
2373}
2374
2375// AsResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2376func (seprs SQLElasticPoolResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
2377	return nil, false
2378}
2379
2380// AsBasicResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings.
2381func (seprs SQLElasticPoolResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
2382	return &seprs, true
2383}
2384
2385// SQLServerResourceSettings defines the SQL Server resource settings.
2386type SQLServerResourceSettings struct {
2387	// TargetResourceName - Gets or sets the target Resource name.
2388	TargetResourceName *string `json:"targetResourceName,omitempty"`
2389	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
2390	ResourceType ResourceType `json:"resourceType,omitempty"`
2391}
2392
2393// MarshalJSON is the custom marshaler for SQLServerResourceSettings.
2394func (ssrs SQLServerResourceSettings) MarshalJSON() ([]byte, error) {
2395	ssrs.ResourceType = ResourceTypeMicrosoftSqlservers
2396	objectMap := make(map[string]interface{})
2397	if ssrs.TargetResourceName != nil {
2398		objectMap["targetResourceName"] = ssrs.TargetResourceName
2399	}
2400	if ssrs.ResourceType != "" {
2401		objectMap["resourceType"] = ssrs.ResourceType
2402	}
2403	return json.Marshal(objectMap)
2404}
2405
2406// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2407func (ssrs SQLServerResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
2408	return nil, false
2409}
2410
2411// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2412func (ssrs SQLServerResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
2413	return nil, false
2414}
2415
2416// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2417func (ssrs SQLServerResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
2418	return nil, false
2419}
2420
2421// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2422func (ssrs SQLServerResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
2423	return nil, false
2424}
2425
2426// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2427func (ssrs SQLServerResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
2428	return nil, false
2429}
2430
2431// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2432func (ssrs SQLServerResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
2433	return nil, false
2434}
2435
2436// AsSQLServerResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2437func (ssrs SQLServerResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
2438	return &ssrs, true
2439}
2440
2441// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2442func (ssrs SQLServerResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
2443	return nil, false
2444}
2445
2446// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2447func (ssrs SQLServerResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
2448	return nil, false
2449}
2450
2451// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2452func (ssrs SQLServerResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
2453	return nil, false
2454}
2455
2456// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2457func (ssrs SQLServerResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
2458	return nil, false
2459}
2460
2461// AsResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2462func (ssrs SQLServerResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
2463	return nil, false
2464}
2465
2466// AsBasicResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings.
2467func (ssrs SQLServerResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
2468	return &ssrs, true
2469}
2470
2471// SubnetReference defines reference to subnet.
2472type SubnetReference struct {
2473	// Name - Gets the name of the proxy resource on the target side.
2474	Name *string `json:"name,omitempty"`
2475	// SourceArmResourceID - Gets the ARM resource ID of the tracked resource being referenced.
2476	SourceArmResourceID *string `json:"sourceArmResourceId,omitempty"`
2477}
2478
2479// SubnetResourceSettings defines the virtual network subnets resource settings.
2480type SubnetResourceSettings struct {
2481	// Name - Gets or sets the Subnet name.
2482	Name *string `json:"name,omitempty"`
2483	// AddressPrefix - Gets or sets address prefix for the subnet.
2484	AddressPrefix *string `json:"addressPrefix,omitempty"`
2485}
2486
2487// SummaryItem summary item.
2488type SummaryItem struct {
2489	// Count - Gets the count.
2490	Count *int32 `json:"count,omitempty"`
2491	// Item - Gets the item.
2492	Item *string `json:"item,omitempty"`
2493}
2494
2495// UnresolvedDependency unresolved dependency.
2496type UnresolvedDependency struct {
2497	// Count - Gets or sets the count.
2498	Count *int32 `json:"count,omitempty"`
2499	// ID - Gets or sets the arm id of the dependency.
2500	ID *string `json:"id,omitempty"`
2501}
2502
2503// UnresolvedDependencyCollection unresolved dependency collection.
2504type UnresolvedDependencyCollection struct {
2505	autorest.Response `json:"-"`
2506	// Value - Gets or sets the list of unresolved dependencies.
2507	Value *[]UnresolvedDependency `json:"value,omitempty"`
2508	// NextLink - Gets or sets the value of  next link.
2509	NextLink *string `json:"nextLink,omitempty"`
2510}
2511
2512// UpdateMoveCollectionRequest defines the request body for updating move collection.
2513type UpdateMoveCollectionRequest struct {
2514	// Tags - Gets or sets the Resource tags.
2515	Tags     map[string]*string `json:"tags"`
2516	Identity *Identity          `json:"identity,omitempty"`
2517}
2518
2519// MarshalJSON is the custom marshaler for UpdateMoveCollectionRequest.
2520func (umcr UpdateMoveCollectionRequest) MarshalJSON() ([]byte, error) {
2521	objectMap := make(map[string]interface{})
2522	if umcr.Tags != nil {
2523		objectMap["tags"] = umcr.Tags
2524	}
2525	if umcr.Identity != nil {
2526		objectMap["identity"] = umcr.Identity
2527	}
2528	return json.Marshal(objectMap)
2529}
2530
2531// VirtualMachineResourceSettings gets or sets the virtual machine resource settings.
2532type VirtualMachineResourceSettings struct {
2533	// TargetAvailabilityZone - Gets or sets the target availability zone. Possible values include: 'One', 'Two', 'Three', 'NA'
2534	TargetAvailabilityZone TargetAvailabilityZone `json:"targetAvailabilityZone,omitempty"`
2535	// TargetVMSize - Gets or sets the target virtual machine size.
2536	TargetVMSize *string `json:"targetVmSize,omitempty"`
2537	// TargetAvailabilitySetID - Gets or sets the target availability set id for virtual machines not in an availability set at source.
2538	TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"`
2539	// TargetResourceName - Gets or sets the target Resource name.
2540	TargetResourceName *string `json:"targetResourceName,omitempty"`
2541	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
2542	ResourceType ResourceType `json:"resourceType,omitempty"`
2543}
2544
2545// MarshalJSON is the custom marshaler for VirtualMachineResourceSettings.
2546func (vmrs VirtualMachineResourceSettings) MarshalJSON() ([]byte, error) {
2547	vmrs.ResourceType = ResourceTypeMicrosoftComputevirtualMachines
2548	objectMap := make(map[string]interface{})
2549	if vmrs.TargetAvailabilityZone != "" {
2550		objectMap["targetAvailabilityZone"] = vmrs.TargetAvailabilityZone
2551	}
2552	if vmrs.TargetVMSize != nil {
2553		objectMap["targetVmSize"] = vmrs.TargetVMSize
2554	}
2555	if vmrs.TargetAvailabilitySetID != nil {
2556		objectMap["targetAvailabilitySetId"] = vmrs.TargetAvailabilitySetID
2557	}
2558	if vmrs.TargetResourceName != nil {
2559		objectMap["targetResourceName"] = vmrs.TargetResourceName
2560	}
2561	if vmrs.ResourceType != "" {
2562		objectMap["resourceType"] = vmrs.ResourceType
2563	}
2564	return json.Marshal(objectMap)
2565}
2566
2567// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2568func (vmrs VirtualMachineResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
2569	return &vmrs, true
2570}
2571
2572// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2573func (vmrs VirtualMachineResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
2574	return nil, false
2575}
2576
2577// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2578func (vmrs VirtualMachineResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
2579	return nil, false
2580}
2581
2582// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2583func (vmrs VirtualMachineResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
2584	return nil, false
2585}
2586
2587// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2588func (vmrs VirtualMachineResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
2589	return nil, false
2590}
2591
2592// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2593func (vmrs VirtualMachineResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
2594	return nil, false
2595}
2596
2597// AsSQLServerResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2598func (vmrs VirtualMachineResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
2599	return nil, false
2600}
2601
2602// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2603func (vmrs VirtualMachineResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
2604	return nil, false
2605}
2606
2607// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2608func (vmrs VirtualMachineResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
2609	return nil, false
2610}
2611
2612// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2613func (vmrs VirtualMachineResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
2614	return nil, false
2615}
2616
2617// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2618func (vmrs VirtualMachineResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
2619	return nil, false
2620}
2621
2622// AsResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2623func (vmrs VirtualMachineResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
2624	return nil, false
2625}
2626
2627// AsBasicResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings.
2628func (vmrs VirtualMachineResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
2629	return &vmrs, true
2630}
2631
2632// VirtualNetworkResourceSettings defines the virtual network resource settings.
2633type VirtualNetworkResourceSettings struct {
2634	// EnableDdosProtection - Gets or sets a value indicating whether gets or sets whether the
2635	// DDOS protection should be switched on.
2636	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
2637	// AddressSpace - Gets or sets the address prefixes for the virtual network.
2638	AddressSpace *[]string `json:"addressSpace,omitempty"`
2639	// DNSServers - Gets or sets DHCPOptions that contains an array of DNS servers available to VMs
2640	// deployed in the virtual network.
2641	DNSServers *[]string `json:"dnsServers,omitempty"`
2642	// Subnets - Gets or sets List of subnets in a VirtualNetwork.
2643	Subnets *[]SubnetResourceSettings `json:"subnets,omitempty"`
2644	// TargetResourceName - Gets or sets the target Resource name.
2645	TargetResourceName *string `json:"targetResourceName,omitempty"`
2646	// ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses'
2647	ResourceType ResourceType `json:"resourceType,omitempty"`
2648}
2649
2650// MarshalJSON is the custom marshaler for VirtualNetworkResourceSettings.
2651func (vnrs VirtualNetworkResourceSettings) MarshalJSON() ([]byte, error) {
2652	vnrs.ResourceType = ResourceTypeMicrosoftNetworkvirtualNetworks
2653	objectMap := make(map[string]interface{})
2654	if vnrs.EnableDdosProtection != nil {
2655		objectMap["enableDdosProtection"] = vnrs.EnableDdosProtection
2656	}
2657	if vnrs.AddressSpace != nil {
2658		objectMap["addressSpace"] = vnrs.AddressSpace
2659	}
2660	if vnrs.DNSServers != nil {
2661		objectMap["dnsServers"] = vnrs.DNSServers
2662	}
2663	if vnrs.Subnets != nil {
2664		objectMap["subnets"] = vnrs.Subnets
2665	}
2666	if vnrs.TargetResourceName != nil {
2667		objectMap["targetResourceName"] = vnrs.TargetResourceName
2668	}
2669	if vnrs.ResourceType != "" {
2670		objectMap["resourceType"] = vnrs.ResourceType
2671	}
2672	return json.Marshal(objectMap)
2673}
2674
2675// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2676func (vnrs VirtualNetworkResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) {
2677	return nil, false
2678}
2679
2680// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2681func (vnrs VirtualNetworkResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) {
2682	return nil, false
2683}
2684
2685// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2686func (vnrs VirtualNetworkResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) {
2687	return &vnrs, true
2688}
2689
2690// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2691func (vnrs VirtualNetworkResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) {
2692	return nil, false
2693}
2694
2695// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2696func (vnrs VirtualNetworkResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) {
2697	return nil, false
2698}
2699
2700// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2701func (vnrs VirtualNetworkResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) {
2702	return nil, false
2703}
2704
2705// AsSQLServerResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2706func (vnrs VirtualNetworkResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) {
2707	return nil, false
2708}
2709
2710// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2711func (vnrs VirtualNetworkResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) {
2712	return nil, false
2713}
2714
2715// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2716func (vnrs VirtualNetworkResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) {
2717	return nil, false
2718}
2719
2720// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2721func (vnrs VirtualNetworkResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) {
2722	return nil, false
2723}
2724
2725// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2726func (vnrs VirtualNetworkResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) {
2727	return nil, false
2728}
2729
2730// AsResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2731func (vnrs VirtualNetworkResourceSettings) AsResourceSettings() (*ResourceSettings, bool) {
2732	return nil, false
2733}
2734
2735// AsBasicResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings.
2736func (vnrs VirtualNetworkResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) {
2737	return &vnrs, true
2738}
2739