1package datamigration
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration"
22
23// APIError error information.
24type APIError struct {
25	// Error - Error information in OData format
26	Error *ODataError `json:"error,omitempty"`
27}
28
29// AvailableServiceSku describes the available service SKU.
30type AvailableServiceSku struct {
31	// ResourceType - The resource type, including the provider namespace
32	ResourceType *string `json:"resourceType,omitempty"`
33	// Sku - SKU name, tier, etc.
34	Sku *AvailableServiceSkuSku `json:"sku,omitempty"`
35	// Capacity - A description of the scaling capacities of the SKU
36	Capacity *AvailableServiceSkuCapacity `json:"capacity,omitempty"`
37}
38
39// AvailableServiceSkuCapacity a description of the scaling capacities of the SKU
40type AvailableServiceSkuCapacity struct {
41	// Minimum - The minimum capacity, usually 0 or 1.
42	Minimum *int32 `json:"minimum,omitempty"`
43	// Maximum - The maximum capacity
44	Maximum *int32 `json:"maximum,omitempty"`
45	// Default - The default capacity
46	Default *int32 `json:"default,omitempty"`
47	// ScaleType - The scalability approach. Possible values include: 'ServiceScalabilityNone', 'ServiceScalabilityManual', 'ServiceScalabilityAutomatic'
48	ScaleType ServiceScalability `json:"scaleType,omitempty"`
49}
50
51// AvailableServiceSkuSku SKU name, tier, etc.
52type AvailableServiceSkuSku struct {
53	// Name - The name of the SKU
54	Name *string `json:"name,omitempty"`
55	// Family - SKU family
56	Family *string `json:"family,omitempty"`
57	// Size - SKU size
58	Size *string `json:"size,omitempty"`
59	// Tier - The tier of the SKU, such as "Free", "Basic", "Standard", or "Premium"
60	Tier *string `json:"tier,omitempty"`
61}
62
63// BlobShare blob container storage information.
64type BlobShare struct {
65	// SasURI - SAS URI of Azure Storage Account Container.
66	SasURI *string `json:"sasUri,omitempty"`
67}
68
69// BasicConnectionInfo defines the connection properties of a server
70type BasicConnectionInfo interface {
71	AsSQLConnectionInfo() (*SQLConnectionInfo, bool)
72	AsConnectionInfo() (*ConnectionInfo, bool)
73}
74
75// ConnectionInfo defines the connection properties of a server
76type ConnectionInfo struct {
77	// UserName - User name
78	UserName *string `json:"userName,omitempty"`
79	// Password - Password credential.
80	Password *string `json:"password,omitempty"`
81	// Type - Possible values include: 'TypeConnectionInfo', 'TypeSQLConnectionInfo'
82	Type Type `json:"type,omitempty"`
83}
84
85func unmarshalBasicConnectionInfo(body []byte) (BasicConnectionInfo, error) {
86	var m map[string]interface{}
87	err := json.Unmarshal(body, &m)
88	if err != nil {
89		return nil, err
90	}
91
92	switch m["type"] {
93	case string(TypeSQLConnectionInfo):
94		var sci SQLConnectionInfo
95		err := json.Unmarshal(body, &sci)
96		return sci, err
97	default:
98		var ci ConnectionInfo
99		err := json.Unmarshal(body, &ci)
100		return ci, err
101	}
102}
103func unmarshalBasicConnectionInfoArray(body []byte) ([]BasicConnectionInfo, error) {
104	var rawMessages []*json.RawMessage
105	err := json.Unmarshal(body, &rawMessages)
106	if err != nil {
107		return nil, err
108	}
109
110	ciArray := make([]BasicConnectionInfo, len(rawMessages))
111
112	for index, rawMessage := range rawMessages {
113		ci, err := unmarshalBasicConnectionInfo(*rawMessage)
114		if err != nil {
115			return nil, err
116		}
117		ciArray[index] = ci
118	}
119	return ciArray, nil
120}
121
122// MarshalJSON is the custom marshaler for ConnectionInfo.
123func (ci ConnectionInfo) MarshalJSON() ([]byte, error) {
124	ci.Type = TypeConnectionInfo
125	objectMap := make(map[string]interface{})
126	if ci.UserName != nil {
127		objectMap["userName"] = ci.UserName
128	}
129	if ci.Password != nil {
130		objectMap["password"] = ci.Password
131	}
132	if ci.Type != "" {
133		objectMap["type"] = ci.Type
134	}
135	return json.Marshal(objectMap)
136}
137
138// AsSQLConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo.
139func (ci ConnectionInfo) AsSQLConnectionInfo() (*SQLConnectionInfo, bool) {
140	return nil, false
141}
142
143// AsConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo.
144func (ci ConnectionInfo) AsConnectionInfo() (*ConnectionInfo, bool) {
145	return &ci, true
146}
147
148// AsBasicConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo.
149func (ci ConnectionInfo) AsBasicConnectionInfo() (BasicConnectionInfo, bool) {
150	return &ci, true
151}
152
153// ConnectToSourceSQLServerTaskInput input for the task that validates connection to SQL Server and also
154// validates source server requirements
155type ConnectToSourceSQLServerTaskInput struct {
156	// SourceConnectionInfo - Connection information for Source SQL Server
157	SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"`
158	// CheckPermissionsGroup - Permission group for validations. Possible values include: 'Default', 'MigrationFromSQLServerToAzureDB'
159	CheckPermissionsGroup ServerLevelPermissionsGroup `json:"checkPermissionsGroup,omitempty"`
160	// CollectLogins - Flag for whether to collect logins from source server.
161	CollectLogins *bool `json:"CollectLogins,omitempty"`
162	// CollectAgentJobs - Flag for whether to collect agent jobs from source server.
163	CollectAgentJobs *bool `json:"CollectAgentJobs,omitempty"`
164}
165
166// BasicConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also
167// validates source server requirements
168type BasicConnectToSourceSQLServerTaskOutput interface {
169	AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool)
170	AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool)
171	AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool)
172	AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool)
173	AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool)
174}
175
176// ConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also
177// validates source server requirements
178type ConnectToSourceSQLServerTaskOutput struct {
179	// ID - READ-ONLY; Result identifier
180	ID *string `json:"id,omitempty"`
181	// ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput'
182	ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"`
183}
184
185func unmarshalBasicConnectToSourceSQLServerTaskOutput(body []byte) (BasicConnectToSourceSQLServerTaskOutput, error) {
186	var m map[string]interface{}
187	err := json.Unmarshal(body, &m)
188	if err != nil {
189		return nil, err
190	}
191
192	switch m["resultType"] {
193	case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput):
194		var ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel
195		err := json.Unmarshal(body, &ctssstoajl)
196		return ctssstoajl, err
197	case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput):
198		var ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel
199		err := json.Unmarshal(body, &ctssstoll)
200		return ctssstoll, err
201	case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput):
202		var ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel
203		err := json.Unmarshal(body, &ctssstodl)
204		return ctssstodl, err
205	case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput):
206		var ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel
207		err := json.Unmarshal(body, &ctssstotl)
208		return ctssstotl, err
209	default:
210		var ctsssto ConnectToSourceSQLServerTaskOutput
211		err := json.Unmarshal(body, &ctsssto)
212		return ctsssto, err
213	}
214}
215func unmarshalBasicConnectToSourceSQLServerTaskOutputArray(body []byte) ([]BasicConnectToSourceSQLServerTaskOutput, error) {
216	var rawMessages []*json.RawMessage
217	err := json.Unmarshal(body, &rawMessages)
218	if err != nil {
219		return nil, err
220	}
221
222	ctssstoArray := make([]BasicConnectToSourceSQLServerTaskOutput, len(rawMessages))
223
224	for index, rawMessage := range rawMessages {
225		ctsssto, err := unmarshalBasicConnectToSourceSQLServerTaskOutput(*rawMessage)
226		if err != nil {
227			return nil, err
228		}
229		ctssstoArray[index] = ctsssto
230	}
231	return ctssstoArray, nil
232}
233
234// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutput.
235func (ctsssto ConnectToSourceSQLServerTaskOutput) MarshalJSON() ([]byte, error) {
236	ctsssto.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput
237	objectMap := make(map[string]interface{})
238	if ctsssto.ResultType != "" {
239		objectMap["resultType"] = ctsssto.ResultType
240	}
241	return json.Marshal(objectMap)
242}
243
244// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
245func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) {
246	return nil, false
247}
248
249// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
250func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) {
251	return nil, false
252}
253
254// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
255func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) {
256	return nil, false
257}
258
259// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
260func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) {
261	return nil, false
262}
263
264// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
265func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) {
266	return &ctsssto, true
267}
268
269// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
270func (ctsssto ConnectToSourceSQLServerTaskOutput) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) {
271	return &ctsssto, true
272}
273
274// ConnectToSourceSQLServerTaskOutputAgentJobLevel agentJob level output for the task that validates
275// connection to SQL Server and also validates source server requirements
276type ConnectToSourceSQLServerTaskOutputAgentJobLevel struct {
277	// Name - READ-ONLY; AgentJob name
278	Name *string `json:"name,omitempty"`
279	// JobCategory - READ-ONLY; The type of AgentJob.
280	JobCategory *string `json:"jobCategory,omitempty"`
281	// IsEnabled - READ-ONLY; The state of the original AgentJob.
282	IsEnabled *bool `json:"isEnabled,omitempty"`
283	// JobOwner - READ-ONLY; The owner of the AgentJob
284	JobOwner *string `json:"jobOwner,omitempty"`
285	// LastExecutedOn - READ-ONLY; UTC Date and time when the AgentJob was last executed.
286	LastExecutedOn *date.Time `json:"lastExecutedOn,omitempty"`
287	// MigrationEligibility - READ-ONLY; Information about eligibility of agent job for migration.
288	MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"`
289	// ID - READ-ONLY; Result identifier
290	ID *string `json:"id,omitempty"`
291	// ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput'
292	ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"`
293}
294
295// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
296func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) MarshalJSON() ([]byte, error) {
297	ctssstoajl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput
298	objectMap := make(map[string]interface{})
299	if ctssstoajl.ResultType != "" {
300		objectMap["resultType"] = ctssstoajl.ResultType
301	}
302	return json.Marshal(objectMap)
303}
304
305// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
306func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) {
307	return &ctssstoajl, true
308}
309
310// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
311func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) {
312	return nil, false
313}
314
315// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
316func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) {
317	return nil, false
318}
319
320// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
321func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) {
322	return nil, false
323}
324
325// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
326func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) {
327	return nil, false
328}
329
330// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
331func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) {
332	return &ctssstoajl, true
333}
334
335// ConnectToSourceSQLServerTaskOutputDatabaseLevel database level output for the task that validates
336// connection to SQL Server and also validates source server requirements
337type ConnectToSourceSQLServerTaskOutputDatabaseLevel struct {
338	// Name - READ-ONLY; Database name
339	Name *string `json:"name,omitempty"`
340	// SizeMB - READ-ONLY; Size of the file in megabytes
341	SizeMB *float64 `json:"sizeMB,omitempty"`
342	// DatabaseFiles - READ-ONLY; The list of database files
343	DatabaseFiles *[]DatabaseFileInfo `json:"databaseFiles,omitempty"`
344	// CompatibilityLevel - READ-ONLY; SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'
345	CompatibilityLevel DatabaseCompatLevel `json:"compatibilityLevel,omitempty"`
346	// DatabaseState - READ-ONLY; State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'
347	DatabaseState DatabaseState `json:"databaseState,omitempty"`
348	// ID - READ-ONLY; Result identifier
349	ID *string `json:"id,omitempty"`
350	// ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput'
351	ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"`
352}
353
354// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
355func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) {
356	ctssstodl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput
357	objectMap := make(map[string]interface{})
358	if ctssstodl.ResultType != "" {
359		objectMap["resultType"] = ctssstodl.ResultType
360	}
361	return json.Marshal(objectMap)
362}
363
364// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
365func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) {
366	return nil, false
367}
368
369// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
370func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) {
371	return nil, false
372}
373
374// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
375func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) {
376	return &ctssstodl, true
377}
378
379// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
380func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) {
381	return nil, false
382}
383
384// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
385func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) {
386	return nil, false
387}
388
389// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
390func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) {
391	return &ctssstodl, true
392}
393
394// ConnectToSourceSQLServerTaskOutputLoginLevel login level output for the task that validates connection
395// to SQL Server and also validates source server requirements
396type ConnectToSourceSQLServerTaskOutputLoginLevel struct {
397	// Name - READ-ONLY; Login name.
398	Name *string `json:"name,omitempty"`
399	// LoginType - READ-ONLY; The type of login. Possible values include: 'WindowsUser', 'WindowsGroup', 'SQLLogin', 'Certificate', 'AsymmetricKey', 'ExternalUser', 'ExternalGroup'
400	LoginType LoginType `json:"loginType,omitempty"`
401	// DefaultDatabase - READ-ONLY; The default database for the login.
402	DefaultDatabase *string `json:"defaultDatabase,omitempty"`
403	// IsEnabled - READ-ONLY; The state of the login.
404	IsEnabled *bool `json:"isEnabled,omitempty"`
405	// MigrationEligibility - READ-ONLY; Information about eligibility of login for migration.
406	MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"`
407	// ID - READ-ONLY; Result identifier
408	ID *string `json:"id,omitempty"`
409	// ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput'
410	ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"`
411}
412
413// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputLoginLevel.
414func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) MarshalJSON() ([]byte, error) {
415	ctssstoll.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput
416	objectMap := make(map[string]interface{})
417	if ctssstoll.ResultType != "" {
418		objectMap["resultType"] = ctssstoll.ResultType
419	}
420	return json.Marshal(objectMap)
421}
422
423// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
424func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) {
425	return nil, false
426}
427
428// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
429func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) {
430	return &ctssstoll, true
431}
432
433// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
434func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) {
435	return nil, false
436}
437
438// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
439func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) {
440	return nil, false
441}
442
443// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
444func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) {
445	return nil, false
446}
447
448// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
449func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) {
450	return &ctssstoll, true
451}
452
453// ConnectToSourceSQLServerTaskOutputTaskLevel task level output for the task that validates connection to
454// SQL Server and also validates source server requirements
455type ConnectToSourceSQLServerTaskOutputTaskLevel struct {
456	// Databases - READ-ONLY; Source databases as a map from database name to database id
457	Databases map[string]*string `json:"databases"`
458	// Logins - READ-ONLY; Source logins as a map from login name to login id.
459	Logins map[string]*string `json:"Logins"`
460	// AgentJobs - READ-ONLY; Source agent jobs as a map from agent job name to id.
461	AgentJobs map[string]*string `json:"AgentJobs"`
462	// SourceServerVersion - READ-ONLY; Source server version
463	SourceServerVersion *string `json:"sourceServerVersion,omitempty"`
464	// SourceServerBrandVersion - READ-ONLY; Source server brand version
465	SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"`
466	// ValidationErrors - READ-ONLY; Validation errors
467	ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"`
468	// ID - READ-ONLY; Result identifier
469	ID *string `json:"id,omitempty"`
470	// ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput'
471	ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"`
472}
473
474// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputTaskLevel.
475func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) MarshalJSON() ([]byte, error) {
476	ctssstotl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput
477	objectMap := make(map[string]interface{})
478	if ctssstotl.ResultType != "" {
479		objectMap["resultType"] = ctssstotl.ResultType
480	}
481	return json.Marshal(objectMap)
482}
483
484// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
485func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) {
486	return nil, false
487}
488
489// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
490func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) {
491	return nil, false
492}
493
494// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
495func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) {
496	return nil, false
497}
498
499// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
500func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) {
501	return &ctssstotl, true
502}
503
504// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
505func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) {
506	return nil, false
507}
508
509// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
510func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) {
511	return &ctssstotl, true
512}
513
514// ConnectToSourceSQLServerTaskProperties properties for the task that validates connection to SQL Server
515// and also validates source server requirements
516type ConnectToSourceSQLServerTaskProperties struct {
517	// Input - Task input
518	Input *ConnectToSourceSQLServerTaskInput `json:"input,omitempty"`
519	// Output - READ-ONLY; Task output. This is ignored if submitted.
520	Output *[]BasicConnectToSourceSQLServerTaskOutput `json:"output,omitempty"`
521	// Errors - READ-ONLY; Array of errors. This is ignored if submitted.
522	Errors *[]ODataError `json:"errors,omitempty"`
523	// State - READ-ONLY; The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted'
524	State TaskState `json:"state,omitempty"`
525	// TaskType - Possible values include: 'TaskTypeProjectTaskProperties', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeConnectToSourceSQLServer'
526	TaskType TaskType `json:"taskType,omitempty"`
527}
528
529// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskProperties.
530func (ctssstp ConnectToSourceSQLServerTaskProperties) MarshalJSON() ([]byte, error) {
531	ctssstp.TaskType = TaskTypeConnectToSourceSQLServer
532	objectMap := make(map[string]interface{})
533	if ctssstp.Input != nil {
534		objectMap["input"] = ctssstp.Input
535	}
536	if ctssstp.TaskType != "" {
537		objectMap["taskType"] = ctssstp.TaskType
538	}
539	return json.Marshal(objectMap)
540}
541
542// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
543func (ctssstp ConnectToSourceSQLServerTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) {
544	return nil, false
545}
546
547// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
548func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) {
549	return nil, false
550}
551
552// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
553func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) {
554	return nil, false
555}
556
557// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
558func (ctssstp ConnectToSourceSQLServerTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) {
559	return nil, false
560}
561
562// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
563func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) {
564	return nil, false
565}
566
567// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
568func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) {
569	return nil, false
570}
571
572// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
573func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) {
574	return &ctssstp, true
575}
576
577// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
578func (ctssstp ConnectToSourceSQLServerTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) {
579	return nil, false
580}
581
582// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
583func (ctssstp ConnectToSourceSQLServerTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) {
584	return &ctssstp, true
585}
586
587// UnmarshalJSON is the custom unmarshaler for ConnectToSourceSQLServerTaskProperties struct.
588func (ctssstp *ConnectToSourceSQLServerTaskProperties) UnmarshalJSON(body []byte) error {
589	var m map[string]*json.RawMessage
590	err := json.Unmarshal(body, &m)
591	if err != nil {
592		return err
593	}
594	for k, v := range m {
595		switch k {
596		case "input":
597			if v != nil {
598				var input ConnectToSourceSQLServerTaskInput
599				err = json.Unmarshal(*v, &input)
600				if err != nil {
601					return err
602				}
603				ctssstp.Input = &input
604			}
605		case "output":
606			if v != nil {
607				output, err := unmarshalBasicConnectToSourceSQLServerTaskOutputArray(*v)
608				if err != nil {
609					return err
610				}
611				ctssstp.Output = &output
612			}
613		case "errors":
614			if v != nil {
615				var errorsVar []ODataError
616				err = json.Unmarshal(*v, &errorsVar)
617				if err != nil {
618					return err
619				}
620				ctssstp.Errors = &errorsVar
621			}
622		case "state":
623			if v != nil {
624				var state TaskState
625				err = json.Unmarshal(*v, &state)
626				if err != nil {
627					return err
628				}
629				ctssstp.State = state
630			}
631		case "taskType":
632			if v != nil {
633				var taskType TaskType
634				err = json.Unmarshal(*v, &taskType)
635				if err != nil {
636					return err
637				}
638				ctssstp.TaskType = taskType
639			}
640		}
641	}
642
643	return nil
644}
645
646// ConnectToTargetSQLDbTaskInput input for the task that validates connection to SQL DB and target server
647// requirements
648type ConnectToTargetSQLDbTaskInput struct {
649	// TargetConnectionInfo - Connection information for target SQL DB
650	TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"`
651}
652
653// ConnectToTargetSQLDbTaskOutput output for the task that validates connection to SQL DB and target server
654// requirements
655type ConnectToTargetSQLDbTaskOutput struct {
656	// ID - READ-ONLY; Result identifier
657	ID *string `json:"id,omitempty"`
658	// Databases - READ-ONLY; Source databases as a map from database name to database id
659	Databases map[string]*string `json:"databases"`
660	// TargetServerVersion - READ-ONLY; Version of the target server
661	TargetServerVersion *string `json:"targetServerVersion,omitempty"`
662	// TargetServerBrandVersion - READ-ONLY; Target server brand version
663	TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"`
664}
665
666// MarshalJSON is the custom marshaler for ConnectToTargetSQLDbTaskOutput.
667func (cttsdto ConnectToTargetSQLDbTaskOutput) MarshalJSON() ([]byte, error) {
668	objectMap := make(map[string]interface{})
669	return json.Marshal(objectMap)
670}
671
672// ConnectToTargetSQLDbTaskProperties properties for the task that validates connection to SQL DB and
673// target server requirements
674type ConnectToTargetSQLDbTaskProperties struct {
675	// Input - Task input
676	Input *ConnectToTargetSQLDbTaskInput `json:"input,omitempty"`
677	// Output - READ-ONLY; Task output. This is ignored if submitted.
678	Output *[]ConnectToTargetSQLDbTaskOutput `json:"output,omitempty"`
679	// Errors - READ-ONLY; Array of errors. This is ignored if submitted.
680	Errors *[]ODataError `json:"errors,omitempty"`
681	// State - READ-ONLY; The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted'
682	State TaskState `json:"state,omitempty"`
683	// TaskType - Possible values include: 'TaskTypeProjectTaskProperties', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeConnectToSourceSQLServer'
684	TaskType TaskType `json:"taskType,omitempty"`
685}
686
687// MarshalJSON is the custom marshaler for ConnectToTargetSQLDbTaskProperties.
688func (cttsdtp ConnectToTargetSQLDbTaskProperties) MarshalJSON() ([]byte, error) {
689	cttsdtp.TaskType = TaskTypeConnectToTargetSQLDb
690	objectMap := make(map[string]interface{})
691	if cttsdtp.Input != nil {
692		objectMap["input"] = cttsdtp.Input
693	}
694	if cttsdtp.TaskType != "" {
695		objectMap["taskType"] = cttsdtp.TaskType
696	}
697	return json.Marshal(objectMap)
698}
699
700// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
701func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) {
702	return nil, false
703}
704
705// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
706func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) {
707	return nil, false
708}
709
710// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
711func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) {
712	return nil, false
713}
714
715// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
716func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) {
717	return nil, false
718}
719
720// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
721func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) {
722	return &cttsdtp, true
723}
724
725// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
726func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) {
727	return nil, false
728}
729
730// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
731func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) {
732	return nil, false
733}
734
735// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
736func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) {
737	return nil, false
738}
739
740// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
741func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) {
742	return &cttsdtp, true
743}
744
745// ConnectToTargetSQLMITaskInput input for the task that validates connection to Azure SQL Database Managed
746// Instance.
747type ConnectToTargetSQLMITaskInput struct {
748	// TargetConnectionInfo - Connection information for target SQL Server
749	TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"`
750}
751
752// ConnectToTargetSQLMITaskOutput output for the task that validates connection to Azure SQL Database
753// Managed Instance.
754type ConnectToTargetSQLMITaskOutput struct {
755	// ID - READ-ONLY; Result identifier
756	ID *string `json:"id,omitempty"`
757	// TargetServerVersion - READ-ONLY; Target server version
758	TargetServerVersion *string `json:"targetServerVersion,omitempty"`
759	// TargetServerBrandVersion - READ-ONLY; Target server brand version
760	TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"`
761	// Logins - READ-ONLY; List of logins on the target server.
762	Logins *[]string `json:"Logins,omitempty"`
763	// AgentJobs - READ-ONLY; List of agent jobs on the target server.
764	AgentJobs *[]string `json:"AgentJobs,omitempty"`
765	// ValidationErrors - READ-ONLY; Validation errors
766	ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"`
767}
768
769// MarshalJSON is the custom marshaler for ConnectToTargetSQLMITaskOutput.
770func (cttsmto ConnectToTargetSQLMITaskOutput) MarshalJSON() ([]byte, error) {
771	objectMap := make(map[string]interface{})
772	return json.Marshal(objectMap)
773}
774
775// ConnectToTargetSQLMITaskProperties properties for the task that validates connection to Azure SQL
776// Database Managed Instance
777type ConnectToTargetSQLMITaskProperties struct {
778	// Input - Task input
779	Input *ConnectToTargetSQLMITaskInput `json:"input,omitempty"`
780	// Output - READ-ONLY; Task output. This is ignored if submitted.
781	Output *[]ConnectToTargetSQLMITaskOutput `json:"output,omitempty"`
782	// Errors - READ-ONLY; Array of errors. This is ignored if submitted.
783	Errors *[]ODataError `json:"errors,omitempty"`
784	// State - READ-ONLY; The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted'
785	State TaskState `json:"state,omitempty"`
786	// TaskType - Possible values include: 'TaskTypeProjectTaskProperties', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeConnectToSourceSQLServer'
787	TaskType TaskType `json:"taskType,omitempty"`
788}
789
790// MarshalJSON is the custom marshaler for ConnectToTargetSQLMITaskProperties.
791func (cttsmtp ConnectToTargetSQLMITaskProperties) MarshalJSON() ([]byte, error) {
792	cttsmtp.TaskType = TaskTypeConnectToTargetAzureSQLDbMI
793	objectMap := make(map[string]interface{})
794	if cttsmtp.Input != nil {
795		objectMap["input"] = cttsmtp.Input
796	}
797	if cttsmtp.TaskType != "" {
798		objectMap["taskType"] = cttsmtp.TaskType
799	}
800	return json.Marshal(objectMap)
801}
802
803// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
804func (cttsmtp ConnectToTargetSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) {
805	return nil, false
806}
807
808// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
809func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) {
810	return nil, false
811}
812
813// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
814func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) {
815	return nil, false
816}
817
818// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
819func (cttsmtp ConnectToTargetSQLMITaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) {
820	return nil, false
821}
822
823// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
824func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) {
825	return nil, false
826}
827
828// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
829func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) {
830	return &cttsmtp, true
831}
832
833// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
834func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) {
835	return nil, false
836}
837
838// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
839func (cttsmtp ConnectToTargetSQLMITaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) {
840	return nil, false
841}
842
843// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
844func (cttsmtp ConnectToTargetSQLMITaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) {
845	return &cttsmtp, true
846}
847
848// Database information about a single database
849type Database struct {
850	// ID - Unique identifier for the database
851	ID *string `json:"id,omitempty"`
852	// Name - Name of the database
853	Name *string `json:"name,omitempty"`
854	// CompatibilityLevel - SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'
855	CompatibilityLevel DatabaseCompatLevel `json:"compatibilityLevel,omitempty"`
856	// Collation - Collation name of the database
857	Collation *string `json:"collation,omitempty"`
858	// ServerName - Name of the server
859	ServerName *string `json:"serverName,omitempty"`
860	// Fqdn - Fully qualified name
861	Fqdn *string `json:"fqdn,omitempty"`
862	// InstallID - Install id of the database
863	InstallID *string `json:"installId,omitempty"`
864	// ServerVersion - Version of the server
865	ServerVersion *string `json:"serverVersion,omitempty"`
866	// ServerEdition - Edition of the server
867	ServerEdition *string `json:"serverEdition,omitempty"`
868	// ServerLevel - Product level of the server (RTM, SP, CTP).
869	ServerLevel *string `json:"serverLevel,omitempty"`
870	// ServerDefaultDataPath - Default path of the data files
871	ServerDefaultDataPath *string `json:"serverDefaultDataPath,omitempty"`
872	// ServerDefaultLogPath - Default path of the log files
873	ServerDefaultLogPath *string `json:"serverDefaultLogPath,omitempty"`
874	// ServerDefaultBackupPath - Default path of the backup folder
875	ServerDefaultBackupPath *string `json:"serverDefaultBackupPath,omitempty"`
876	// ServerCoreCount - Number of cores on the server
877	ServerCoreCount *int32 `json:"serverCoreCount,omitempty"`
878	// ServerVisibleOnlineCoreCount - Number of cores on the server that have VISIBLE ONLINE status
879	ServerVisibleOnlineCoreCount *int32 `json:"serverVisibleOnlineCoreCount,omitempty"`
880	// DatabaseState - State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'
881	DatabaseState DatabaseState `json:"databaseState,omitempty"`
882	// ServerID - The unique Server Id
883	ServerID *string `json:"serverId,omitempty"`
884}
885
886// DatabaseFileInfo database file specific information
887type DatabaseFileInfo struct {
888	// DatabaseName - Name of the database
889	DatabaseName *string `json:"databaseName,omitempty"`
890	// ID - Unique identifier for database file
891	ID *string `json:"id,omitempty"`
892	// LogicalName - Logical name of the file
893	LogicalName *string `json:"logicalName,omitempty"`
894	// PhysicalFullName - Operating-system full path of the file
895	PhysicalFullName *string `json:"physicalFullName,omitempty"`
896	// RestoreFullName - Suggested full path of the file for restoring
897	RestoreFullName *string `json:"restoreFullName,omitempty"`
898	// FileType - Database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'
899	FileType DatabaseFileType `json:"fileType,omitempty"`
900	// SizeMB - Size of the file in megabytes
901	SizeMB *float64 `json:"sizeMB,omitempty"`
902}
903
904// DatabaseFileInput database file specific information for input
905type DatabaseFileInput struct {
906	// ID - Unique identifier for database file
907	ID *string `json:"id,omitempty"`
908	// LogicalName - Logical name of the file
909	LogicalName *string `json:"logicalName,omitempty"`
910	// PhysicalFullName - Operating-system full path of the file
911	PhysicalFullName *string `json:"physicalFullName,omitempty"`
912	// RestoreFullName - Suggested full path of the file for restoring
913	RestoreFullName *string `json:"restoreFullName,omitempty"`
914	// FileType - Database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'
915	FileType DatabaseFileType `json:"fileType,omitempty"`
916}
917
918// DatabaseInfo project Database Details
919type DatabaseInfo struct {
920	// SourceDatabaseName - Name of the database
921	SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"`
922}
923
924// DatabaseObjectName a representation of the name of an object in a database
925type DatabaseObjectName struct {
926	// DatabaseName - READ-ONLY; The unescaped name of the database containing the object
927	DatabaseName *string `json:"databaseName,omitempty"`
928	// ObjectName - READ-ONLY; The unescaped name of the object
929	ObjectName *string `json:"objectName,omitempty"`
930	// SchemaName - READ-ONLY; The unescaped name of the schema containing the object
931	SchemaName *string `json:"schemaName,omitempty"`
932	// ObjectType - Type of the object in the database. Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'
933	ObjectType ObjectType `json:"objectType,omitempty"`
934}
935
936// MarshalJSON is the custom marshaler for DatabaseObjectName.
937func (don DatabaseObjectName) MarshalJSON() ([]byte, error) {
938	objectMap := make(map[string]interface{})
939	if don.ObjectType != "" {
940		objectMap["objectType"] = don.ObjectType
941	}
942	return json.Marshal(objectMap)
943}
944
945// DatabaseSummaryResult summary of database results in the migration
946type DatabaseSummaryResult struct {
947	// SizeMB - READ-ONLY; Size of the database in megabytes
948	SizeMB *float64 `json:"sizeMB,omitempty"`
949	// Name - READ-ONLY; Name of the item
950	Name *string `json:"name,omitempty"`
951	// StartedOn - READ-ONLY; Migration start time
952	StartedOn *date.Time `json:"startedOn,omitempty"`
953	// EndedOn - READ-ONLY; Migration end time
954	EndedOn *date.Time `json:"endedOn,omitempty"`
955	// State - READ-ONLY; Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped'
956	State MigrationState `json:"state,omitempty"`
957	// StatusMessage - READ-ONLY; Status message
958	StatusMessage *string `json:"statusMessage,omitempty"`
959	// ItemsCount - READ-ONLY; Number of items
960	ItemsCount *int64 `json:"itemsCount,omitempty"`
961	// ItemsCompletedCount - READ-ONLY; Number of successfully completed items
962	ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"`
963	// ErrorPrefix - READ-ONLY; Wildcard string prefix to use for querying all errors of the item
964	ErrorPrefix *string `json:"errorPrefix,omitempty"`
965	// ResultPrefix - READ-ONLY; Wildcard string prefix to use for querying all sub-tem results of the item
966	ResultPrefix *string `json:"resultPrefix,omitempty"`
967}
968
969// MarshalJSON is the custom marshaler for DatabaseSummaryResult.
970func (dsr DatabaseSummaryResult) MarshalJSON() ([]byte, error) {
971	objectMap := make(map[string]interface{})
972	return json.Marshal(objectMap)
973}
974
975// DatabaseTable table properties
976type DatabaseTable struct {
977	// HasRows - READ-ONLY; Indicates whether table is empty or not
978	HasRows *bool `json:"hasRows,omitempty"`
979	// Name - READ-ONLY; Schema-qualified name of the table
980	Name *string `json:"name,omitempty"`
981}
982
983// MarshalJSON is the custom marshaler for DatabaseTable.
984func (dt DatabaseTable) MarshalJSON() ([]byte, error) {
985	objectMap := make(map[string]interface{})
986	return json.Marshal(objectMap)
987}
988
989// DataIntegrityValidationResult results for checksum based Data Integrity validation results
990type DataIntegrityValidationResult struct {
991	// FailedObjects - List of failed table names of source and target pair
992	FailedObjects map[string]*string `json:"failedObjects"`
993	// ValidationErrors - List of errors that happened while performing data integrity validation
994	ValidationErrors *ValidationError `json:"validationErrors,omitempty"`
995}
996
997// MarshalJSON is the custom marshaler for DataIntegrityValidationResult.
998func (divr DataIntegrityValidationResult) MarshalJSON() ([]byte, error) {
999	objectMap := make(map[string]interface{})
1000	if divr.FailedObjects != nil {
1001		objectMap["failedObjects"] = divr.FailedObjects
1002	}
1003	if divr.ValidationErrors != nil {
1004		objectMap["validationErrors"] = divr.ValidationErrors
1005	}
1006	return json.Marshal(objectMap)
1007}
1008
1009// DataItemMigrationSummaryResult basic summary of a data item migration
1010type DataItemMigrationSummaryResult struct {
1011	// Name - READ-ONLY; Name of the item
1012	Name *string `json:"name,omitempty"`
1013	// StartedOn - READ-ONLY; Migration start time
1014	StartedOn *date.Time `json:"startedOn,omitempty"`
1015	// EndedOn - READ-ONLY; Migration end time
1016	EndedOn *date.Time `json:"endedOn,omitempty"`
1017	// State - READ-ONLY; Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped'
1018	State MigrationState `json:"state,omitempty"`
1019	// StatusMessage - READ-ONLY; Status message
1020	StatusMessage *string `json:"statusMessage,omitempty"`
1021	// ItemsCount - READ-ONLY; Number of items
1022	ItemsCount *int64 `json:"itemsCount,omitempty"`
1023	// ItemsCompletedCount - READ-ONLY; Number of successfully completed items
1024	ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"`
1025	// ErrorPrefix - READ-ONLY; Wildcard string prefix to use for querying all errors of the item
1026	ErrorPrefix *string `json:"errorPrefix,omitempty"`
1027	// ResultPrefix - READ-ONLY; Wildcard string prefix to use for querying all sub-tem results of the item
1028	ResultPrefix *string `json:"resultPrefix,omitempty"`
1029}
1030
1031// MarshalJSON is the custom marshaler for DataItemMigrationSummaryResult.
1032func (dimsr DataItemMigrationSummaryResult) MarshalJSON() ([]byte, error) {
1033	objectMap := make(map[string]interface{})
1034	return json.Marshal(objectMap)
1035}
1036
1037// Error migration Task errors
1038type Error struct {
1039	// Message - READ-ONLY; Error description
1040	Message *string `json:"message,omitempty"`
1041	// Type - Type of error. Possible values include: 'ErrorTypeDefault', 'ErrorTypeWarning', 'ErrorTypeError'
1042	Type ErrorType `json:"type,omitempty"`
1043}
1044
1045// MarshalJSON is the custom marshaler for Error.
1046func (e Error) MarshalJSON() ([]byte, error) {
1047	objectMap := make(map[string]interface{})
1048	if e.Type != "" {
1049		objectMap["type"] = e.Type
1050	}
1051	return json.Marshal(objectMap)
1052}
1053
1054// ExecutionStatistics description about the errors happen while performing migration validation
1055type ExecutionStatistics struct {
1056	// ExecutionCount - No. of query executions
1057	ExecutionCount *int64 `json:"executionCount,omitempty"`
1058	// CPUTimeMs - CPU Time in millisecond(s) for the query execution
1059	CPUTimeMs *float64 `json:"cpuTimeMs,omitempty"`
1060	// ElapsedTimeMs - Time taken in millisecond(s) for executing the query
1061	ElapsedTimeMs *float64 `json:"elapsedTimeMs,omitempty"`
1062	// WaitStats - Dictionary of sql query execution wait types and the respective statistics
1063	WaitStats map[string]*WaitStatistics `json:"waitStats"`
1064	// HasErrors - Indicates whether the query resulted in an error
1065	HasErrors *bool `json:"hasErrors,omitempty"`
1066	// SQLErrors - List of sql Errors
1067	SQLErrors *[]string `json:"sqlErrors,omitempty"`
1068}
1069
1070// MarshalJSON is the custom marshaler for ExecutionStatistics.
1071func (es ExecutionStatistics) MarshalJSON() ([]byte, error) {
1072	objectMap := make(map[string]interface{})
1073	if es.ExecutionCount != nil {
1074		objectMap["executionCount"] = es.ExecutionCount
1075	}
1076	if es.CPUTimeMs != nil {
1077		objectMap["cpuTimeMs"] = es.CPUTimeMs
1078	}
1079	if es.ElapsedTimeMs != nil {
1080		objectMap["elapsedTimeMs"] = es.ElapsedTimeMs
1081	}
1082	if es.WaitStats != nil {
1083		objectMap["waitStats"] = es.WaitStats
1084	}
1085	if es.HasErrors != nil {
1086		objectMap["hasErrors"] = es.HasErrors
1087	}
1088	if es.SQLErrors != nil {
1089		objectMap["sqlErrors"] = es.SQLErrors
1090	}
1091	return json.Marshal(objectMap)
1092}
1093
1094// FileShare file share information with Path, Username, and Password.
1095type FileShare struct {
1096	// UserName - User name credential to connect to the share location
1097	UserName *string `json:"userName,omitempty"`
1098	// Password - Password credential used to connect to the share location.
1099	Password *string `json:"password,omitempty"`
1100	// Path - The folder path for this share.
1101	Path *string `json:"path,omitempty"`
1102}
1103
1104// GetUserTablesSQLTaskInput input for the task that collects user tables for the given list of databases
1105type GetUserTablesSQLTaskInput struct {
1106	// ConnectionInfo - Connection information for SQL Server
1107	ConnectionInfo *SQLConnectionInfo `json:"connectionInfo,omitempty"`
1108	// SelectedDatabases - List of database names to collect tables for
1109	SelectedDatabases *[]string `json:"selectedDatabases,omitempty"`
1110}
1111
1112// GetUserTablesSQLTaskOutput output of the task that collects user tables for the given list of databases
1113type GetUserTablesSQLTaskOutput struct {
1114	// ID - READ-ONLY; Result identifier
1115	ID *string `json:"id,omitempty"`
1116	// DatabasesToTables - READ-ONLY; Mapping from database name to list of tables
1117	DatabasesToTables map[string][]DatabaseTable `json:"databasesToTables"`
1118	// ValidationErrors - READ-ONLY; Validation errors
1119	ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"`
1120}
1121
1122// MarshalJSON is the custom marshaler for GetUserTablesSQLTaskOutput.
1123func (gutsto GetUserTablesSQLTaskOutput) MarshalJSON() ([]byte, error) {
1124	objectMap := make(map[string]interface{})
1125	return json.Marshal(objectMap)
1126}
1127
1128// GetUserTablesSQLTaskProperties properties for the task that collects user tables for the given list of
1129// databases
1130type GetUserTablesSQLTaskProperties struct {
1131	// Input - Task input
1132	Input *GetUserTablesSQLTaskInput `json:"input,omitempty"`
1133	// Output - READ-ONLY; Task output. This is ignored if submitted.
1134	Output *[]GetUserTablesSQLTaskOutput `json:"output,omitempty"`
1135	// Errors - READ-ONLY; Array of errors. This is ignored if submitted.
1136	Errors *[]ODataError `json:"errors,omitempty"`
1137	// State - READ-ONLY; The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted'
1138	State TaskState `json:"state,omitempty"`
1139	// TaskType - Possible values include: 'TaskTypeProjectTaskProperties', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeConnectToSourceSQLServer'
1140	TaskType TaskType `json:"taskType,omitempty"`
1141}
1142
1143// MarshalJSON is the custom marshaler for GetUserTablesSQLTaskProperties.
1144func (gutstp GetUserTablesSQLTaskProperties) MarshalJSON() ([]byte, error) {
1145	gutstp.TaskType = TaskTypeGetUserTablesSQL
1146	objectMap := make(map[string]interface{})
1147	if gutstp.Input != nil {
1148		objectMap["input"] = gutstp.Input
1149	}
1150	if gutstp.TaskType != "" {
1151		objectMap["taskType"] = gutstp.TaskType
1152	}
1153	return json.Marshal(objectMap)
1154}
1155
1156// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties.
1157func (gutstp GetUserTablesSQLTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) {
1158	return nil, false
1159}
1160
1161// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties.
1162func (gutstp GetUserTablesSQLTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) {
1163	return nil, false
1164}
1165
1166// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties.
1167func (gutstp GetUserTablesSQLTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) {
1168	return nil, false
1169}
1170
1171// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties.
1172func (gutstp GetUserTablesSQLTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) {
1173	return &gutstp, true
1174}
1175
1176// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties.
1177func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) {
1178	return nil, false
1179}
1180
1181// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties.
1182func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) {
1183	return nil, false
1184}
1185
1186// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties.
1187func (gutstp GetUserTablesSQLTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) {
1188	return nil, false
1189}
1190
1191// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties.
1192func (gutstp GetUserTablesSQLTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) {
1193	return nil, false
1194}
1195
1196// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties.
1197func (gutstp GetUserTablesSQLTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) {
1198	return &gutstp, true
1199}
1200
1201// MigrateSQLServerSQLDbDatabaseInput database specific information for SQL to Azure SQL DB migration task
1202// inputs
1203type MigrateSQLServerSQLDbDatabaseInput struct {
1204	// Name - Name of the database
1205	Name *string `json:"name,omitempty"`
1206	// TargetDatabaseName - Name of target database. Note: Target database will be truncated before starting migration.
1207	TargetDatabaseName *string `json:"targetDatabaseName,omitempty"`
1208	// MakeSourceDbReadOnly - Whether to set database read only before migration
1209	MakeSourceDbReadOnly *bool `json:"makeSourceDbReadOnly,omitempty"`
1210	// TableMap - Mapping of source to target tables
1211	TableMap map[string]*string `json:"tableMap"`
1212}
1213
1214// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbDatabaseInput.
1215func (msssddi MigrateSQLServerSQLDbDatabaseInput) MarshalJSON() ([]byte, error) {
1216	objectMap := make(map[string]interface{})
1217	if msssddi.Name != nil {
1218		objectMap["name"] = msssddi.Name
1219	}
1220	if msssddi.TargetDatabaseName != nil {
1221		objectMap["targetDatabaseName"] = msssddi.TargetDatabaseName
1222	}
1223	if msssddi.MakeSourceDbReadOnly != nil {
1224		objectMap["makeSourceDbReadOnly"] = msssddi.MakeSourceDbReadOnly
1225	}
1226	if msssddi.TableMap != nil {
1227		objectMap["tableMap"] = msssddi.TableMap
1228	}
1229	return json.Marshal(objectMap)
1230}
1231
1232// MigrateSQLServerSQLDbTaskInput input for the task that migrates on-prem SQL Server databases to Azure
1233// SQL Database
1234type MigrateSQLServerSQLDbTaskInput struct {
1235	// SelectedDatabases - Databases to migrate
1236	SelectedDatabases *[]MigrateSQLServerSQLDbDatabaseInput `json:"selectedDatabases,omitempty"`
1237	// ValidationOptions - Options for enabling various post migration validations. Available options,
1238	//  1.) Data Integrity Check: Performs a checksum based comparison on source and target tables after the migration to ensure the correctness of the data.
1239	//  2.) Schema Validation: Performs a thorough schema comparison between the source and target tables and provides a list of differences between the source and target database, 3.) Query Analysis: Executes a set of queries picked up automatically either from the Query Plan Cache or Query Store and execute them and compares the execution time between the source and target database.
1240	ValidationOptions *MigrationValidationOptions `json:"validationOptions,omitempty"`
1241	// SourceConnectionInfo - Information for connecting to source
1242	SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"`
1243	// TargetConnectionInfo - Information for connecting to target
1244	TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"`
1245}
1246
1247// BasicMigrateSQLServerSQLDbTaskOutput output for the task that migrates on-prem SQL Server databases to Azure SQL
1248// Database
1249type BasicMigrateSQLServerSQLDbTaskOutput interface {
1250	AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool)
1251	AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool)
1252	AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool)
1253	AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool)
1254	AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool)
1255}
1256
1257// MigrateSQLServerSQLDbTaskOutput output for the task that migrates on-prem SQL Server databases to Azure SQL
1258// Database
1259type MigrateSQLServerSQLDbTaskOutput struct {
1260	// ID - READ-ONLY; Result identifier
1261	ID *string `json:"id,omitempty"`
1262	// ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput'
1263	ResultType ResultType `json:"resultType,omitempty"`
1264}
1265
1266func unmarshalBasicMigrateSQLServerSQLDbTaskOutput(body []byte) (BasicMigrateSQLServerSQLDbTaskOutput, error) {
1267	var m map[string]interface{}
1268	err := json.Unmarshal(body, &m)
1269	if err != nil {
1270		return nil, err
1271	}
1272
1273	switch m["resultType"] {
1274	case string(ResultTypeErrorOutput):
1275		var msssdtoe MigrateSQLServerSQLDbTaskOutputError
1276		err := json.Unmarshal(body, &msssdtoe)
1277		return msssdtoe, err
1278	case string(ResultTypeTableLevelOutput):
1279		var msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel
1280		err := json.Unmarshal(body, &msssdtotl)
1281		return msssdtotl, err
1282	case string(ResultTypeDatabaseLevelOutput):
1283		var msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel
1284		err := json.Unmarshal(body, &msssdtodl)
1285		return msssdtodl, err
1286	case string(ResultTypeMigrationLevelOutput):
1287		var msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel
1288		err := json.Unmarshal(body, &msssdtoml)
1289		return msssdtoml, err
1290	default:
1291		var msssdto MigrateSQLServerSQLDbTaskOutput
1292		err := json.Unmarshal(body, &msssdto)
1293		return msssdto, err
1294	}
1295}
1296func unmarshalBasicMigrateSQLServerSQLDbTaskOutputArray(body []byte) ([]BasicMigrateSQLServerSQLDbTaskOutput, error) {
1297	var rawMessages []*json.RawMessage
1298	err := json.Unmarshal(body, &rawMessages)
1299	if err != nil {
1300		return nil, err
1301	}
1302
1303	msssdtoArray := make([]BasicMigrateSQLServerSQLDbTaskOutput, len(rawMessages))
1304
1305	for index, rawMessage := range rawMessages {
1306		msssdto, err := unmarshalBasicMigrateSQLServerSQLDbTaskOutput(*rawMessage)
1307		if err != nil {
1308			return nil, err
1309		}
1310		msssdtoArray[index] = msssdto
1311	}
1312	return msssdtoArray, nil
1313}
1314
1315// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutput.
1316func (msssdto MigrateSQLServerSQLDbTaskOutput) MarshalJSON() ([]byte, error) {
1317	msssdto.ResultType = ResultTypeMigrateSQLServerSQLDbTaskOutput
1318	objectMap := make(map[string]interface{})
1319	if msssdto.ResultType != "" {
1320		objectMap["resultType"] = msssdto.ResultType
1321	}
1322	return json.Marshal(objectMap)
1323}
1324
1325// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput.
1326func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) {
1327	return nil, false
1328}
1329
1330// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput.
1331func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) {
1332	return nil, false
1333}
1334
1335// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput.
1336func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) {
1337	return nil, false
1338}
1339
1340// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput.
1341func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) {
1342	return nil, false
1343}
1344
1345// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput.
1346func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) {
1347	return &msssdto, true
1348}
1349
1350// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput.
1351func (msssdto MigrateSQLServerSQLDbTaskOutput) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) {
1352	return &msssdto, true
1353}
1354
1355// MigrateSQLServerSQLDbTaskOutputDatabaseLevel ...
1356type MigrateSQLServerSQLDbTaskOutputDatabaseLevel struct {
1357	// DatabaseName - READ-ONLY; Name of the item
1358	DatabaseName *string `json:"databaseName,omitempty"`
1359	// StartedOn - READ-ONLY; Migration start time
1360	StartedOn *date.Time `json:"startedOn,omitempty"`
1361	// EndedOn - READ-ONLY; Migration end time
1362	EndedOn *date.Time `json:"endedOn,omitempty"`
1363	// State - READ-ONLY; Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped'
1364	State MigrationState `json:"state,omitempty"`
1365	// Stage - READ-ONLY; Migration stage that this database is in. Possible values include: 'DatabaseMigrationStageNone', 'DatabaseMigrationStageInitialize', 'DatabaseMigrationStageBackup', 'DatabaseMigrationStageFileCopy', 'DatabaseMigrationStageRestore', 'DatabaseMigrationStageCompleted'
1366	Stage DatabaseMigrationStage `json:"stage,omitempty"`
1367	// StatusMessage - READ-ONLY; Status message
1368	StatusMessage *string `json:"statusMessage,omitempty"`
1369	// Message - READ-ONLY; Migration progress message
1370	Message *string `json:"message,omitempty"`
1371	// NumberOfObjects - READ-ONLY; Number of objects
1372	NumberOfObjects *int64 `json:"numberOfObjects,omitempty"`
1373	// NumberOfObjectsCompleted - READ-ONLY; Number of successfully completed objects
1374	NumberOfObjectsCompleted *int64 `json:"numberOfObjectsCompleted,omitempty"`
1375	// ErrorCount - READ-ONLY; Number of database/object errors.
1376	ErrorCount *int64 `json:"errorCount,omitempty"`
1377	// ErrorPrefix - READ-ONLY; Wildcard string prefix to use for querying all errors of the item
1378	ErrorPrefix *string `json:"errorPrefix,omitempty"`
1379	// ResultPrefix - READ-ONLY; Wildcard string prefix to use for querying all sub-tem results of the item
1380	ResultPrefix *string `json:"resultPrefix,omitempty"`
1381	// ExceptionsAndWarnings - READ-ONLY; Migration exceptions and warnings.
1382	ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"`
1383	// ObjectSummary - READ-ONLY; Summary of object results in the migration
1384	ObjectSummary map[string]*DataItemMigrationSummaryResult `json:"objectSummary"`
1385	// ID - READ-ONLY; Result identifier
1386	ID *string `json:"id,omitempty"`
1387	// ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput'
1388	ResultType ResultType `json:"resultType,omitempty"`
1389}
1390
1391// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputDatabaseLevel.
1392func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) {
1393	msssdtodl.ResultType = ResultTypeDatabaseLevelOutput
1394	objectMap := make(map[string]interface{})
1395	if msssdtodl.ResultType != "" {
1396		objectMap["resultType"] = msssdtodl.ResultType
1397	}
1398	return json.Marshal(objectMap)
1399}
1400
1401// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel.
1402func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) {
1403	return nil, false
1404}
1405
1406// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel.
1407func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) {
1408	return nil, false
1409}
1410
1411// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel.
1412func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) {
1413	return &msssdtodl, true
1414}
1415
1416// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel.
1417func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) {
1418	return nil, false
1419}
1420
1421// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel.
1422func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) {
1423	return nil, false
1424}
1425
1426// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel.
1427func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) {
1428	return &msssdtodl, true
1429}
1430
1431// MigrateSQLServerSQLDbTaskOutputError ...
1432type MigrateSQLServerSQLDbTaskOutputError struct {
1433	// Error - READ-ONLY; Migration error
1434	Error *ReportableException `json:"error,omitempty"`
1435	// ID - READ-ONLY; Result identifier
1436	ID *string `json:"id,omitempty"`
1437	// ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput'
1438	ResultType ResultType `json:"resultType,omitempty"`
1439}
1440
1441// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputError.
1442func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) MarshalJSON() ([]byte, error) {
1443	msssdtoe.ResultType = ResultTypeErrorOutput
1444	objectMap := make(map[string]interface{})
1445	if msssdtoe.ResultType != "" {
1446		objectMap["resultType"] = msssdtoe.ResultType
1447	}
1448	return json.Marshal(objectMap)
1449}
1450
1451// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError.
1452func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) {
1453	return &msssdtoe, true
1454}
1455
1456// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError.
1457func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) {
1458	return nil, false
1459}
1460
1461// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError.
1462func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) {
1463	return nil, false
1464}
1465
1466// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError.
1467func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) {
1468	return nil, false
1469}
1470
1471// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError.
1472func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) {
1473	return nil, false
1474}
1475
1476// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError.
1477func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) {
1478	return &msssdtoe, true
1479}
1480
1481// MigrateSQLServerSQLDbTaskOutputMigrationLevel ...
1482type MigrateSQLServerSQLDbTaskOutputMigrationLevel struct {
1483	// StartedOn - READ-ONLY; Migration start time
1484	StartedOn *date.Time `json:"startedOn,omitempty"`
1485	// EndedOn - READ-ONLY; Migration end time
1486	EndedOn *date.Time `json:"endedOn,omitempty"`
1487	// DurationInSeconds - READ-ONLY; Duration of task execution in seconds.
1488	DurationInSeconds *int64 `json:"durationInSeconds,omitempty"`
1489	// Status - READ-ONLY; Current status of migration. Possible values include: 'MigrationStatusDefault', 'MigrationStatusConnecting', 'MigrationStatusSourceAndTargetSelected', 'MigrationStatusSelectLogins', 'MigrationStatusConfigured', 'MigrationStatusRunning', 'MigrationStatusError', 'MigrationStatusStopped', 'MigrationStatusCompleted', 'MigrationStatusCompletedWithWarnings'
1490	Status MigrationStatus `json:"status,omitempty"`
1491	// StatusMessage - READ-ONLY; Migration status message
1492	StatusMessage *string `json:"statusMessage,omitempty"`
1493	// Message - READ-ONLY; Migration progress message
1494	Message *string `json:"message,omitempty"`
1495	// Databases - READ-ONLY; Selected databases as a map from database name to database id
1496	Databases map[string]*string `json:"databases"`
1497	// DatabaseSummary - READ-ONLY; Summary of database results in the migration
1498	DatabaseSummary map[string]*DatabaseSummaryResult `json:"databaseSummary"`
1499	// MigrationReportResult - Migration Report Result, provides unique url for downloading your migration report.
1500	MigrationReportResult *MigrationReportResult `json:"migrationReportResult,omitempty"`
1501	// SourceServerVersion - READ-ONLY; Source server version
1502	SourceServerVersion *string `json:"sourceServerVersion,omitempty"`
1503	// SourceServerBrandVersion - READ-ONLY; Source server brand version
1504	SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"`
1505	// TargetServerVersion - READ-ONLY; Target server version
1506	TargetServerVersion *string `json:"targetServerVersion,omitempty"`
1507	// TargetServerBrandVersion - READ-ONLY; Target server brand version
1508	TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"`
1509	// ExceptionsAndWarnings - READ-ONLY; Migration exceptions and warnings.
1510	ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"`
1511	// ID - READ-ONLY; Result identifier
1512	ID *string `json:"id,omitempty"`
1513	// ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput'
1514	ResultType ResultType `json:"resultType,omitempty"`
1515}
1516
1517// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputMigrationLevel.
1518func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) {
1519	msssdtoml.ResultType = ResultTypeMigrationLevelOutput
1520	objectMap := make(map[string]interface{})
1521	if msssdtoml.MigrationReportResult != nil {
1522		objectMap["migrationReportResult"] = msssdtoml.MigrationReportResult
1523	}
1524	if msssdtoml.ResultType != "" {
1525		objectMap["resultType"] = msssdtoml.ResultType
1526	}
1527	return json.Marshal(objectMap)
1528}
1529
1530// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel.
1531func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) {
1532	return nil, false
1533}
1534
1535// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel.
1536func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) {
1537	return nil, false
1538}
1539
1540// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel.
1541func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) {
1542	return nil, false
1543}
1544
1545// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel.
1546func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) {
1547	return &msssdtoml, true
1548}
1549
1550// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel.
1551func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) {
1552	return nil, false
1553}
1554
1555// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel.
1556func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) {
1557	return &msssdtoml, true
1558}
1559
1560// MigrateSQLServerSQLDbTaskOutputTableLevel ...
1561type MigrateSQLServerSQLDbTaskOutputTableLevel struct {
1562	// ObjectName - READ-ONLY; Name of the item
1563	ObjectName *string `json:"objectName,omitempty"`
1564	// StartedOn - READ-ONLY; Migration start time
1565	StartedOn *date.Time `json:"startedOn,omitempty"`
1566	// EndedOn - READ-ONLY; Migration end time
1567	EndedOn *date.Time `json:"endedOn,omitempty"`
1568	// State - READ-ONLY; Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped'
1569	State MigrationState `json:"state,omitempty"`
1570	// StatusMessage - READ-ONLY; Status message
1571	StatusMessage *string `json:"statusMessage,omitempty"`
1572	// ItemsCount - READ-ONLY; Number of items
1573	ItemsCount *int64 `json:"itemsCount,omitempty"`
1574	// ItemsCompletedCount - READ-ONLY; Number of successfully completed items
1575	ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"`
1576	// ErrorPrefix - READ-ONLY; Wildcard string prefix to use for querying all errors of the item
1577	ErrorPrefix *string `json:"errorPrefix,omitempty"`
1578	// ResultPrefix - READ-ONLY; Wildcard string prefix to use for querying all sub-tem results of the item
1579	ResultPrefix *string `json:"resultPrefix,omitempty"`
1580	// ID - READ-ONLY; Result identifier
1581	ID *string `json:"id,omitempty"`
1582	// ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput'
1583	ResultType ResultType `json:"resultType,omitempty"`
1584}
1585
1586// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputTableLevel.
1587func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) MarshalJSON() ([]byte, error) {
1588	msssdtotl.ResultType = ResultTypeTableLevelOutput
1589	objectMap := make(map[string]interface{})
1590	if msssdtotl.ResultType != "" {
1591		objectMap["resultType"] = msssdtotl.ResultType
1592	}
1593	return json.Marshal(objectMap)
1594}
1595
1596// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel.
1597func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) {
1598	return nil, false
1599}
1600
1601// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel.
1602func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) {
1603	return &msssdtotl, true
1604}
1605
1606// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel.
1607func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) {
1608	return nil, false
1609}
1610
1611// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel.
1612func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) {
1613	return nil, false
1614}
1615
1616// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel.
1617func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) {
1618	return nil, false
1619}
1620
1621// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel.
1622func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) {
1623	return &msssdtotl, true
1624}
1625
1626// MigrateSQLServerSQLDbTaskProperties properties for the task that migrates on-prem SQL Server databases
1627// to Azure SQL Database
1628type MigrateSQLServerSQLDbTaskProperties struct {
1629	// Input - Task input
1630	Input *MigrateSQLServerSQLDbTaskInput `json:"input,omitempty"`
1631	// Output - READ-ONLY; Task output. This is ignored if submitted.
1632	Output *[]BasicMigrateSQLServerSQLDbTaskOutput `json:"output,omitempty"`
1633	// Errors - READ-ONLY; Array of errors. This is ignored if submitted.
1634	Errors *[]ODataError `json:"errors,omitempty"`
1635	// State - READ-ONLY; The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted'
1636	State TaskState `json:"state,omitempty"`
1637	// TaskType - Possible values include: 'TaskTypeProjectTaskProperties', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeConnectToSourceSQLServer'
1638	TaskType TaskType `json:"taskType,omitempty"`
1639}
1640
1641// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskProperties.
1642func (msssdtp MigrateSQLServerSQLDbTaskProperties) MarshalJSON() ([]byte, error) {
1643	msssdtp.TaskType = TaskTypeMigrateSQLServerSQLDb
1644	objectMap := make(map[string]interface{})
1645	if msssdtp.Input != nil {
1646		objectMap["input"] = msssdtp.Input
1647	}
1648	if msssdtp.TaskType != "" {
1649		objectMap["taskType"] = msssdtp.TaskType
1650	}
1651	return json.Marshal(objectMap)
1652}
1653
1654// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties.
1655func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) {
1656	return nil, false
1657}
1658
1659// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties.
1660func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) {
1661	return &msssdtp, true
1662}
1663
1664// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties.
1665func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) {
1666	return nil, false
1667}
1668
1669// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties.
1670func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) {
1671	return nil, false
1672}
1673
1674// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties.
1675func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) {
1676	return nil, false
1677}
1678
1679// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties.
1680func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) {
1681	return nil, false
1682}
1683
1684// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties.
1685func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) {
1686	return nil, false
1687}
1688
1689// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties.
1690func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) {
1691	return nil, false
1692}
1693
1694// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties.
1695func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) {
1696	return &msssdtp, true
1697}
1698
1699// UnmarshalJSON is the custom unmarshaler for MigrateSQLServerSQLDbTaskProperties struct.
1700func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) error {
1701	var m map[string]*json.RawMessage
1702	err := json.Unmarshal(body, &m)
1703	if err != nil {
1704		return err
1705	}
1706	for k, v := range m {
1707		switch k {
1708		case "input":
1709			if v != nil {
1710				var input MigrateSQLServerSQLDbTaskInput
1711				err = json.Unmarshal(*v, &input)
1712				if err != nil {
1713					return err
1714				}
1715				msssdtp.Input = &input
1716			}
1717		case "output":
1718			if v != nil {
1719				output, err := unmarshalBasicMigrateSQLServerSQLDbTaskOutputArray(*v)
1720				if err != nil {
1721					return err
1722				}
1723				msssdtp.Output = &output
1724			}
1725		case "errors":
1726			if v != nil {
1727				var errorsVar []ODataError
1728				err = json.Unmarshal(*v, &errorsVar)
1729				if err != nil {
1730					return err
1731				}
1732				msssdtp.Errors = &errorsVar
1733			}
1734		case "state":
1735			if v != nil {
1736				var state TaskState
1737				err = json.Unmarshal(*v, &state)
1738				if err != nil {
1739					return err
1740				}
1741				msssdtp.State = state
1742			}
1743		case "taskType":
1744			if v != nil {
1745				var taskType TaskType
1746				err = json.Unmarshal(*v, &taskType)
1747				if err != nil {
1748					return err
1749				}
1750				msssdtp.TaskType = taskType
1751			}
1752		}
1753	}
1754
1755	return nil
1756}
1757
1758// MigrateSQLServerSQLMIDatabaseInput database specific information for SQL to Azure SQL DB Managed
1759// Instance migration task inputs
1760type MigrateSQLServerSQLMIDatabaseInput struct {
1761	// Name - Name of the database
1762	Name *string `json:"name,omitempty"`
1763	// RestoreDatabaseName - Name of the database at destination
1764	RestoreDatabaseName *string `json:"restoreDatabaseName,omitempty"`
1765	// BackupFileShare - Backup file share information for backing up this database.
1766	BackupFileShare *FileShare `json:"backupFileShare,omitempty"`
1767}
1768
1769// MigrateSQLServerSQLMITaskInput input for task that migrates SQL Server databases to Azure SQL Database
1770// Managed Instance.
1771type MigrateSQLServerSQLMITaskInput struct {
1772	// SelectedDatabases - Databases to migrate
1773	SelectedDatabases *[]MigrateSQLServerSQLMIDatabaseInput `json:"selectedDatabases,omitempty"`
1774	// SelectedLogins - Logins to migrate.
1775	SelectedLogins *[]string `json:"selectedLogins,omitempty"`
1776	// SelectedAgentJobs - Agent Jobs to migrate.
1777	SelectedAgentJobs *[]string `json:"selectedAgentJobs,omitempty"`
1778	// BackupFileShare - Backup file share information for all selected databases.
1779	BackupFileShare *FileShare `json:"backupFileShare,omitempty"`
1780	// BackupBlobShare - SAS URI of Azure Storage Account Container to be used for storing backup files.
1781	BackupBlobShare *BlobShare `json:"backupBlobShare,omitempty"`
1782	// SourceConnectionInfo - Information for connecting to source
1783	SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"`
1784	// TargetConnectionInfo - Information for connecting to target
1785	TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"`
1786}
1787
1788// BasicMigrateSQLServerSQLMITaskOutput output for task that migrates SQL Server databases to Azure SQL Database
1789// Managed Instance.
1790type BasicMigrateSQLServerSQLMITaskOutput interface {
1791	AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool)
1792	AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool)
1793	AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool)
1794	AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool)
1795	AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool)
1796	AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool)
1797}
1798
1799// MigrateSQLServerSQLMITaskOutput output for task that migrates SQL Server databases to Azure SQL Database
1800// Managed Instance.
1801type MigrateSQLServerSQLMITaskOutput struct {
1802	// ID - READ-ONLY; Result identifier
1803	ID *string `json:"id,omitempty"`
1804	// ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput'
1805	ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"`
1806}
1807
1808func unmarshalBasicMigrateSQLServerSQLMITaskOutput(body []byte) (BasicMigrateSQLServerSQLMITaskOutput, error) {
1809	var m map[string]interface{}
1810	err := json.Unmarshal(body, &m)
1811	if err != nil {
1812		return nil, err
1813	}
1814
1815	switch m["resultType"] {
1816	case string(ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput):
1817		var msssmtoe MigrateSQLServerSQLMITaskOutputError
1818		err := json.Unmarshal(body, &msssmtoe)
1819		return msssmtoe, err
1820	case string(ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput):
1821		var msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel
1822		err := json.Unmarshal(body, &msssmtoll)
1823		return msssmtoll, err
1824	case string(ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput):
1825		var msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel
1826		err := json.Unmarshal(body, &msssmtoajl)
1827		return msssmtoajl, err
1828	case string(ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput):
1829		var msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel
1830		err := json.Unmarshal(body, &msssmtodl)
1831		return msssmtodl, err
1832	case string(ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput):
1833		var msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel
1834		err := json.Unmarshal(body, &msssmtoml)
1835		return msssmtoml, err
1836	default:
1837		var msssmto MigrateSQLServerSQLMITaskOutput
1838		err := json.Unmarshal(body, &msssmto)
1839		return msssmto, err
1840	}
1841}
1842func unmarshalBasicMigrateSQLServerSQLMITaskOutputArray(body []byte) ([]BasicMigrateSQLServerSQLMITaskOutput, error) {
1843	var rawMessages []*json.RawMessage
1844	err := json.Unmarshal(body, &rawMessages)
1845	if err != nil {
1846		return nil, err
1847	}
1848
1849	msssmtoArray := make([]BasicMigrateSQLServerSQLMITaskOutput, len(rawMessages))
1850
1851	for index, rawMessage := range rawMessages {
1852		msssmto, err := unmarshalBasicMigrateSQLServerSQLMITaskOutput(*rawMessage)
1853		if err != nil {
1854			return nil, err
1855		}
1856		msssmtoArray[index] = msssmto
1857	}
1858	return msssmtoArray, nil
1859}
1860
1861// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutput.
1862func (msssmto MigrateSQLServerSQLMITaskOutput) MarshalJSON() ([]byte, error) {
1863	msssmto.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput
1864	objectMap := make(map[string]interface{})
1865	if msssmto.ResultType != "" {
1866		objectMap["resultType"] = msssmto.ResultType
1867	}
1868	return json.Marshal(objectMap)
1869}
1870
1871// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput.
1872func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) {
1873	return nil, false
1874}
1875
1876// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput.
1877func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) {
1878	return nil, false
1879}
1880
1881// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput.
1882func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) {
1883	return nil, false
1884}
1885
1886// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput.
1887func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) {
1888	return nil, false
1889}
1890
1891// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput.
1892func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) {
1893	return nil, false
1894}
1895
1896// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput.
1897func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) {
1898	return &msssmto, true
1899}
1900
1901// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput.
1902func (msssmto MigrateSQLServerSQLMITaskOutput) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) {
1903	return &msssmto, true
1904}
1905
1906// MigrateSQLServerSQLMITaskOutputAgentJobLevel ...
1907type MigrateSQLServerSQLMITaskOutputAgentJobLevel struct {
1908	// Name - READ-ONLY; AgentJob name.
1909	Name *string `json:"name,omitempty"`
1910	// IsEnabled - READ-ONLY; The state of the original AgentJob.
1911	IsEnabled *bool `json:"isEnabled,omitempty"`
1912	// State - READ-ONLY; Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped'
1913	State MigrationState `json:"state,omitempty"`
1914	// StartedOn - READ-ONLY; Migration start time
1915	StartedOn *date.Time `json:"startedOn,omitempty"`
1916	// EndedOn - READ-ONLY; Migration end time
1917	EndedOn *date.Time `json:"endedOn,omitempty"`
1918	// Message - READ-ONLY; Migration progress message
1919	Message *string `json:"message,omitempty"`
1920	// ExceptionsAndWarnings - READ-ONLY; Migration errors and warnings per job
1921	ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"`
1922	// ID - READ-ONLY; Result identifier
1923	ID *string `json:"id,omitempty"`
1924	// ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput'
1925	ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"`
1926}
1927
1928// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutputAgentJobLevel.
1929func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) MarshalJSON() ([]byte, error) {
1930	msssmtoajl.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput
1931	objectMap := make(map[string]interface{})
1932	if msssmtoajl.ResultType != "" {
1933		objectMap["resultType"] = msssmtoajl.ResultType
1934	}
1935	return json.Marshal(objectMap)
1936}
1937
1938// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel.
1939func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) {
1940	return nil, false
1941}
1942
1943// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel.
1944func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) {
1945	return nil, false
1946}
1947
1948// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel.
1949func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) {
1950	return &msssmtoajl, true
1951}
1952
1953// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel.
1954func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) {
1955	return nil, false
1956}
1957
1958// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel.
1959func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) {
1960	return nil, false
1961}
1962
1963// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel.
1964func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) {
1965	return nil, false
1966}
1967
1968// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel.
1969func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) {
1970	return &msssmtoajl, true
1971}
1972
1973// MigrateSQLServerSQLMITaskOutputDatabaseLevel ...
1974type MigrateSQLServerSQLMITaskOutputDatabaseLevel struct {
1975	// DatabaseName - READ-ONLY; Name of the database
1976	DatabaseName *string `json:"databaseName,omitempty"`
1977	// SizeMB - READ-ONLY; Size of the database in megabytes
1978	SizeMB *float64 `json:"sizeMB,omitempty"`
1979	// State - READ-ONLY; Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped'
1980	State MigrationState `json:"state,omitempty"`
1981	// Stage - READ-ONLY; Current stage of migration. Possible values include: 'DatabaseMigrationStageNone', 'DatabaseMigrationStageInitialize', 'DatabaseMigrationStageBackup', 'DatabaseMigrationStageFileCopy', 'DatabaseMigrationStageRestore', 'DatabaseMigrationStageCompleted'
1982	Stage DatabaseMigrationStage `json:"stage,omitempty"`
1983	// StartedOn - READ-ONLY; Migration start time
1984	StartedOn *date.Time `json:"startedOn,omitempty"`
1985	// EndedOn - READ-ONLY; Migration end time
1986	EndedOn *date.Time `json:"endedOn,omitempty"`
1987	// Message - READ-ONLY; Migration progress message
1988	Message *string `json:"message,omitempty"`
1989	// ExceptionsAndWarnings - READ-ONLY; Migration exceptions and warnings
1990	ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"`
1991	// ID - READ-ONLY; Result identifier
1992	ID *string `json:"id,omitempty"`
1993	// ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput'
1994	ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"`
1995}
1996
1997// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutputDatabaseLevel.
1998func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) {
1999	msssmtodl.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput
2000	objectMap := make(map[string]interface{})
2001	if msssmtodl.ResultType != "" {
2002		objectMap["resultType"] = msssmtodl.ResultType
2003	}
2004	return json.Marshal(objectMap)
2005}
2006
2007// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel.
2008func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) {
2009	return nil, false
2010}
2011
2012// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel.
2013func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) {
2014	return nil, false
2015}
2016
2017// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel.
2018func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) {
2019	return nil, false
2020}
2021
2022// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel.
2023func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) {
2024	return &msssmtodl, true
2025}
2026
2027// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel.
2028func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) {
2029	return nil, false
2030}
2031
2032// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel.
2033func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) {
2034	return nil, false
2035}
2036
2037// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel.
2038func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) {
2039	return &msssmtodl, true
2040}
2041
2042// MigrateSQLServerSQLMITaskOutputError ...
2043type MigrateSQLServerSQLMITaskOutputError struct {
2044	// Error - READ-ONLY; Migration error
2045	Error *ReportableException `json:"error,omitempty"`
2046	// ID - READ-ONLY; Result identifier
2047	ID *string `json:"id,omitempty"`
2048	// ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput'
2049	ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"`
2050}
2051
2052// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutputError.
2053func (msssmtoe MigrateSQLServerSQLMITaskOutputError) MarshalJSON() ([]byte, error) {
2054	msssmtoe.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput
2055	objectMap := make(map[string]interface{})
2056	if msssmtoe.ResultType != "" {
2057		objectMap["resultType"] = msssmtoe.ResultType
2058	}
2059	return json.Marshal(objectMap)
2060}
2061
2062// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError.
2063func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) {
2064	return &msssmtoe, true
2065}
2066
2067// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError.
2068func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) {
2069	return nil, false
2070}
2071
2072// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError.
2073func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) {
2074	return nil, false
2075}
2076
2077// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError.
2078func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) {
2079	return nil, false
2080}
2081
2082// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError.
2083func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) {
2084	return nil, false
2085}
2086
2087// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError.
2088func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) {
2089	return nil, false
2090}
2091
2092// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError.
2093func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) {
2094	return &msssmtoe, true
2095}
2096
2097// MigrateSQLServerSQLMITaskOutputLoginLevel ...
2098type MigrateSQLServerSQLMITaskOutputLoginLevel struct {
2099	// LoginName - READ-ONLY; Login name.
2100	LoginName *string `json:"loginName,omitempty"`
2101	// State - READ-ONLY; Current state of login. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped'
2102	State MigrationState `json:"state,omitempty"`
2103	// Stage - READ-ONLY; Current stage of login. Possible values include: 'LoginMigrationStageNone', 'LoginMigrationStageInitialize', 'LoginMigrationStageLoginMigration', 'LoginMigrationStageEstablishUserMapping', 'LoginMigrationStageAssignRoleMembership', 'LoginMigrationStageAssignRoleOwnership', 'LoginMigrationStageEstablishServerPermissions', 'LoginMigrationStageEstablishObjectPermissions', 'LoginMigrationStageCompleted'
2104	Stage LoginMigrationStage `json:"stage,omitempty"`
2105	// StartedOn - READ-ONLY; Login migration start time
2106	StartedOn *date.Time `json:"startedOn,omitempty"`
2107	// EndedOn - READ-ONLY; Login migration end time
2108	EndedOn *date.Time `json:"endedOn,omitempty"`
2109	// Message - READ-ONLY; Login migration progress message
2110	Message *string `json:"message,omitempty"`
2111	// ExceptionsAndWarnings - READ-ONLY; Login migration errors and warnings per login
2112	ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"`
2113	// ID - READ-ONLY; Result identifier
2114	ID *string `json:"id,omitempty"`
2115	// ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput'
2116	ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"`
2117}
2118
2119// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutputLoginLevel.
2120func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) MarshalJSON() ([]byte, error) {
2121	msssmtoll.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput
2122	objectMap := make(map[string]interface{})
2123	if msssmtoll.ResultType != "" {
2124		objectMap["resultType"] = msssmtoll.ResultType
2125	}
2126	return json.Marshal(objectMap)
2127}
2128
2129// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel.
2130func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) {
2131	return nil, false
2132}
2133
2134// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel.
2135func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) {
2136	return &msssmtoll, true
2137}
2138
2139// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel.
2140func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) {
2141	return nil, false
2142}
2143
2144// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel.
2145func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) {
2146	return nil, false
2147}
2148
2149// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel.
2150func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) {
2151	return nil, false
2152}
2153
2154// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel.
2155func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) {
2156	return nil, false
2157}
2158
2159// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel.
2160func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) {
2161	return &msssmtoll, true
2162}
2163
2164// MigrateSQLServerSQLMITaskOutputMigrationLevel ...
2165type MigrateSQLServerSQLMITaskOutputMigrationLevel struct {
2166	// StartedOn - READ-ONLY; Migration start time
2167	StartedOn *date.Time `json:"startedOn,omitempty"`
2168	// EndedOn - READ-ONLY; Migration end time
2169	EndedOn *date.Time `json:"endedOn,omitempty"`
2170	// Status - READ-ONLY; Current status of migration. Possible values include: 'MigrationStatusDefault', 'MigrationStatusConnecting', 'MigrationStatusSourceAndTargetSelected', 'MigrationStatusSelectLogins', 'MigrationStatusConfigured', 'MigrationStatusRunning', 'MigrationStatusError', 'MigrationStatusStopped', 'MigrationStatusCompleted', 'MigrationStatusCompletedWithWarnings'
2171	Status MigrationStatus `json:"status,omitempty"`
2172	// State - READ-ONLY; Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped'
2173	State MigrationState `json:"state,omitempty"`
2174	// AgentJobs - READ-ONLY; Selected agent jobs as a map from name to id
2175	AgentJobs map[string]*string `json:"agentJobs"`
2176	// Logins - READ-ONLY; Selected logins as a map from name to id
2177	Logins map[string]*string `json:"logins"`
2178	// Message - READ-ONLY; Migration progress message
2179	Message *string `json:"message,omitempty"`
2180	// ServerRoleResults - READ-ONLY; Map of server role migration results.
2181	ServerRoleResults map[string]*StartMigrationScenarioServerRoleResult `json:"serverRoleResults"`
2182	// OrphanedUsers - READ-ONLY; Map of users to database name of orphaned users.
2183	OrphanedUsers map[string]*string `json:"orphanedUsers"`
2184	// Databases - READ-ONLY; Selected databases as a map from database name to database id
2185	Databases map[string]*string `json:"databases"`
2186	// SourceServerVersion - READ-ONLY; Source server version
2187	SourceServerVersion *string `json:"sourceServerVersion,omitempty"`
2188	// SourceServerBrandVersion - READ-ONLY; Source server brand version
2189	SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"`
2190	// TargetServerVersion - READ-ONLY; Target server version
2191	TargetServerVersion *string `json:"targetServerVersion,omitempty"`
2192	// TargetServerBrandVersion - READ-ONLY; Target server brand version
2193	TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"`
2194	// ExceptionsAndWarnings - READ-ONLY; Migration exceptions and warnings.
2195	ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"`
2196	// ID - READ-ONLY; Result identifier
2197	ID *string `json:"id,omitempty"`
2198	// ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput'
2199	ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"`
2200}
2201
2202// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutputMigrationLevel.
2203func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) MarshalJSON() ([]byte, error) {
2204	msssmtoml.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput
2205	objectMap := make(map[string]interface{})
2206	if msssmtoml.ResultType != "" {
2207		objectMap["resultType"] = msssmtoml.ResultType
2208	}
2209	return json.Marshal(objectMap)
2210}
2211
2212// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel.
2213func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) {
2214	return nil, false
2215}
2216
2217// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel.
2218func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) {
2219	return nil, false
2220}
2221
2222// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel.
2223func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) {
2224	return nil, false
2225}
2226
2227// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel.
2228func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) {
2229	return nil, false
2230}
2231
2232// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel.
2233func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) {
2234	return &msssmtoml, true
2235}
2236
2237// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel.
2238func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) {
2239	return nil, false
2240}
2241
2242// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel.
2243func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) {
2244	return &msssmtoml, true
2245}
2246
2247// MigrateSQLServerSQLMITaskProperties properties for task that migrates SQL Server databases to Azure SQL
2248// Database Managed Instance
2249type MigrateSQLServerSQLMITaskProperties struct {
2250	// Input - Task input
2251	Input *MigrateSQLServerSQLMITaskInput `json:"input,omitempty"`
2252	// Output - READ-ONLY; Task output. This is ignored if submitted.
2253	Output *[]BasicMigrateSQLServerSQLMITaskOutput `json:"output,omitempty"`
2254	// Errors - READ-ONLY; Array of errors. This is ignored if submitted.
2255	Errors *[]ODataError `json:"errors,omitempty"`
2256	// State - READ-ONLY; The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted'
2257	State TaskState `json:"state,omitempty"`
2258	// TaskType - Possible values include: 'TaskTypeProjectTaskProperties', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeConnectToSourceSQLServer'
2259	TaskType TaskType `json:"taskType,omitempty"`
2260}
2261
2262// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskProperties.
2263func (msssmtp MigrateSQLServerSQLMITaskProperties) MarshalJSON() ([]byte, error) {
2264	msssmtp.TaskType = TaskTypeMigrateSQLServerAzureSQLDbMI
2265	objectMap := make(map[string]interface{})
2266	if msssmtp.Input != nil {
2267		objectMap["input"] = msssmtp.Input
2268	}
2269	if msssmtp.TaskType != "" {
2270		objectMap["taskType"] = msssmtp.TaskType
2271	}
2272	return json.Marshal(objectMap)
2273}
2274
2275// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties.
2276func (msssmtp MigrateSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) {
2277	return nil, false
2278}
2279
2280// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties.
2281func (msssmtp MigrateSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) {
2282	return nil, false
2283}
2284
2285// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties.
2286func (msssmtp MigrateSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) {
2287	return &msssmtp, true
2288}
2289
2290// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties.
2291func (msssmtp MigrateSQLServerSQLMITaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) {
2292	return nil, false
2293}
2294
2295// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties.
2296func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) {
2297	return nil, false
2298}
2299
2300// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties.
2301func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) {
2302	return nil, false
2303}
2304
2305// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties.
2306func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) {
2307	return nil, false
2308}
2309
2310// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties.
2311func (msssmtp MigrateSQLServerSQLMITaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) {
2312	return nil, false
2313}
2314
2315// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties.
2316func (msssmtp MigrateSQLServerSQLMITaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) {
2317	return &msssmtp, true
2318}
2319
2320// UnmarshalJSON is the custom unmarshaler for MigrateSQLServerSQLMITaskProperties struct.
2321func (msssmtp *MigrateSQLServerSQLMITaskProperties) UnmarshalJSON(body []byte) error {
2322	var m map[string]*json.RawMessage
2323	err := json.Unmarshal(body, &m)
2324	if err != nil {
2325		return err
2326	}
2327	for k, v := range m {
2328		switch k {
2329		case "input":
2330			if v != nil {
2331				var input MigrateSQLServerSQLMITaskInput
2332				err = json.Unmarshal(*v, &input)
2333				if err != nil {
2334					return err
2335				}
2336				msssmtp.Input = &input
2337			}
2338		case "output":
2339			if v != nil {
2340				output, err := unmarshalBasicMigrateSQLServerSQLMITaskOutputArray(*v)
2341				if err != nil {
2342					return err
2343				}
2344				msssmtp.Output = &output
2345			}
2346		case "errors":
2347			if v != nil {
2348				var errorsVar []ODataError
2349				err = json.Unmarshal(*v, &errorsVar)
2350				if err != nil {
2351					return err
2352				}
2353				msssmtp.Errors = &errorsVar
2354			}
2355		case "state":
2356			if v != nil {
2357				var state TaskState
2358				err = json.Unmarshal(*v, &state)
2359				if err != nil {
2360					return err
2361				}
2362				msssmtp.State = state
2363			}
2364		case "taskType":
2365			if v != nil {
2366				var taskType TaskType
2367				err = json.Unmarshal(*v, &taskType)
2368				if err != nil {
2369					return err
2370				}
2371				msssmtp.TaskType = taskType
2372			}
2373		}
2374	}
2375
2376	return nil
2377}
2378
2379// MigrateSQLServerSQLServerDatabaseInput database specific information for SQL to SQL migration task
2380// inputs
2381type MigrateSQLServerSQLServerDatabaseInput struct {
2382	// Name - Name of the database
2383	Name *string `json:"name,omitempty"`
2384	// RestoreDatabaseName - Name of the database at destination
2385	RestoreDatabaseName *string `json:"restoreDatabaseName,omitempty"`
2386	// BackupFileShare - Backup file share information for this database.
2387	BackupFileShare *FileShare `json:"backupFileShare,omitempty"`
2388	// DatabaseFiles - The list of database files
2389	DatabaseFiles *[]DatabaseFileInput `json:"databaseFiles,omitempty"`
2390}
2391
2392// MigrationEligibilityInfo information about migration eligibility of a server object
2393type MigrationEligibilityInfo struct {
2394	// IsEligibleForMigration - READ-ONLY; Whether object is eligible for migration or not.
2395	IsEligibleForMigration *bool `json:"isEligibleForMigration,omitempty"`
2396	// ValidationMessages - READ-ONLY; Information about eligibility failure for the server object.
2397	ValidationMessages *[]string `json:"validationMessages,omitempty"`
2398}
2399
2400// MarshalJSON is the custom marshaler for MigrationEligibilityInfo.
2401func (mei MigrationEligibilityInfo) MarshalJSON() ([]byte, error) {
2402	objectMap := make(map[string]interface{})
2403	return json.Marshal(objectMap)
2404}
2405
2406// MigrationReportResult migration validation report result, contains the url for downloading the generated
2407// report.
2408type MigrationReportResult struct {
2409	// ID - Migration validation result identifier
2410	ID *string `json:"id,omitempty"`
2411	// ReportURL - The url of the report.
2412	ReportURL *string `json:"reportUrl,omitempty"`
2413}
2414
2415// MigrationTableMetadata metadata for tables selected in migration project
2416type MigrationTableMetadata struct {
2417	// SourceTableName - READ-ONLY; Source table name
2418	SourceTableName *string `json:"sourceTableName,omitempty"`
2419	// TargetTableName - READ-ONLY; Target table name
2420	TargetTableName *string `json:"targetTableName,omitempty"`
2421}
2422
2423// MarshalJSON is the custom marshaler for MigrationTableMetadata.
2424func (mtm MigrationTableMetadata) MarshalJSON() ([]byte, error) {
2425	objectMap := make(map[string]interface{})
2426	return json.Marshal(objectMap)
2427}
2428
2429// MigrationValidationDatabaseLevelResult database level validation results
2430type MigrationValidationDatabaseLevelResult struct {
2431	// ID - READ-ONLY; Result identifier
2432	ID *string `json:"id,omitempty"`
2433	// MigrationID - READ-ONLY; Migration Identifier
2434	MigrationID *string `json:"migrationId,omitempty"`
2435	// SourceDatabaseName - READ-ONLY; Name of the source database
2436	SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"`
2437	// TargetDatabaseName - READ-ONLY; Name of the target database
2438	TargetDatabaseName *string `json:"targetDatabaseName,omitempty"`
2439	// StartedOn - READ-ONLY; Validation start time
2440	StartedOn *date.Time `json:"startedOn,omitempty"`
2441	// EndedOn - READ-ONLY; Validation end time
2442	EndedOn *date.Time `json:"endedOn,omitempty"`
2443	// DataIntegrityValidationResult - READ-ONLY; Provides data integrity validation result between the source and target tables that are migrated.
2444	DataIntegrityValidationResult *DataIntegrityValidationResult `json:"dataIntegrityValidationResult,omitempty"`
2445	// SchemaValidationResult - READ-ONLY; Provides schema comparison result between source and target database
2446	SchemaValidationResult *SchemaComparisonValidationResult `json:"schemaValidationResult,omitempty"`
2447	// QueryAnalysisValidationResult - READ-ONLY; Results of some of the query execution result between source and target database
2448	QueryAnalysisValidationResult *QueryAnalysisValidationResult `json:"queryAnalysisValidationResult,omitempty"`
2449	// Status - READ-ONLY; Current status of validation at the database level. Possible values include: 'ValidationStatusDefault', 'ValidationStatusNotStarted', 'ValidationStatusInitialized', 'ValidationStatusInProgress', 'ValidationStatusCompleted', 'ValidationStatusCompletedWithIssues', 'ValidationStatusFailed', 'ValidationStatusStopped'
2450	Status ValidationStatus `json:"status,omitempty"`
2451}
2452
2453// MarshalJSON is the custom marshaler for MigrationValidationDatabaseLevelResult.
2454func (mvdlr MigrationValidationDatabaseLevelResult) MarshalJSON() ([]byte, error) {
2455	objectMap := make(map[string]interface{})
2456	return json.Marshal(objectMap)
2457}
2458
2459// MigrationValidationDatabaseSummaryResult migration Validation Database level summary result
2460type MigrationValidationDatabaseSummaryResult struct {
2461	// ID - READ-ONLY; Result identifier
2462	ID *string `json:"id,omitempty"`
2463	// MigrationID - READ-ONLY; Migration Identifier
2464	MigrationID *string `json:"migrationId,omitempty"`
2465	// SourceDatabaseName - READ-ONLY; Name of the source database
2466	SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"`
2467	// TargetDatabaseName - READ-ONLY; Name of the target database
2468	TargetDatabaseName *string `json:"targetDatabaseName,omitempty"`
2469	// StartedOn - READ-ONLY; Validation start time
2470	StartedOn *date.Time `json:"startedOn,omitempty"`
2471	// EndedOn - READ-ONLY; Validation end time
2472	EndedOn *date.Time `json:"endedOn,omitempty"`
2473	// Status - READ-ONLY; Current status of validation at the database level. Possible values include: 'ValidationStatusDefault', 'ValidationStatusNotStarted', 'ValidationStatusInitialized', 'ValidationStatusInProgress', 'ValidationStatusCompleted', 'ValidationStatusCompletedWithIssues', 'ValidationStatusFailed', 'ValidationStatusStopped'
2474	Status ValidationStatus `json:"status,omitempty"`
2475}
2476
2477// MarshalJSON is the custom marshaler for MigrationValidationDatabaseSummaryResult.
2478func (mvdsr MigrationValidationDatabaseSummaryResult) MarshalJSON() ([]byte, error) {
2479	objectMap := make(map[string]interface{})
2480	return json.Marshal(objectMap)
2481}
2482
2483// MigrationValidationOptions types of validations to run after the migration
2484type MigrationValidationOptions struct {
2485	// EnableSchemaValidation - Allows to compare the schema information between source and target.
2486	EnableSchemaValidation *bool `json:"enableSchemaValidation,omitempty"`
2487	// EnableDataIntegrityValidation - Allows to perform a checksum based data integrity validation between source and target for the selected database / tables .
2488	EnableDataIntegrityValidation *bool `json:"enableDataIntegrityValidation,omitempty"`
2489	// EnableQueryAnalysisValidation - Allows to perform a quick and intelligent query analysis by retrieving queries from the source database and executes them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries.
2490	EnableQueryAnalysisValidation *bool `json:"enableQueryAnalysisValidation,omitempty"`
2491}
2492
2493// MigrationValidationResult migration Validation Result
2494type MigrationValidationResult struct {
2495	// ID - READ-ONLY; Migration validation result identifier
2496	ID *string `json:"id,omitempty"`
2497	// MigrationID - READ-ONLY; Migration Identifier
2498	MigrationID *string `json:"migrationId,omitempty"`
2499	// SummaryResults - Validation summary results for each database
2500	SummaryResults map[string]*MigrationValidationDatabaseSummaryResult `json:"summaryResults"`
2501	// Status - READ-ONLY; Current status of validation at the migration level. Status from the database validation result status will be aggregated here. Possible values include: 'ValidationStatusDefault', 'ValidationStatusNotStarted', 'ValidationStatusInitialized', 'ValidationStatusInProgress', 'ValidationStatusCompleted', 'ValidationStatusCompletedWithIssues', 'ValidationStatusFailed', 'ValidationStatusStopped'
2502	Status ValidationStatus `json:"status,omitempty"`
2503}
2504
2505// MarshalJSON is the custom marshaler for MigrationValidationResult.
2506func (mvr MigrationValidationResult) MarshalJSON() ([]byte, error) {
2507	objectMap := make(map[string]interface{})
2508	if mvr.SummaryResults != nil {
2509		objectMap["summaryResults"] = mvr.SummaryResults
2510	}
2511	return json.Marshal(objectMap)
2512}
2513
2514// NameAvailabilityRequest a resource type and proposed name
2515type NameAvailabilityRequest struct {
2516	// Name - The proposed resource name
2517	Name *string `json:"name,omitempty"`
2518	// Type - The resource type chain (e.g. virtualMachines/extensions)
2519	Type *string `json:"type,omitempty"`
2520}
2521
2522// NameAvailabilityResponse indicates whether a proposed resource name is available
2523type NameAvailabilityResponse struct {
2524	autorest.Response `json:"-"`
2525	// NameAvailable - If true, the name is valid and available. If false, 'reason' describes why not.
2526	NameAvailable *bool `json:"nameAvailable,omitempty"`
2527	// Reason - The reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid'
2528	Reason NameCheckFailureReason `json:"reason,omitempty"`
2529	// Message - The localized reason why the name is not available, if nameAvailable is false
2530	Message *string `json:"message,omitempty"`
2531}
2532
2533// ODataError error information in OData format.
2534type ODataError struct {
2535	// Code - The machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError'
2536	Code *string `json:"code,omitempty"`
2537	// Message - The human-readable description of the error
2538	Message *string `json:"message,omitempty"`
2539	// Details - Inner errors that caused this error
2540	Details *[]ODataError `json:"details,omitempty"`
2541}
2542
2543// Project a project resource
2544type Project struct {
2545	autorest.Response `json:"-"`
2546	// ProjectProperties - Project properties
2547	*ProjectProperties `json:"properties,omitempty"`
2548	// Tags - Resource tags.
2549	Tags map[string]*string `json:"tags"`
2550	// Location - Resource location.
2551	Location *string `json:"location,omitempty"`
2552	// ID - READ-ONLY; Resource ID.
2553	ID *string `json:"id,omitempty"`
2554	// Name - READ-ONLY; Resource name.
2555	Name *string `json:"name,omitempty"`
2556	// Type - READ-ONLY; Resource type.
2557	Type *string `json:"type,omitempty"`
2558}
2559
2560// MarshalJSON is the custom marshaler for Project.
2561func (p Project) MarshalJSON() ([]byte, error) {
2562	objectMap := make(map[string]interface{})
2563	if p.ProjectProperties != nil {
2564		objectMap["properties"] = p.ProjectProperties
2565	}
2566	if p.Tags != nil {
2567		objectMap["tags"] = p.Tags
2568	}
2569	if p.Location != nil {
2570		objectMap["location"] = p.Location
2571	}
2572	return json.Marshal(objectMap)
2573}
2574
2575// UnmarshalJSON is the custom unmarshaler for Project struct.
2576func (p *Project) UnmarshalJSON(body []byte) error {
2577	var m map[string]*json.RawMessage
2578	err := json.Unmarshal(body, &m)
2579	if err != nil {
2580		return err
2581	}
2582	for k, v := range m {
2583		switch k {
2584		case "properties":
2585			if v != nil {
2586				var projectProperties ProjectProperties
2587				err = json.Unmarshal(*v, &projectProperties)
2588				if err != nil {
2589					return err
2590				}
2591				p.ProjectProperties = &projectProperties
2592			}
2593		case "tags":
2594			if v != nil {
2595				var tags map[string]*string
2596				err = json.Unmarshal(*v, &tags)
2597				if err != nil {
2598					return err
2599				}
2600				p.Tags = tags
2601			}
2602		case "location":
2603			if v != nil {
2604				var location string
2605				err = json.Unmarshal(*v, &location)
2606				if err != nil {
2607					return err
2608				}
2609				p.Location = &location
2610			}
2611		case "id":
2612			if v != nil {
2613				var ID string
2614				err = json.Unmarshal(*v, &ID)
2615				if err != nil {
2616					return err
2617				}
2618				p.ID = &ID
2619			}
2620		case "name":
2621			if v != nil {
2622				var name string
2623				err = json.Unmarshal(*v, &name)
2624				if err != nil {
2625					return err
2626				}
2627				p.Name = &name
2628			}
2629		case "type":
2630			if v != nil {
2631				var typeVar string
2632				err = json.Unmarshal(*v, &typeVar)
2633				if err != nil {
2634					return err
2635				}
2636				p.Type = &typeVar
2637			}
2638		}
2639	}
2640
2641	return nil
2642}
2643
2644// ProjectList oData page of project resources
2645type ProjectList struct {
2646	autorest.Response `json:"-"`
2647	// Value - List of projects
2648	Value *[]Project `json:"value,omitempty"`
2649	// NextLink - URL to load the next page of projects
2650	NextLink *string `json:"nextLink,omitempty"`
2651}
2652
2653// ProjectListIterator provides access to a complete listing of Project values.
2654type ProjectListIterator struct {
2655	i    int
2656	page ProjectListPage
2657}
2658
2659// NextWithContext advances to the next value.  If there was an error making
2660// the request the iterator does not advance and the error is returned.
2661func (iter *ProjectListIterator) NextWithContext(ctx context.Context) (err error) {
2662	if tracing.IsEnabled() {
2663		ctx = tracing.StartSpan(ctx, fqdn+"/ProjectListIterator.NextWithContext")
2664		defer func() {
2665			sc := -1
2666			if iter.Response().Response.Response != nil {
2667				sc = iter.Response().Response.Response.StatusCode
2668			}
2669			tracing.EndSpan(ctx, sc, err)
2670		}()
2671	}
2672	iter.i++
2673	if iter.i < len(iter.page.Values()) {
2674		return nil
2675	}
2676	err = iter.page.NextWithContext(ctx)
2677	if err != nil {
2678		iter.i--
2679		return err
2680	}
2681	iter.i = 0
2682	return nil
2683}
2684
2685// Next advances to the next value.  If there was an error making
2686// the request the iterator does not advance and the error is returned.
2687// Deprecated: Use NextWithContext() instead.
2688func (iter *ProjectListIterator) Next() error {
2689	return iter.NextWithContext(context.Background())
2690}
2691
2692// NotDone returns true if the enumeration should be started or is not yet complete.
2693func (iter ProjectListIterator) NotDone() bool {
2694	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2695}
2696
2697// Response returns the raw server response from the last page request.
2698func (iter ProjectListIterator) Response() ProjectList {
2699	return iter.page.Response()
2700}
2701
2702// Value returns the current value or a zero-initialized value if the
2703// iterator has advanced beyond the end of the collection.
2704func (iter ProjectListIterator) Value() Project {
2705	if !iter.page.NotDone() {
2706		return Project{}
2707	}
2708	return iter.page.Values()[iter.i]
2709}
2710
2711// Creates a new instance of the ProjectListIterator type.
2712func NewProjectListIterator(page ProjectListPage) ProjectListIterator {
2713	return ProjectListIterator{page: page}
2714}
2715
2716// IsEmpty returns true if the ListResult contains no values.
2717func (pl ProjectList) IsEmpty() bool {
2718	return pl.Value == nil || len(*pl.Value) == 0
2719}
2720
2721// hasNextLink returns true if the NextLink is not empty.
2722func (pl ProjectList) hasNextLink() bool {
2723	return pl.NextLink != nil && len(*pl.NextLink) != 0
2724}
2725
2726// projectListPreparer prepares a request to retrieve the next set of results.
2727// It returns nil if no more results exist.
2728func (pl ProjectList) projectListPreparer(ctx context.Context) (*http.Request, error) {
2729	if !pl.hasNextLink() {
2730		return nil, nil
2731	}
2732	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2733		autorest.AsJSON(),
2734		autorest.AsGet(),
2735		autorest.WithBaseURL(to.String(pl.NextLink)))
2736}
2737
2738// ProjectListPage contains a page of Project values.
2739type ProjectListPage struct {
2740	fn func(context.Context, ProjectList) (ProjectList, error)
2741	pl ProjectList
2742}
2743
2744// NextWithContext advances to the next page of values.  If there was an error making
2745// the request the page does not advance and the error is returned.
2746func (page *ProjectListPage) NextWithContext(ctx context.Context) (err error) {
2747	if tracing.IsEnabled() {
2748		ctx = tracing.StartSpan(ctx, fqdn+"/ProjectListPage.NextWithContext")
2749		defer func() {
2750			sc := -1
2751			if page.Response().Response.Response != nil {
2752				sc = page.Response().Response.Response.StatusCode
2753			}
2754			tracing.EndSpan(ctx, sc, err)
2755		}()
2756	}
2757	for {
2758		next, err := page.fn(ctx, page.pl)
2759		if err != nil {
2760			return err
2761		}
2762		page.pl = next
2763		if !next.hasNextLink() || !next.IsEmpty() {
2764			break
2765		}
2766	}
2767	return nil
2768}
2769
2770// Next advances to the next page of values.  If there was an error making
2771// the request the page does not advance and the error is returned.
2772// Deprecated: Use NextWithContext() instead.
2773func (page *ProjectListPage) Next() error {
2774	return page.NextWithContext(context.Background())
2775}
2776
2777// NotDone returns true if the page enumeration should be started or is not yet complete.
2778func (page ProjectListPage) NotDone() bool {
2779	return !page.pl.IsEmpty()
2780}
2781
2782// Response returns the raw server response from the last page request.
2783func (page ProjectListPage) Response() ProjectList {
2784	return page.pl
2785}
2786
2787// Values returns the slice of values for the current page or nil if there are no values.
2788func (page ProjectListPage) Values() []Project {
2789	if page.pl.IsEmpty() {
2790		return nil
2791	}
2792	return *page.pl.Value
2793}
2794
2795// Creates a new instance of the ProjectListPage type.
2796func NewProjectListPage(cur ProjectList, getNextPage func(context.Context, ProjectList) (ProjectList, error)) ProjectListPage {
2797	return ProjectListPage{
2798		fn: getNextPage,
2799		pl: cur,
2800	}
2801}
2802
2803// ProjectMetadata common metadata for migration projects
2804type ProjectMetadata struct {
2805	// SourceServerName - READ-ONLY; Source server name
2806	SourceServerName *string `json:"sourceServerName,omitempty"`
2807	// SourceServerPort - READ-ONLY; Source server port number
2808	SourceServerPort *string `json:"sourceServerPort,omitempty"`
2809	// SourceUsername - READ-ONLY; Source username
2810	SourceUsername *string `json:"sourceUsername,omitempty"`
2811	// TargetServerName - READ-ONLY; Target server name
2812	TargetServerName *string `json:"targetServerName,omitempty"`
2813	// TargetUsername - READ-ONLY; Target username
2814	TargetUsername *string `json:"targetUsername,omitempty"`
2815	// TargetDbName - READ-ONLY; Target database name
2816	TargetDbName *string `json:"targetDbName,omitempty"`
2817	// TargetUsingWinAuth - READ-ONLY; Whether target connection is Windows authentication
2818	TargetUsingWinAuth *bool `json:"targetUsingWinAuth,omitempty"`
2819	// SelectedMigrationTables - READ-ONLY; List of tables selected for migration
2820	SelectedMigrationTables *[]MigrationTableMetadata `json:"selectedMigrationTables,omitempty"`
2821}
2822
2823// MarshalJSON is the custom marshaler for ProjectMetadata.
2824func (pm ProjectMetadata) MarshalJSON() ([]byte, error) {
2825	objectMap := make(map[string]interface{})
2826	return json.Marshal(objectMap)
2827}
2828
2829// ProjectProperties project-specific properties
2830type ProjectProperties struct {
2831	// SourcePlatform - Source platform for the project. Possible values include: 'SQL', 'Unknown'
2832	SourcePlatform ProjectSourcePlatform `json:"sourcePlatform,omitempty"`
2833	// TargetPlatform - Target platform for the project. Possible values include: 'ProjectTargetPlatformSQLDB', 'ProjectTargetPlatformSQLMI', 'ProjectTargetPlatformUnknown'
2834	TargetPlatform ProjectTargetPlatform `json:"targetPlatform,omitempty"`
2835	// CreationTime - READ-ONLY; UTC Date and time when project was created
2836	CreationTime *date.Time `json:"creationTime,omitempty"`
2837	// SourceConnectionInfo - Information for connecting to source
2838	SourceConnectionInfo BasicConnectionInfo `json:"sourceConnectionInfo,omitempty"`
2839	// TargetConnectionInfo - Information for connecting to target
2840	TargetConnectionInfo BasicConnectionInfo `json:"targetConnectionInfo,omitempty"`
2841	// DatabasesInfo - List of DatabaseInfo
2842	DatabasesInfo *[]DatabaseInfo `json:"databasesInfo,omitempty"`
2843	// ProvisioningState - READ-ONLY; The project's provisioning state. Possible values include: 'Deleting', 'Succeeded'
2844	ProvisioningState ProjectProvisioningState `json:"provisioningState,omitempty"`
2845}
2846
2847// MarshalJSON is the custom marshaler for ProjectProperties.
2848func (pp ProjectProperties) MarshalJSON() ([]byte, error) {
2849	objectMap := make(map[string]interface{})
2850	if pp.SourcePlatform != "" {
2851		objectMap["sourcePlatform"] = pp.SourcePlatform
2852	}
2853	if pp.TargetPlatform != "" {
2854		objectMap["targetPlatform"] = pp.TargetPlatform
2855	}
2856	objectMap["sourceConnectionInfo"] = pp.SourceConnectionInfo
2857	objectMap["targetConnectionInfo"] = pp.TargetConnectionInfo
2858	if pp.DatabasesInfo != nil {
2859		objectMap["databasesInfo"] = pp.DatabasesInfo
2860	}
2861	return json.Marshal(objectMap)
2862}
2863
2864// UnmarshalJSON is the custom unmarshaler for ProjectProperties struct.
2865func (pp *ProjectProperties) UnmarshalJSON(body []byte) error {
2866	var m map[string]*json.RawMessage
2867	err := json.Unmarshal(body, &m)
2868	if err != nil {
2869		return err
2870	}
2871	for k, v := range m {
2872		switch k {
2873		case "sourcePlatform":
2874			if v != nil {
2875				var sourcePlatform ProjectSourcePlatform
2876				err = json.Unmarshal(*v, &sourcePlatform)
2877				if err != nil {
2878					return err
2879				}
2880				pp.SourcePlatform = sourcePlatform
2881			}
2882		case "targetPlatform":
2883			if v != nil {
2884				var targetPlatform ProjectTargetPlatform
2885				err = json.Unmarshal(*v, &targetPlatform)
2886				if err != nil {
2887					return err
2888				}
2889				pp.TargetPlatform = targetPlatform
2890			}
2891		case "creationTime":
2892			if v != nil {
2893				var creationTime date.Time
2894				err = json.Unmarshal(*v, &creationTime)
2895				if err != nil {
2896					return err
2897				}
2898				pp.CreationTime = &creationTime
2899			}
2900		case "sourceConnectionInfo":
2901			if v != nil {
2902				sourceConnectionInfo, err := unmarshalBasicConnectionInfo(*v)
2903				if err != nil {
2904					return err
2905				}
2906				pp.SourceConnectionInfo = sourceConnectionInfo
2907			}
2908		case "targetConnectionInfo":
2909			if v != nil {
2910				targetConnectionInfo, err := unmarshalBasicConnectionInfo(*v)
2911				if err != nil {
2912					return err
2913				}
2914				pp.TargetConnectionInfo = targetConnectionInfo
2915			}
2916		case "databasesInfo":
2917			if v != nil {
2918				var databasesInfo []DatabaseInfo
2919				err = json.Unmarshal(*v, &databasesInfo)
2920				if err != nil {
2921					return err
2922				}
2923				pp.DatabasesInfo = &databasesInfo
2924			}
2925		case "provisioningState":
2926			if v != nil {
2927				var provisioningState ProjectProvisioningState
2928				err = json.Unmarshal(*v, &provisioningState)
2929				if err != nil {
2930					return err
2931				}
2932				pp.ProvisioningState = provisioningState
2933			}
2934		}
2935	}
2936
2937	return nil
2938}
2939
2940// ProjectTask a task resource
2941type ProjectTask struct {
2942	autorest.Response `json:"-"`
2943	// Etag - HTTP strong entity tag value. This is ignored if submitted.
2944	Etag *string `json:"etag,omitempty"`
2945	// Properties - Custom task properties
2946	Properties BasicProjectTaskProperties `json:"properties,omitempty"`
2947	// ID - READ-ONLY; Resource ID.
2948	ID *string `json:"id,omitempty"`
2949	// Name - READ-ONLY; Resource name.
2950	Name *string `json:"name,omitempty"`
2951	// Type - READ-ONLY; Resource type.
2952	Type *string `json:"type,omitempty"`
2953}
2954
2955// MarshalJSON is the custom marshaler for ProjectTask.
2956func (pt ProjectTask) MarshalJSON() ([]byte, error) {
2957	objectMap := make(map[string]interface{})
2958	if pt.Etag != nil {
2959		objectMap["etag"] = pt.Etag
2960	}
2961	objectMap["properties"] = pt.Properties
2962	return json.Marshal(objectMap)
2963}
2964
2965// UnmarshalJSON is the custom unmarshaler for ProjectTask struct.
2966func (pt *ProjectTask) UnmarshalJSON(body []byte) error {
2967	var m map[string]*json.RawMessage
2968	err := json.Unmarshal(body, &m)
2969	if err != nil {
2970		return err
2971	}
2972	for k, v := range m {
2973		switch k {
2974		case "etag":
2975			if v != nil {
2976				var etag string
2977				err = json.Unmarshal(*v, &etag)
2978				if err != nil {
2979					return err
2980				}
2981				pt.Etag = &etag
2982			}
2983		case "properties":
2984			if v != nil {
2985				properties, err := unmarshalBasicProjectTaskProperties(*v)
2986				if err != nil {
2987					return err
2988				}
2989				pt.Properties = properties
2990			}
2991		case "id":
2992			if v != nil {
2993				var ID string
2994				err = json.Unmarshal(*v, &ID)
2995				if err != nil {
2996					return err
2997				}
2998				pt.ID = &ID
2999			}
3000		case "name":
3001			if v != nil {
3002				var name string
3003				err = json.Unmarshal(*v, &name)
3004				if err != nil {
3005					return err
3006				}
3007				pt.Name = &name
3008			}
3009		case "type":
3010			if v != nil {
3011				var typeVar string
3012				err = json.Unmarshal(*v, &typeVar)
3013				if err != nil {
3014					return err
3015				}
3016				pt.Type = &typeVar
3017			}
3018		}
3019	}
3020
3021	return nil
3022}
3023
3024// BasicProjectTaskProperties base class for all types of DMS task properties. If task is not supported by current
3025// client, this object is returned.
3026type BasicProjectTaskProperties interface {
3027	AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool)
3028	AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool)
3029	AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool)
3030	AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool)
3031	AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool)
3032	AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool)
3033	AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool)
3034	AsProjectTaskProperties() (*ProjectTaskProperties, bool)
3035}
3036
3037// ProjectTaskProperties base class for all types of DMS task properties. If task is not supported by current
3038// client, this object is returned.
3039type ProjectTaskProperties struct {
3040	// Errors - READ-ONLY; Array of errors. This is ignored if submitted.
3041	Errors *[]ODataError `json:"errors,omitempty"`
3042	// State - READ-ONLY; The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted'
3043	State TaskState `json:"state,omitempty"`
3044	// TaskType - Possible values include: 'TaskTypeProjectTaskProperties', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeConnectToSourceSQLServer'
3045	TaskType TaskType `json:"taskType,omitempty"`
3046}
3047
3048func unmarshalBasicProjectTaskProperties(body []byte) (BasicProjectTaskProperties, error) {
3049	var m map[string]interface{}
3050	err := json.Unmarshal(body, &m)
3051	if err != nil {
3052		return nil, err
3053	}
3054
3055	switch m["taskType"] {
3056	case string(TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI):
3057		var vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties
3058		err := json.Unmarshal(body, &vmisssmtp)
3059		return vmisssmtp, err
3060	case string(TaskTypeMigrateSQLServerSQLDb):
3061		var msssdtp MigrateSQLServerSQLDbTaskProperties
3062		err := json.Unmarshal(body, &msssdtp)
3063		return msssdtp, err
3064	case string(TaskTypeMigrateSQLServerAzureSQLDbMI):
3065		var msssmtp MigrateSQLServerSQLMITaskProperties
3066		err := json.Unmarshal(body, &msssmtp)
3067		return msssmtp, err
3068	case string(TaskTypeGetUserTablesSQL):
3069		var gutstp GetUserTablesSQLTaskProperties
3070		err := json.Unmarshal(body, &gutstp)
3071		return gutstp, err
3072	case string(TaskTypeConnectToTargetSQLDb):
3073		var cttsdtp ConnectToTargetSQLDbTaskProperties
3074		err := json.Unmarshal(body, &cttsdtp)
3075		return cttsdtp, err
3076	case string(TaskTypeConnectToTargetAzureSQLDbMI):
3077		var cttsmtp ConnectToTargetSQLMITaskProperties
3078		err := json.Unmarshal(body, &cttsmtp)
3079		return cttsmtp, err
3080	case string(TaskTypeConnectToSourceSQLServer):
3081		var ctssstp ConnectToSourceSQLServerTaskProperties
3082		err := json.Unmarshal(body, &ctssstp)
3083		return ctssstp, err
3084	default:
3085		var ptp ProjectTaskProperties
3086		err := json.Unmarshal(body, &ptp)
3087		return ptp, err
3088	}
3089}
3090func unmarshalBasicProjectTaskPropertiesArray(body []byte) ([]BasicProjectTaskProperties, error) {
3091	var rawMessages []*json.RawMessage
3092	err := json.Unmarshal(body, &rawMessages)
3093	if err != nil {
3094		return nil, err
3095	}
3096
3097	ptpArray := make([]BasicProjectTaskProperties, len(rawMessages))
3098
3099	for index, rawMessage := range rawMessages {
3100		ptp, err := unmarshalBasicProjectTaskProperties(*rawMessage)
3101		if err != nil {
3102			return nil, err
3103		}
3104		ptpArray[index] = ptp
3105	}
3106	return ptpArray, nil
3107}
3108
3109// MarshalJSON is the custom marshaler for ProjectTaskProperties.
3110func (ptp ProjectTaskProperties) MarshalJSON() ([]byte, error) {
3111	ptp.TaskType = TaskTypeProjectTaskProperties
3112	objectMap := make(map[string]interface{})
3113	if ptp.TaskType != "" {
3114		objectMap["taskType"] = ptp.TaskType
3115	}
3116	return json.Marshal(objectMap)
3117}
3118
3119// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties.
3120func (ptp ProjectTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) {
3121	return nil, false
3122}
3123
3124// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties.
3125func (ptp ProjectTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) {
3126	return nil, false
3127}
3128
3129// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties.
3130func (ptp ProjectTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) {
3131	return nil, false
3132}
3133
3134// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties.
3135func (ptp ProjectTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) {
3136	return nil, false
3137}
3138
3139// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties.
3140func (ptp ProjectTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) {
3141	return nil, false
3142}
3143
3144// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties.
3145func (ptp ProjectTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) {
3146	return nil, false
3147}
3148
3149// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties.
3150func (ptp ProjectTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) {
3151	return nil, false
3152}
3153
3154// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties.
3155func (ptp ProjectTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) {
3156	return &ptp, true
3157}
3158
3159// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties.
3160func (ptp ProjectTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) {
3161	return &ptp, true
3162}
3163
3164// QueryAnalysisValidationResult results for query analysis comparison between the source and target
3165type QueryAnalysisValidationResult struct {
3166	// QueryResults - List of queries executed and it's execution results in source and target
3167	QueryResults *QueryExecutionResult `json:"queryResults,omitempty"`
3168	// ValidationErrors - Errors that are part of the execution
3169	ValidationErrors *ValidationError `json:"validationErrors,omitempty"`
3170}
3171
3172// QueryExecutionResult describes query analysis results for execution in source and target
3173type QueryExecutionResult struct {
3174	// QueryText - Query text retrieved from the source server
3175	QueryText *string `json:"queryText,omitempty"`
3176	// StatementsInBatch - Total no. of statements in the batch
3177	StatementsInBatch *int64 `json:"statementsInBatch,omitempty"`
3178	// SourceResult - Query analysis result from the source
3179	SourceResult *ExecutionStatistics `json:"sourceResult,omitempty"`
3180	// TargetResult - Query analysis result from the target
3181	TargetResult *ExecutionStatistics `json:"targetResult,omitempty"`
3182}
3183
3184// Quota describes a quota for or usage details about a resource
3185type Quota struct {
3186	// CurrentValue - The current value of the quota. If null or missing, the current value cannot be determined in the context of the request.
3187	CurrentValue *float64 `json:"currentValue,omitempty"`
3188	// ID - The resource ID of the quota object
3189	ID *string `json:"id,omitempty"`
3190	// Limit - The maximum value of the quota. If null or missing, the quota has no maximum, in which case it merely tracks usage.
3191	Limit *float64 `json:"limit,omitempty"`
3192	// Name - The name of the quota
3193	Name *QuotaName `json:"name,omitempty"`
3194	// Unit - The unit for the quota, such as Count, Bytes, BytesPerSecond, etc.
3195	Unit *string `json:"unit,omitempty"`
3196}
3197
3198// QuotaList oData page of quota objects
3199type QuotaList struct {
3200	autorest.Response `json:"-"`
3201	// Value - List of quotas
3202	Value *[]Quota `json:"value,omitempty"`
3203	// NextLink - URL to load the next page of quotas, or null or missing if this is the last page
3204	NextLink *string `json:"nextLink,omitempty"`
3205}
3206
3207// QuotaListIterator provides access to a complete listing of Quota values.
3208type QuotaListIterator struct {
3209	i    int
3210	page QuotaListPage
3211}
3212
3213// NextWithContext advances to the next value.  If there was an error making
3214// the request the iterator does not advance and the error is returned.
3215func (iter *QuotaListIterator) NextWithContext(ctx context.Context) (err error) {
3216	if tracing.IsEnabled() {
3217		ctx = tracing.StartSpan(ctx, fqdn+"/QuotaListIterator.NextWithContext")
3218		defer func() {
3219			sc := -1
3220			if iter.Response().Response.Response != nil {
3221				sc = iter.Response().Response.Response.StatusCode
3222			}
3223			tracing.EndSpan(ctx, sc, err)
3224		}()
3225	}
3226	iter.i++
3227	if iter.i < len(iter.page.Values()) {
3228		return nil
3229	}
3230	err = iter.page.NextWithContext(ctx)
3231	if err != nil {
3232		iter.i--
3233		return err
3234	}
3235	iter.i = 0
3236	return nil
3237}
3238
3239// Next advances to the next value.  If there was an error making
3240// the request the iterator does not advance and the error is returned.
3241// Deprecated: Use NextWithContext() instead.
3242func (iter *QuotaListIterator) Next() error {
3243	return iter.NextWithContext(context.Background())
3244}
3245
3246// NotDone returns true if the enumeration should be started or is not yet complete.
3247func (iter QuotaListIterator) NotDone() bool {
3248	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3249}
3250
3251// Response returns the raw server response from the last page request.
3252func (iter QuotaListIterator) Response() QuotaList {
3253	return iter.page.Response()
3254}
3255
3256// Value returns the current value or a zero-initialized value if the
3257// iterator has advanced beyond the end of the collection.
3258func (iter QuotaListIterator) Value() Quota {
3259	if !iter.page.NotDone() {
3260		return Quota{}
3261	}
3262	return iter.page.Values()[iter.i]
3263}
3264
3265// Creates a new instance of the QuotaListIterator type.
3266func NewQuotaListIterator(page QuotaListPage) QuotaListIterator {
3267	return QuotaListIterator{page: page}
3268}
3269
3270// IsEmpty returns true if the ListResult contains no values.
3271func (ql QuotaList) IsEmpty() bool {
3272	return ql.Value == nil || len(*ql.Value) == 0
3273}
3274
3275// hasNextLink returns true if the NextLink is not empty.
3276func (ql QuotaList) hasNextLink() bool {
3277	return ql.NextLink != nil && len(*ql.NextLink) != 0
3278}
3279
3280// quotaListPreparer prepares a request to retrieve the next set of results.
3281// It returns nil if no more results exist.
3282func (ql QuotaList) quotaListPreparer(ctx context.Context) (*http.Request, error) {
3283	if !ql.hasNextLink() {
3284		return nil, nil
3285	}
3286	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3287		autorest.AsJSON(),
3288		autorest.AsGet(),
3289		autorest.WithBaseURL(to.String(ql.NextLink)))
3290}
3291
3292// QuotaListPage contains a page of Quota values.
3293type QuotaListPage struct {
3294	fn func(context.Context, QuotaList) (QuotaList, error)
3295	ql QuotaList
3296}
3297
3298// NextWithContext advances to the next page of values.  If there was an error making
3299// the request the page does not advance and the error is returned.
3300func (page *QuotaListPage) NextWithContext(ctx context.Context) (err error) {
3301	if tracing.IsEnabled() {
3302		ctx = tracing.StartSpan(ctx, fqdn+"/QuotaListPage.NextWithContext")
3303		defer func() {
3304			sc := -1
3305			if page.Response().Response.Response != nil {
3306				sc = page.Response().Response.Response.StatusCode
3307			}
3308			tracing.EndSpan(ctx, sc, err)
3309		}()
3310	}
3311	for {
3312		next, err := page.fn(ctx, page.ql)
3313		if err != nil {
3314			return err
3315		}
3316		page.ql = next
3317		if !next.hasNextLink() || !next.IsEmpty() {
3318			break
3319		}
3320	}
3321	return nil
3322}
3323
3324// Next advances to the next page of values.  If there was an error making
3325// the request the page does not advance and the error is returned.
3326// Deprecated: Use NextWithContext() instead.
3327func (page *QuotaListPage) Next() error {
3328	return page.NextWithContext(context.Background())
3329}
3330
3331// NotDone returns true if the page enumeration should be started or is not yet complete.
3332func (page QuotaListPage) NotDone() bool {
3333	return !page.ql.IsEmpty()
3334}
3335
3336// Response returns the raw server response from the last page request.
3337func (page QuotaListPage) Response() QuotaList {
3338	return page.ql
3339}
3340
3341// Values returns the slice of values for the current page or nil if there are no values.
3342func (page QuotaListPage) Values() []Quota {
3343	if page.ql.IsEmpty() {
3344		return nil
3345	}
3346	return *page.ql.Value
3347}
3348
3349// Creates a new instance of the QuotaListPage type.
3350func NewQuotaListPage(cur QuotaList, getNextPage func(context.Context, QuotaList) (QuotaList, error)) QuotaListPage {
3351	return QuotaListPage{
3352		fn: getNextPage,
3353		ql: cur,
3354	}
3355}
3356
3357// QuotaName the name of the quota
3358type QuotaName struct {
3359	// LocalizedValue - The localized name of the quota
3360	LocalizedValue *string `json:"localizedValue,omitempty"`
3361	// Value - The unlocalized name (or ID) of the quota
3362	Value *string `json:"value,omitempty"`
3363}
3364
3365// ReportableException exception object for all custom exceptions
3366type ReportableException struct {
3367	// Message - Error message
3368	Message *string `json:"message,omitempty"`
3369	// FilePath - The path to the file where exception occurred
3370	FilePath *string `json:"filePath,omitempty"`
3371	// LineNumber - The line number where exception occurred
3372	LineNumber *string `json:"lineNumber,omitempty"`
3373	// HResult - Coded numerical value that is assigned to a specific exception
3374	HResult *int32 `json:"hResult,omitempty"`
3375	// StackTrace - Stack trace
3376	StackTrace *string `json:"stackTrace,omitempty"`
3377}
3378
3379// Resource ARM resource.
3380type Resource struct {
3381	// ID - READ-ONLY; Resource ID.
3382	ID *string `json:"id,omitempty"`
3383	// Name - READ-ONLY; Resource name.
3384	Name *string `json:"name,omitempty"`
3385	// Type - READ-ONLY; Resource type.
3386	Type *string `json:"type,omitempty"`
3387}
3388
3389// MarshalJSON is the custom marshaler for Resource.
3390func (r Resource) MarshalJSON() ([]byte, error) {
3391	objectMap := make(map[string]interface{})
3392	return json.Marshal(objectMap)
3393}
3394
3395// ResourceSku describes an available DMS SKU.
3396type ResourceSku struct {
3397	// ResourceType - READ-ONLY; The type of resource the SKU applies to.
3398	ResourceType *string `json:"resourceType,omitempty"`
3399	// Name - READ-ONLY; The name of SKU.
3400	Name *string `json:"name,omitempty"`
3401	// Tier - READ-ONLY; Specifies the tier of DMS in a scale set.
3402	Tier *string `json:"tier,omitempty"`
3403	// Size - READ-ONLY; The Size of the SKU.
3404	Size *string `json:"size,omitempty"`
3405	// Family - READ-ONLY; The Family of this particular SKU.
3406	Family *string `json:"family,omitempty"`
3407	// Kind - READ-ONLY; The Kind of resources that are supported in this SKU.
3408	Kind *string `json:"kind,omitempty"`
3409	// Capacity - READ-ONLY; Not used.
3410	Capacity *ResourceSkuCapacity `json:"capacity,omitempty"`
3411	// Locations - READ-ONLY; The set of locations that the SKU is available.
3412	Locations *[]string `json:"locations,omitempty"`
3413	// APIVersions - READ-ONLY; The api versions that support this SKU.
3414	APIVersions *[]string `json:"apiVersions,omitempty"`
3415	// Costs - READ-ONLY; Metadata for retrieving price info.
3416	Costs *[]ResourceSkuCosts `json:"costs,omitempty"`
3417	// Capabilities - READ-ONLY; A name value pair to describe the capability.
3418	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
3419	// Restrictions - READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
3420	Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
3421}
3422
3423// MarshalJSON is the custom marshaler for ResourceSku.
3424func (rs ResourceSku) MarshalJSON() ([]byte, error) {
3425	objectMap := make(map[string]interface{})
3426	return json.Marshal(objectMap)
3427}
3428
3429// ResourceSkuCapabilities describes The SKU capabilities object.
3430type ResourceSkuCapabilities struct {
3431	// Name - READ-ONLY; An invariant to describe the feature.
3432	Name *string `json:"name,omitempty"`
3433	// Value - READ-ONLY; An invariant if the feature is measured by quantity.
3434	Value *string `json:"value,omitempty"`
3435}
3436
3437// MarshalJSON is the custom marshaler for ResourceSkuCapabilities.
3438func (rsc ResourceSkuCapabilities) MarshalJSON() ([]byte, error) {
3439	objectMap := make(map[string]interface{})
3440	return json.Marshal(objectMap)
3441}
3442
3443// ResourceSkuCapacity describes scaling information of a SKU.
3444type ResourceSkuCapacity struct {
3445	// Minimum - READ-ONLY; The minimum capacity.
3446	Minimum *int64 `json:"minimum,omitempty"`
3447	// Maximum - READ-ONLY; The maximum capacity.
3448	Maximum *int64 `json:"maximum,omitempty"`
3449	// Default - READ-ONLY; The default capacity.
3450	Default *int64 `json:"default,omitempty"`
3451	// ScaleType - READ-ONLY; The scale type applicable to the SKU. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone'
3452	ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
3453}
3454
3455// MarshalJSON is the custom marshaler for ResourceSkuCapacity.
3456func (rsc ResourceSkuCapacity) MarshalJSON() ([]byte, error) {
3457	objectMap := make(map[string]interface{})
3458	return json.Marshal(objectMap)
3459}
3460
3461// ResourceSkuCosts describes metadata for retrieving price info.
3462type ResourceSkuCosts struct {
3463	// MeterID - READ-ONLY; Used for querying price from commerce.
3464	MeterID *string `json:"meterID,omitempty"`
3465	// Quantity - READ-ONLY; The multiplier is needed to extend the base metered cost.
3466	Quantity *int64 `json:"quantity,omitempty"`
3467	// ExtendedUnit - READ-ONLY; An invariant to show the extended unit.
3468	ExtendedUnit *string `json:"extendedUnit,omitempty"`
3469}
3470
3471// MarshalJSON is the custom marshaler for ResourceSkuCosts.
3472func (rsc ResourceSkuCosts) MarshalJSON() ([]byte, error) {
3473	objectMap := make(map[string]interface{})
3474	return json.Marshal(objectMap)
3475}
3476
3477// ResourceSkuRestrictions describes scaling information of a SKU.
3478type ResourceSkuRestrictions struct {
3479	// Type - READ-ONLY; The type of restrictions. Possible values include: 'Location'
3480	Type ResourceSkuRestrictionsType `json:"type,omitempty"`
3481	// Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
3482	Values *[]string `json:"values,omitempty"`
3483	// ReasonCode - READ-ONLY; The reason code for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription'
3484	ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
3485}
3486
3487// MarshalJSON is the custom marshaler for ResourceSkuRestrictions.
3488func (rsr ResourceSkuRestrictions) MarshalJSON() ([]byte, error) {
3489	objectMap := make(map[string]interface{})
3490	return json.Marshal(objectMap)
3491}
3492
3493// ResourceSkusResult the DMS List SKUs operation response.
3494type ResourceSkusResult struct {
3495	autorest.Response `json:"-"`
3496	// Value - The list of SKUs available for the subscription.
3497	Value *[]ResourceSku `json:"value,omitempty"`
3498	// NextLink - The uri to fetch the next page of DMS SKUs. Call ListNext() with this to fetch the next page of DMS SKUs.
3499	NextLink *string `json:"nextLink,omitempty"`
3500}
3501
3502// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values.
3503type ResourceSkusResultIterator struct {
3504	i    int
3505	page ResourceSkusResultPage
3506}
3507
3508// NextWithContext advances to the next value.  If there was an error making
3509// the request the iterator does not advance and the error is returned.
3510func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
3511	if tracing.IsEnabled() {
3512		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext")
3513		defer func() {
3514			sc := -1
3515			if iter.Response().Response.Response != nil {
3516				sc = iter.Response().Response.Response.StatusCode
3517			}
3518			tracing.EndSpan(ctx, sc, err)
3519		}()
3520	}
3521	iter.i++
3522	if iter.i < len(iter.page.Values()) {
3523		return nil
3524	}
3525	err = iter.page.NextWithContext(ctx)
3526	if err != nil {
3527		iter.i--
3528		return err
3529	}
3530	iter.i = 0
3531	return nil
3532}
3533
3534// Next advances to the next value.  If there was an error making
3535// the request the iterator does not advance and the error is returned.
3536// Deprecated: Use NextWithContext() instead.
3537func (iter *ResourceSkusResultIterator) Next() error {
3538	return iter.NextWithContext(context.Background())
3539}
3540
3541// NotDone returns true if the enumeration should be started or is not yet complete.
3542func (iter ResourceSkusResultIterator) NotDone() bool {
3543	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3544}
3545
3546// Response returns the raw server response from the last page request.
3547func (iter ResourceSkusResultIterator) Response() ResourceSkusResult {
3548	return iter.page.Response()
3549}
3550
3551// Value returns the current value or a zero-initialized value if the
3552// iterator has advanced beyond the end of the collection.
3553func (iter ResourceSkusResultIterator) Value() ResourceSku {
3554	if !iter.page.NotDone() {
3555		return ResourceSku{}
3556	}
3557	return iter.page.Values()[iter.i]
3558}
3559
3560// Creates a new instance of the ResourceSkusResultIterator type.
3561func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator {
3562	return ResourceSkusResultIterator{page: page}
3563}
3564
3565// IsEmpty returns true if the ListResult contains no values.
3566func (rsr ResourceSkusResult) IsEmpty() bool {
3567	return rsr.Value == nil || len(*rsr.Value) == 0
3568}
3569
3570// hasNextLink returns true if the NextLink is not empty.
3571func (rsr ResourceSkusResult) hasNextLink() bool {
3572	return rsr.NextLink != nil && len(*rsr.NextLink) != 0
3573}
3574
3575// resourceSkusResultPreparer prepares a request to retrieve the next set of results.
3576// It returns nil if no more results exist.
3577func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) {
3578	if !rsr.hasNextLink() {
3579		return nil, nil
3580	}
3581	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3582		autorest.AsJSON(),
3583		autorest.AsGet(),
3584		autorest.WithBaseURL(to.String(rsr.NextLink)))
3585}
3586
3587// ResourceSkusResultPage contains a page of ResourceSku values.
3588type ResourceSkusResultPage struct {
3589	fn  func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)
3590	rsr ResourceSkusResult
3591}
3592
3593// NextWithContext advances to the next page of values.  If there was an error making
3594// the request the page does not advance and the error is returned.
3595func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) {
3596	if tracing.IsEnabled() {
3597		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext")
3598		defer func() {
3599			sc := -1
3600			if page.Response().Response.Response != nil {
3601				sc = page.Response().Response.Response.StatusCode
3602			}
3603			tracing.EndSpan(ctx, sc, err)
3604		}()
3605	}
3606	for {
3607		next, err := page.fn(ctx, page.rsr)
3608		if err != nil {
3609			return err
3610		}
3611		page.rsr = next
3612		if !next.hasNextLink() || !next.IsEmpty() {
3613			break
3614		}
3615	}
3616	return nil
3617}
3618
3619// Next advances to the next page of values.  If there was an error making
3620// the request the page does not advance and the error is returned.
3621// Deprecated: Use NextWithContext() instead.
3622func (page *ResourceSkusResultPage) Next() error {
3623	return page.NextWithContext(context.Background())
3624}
3625
3626// NotDone returns true if the page enumeration should be started or is not yet complete.
3627func (page ResourceSkusResultPage) NotDone() bool {
3628	return !page.rsr.IsEmpty()
3629}
3630
3631// Response returns the raw server response from the last page request.
3632func (page ResourceSkusResultPage) Response() ResourceSkusResult {
3633	return page.rsr
3634}
3635
3636// Values returns the slice of values for the current page or nil if there are no values.
3637func (page ResourceSkusResultPage) Values() []ResourceSku {
3638	if page.rsr.IsEmpty() {
3639		return nil
3640	}
3641	return *page.rsr.Value
3642}
3643
3644// Creates a new instance of the ResourceSkusResultPage type.
3645func NewResourceSkusResultPage(cur ResourceSkusResult, getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
3646	return ResourceSkusResultPage{
3647		fn:  getNextPage,
3648		rsr: cur,
3649	}
3650}
3651
3652// SchemaComparisonValidationResult results for schema comparison between the source and target
3653type SchemaComparisonValidationResult struct {
3654	// SchemaDifferences - List of schema differences between the source and target databases
3655	SchemaDifferences *SchemaComparisonValidationResultType `json:"schemaDifferences,omitempty"`
3656	// ValidationErrors - List of errors that happened while performing schema compare validation
3657	ValidationErrors *ValidationError `json:"validationErrors,omitempty"`
3658	// SourceDatabaseObjectCount - Count of source database objects
3659	SourceDatabaseObjectCount map[string]*int64 `json:"sourceDatabaseObjectCount"`
3660	// TargetDatabaseObjectCount - Count of target database objects
3661	TargetDatabaseObjectCount map[string]*int64 `json:"targetDatabaseObjectCount"`
3662}
3663
3664// MarshalJSON is the custom marshaler for SchemaComparisonValidationResult.
3665func (scvr SchemaComparisonValidationResult) MarshalJSON() ([]byte, error) {
3666	objectMap := make(map[string]interface{})
3667	if scvr.SchemaDifferences != nil {
3668		objectMap["schemaDifferences"] = scvr.SchemaDifferences
3669	}
3670	if scvr.ValidationErrors != nil {
3671		objectMap["validationErrors"] = scvr.ValidationErrors
3672	}
3673	if scvr.SourceDatabaseObjectCount != nil {
3674		objectMap["sourceDatabaseObjectCount"] = scvr.SourceDatabaseObjectCount
3675	}
3676	if scvr.TargetDatabaseObjectCount != nil {
3677		objectMap["targetDatabaseObjectCount"] = scvr.TargetDatabaseObjectCount
3678	}
3679	return json.Marshal(objectMap)
3680}
3681
3682// SchemaComparisonValidationResultType description about the errors happen while performing migration
3683// validation
3684type SchemaComparisonValidationResultType struct {
3685	// ObjectName - Name of the object that has the difference
3686	ObjectName *string `json:"objectName,omitempty"`
3687	// ObjectType - Type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'
3688	ObjectType ObjectType `json:"objectType,omitempty"`
3689	// UpdateAction - Update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget'
3690	UpdateAction UpdateActionType `json:"updateAction,omitempty"`
3691}
3692
3693// Service a Data Migration Service resource
3694type Service struct {
3695	autorest.Response `json:"-"`
3696	// Etag - HTTP strong entity tag value. Ignored if submitted
3697	Etag *string `json:"etag,omitempty"`
3698	// Kind - The resource kind. Only 'vm' (the default) is supported.
3699	Kind *string `json:"kind,omitempty"`
3700	// ServiceProperties - Custom service properties
3701	*ServiceProperties `json:"properties,omitempty"`
3702	// Sku - Service SKU
3703	Sku *ServiceSku `json:"sku,omitempty"`
3704	// Tags - Resource tags.
3705	Tags map[string]*string `json:"tags"`
3706	// Location - Resource location.
3707	Location *string `json:"location,omitempty"`
3708	// ID - READ-ONLY; Resource ID.
3709	ID *string `json:"id,omitempty"`
3710	// Name - READ-ONLY; Resource name.
3711	Name *string `json:"name,omitempty"`
3712	// Type - READ-ONLY; Resource type.
3713	Type *string `json:"type,omitempty"`
3714}
3715
3716// MarshalJSON is the custom marshaler for Service.
3717func (s Service) MarshalJSON() ([]byte, error) {
3718	objectMap := make(map[string]interface{})
3719	if s.Etag != nil {
3720		objectMap["etag"] = s.Etag
3721	}
3722	if s.Kind != nil {
3723		objectMap["kind"] = s.Kind
3724	}
3725	if s.ServiceProperties != nil {
3726		objectMap["properties"] = s.ServiceProperties
3727	}
3728	if s.Sku != nil {
3729		objectMap["sku"] = s.Sku
3730	}
3731	if s.Tags != nil {
3732		objectMap["tags"] = s.Tags
3733	}
3734	if s.Location != nil {
3735		objectMap["location"] = s.Location
3736	}
3737	return json.Marshal(objectMap)
3738}
3739
3740// UnmarshalJSON is the custom unmarshaler for Service struct.
3741func (s *Service) UnmarshalJSON(body []byte) error {
3742	var m map[string]*json.RawMessage
3743	err := json.Unmarshal(body, &m)
3744	if err != nil {
3745		return err
3746	}
3747	for k, v := range m {
3748		switch k {
3749		case "etag":
3750			if v != nil {
3751				var etag string
3752				err = json.Unmarshal(*v, &etag)
3753				if err != nil {
3754					return err
3755				}
3756				s.Etag = &etag
3757			}
3758		case "kind":
3759			if v != nil {
3760				var kind string
3761				err = json.Unmarshal(*v, &kind)
3762				if err != nil {
3763					return err
3764				}
3765				s.Kind = &kind
3766			}
3767		case "properties":
3768			if v != nil {
3769				var serviceProperties ServiceProperties
3770				err = json.Unmarshal(*v, &serviceProperties)
3771				if err != nil {
3772					return err
3773				}
3774				s.ServiceProperties = &serviceProperties
3775			}
3776		case "sku":
3777			if v != nil {
3778				var sku ServiceSku
3779				err = json.Unmarshal(*v, &sku)
3780				if err != nil {
3781					return err
3782				}
3783				s.Sku = &sku
3784			}
3785		case "tags":
3786			if v != nil {
3787				var tags map[string]*string
3788				err = json.Unmarshal(*v, &tags)
3789				if err != nil {
3790					return err
3791				}
3792				s.Tags = tags
3793			}
3794		case "location":
3795			if v != nil {
3796				var location string
3797				err = json.Unmarshal(*v, &location)
3798				if err != nil {
3799					return err
3800				}
3801				s.Location = &location
3802			}
3803		case "id":
3804			if v != nil {
3805				var ID string
3806				err = json.Unmarshal(*v, &ID)
3807				if err != nil {
3808					return err
3809				}
3810				s.ID = &ID
3811			}
3812		case "name":
3813			if v != nil {
3814				var name string
3815				err = json.Unmarshal(*v, &name)
3816				if err != nil {
3817					return err
3818				}
3819				s.Name = &name
3820			}
3821		case "type":
3822			if v != nil {
3823				var typeVar string
3824				err = json.Unmarshal(*v, &typeVar)
3825				if err != nil {
3826					return err
3827				}
3828				s.Type = &typeVar
3829			}
3830		}
3831	}
3832
3833	return nil
3834}
3835
3836// ServiceList oData page of service objects
3837type ServiceList struct {
3838	autorest.Response `json:"-"`
3839	// Value - List of services
3840	Value *[]Service `json:"value,omitempty"`
3841	// NextLink - URL to load the next page of services
3842	NextLink *string `json:"nextLink,omitempty"`
3843}
3844
3845// ServiceListIterator provides access to a complete listing of Service values.
3846type ServiceListIterator struct {
3847	i    int
3848	page ServiceListPage
3849}
3850
3851// NextWithContext advances to the next value.  If there was an error making
3852// the request the iterator does not advance and the error is returned.
3853func (iter *ServiceListIterator) NextWithContext(ctx context.Context) (err error) {
3854	if tracing.IsEnabled() {
3855		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListIterator.NextWithContext")
3856		defer func() {
3857			sc := -1
3858			if iter.Response().Response.Response != nil {
3859				sc = iter.Response().Response.Response.StatusCode
3860			}
3861			tracing.EndSpan(ctx, sc, err)
3862		}()
3863	}
3864	iter.i++
3865	if iter.i < len(iter.page.Values()) {
3866		return nil
3867	}
3868	err = iter.page.NextWithContext(ctx)
3869	if err != nil {
3870		iter.i--
3871		return err
3872	}
3873	iter.i = 0
3874	return nil
3875}
3876
3877// Next advances to the next value.  If there was an error making
3878// the request the iterator does not advance and the error is returned.
3879// Deprecated: Use NextWithContext() instead.
3880func (iter *ServiceListIterator) Next() error {
3881	return iter.NextWithContext(context.Background())
3882}
3883
3884// NotDone returns true if the enumeration should be started or is not yet complete.
3885func (iter ServiceListIterator) NotDone() bool {
3886	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3887}
3888
3889// Response returns the raw server response from the last page request.
3890func (iter ServiceListIterator) Response() ServiceList {
3891	return iter.page.Response()
3892}
3893
3894// Value returns the current value or a zero-initialized value if the
3895// iterator has advanced beyond the end of the collection.
3896func (iter ServiceListIterator) Value() Service {
3897	if !iter.page.NotDone() {
3898		return Service{}
3899	}
3900	return iter.page.Values()[iter.i]
3901}
3902
3903// Creates a new instance of the ServiceListIterator type.
3904func NewServiceListIterator(page ServiceListPage) ServiceListIterator {
3905	return ServiceListIterator{page: page}
3906}
3907
3908// IsEmpty returns true if the ListResult contains no values.
3909func (sl ServiceList) IsEmpty() bool {
3910	return sl.Value == nil || len(*sl.Value) == 0
3911}
3912
3913// hasNextLink returns true if the NextLink is not empty.
3914func (sl ServiceList) hasNextLink() bool {
3915	return sl.NextLink != nil && len(*sl.NextLink) != 0
3916}
3917
3918// serviceListPreparer prepares a request to retrieve the next set of results.
3919// It returns nil if no more results exist.
3920func (sl ServiceList) serviceListPreparer(ctx context.Context) (*http.Request, error) {
3921	if !sl.hasNextLink() {
3922		return nil, nil
3923	}
3924	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3925		autorest.AsJSON(),
3926		autorest.AsGet(),
3927		autorest.WithBaseURL(to.String(sl.NextLink)))
3928}
3929
3930// ServiceListPage contains a page of Service values.
3931type ServiceListPage struct {
3932	fn func(context.Context, ServiceList) (ServiceList, error)
3933	sl ServiceList
3934}
3935
3936// NextWithContext advances to the next page of values.  If there was an error making
3937// the request the page does not advance and the error is returned.
3938func (page *ServiceListPage) NextWithContext(ctx context.Context) (err error) {
3939	if tracing.IsEnabled() {
3940		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListPage.NextWithContext")
3941		defer func() {
3942			sc := -1
3943			if page.Response().Response.Response != nil {
3944				sc = page.Response().Response.Response.StatusCode
3945			}
3946			tracing.EndSpan(ctx, sc, err)
3947		}()
3948	}
3949	for {
3950		next, err := page.fn(ctx, page.sl)
3951		if err != nil {
3952			return err
3953		}
3954		page.sl = next
3955		if !next.hasNextLink() || !next.IsEmpty() {
3956			break
3957		}
3958	}
3959	return nil
3960}
3961
3962// Next advances to the next page of values.  If there was an error making
3963// the request the page does not advance and the error is returned.
3964// Deprecated: Use NextWithContext() instead.
3965func (page *ServiceListPage) Next() error {
3966	return page.NextWithContext(context.Background())
3967}
3968
3969// NotDone returns true if the page enumeration should be started or is not yet complete.
3970func (page ServiceListPage) NotDone() bool {
3971	return !page.sl.IsEmpty()
3972}
3973
3974// Response returns the raw server response from the last page request.
3975func (page ServiceListPage) Response() ServiceList {
3976	return page.sl
3977}
3978
3979// Values returns the slice of values for the current page or nil if there are no values.
3980func (page ServiceListPage) Values() []Service {
3981	if page.sl.IsEmpty() {
3982		return nil
3983	}
3984	return *page.sl.Value
3985}
3986
3987// Creates a new instance of the ServiceListPage type.
3988func NewServiceListPage(cur ServiceList, getNextPage func(context.Context, ServiceList) (ServiceList, error)) ServiceListPage {
3989	return ServiceListPage{
3990		fn: getNextPage,
3991		sl: cur,
3992	}
3993}
3994
3995// ServiceOperation description of an action supported by the Data Migration Service
3996type ServiceOperation struct {
3997	// Name - The fully qualified action name, e.g. Microsoft.DataMigration/services/read
3998	Name *string `json:"name,omitempty"`
3999	// Display - Localized display text
4000	Display *ServiceOperationDisplay `json:"display,omitempty"`
4001}
4002
4003// ServiceOperationDisplay localized display text
4004type ServiceOperationDisplay struct {
4005	// Provider - The localized resource provider name
4006	Provider *string `json:"provider,omitempty"`
4007	// Resource - The localized resource type name
4008	Resource *string `json:"resource,omitempty"`
4009	// Operation - The localized operation name
4010	Operation *string `json:"operation,omitempty"`
4011	// Description - The localized operation description
4012	Description *string `json:"description,omitempty"`
4013}
4014
4015// ServiceOperationList oData page of action (operation) objects
4016type ServiceOperationList struct {
4017	autorest.Response `json:"-"`
4018	// Value - List of actions
4019	Value *[]ServiceOperation `json:"value,omitempty"`
4020	// NextLink - URL to load the next page of actions
4021	NextLink *string `json:"nextLink,omitempty"`
4022}
4023
4024// ServiceOperationListIterator provides access to a complete listing of ServiceOperation values.
4025type ServiceOperationListIterator struct {
4026	i    int
4027	page ServiceOperationListPage
4028}
4029
4030// NextWithContext advances to the next value.  If there was an error making
4031// the request the iterator does not advance and the error is returned.
4032func (iter *ServiceOperationListIterator) NextWithContext(ctx context.Context) (err error) {
4033	if tracing.IsEnabled() {
4034		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceOperationListIterator.NextWithContext")
4035		defer func() {
4036			sc := -1
4037			if iter.Response().Response.Response != nil {
4038				sc = iter.Response().Response.Response.StatusCode
4039			}
4040			tracing.EndSpan(ctx, sc, err)
4041		}()
4042	}
4043	iter.i++
4044	if iter.i < len(iter.page.Values()) {
4045		return nil
4046	}
4047	err = iter.page.NextWithContext(ctx)
4048	if err != nil {
4049		iter.i--
4050		return err
4051	}
4052	iter.i = 0
4053	return nil
4054}
4055
4056// Next advances to the next value.  If there was an error making
4057// the request the iterator does not advance and the error is returned.
4058// Deprecated: Use NextWithContext() instead.
4059func (iter *ServiceOperationListIterator) Next() error {
4060	return iter.NextWithContext(context.Background())
4061}
4062
4063// NotDone returns true if the enumeration should be started or is not yet complete.
4064func (iter ServiceOperationListIterator) NotDone() bool {
4065	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4066}
4067
4068// Response returns the raw server response from the last page request.
4069func (iter ServiceOperationListIterator) Response() ServiceOperationList {
4070	return iter.page.Response()
4071}
4072
4073// Value returns the current value or a zero-initialized value if the
4074// iterator has advanced beyond the end of the collection.
4075func (iter ServiceOperationListIterator) Value() ServiceOperation {
4076	if !iter.page.NotDone() {
4077		return ServiceOperation{}
4078	}
4079	return iter.page.Values()[iter.i]
4080}
4081
4082// Creates a new instance of the ServiceOperationListIterator type.
4083func NewServiceOperationListIterator(page ServiceOperationListPage) ServiceOperationListIterator {
4084	return ServiceOperationListIterator{page: page}
4085}
4086
4087// IsEmpty returns true if the ListResult contains no values.
4088func (sol ServiceOperationList) IsEmpty() bool {
4089	return sol.Value == nil || len(*sol.Value) == 0
4090}
4091
4092// hasNextLink returns true if the NextLink is not empty.
4093func (sol ServiceOperationList) hasNextLink() bool {
4094	return sol.NextLink != nil && len(*sol.NextLink) != 0
4095}
4096
4097// serviceOperationListPreparer prepares a request to retrieve the next set of results.
4098// It returns nil if no more results exist.
4099func (sol ServiceOperationList) serviceOperationListPreparer(ctx context.Context) (*http.Request, error) {
4100	if !sol.hasNextLink() {
4101		return nil, nil
4102	}
4103	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4104		autorest.AsJSON(),
4105		autorest.AsGet(),
4106		autorest.WithBaseURL(to.String(sol.NextLink)))
4107}
4108
4109// ServiceOperationListPage contains a page of ServiceOperation values.
4110type ServiceOperationListPage struct {
4111	fn  func(context.Context, ServiceOperationList) (ServiceOperationList, error)
4112	sol ServiceOperationList
4113}
4114
4115// NextWithContext advances to the next page of values.  If there was an error making
4116// the request the page does not advance and the error is returned.
4117func (page *ServiceOperationListPage) NextWithContext(ctx context.Context) (err error) {
4118	if tracing.IsEnabled() {
4119		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceOperationListPage.NextWithContext")
4120		defer func() {
4121			sc := -1
4122			if page.Response().Response.Response != nil {
4123				sc = page.Response().Response.Response.StatusCode
4124			}
4125			tracing.EndSpan(ctx, sc, err)
4126		}()
4127	}
4128	for {
4129		next, err := page.fn(ctx, page.sol)
4130		if err != nil {
4131			return err
4132		}
4133		page.sol = next
4134		if !next.hasNextLink() || !next.IsEmpty() {
4135			break
4136		}
4137	}
4138	return nil
4139}
4140
4141// Next advances to the next page of values.  If there was an error making
4142// the request the page does not advance and the error is returned.
4143// Deprecated: Use NextWithContext() instead.
4144func (page *ServiceOperationListPage) Next() error {
4145	return page.NextWithContext(context.Background())
4146}
4147
4148// NotDone returns true if the page enumeration should be started or is not yet complete.
4149func (page ServiceOperationListPage) NotDone() bool {
4150	return !page.sol.IsEmpty()
4151}
4152
4153// Response returns the raw server response from the last page request.
4154func (page ServiceOperationListPage) Response() ServiceOperationList {
4155	return page.sol
4156}
4157
4158// Values returns the slice of values for the current page or nil if there are no values.
4159func (page ServiceOperationListPage) Values() []ServiceOperation {
4160	if page.sol.IsEmpty() {
4161		return nil
4162	}
4163	return *page.sol.Value
4164}
4165
4166// Creates a new instance of the ServiceOperationListPage type.
4167func NewServiceOperationListPage(cur ServiceOperationList, getNextPage func(context.Context, ServiceOperationList) (ServiceOperationList, error)) ServiceOperationListPage {
4168	return ServiceOperationListPage{
4169		fn:  getNextPage,
4170		sol: cur,
4171	}
4172}
4173
4174// ServiceProperties properties of the Data Migration service instance
4175type ServiceProperties struct {
4176	// ProvisioningState - READ-ONLY; The resource's provisioning state. Possible values include: 'ServiceProvisioningStateAccepted', 'ServiceProvisioningStateDeleting', 'ServiceProvisioningStateDeploying', 'ServiceProvisioningStateStopped', 'ServiceProvisioningStateStopping', 'ServiceProvisioningStateStarting', 'ServiceProvisioningStateFailedToStart', 'ServiceProvisioningStateFailedToStop', 'ServiceProvisioningStateSucceeded', 'ServiceProvisioningStateFailed'
4177	ProvisioningState ServiceProvisioningState `json:"provisioningState,omitempty"`
4178	// PublicKey - The public key of the service, used to encrypt secrets sent to the service
4179	PublicKey *string `json:"publicKey,omitempty"`
4180	// VirtualSubnetID - The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined
4181	VirtualSubnetID *string `json:"virtualSubnetId,omitempty"`
4182}
4183
4184// MarshalJSON is the custom marshaler for ServiceProperties.
4185func (sp ServiceProperties) MarshalJSON() ([]byte, error) {
4186	objectMap := make(map[string]interface{})
4187	if sp.PublicKey != nil {
4188		objectMap["publicKey"] = sp.PublicKey
4189	}
4190	if sp.VirtualSubnetID != nil {
4191		objectMap["virtualSubnetId"] = sp.VirtualSubnetID
4192	}
4193	return json.Marshal(objectMap)
4194}
4195
4196// ServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4197// operation.
4198type ServicesCreateOrUpdateFuture struct {
4199	azure.FutureAPI
4200	// Result returns the result of the asynchronous operation.
4201	// If the operation has not completed it will return an error.
4202	Result func(ServicesClient) (Service, error)
4203}
4204
4205// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4206func (future *ServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4207	var azFuture azure.Future
4208	if err := json.Unmarshal(body, &azFuture); err != nil {
4209		return err
4210	}
4211	future.FutureAPI = &azFuture
4212	future.Result = future.result
4213	return nil
4214}
4215
4216// result is the default implementation for ServicesCreateOrUpdateFuture.Result.
4217func (future *ServicesCreateOrUpdateFuture) result(client ServicesClient) (s Service, err error) {
4218	var done bool
4219	done, err = future.DoneWithContext(context.Background(), client)
4220	if err != nil {
4221		err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4222		return
4223	}
4224	if !done {
4225		s.Response.Response = future.Response()
4226		err = azure.NewAsyncOpIncompleteError("datamigration.ServicesCreateOrUpdateFuture")
4227		return
4228	}
4229	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4230	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
4231		s, err = client.CreateOrUpdateResponder(s.Response.Response)
4232		if err != nil {
4233			err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
4234		}
4235	}
4236	return
4237}
4238
4239// ServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4240// operation.
4241type ServicesDeleteFuture struct {
4242	azure.FutureAPI
4243	// Result returns the result of the asynchronous operation.
4244	// If the operation has not completed it will return an error.
4245	Result func(ServicesClient) (autorest.Response, error)
4246}
4247
4248// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4249func (future *ServicesDeleteFuture) UnmarshalJSON(body []byte) error {
4250	var azFuture azure.Future
4251	if err := json.Unmarshal(body, &azFuture); err != nil {
4252		return err
4253	}
4254	future.FutureAPI = &azFuture
4255	future.Result = future.result
4256	return nil
4257}
4258
4259// result is the default implementation for ServicesDeleteFuture.Result.
4260func (future *ServicesDeleteFuture) result(client ServicesClient) (ar autorest.Response, err error) {
4261	var done bool
4262	done, err = future.DoneWithContext(context.Background(), client)
4263	if err != nil {
4264		err = autorest.NewErrorWithError(err, "datamigration.ServicesDeleteFuture", "Result", future.Response(), "Polling failure")
4265		return
4266	}
4267	if !done {
4268		ar.Response = future.Response()
4269		err = azure.NewAsyncOpIncompleteError("datamigration.ServicesDeleteFuture")
4270		return
4271	}
4272	ar.Response = future.Response()
4273	return
4274}
4275
4276// ServiceSku an Azure SKU instance
4277type ServiceSku struct {
4278	// Name - The unique name of the SKU, such as 'P3'
4279	Name *string `json:"name,omitempty"`
4280	// Tier - The tier of the SKU, such as 'Free', 'Basic', 'Standard', or 'Premium'
4281	Tier *string `json:"tier,omitempty"`
4282	// Family - The SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines
4283	Family *string `json:"family,omitempty"`
4284	// Size - The size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines
4285	Size *string `json:"size,omitempty"`
4286	// Capacity - The capacity of the SKU, if it supports scaling
4287	Capacity *int32 `json:"capacity,omitempty"`
4288}
4289
4290// ServiceSkuList oData page of available SKUs
4291type ServiceSkuList struct {
4292	autorest.Response `json:"-"`
4293	// Value - List of service SKUs
4294	Value *[]AvailableServiceSku `json:"value,omitempty"`
4295	// NextLink - URL to load the next page of service SKUs
4296	NextLink *string `json:"nextLink,omitempty"`
4297}
4298
4299// ServiceSkuListIterator provides access to a complete listing of AvailableServiceSku values.
4300type ServiceSkuListIterator struct {
4301	i    int
4302	page ServiceSkuListPage
4303}
4304
4305// NextWithContext advances to the next value.  If there was an error making
4306// the request the iterator does not advance and the error is returned.
4307func (iter *ServiceSkuListIterator) NextWithContext(ctx context.Context) (err error) {
4308	if tracing.IsEnabled() {
4309		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkuListIterator.NextWithContext")
4310		defer func() {
4311			sc := -1
4312			if iter.Response().Response.Response != nil {
4313				sc = iter.Response().Response.Response.StatusCode
4314			}
4315			tracing.EndSpan(ctx, sc, err)
4316		}()
4317	}
4318	iter.i++
4319	if iter.i < len(iter.page.Values()) {
4320		return nil
4321	}
4322	err = iter.page.NextWithContext(ctx)
4323	if err != nil {
4324		iter.i--
4325		return err
4326	}
4327	iter.i = 0
4328	return nil
4329}
4330
4331// Next advances to the next value.  If there was an error making
4332// the request the iterator does not advance and the error is returned.
4333// Deprecated: Use NextWithContext() instead.
4334func (iter *ServiceSkuListIterator) Next() error {
4335	return iter.NextWithContext(context.Background())
4336}
4337
4338// NotDone returns true if the enumeration should be started or is not yet complete.
4339func (iter ServiceSkuListIterator) NotDone() bool {
4340	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4341}
4342
4343// Response returns the raw server response from the last page request.
4344func (iter ServiceSkuListIterator) Response() ServiceSkuList {
4345	return iter.page.Response()
4346}
4347
4348// Value returns the current value or a zero-initialized value if the
4349// iterator has advanced beyond the end of the collection.
4350func (iter ServiceSkuListIterator) Value() AvailableServiceSku {
4351	if !iter.page.NotDone() {
4352		return AvailableServiceSku{}
4353	}
4354	return iter.page.Values()[iter.i]
4355}
4356
4357// Creates a new instance of the ServiceSkuListIterator type.
4358func NewServiceSkuListIterator(page ServiceSkuListPage) ServiceSkuListIterator {
4359	return ServiceSkuListIterator{page: page}
4360}
4361
4362// IsEmpty returns true if the ListResult contains no values.
4363func (ssl ServiceSkuList) IsEmpty() bool {
4364	return ssl.Value == nil || len(*ssl.Value) == 0
4365}
4366
4367// hasNextLink returns true if the NextLink is not empty.
4368func (ssl ServiceSkuList) hasNextLink() bool {
4369	return ssl.NextLink != nil && len(*ssl.NextLink) != 0
4370}
4371
4372// serviceSkuListPreparer prepares a request to retrieve the next set of results.
4373// It returns nil if no more results exist.
4374func (ssl ServiceSkuList) serviceSkuListPreparer(ctx context.Context) (*http.Request, error) {
4375	if !ssl.hasNextLink() {
4376		return nil, nil
4377	}
4378	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4379		autorest.AsJSON(),
4380		autorest.AsGet(),
4381		autorest.WithBaseURL(to.String(ssl.NextLink)))
4382}
4383
4384// ServiceSkuListPage contains a page of AvailableServiceSku values.
4385type ServiceSkuListPage struct {
4386	fn  func(context.Context, ServiceSkuList) (ServiceSkuList, error)
4387	ssl ServiceSkuList
4388}
4389
4390// NextWithContext advances to the next page of values.  If there was an error making
4391// the request the page does not advance and the error is returned.
4392func (page *ServiceSkuListPage) NextWithContext(ctx context.Context) (err error) {
4393	if tracing.IsEnabled() {
4394		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkuListPage.NextWithContext")
4395		defer func() {
4396			sc := -1
4397			if page.Response().Response.Response != nil {
4398				sc = page.Response().Response.Response.StatusCode
4399			}
4400			tracing.EndSpan(ctx, sc, err)
4401		}()
4402	}
4403	for {
4404		next, err := page.fn(ctx, page.ssl)
4405		if err != nil {
4406			return err
4407		}
4408		page.ssl = next
4409		if !next.hasNextLink() || !next.IsEmpty() {
4410			break
4411		}
4412	}
4413	return nil
4414}
4415
4416// Next advances to the next page of values.  If there was an error making
4417// the request the page does not advance and the error is returned.
4418// Deprecated: Use NextWithContext() instead.
4419func (page *ServiceSkuListPage) Next() error {
4420	return page.NextWithContext(context.Background())
4421}
4422
4423// NotDone returns true if the page enumeration should be started or is not yet complete.
4424func (page ServiceSkuListPage) NotDone() bool {
4425	return !page.ssl.IsEmpty()
4426}
4427
4428// Response returns the raw server response from the last page request.
4429func (page ServiceSkuListPage) Response() ServiceSkuList {
4430	return page.ssl
4431}
4432
4433// Values returns the slice of values for the current page or nil if there are no values.
4434func (page ServiceSkuListPage) Values() []AvailableServiceSku {
4435	if page.ssl.IsEmpty() {
4436		return nil
4437	}
4438	return *page.ssl.Value
4439}
4440
4441// Creates a new instance of the ServiceSkuListPage type.
4442func NewServiceSkuListPage(cur ServiceSkuList, getNextPage func(context.Context, ServiceSkuList) (ServiceSkuList, error)) ServiceSkuListPage {
4443	return ServiceSkuListPage{
4444		fn:  getNextPage,
4445		ssl: cur,
4446	}
4447}
4448
4449// ServicesStartFuture an abstraction for monitoring and retrieving the results of a long-running
4450// operation.
4451type ServicesStartFuture struct {
4452	azure.FutureAPI
4453	// Result returns the result of the asynchronous operation.
4454	// If the operation has not completed it will return an error.
4455	Result func(ServicesClient) (autorest.Response, error)
4456}
4457
4458// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4459func (future *ServicesStartFuture) UnmarshalJSON(body []byte) error {
4460	var azFuture azure.Future
4461	if err := json.Unmarshal(body, &azFuture); err != nil {
4462		return err
4463	}
4464	future.FutureAPI = &azFuture
4465	future.Result = future.result
4466	return nil
4467}
4468
4469// result is the default implementation for ServicesStartFuture.Result.
4470func (future *ServicesStartFuture) result(client ServicesClient) (ar autorest.Response, err error) {
4471	var done bool
4472	done, err = future.DoneWithContext(context.Background(), client)
4473	if err != nil {
4474		err = autorest.NewErrorWithError(err, "datamigration.ServicesStartFuture", "Result", future.Response(), "Polling failure")
4475		return
4476	}
4477	if !done {
4478		ar.Response = future.Response()
4479		err = azure.NewAsyncOpIncompleteError("datamigration.ServicesStartFuture")
4480		return
4481	}
4482	ar.Response = future.Response()
4483	return
4484}
4485
4486// ServicesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
4487type ServicesStopFuture struct {
4488	azure.FutureAPI
4489	// Result returns the result of the asynchronous operation.
4490	// If the operation has not completed it will return an error.
4491	Result func(ServicesClient) (autorest.Response, error)
4492}
4493
4494// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4495func (future *ServicesStopFuture) UnmarshalJSON(body []byte) error {
4496	var azFuture azure.Future
4497	if err := json.Unmarshal(body, &azFuture); err != nil {
4498		return err
4499	}
4500	future.FutureAPI = &azFuture
4501	future.Result = future.result
4502	return nil
4503}
4504
4505// result is the default implementation for ServicesStopFuture.Result.
4506func (future *ServicesStopFuture) result(client ServicesClient) (ar autorest.Response, err error) {
4507	var done bool
4508	done, err = future.DoneWithContext(context.Background(), client)
4509	if err != nil {
4510		err = autorest.NewErrorWithError(err, "datamigration.ServicesStopFuture", "Result", future.Response(), "Polling failure")
4511		return
4512	}
4513	if !done {
4514		ar.Response = future.Response()
4515		err = azure.NewAsyncOpIncompleteError("datamigration.ServicesStopFuture")
4516		return
4517	}
4518	ar.Response = future.Response()
4519	return
4520}
4521
4522// ServiceStatusResponse service health status
4523type ServiceStatusResponse struct {
4524	autorest.Response `json:"-"`
4525	// AgentVersion - The DMS instance agent version
4526	AgentVersion *string `json:"agentVersion,omitempty"`
4527	// Status - The machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed'
4528	Status *string `json:"status,omitempty"`
4529	// VMSize - The services virtual machine size, such as 'Standard_D2_v2'
4530	VMSize *string `json:"vmSize,omitempty"`
4531	// SupportedTaskTypes - The list of supported task types
4532	SupportedTaskTypes *[]string `json:"supportedTaskTypes,omitempty"`
4533}
4534
4535// ServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4536// operation.
4537type ServicesUpdateFuture struct {
4538	azure.FutureAPI
4539	// Result returns the result of the asynchronous operation.
4540	// If the operation has not completed it will return an error.
4541	Result func(ServicesClient) (Service, error)
4542}
4543
4544// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4545func (future *ServicesUpdateFuture) UnmarshalJSON(body []byte) error {
4546	var azFuture azure.Future
4547	if err := json.Unmarshal(body, &azFuture); err != nil {
4548		return err
4549	}
4550	future.FutureAPI = &azFuture
4551	future.Result = future.result
4552	return nil
4553}
4554
4555// result is the default implementation for ServicesUpdateFuture.Result.
4556func (future *ServicesUpdateFuture) result(client ServicesClient) (s Service, err error) {
4557	var done bool
4558	done, err = future.DoneWithContext(context.Background(), client)
4559	if err != nil {
4560		err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", future.Response(), "Polling failure")
4561		return
4562	}
4563	if !done {
4564		s.Response.Response = future.Response()
4565		err = azure.NewAsyncOpIncompleteError("datamigration.ServicesUpdateFuture")
4566		return
4567	}
4568	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4569	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
4570		s, err = client.UpdateResponder(s.Response.Response)
4571		if err != nil {
4572			err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
4573		}
4574	}
4575	return
4576}
4577
4578// SQLConnectionInfo information for connecting to SQL database server
4579type SQLConnectionInfo struct {
4580	// DataSource - Data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber
4581	DataSource *string `json:"dataSource,omitempty"`
4582	// Authentication - Authentication type to use for connection. Possible values include: 'None', 'WindowsAuthentication', 'SQLAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'
4583	Authentication AuthenticationType `json:"authentication,omitempty"`
4584	// EncryptConnection - Whether to encrypt the connection
4585	EncryptConnection *bool `json:"encryptConnection,omitempty"`
4586	// AdditionalSettings - Additional connection settings
4587	AdditionalSettings *string `json:"additionalSettings,omitempty"`
4588	// TrustServerCertificate - Whether to trust the server certificate
4589	TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"`
4590	// UserName - User name
4591	UserName *string `json:"userName,omitempty"`
4592	// Password - Password credential.
4593	Password *string `json:"password,omitempty"`
4594	// Type - Possible values include: 'TypeConnectionInfo', 'TypeSQLConnectionInfo'
4595	Type Type `json:"type,omitempty"`
4596}
4597
4598// MarshalJSON is the custom marshaler for SQLConnectionInfo.
4599func (sci SQLConnectionInfo) MarshalJSON() ([]byte, error) {
4600	sci.Type = TypeSQLConnectionInfo
4601	objectMap := make(map[string]interface{})
4602	if sci.DataSource != nil {
4603		objectMap["dataSource"] = sci.DataSource
4604	}
4605	if sci.Authentication != "" {
4606		objectMap["authentication"] = sci.Authentication
4607	}
4608	if sci.EncryptConnection != nil {
4609		objectMap["encryptConnection"] = sci.EncryptConnection
4610	}
4611	if sci.AdditionalSettings != nil {
4612		objectMap["additionalSettings"] = sci.AdditionalSettings
4613	}
4614	if sci.TrustServerCertificate != nil {
4615		objectMap["trustServerCertificate"] = sci.TrustServerCertificate
4616	}
4617	if sci.UserName != nil {
4618		objectMap["userName"] = sci.UserName
4619	}
4620	if sci.Password != nil {
4621		objectMap["password"] = sci.Password
4622	}
4623	if sci.Type != "" {
4624		objectMap["type"] = sci.Type
4625	}
4626	return json.Marshal(objectMap)
4627}
4628
4629// AsSQLConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo.
4630func (sci SQLConnectionInfo) AsSQLConnectionInfo() (*SQLConnectionInfo, bool) {
4631	return &sci, true
4632}
4633
4634// AsConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo.
4635func (sci SQLConnectionInfo) AsConnectionInfo() (*ConnectionInfo, bool) {
4636	return nil, false
4637}
4638
4639// AsBasicConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo.
4640func (sci SQLConnectionInfo) AsBasicConnectionInfo() (BasicConnectionInfo, bool) {
4641	return &sci, true
4642}
4643
4644// SQLMigrationTaskInput base class for migration task input
4645type SQLMigrationTaskInput struct {
4646	// SourceConnectionInfo - Information for connecting to source
4647	SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"`
4648	// TargetConnectionInfo - Information for connecting to target
4649	TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"`
4650}
4651
4652// StartMigrationScenarioServerRoleResult server role migration result
4653type StartMigrationScenarioServerRoleResult struct {
4654	// Name - READ-ONLY; Name of server role.
4655	Name *string `json:"name,omitempty"`
4656	// State - READ-ONLY; Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped'
4657	State MigrationState `json:"state,omitempty"`
4658	// ExceptionsAndWarnings - READ-ONLY; Migration exceptions and warnings.
4659	ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"`
4660}
4661
4662// MarshalJSON is the custom marshaler for StartMigrationScenarioServerRoleResult.
4663func (smssrr StartMigrationScenarioServerRoleResult) MarshalJSON() ([]byte, error) {
4664	objectMap := make(map[string]interface{})
4665	return json.Marshal(objectMap)
4666}
4667
4668// TaskList oData page of tasks
4669type TaskList struct {
4670	autorest.Response `json:"-"`
4671	// Value - List of tasks
4672	Value *[]ProjectTask `json:"value,omitempty"`
4673	// NextLink - URL to load the next page of tasks
4674	NextLink *string `json:"nextLink,omitempty"`
4675}
4676
4677// TaskListIterator provides access to a complete listing of ProjectTask values.
4678type TaskListIterator struct {
4679	i    int
4680	page TaskListPage
4681}
4682
4683// NextWithContext advances to the next value.  If there was an error making
4684// the request the iterator does not advance and the error is returned.
4685func (iter *TaskListIterator) NextWithContext(ctx context.Context) (err error) {
4686	if tracing.IsEnabled() {
4687		ctx = tracing.StartSpan(ctx, fqdn+"/TaskListIterator.NextWithContext")
4688		defer func() {
4689			sc := -1
4690			if iter.Response().Response.Response != nil {
4691				sc = iter.Response().Response.Response.StatusCode
4692			}
4693			tracing.EndSpan(ctx, sc, err)
4694		}()
4695	}
4696	iter.i++
4697	if iter.i < len(iter.page.Values()) {
4698		return nil
4699	}
4700	err = iter.page.NextWithContext(ctx)
4701	if err != nil {
4702		iter.i--
4703		return err
4704	}
4705	iter.i = 0
4706	return nil
4707}
4708
4709// Next advances to the next value.  If there was an error making
4710// the request the iterator does not advance and the error is returned.
4711// Deprecated: Use NextWithContext() instead.
4712func (iter *TaskListIterator) Next() error {
4713	return iter.NextWithContext(context.Background())
4714}
4715
4716// NotDone returns true if the enumeration should be started or is not yet complete.
4717func (iter TaskListIterator) NotDone() bool {
4718	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4719}
4720
4721// Response returns the raw server response from the last page request.
4722func (iter TaskListIterator) Response() TaskList {
4723	return iter.page.Response()
4724}
4725
4726// Value returns the current value or a zero-initialized value if the
4727// iterator has advanced beyond the end of the collection.
4728func (iter TaskListIterator) Value() ProjectTask {
4729	if !iter.page.NotDone() {
4730		return ProjectTask{}
4731	}
4732	return iter.page.Values()[iter.i]
4733}
4734
4735// Creates a new instance of the TaskListIterator type.
4736func NewTaskListIterator(page TaskListPage) TaskListIterator {
4737	return TaskListIterator{page: page}
4738}
4739
4740// IsEmpty returns true if the ListResult contains no values.
4741func (tl TaskList) IsEmpty() bool {
4742	return tl.Value == nil || len(*tl.Value) == 0
4743}
4744
4745// hasNextLink returns true if the NextLink is not empty.
4746func (tl TaskList) hasNextLink() bool {
4747	return tl.NextLink != nil && len(*tl.NextLink) != 0
4748}
4749
4750// taskListPreparer prepares a request to retrieve the next set of results.
4751// It returns nil if no more results exist.
4752func (tl TaskList) taskListPreparer(ctx context.Context) (*http.Request, error) {
4753	if !tl.hasNextLink() {
4754		return nil, nil
4755	}
4756	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4757		autorest.AsJSON(),
4758		autorest.AsGet(),
4759		autorest.WithBaseURL(to.String(tl.NextLink)))
4760}
4761
4762// TaskListPage contains a page of ProjectTask values.
4763type TaskListPage struct {
4764	fn func(context.Context, TaskList) (TaskList, error)
4765	tl TaskList
4766}
4767
4768// NextWithContext advances to the next page of values.  If there was an error making
4769// the request the page does not advance and the error is returned.
4770func (page *TaskListPage) NextWithContext(ctx context.Context) (err error) {
4771	if tracing.IsEnabled() {
4772		ctx = tracing.StartSpan(ctx, fqdn+"/TaskListPage.NextWithContext")
4773		defer func() {
4774			sc := -1
4775			if page.Response().Response.Response != nil {
4776				sc = page.Response().Response.Response.StatusCode
4777			}
4778			tracing.EndSpan(ctx, sc, err)
4779		}()
4780	}
4781	for {
4782		next, err := page.fn(ctx, page.tl)
4783		if err != nil {
4784			return err
4785		}
4786		page.tl = next
4787		if !next.hasNextLink() || !next.IsEmpty() {
4788			break
4789		}
4790	}
4791	return nil
4792}
4793
4794// Next advances to the next page of values.  If there was an error making
4795// the request the page does not advance and the error is returned.
4796// Deprecated: Use NextWithContext() instead.
4797func (page *TaskListPage) Next() error {
4798	return page.NextWithContext(context.Background())
4799}
4800
4801// NotDone returns true if the page enumeration should be started or is not yet complete.
4802func (page TaskListPage) NotDone() bool {
4803	return !page.tl.IsEmpty()
4804}
4805
4806// Response returns the raw server response from the last page request.
4807func (page TaskListPage) Response() TaskList {
4808	return page.tl
4809}
4810
4811// Values returns the slice of values for the current page or nil if there are no values.
4812func (page TaskListPage) Values() []ProjectTask {
4813	if page.tl.IsEmpty() {
4814		return nil
4815	}
4816	return *page.tl.Value
4817}
4818
4819// Creates a new instance of the TaskListPage type.
4820func NewTaskListPage(cur TaskList, getNextPage func(context.Context, TaskList) (TaskList, error)) TaskListPage {
4821	return TaskListPage{
4822		fn: getNextPage,
4823		tl: cur,
4824	}
4825}
4826
4827// TrackedResource ARM tracked top level resource.
4828type TrackedResource struct {
4829	// Tags - Resource tags.
4830	Tags map[string]*string `json:"tags"`
4831	// Location - Resource location.
4832	Location *string `json:"location,omitempty"`
4833	// ID - READ-ONLY; Resource ID.
4834	ID *string `json:"id,omitempty"`
4835	// Name - READ-ONLY; Resource name.
4836	Name *string `json:"name,omitempty"`
4837	// Type - READ-ONLY; Resource type.
4838	Type *string `json:"type,omitempty"`
4839}
4840
4841// MarshalJSON is the custom marshaler for TrackedResource.
4842func (tr TrackedResource) MarshalJSON() ([]byte, error) {
4843	objectMap := make(map[string]interface{})
4844	if tr.Tags != nil {
4845		objectMap["tags"] = tr.Tags
4846	}
4847	if tr.Location != nil {
4848		objectMap["location"] = tr.Location
4849	}
4850	return json.Marshal(objectMap)
4851}
4852
4853// ValidateMigrationInputSQLServerSQLMITaskInput input for task that validates migration input for SQL to
4854// Azure SQL Managed Instance
4855type ValidateMigrationInputSQLServerSQLMITaskInput struct {
4856	// TargetConnectionInfo - Information for connecting to target
4857	TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"`
4858	// SelectedDatabases - Databases to migrate
4859	SelectedDatabases *[]MigrateSQLServerSQLMIDatabaseInput `json:"selectedDatabases,omitempty"`
4860	// BackupFileShare - Backup file share information for all selected databases.
4861	BackupFileShare *FileShare `json:"backupFileShare,omitempty"`
4862	// BackupBlobShare - SAS URI of Azure Storage Account Container to be used for storing backup files.
4863	BackupBlobShare *BlobShare `json:"backupBlobShare,omitempty"`
4864}
4865
4866// ValidateMigrationInputSQLServerSQLMITaskOutput output for task that validates migration input for SQL to
4867// Azure SQL Managed Instance migrations
4868type ValidateMigrationInputSQLServerSQLMITaskOutput struct {
4869	// ID - READ-ONLY; Result identifier
4870	ID *string `json:"id,omitempty"`
4871	// Name - READ-ONLY; Name of database
4872	Name *string `json:"name,omitempty"`
4873	// RestoreDatabaseNameErrors - READ-ONLY; Errors associated with the RestoreDatabaseName
4874	RestoreDatabaseNameErrors *[]ReportableException `json:"restoreDatabaseNameErrors,omitempty"`
4875	// BackupFolderErrors - READ-ONLY; Errors associated with the BackupFolder path
4876	BackupFolderErrors *[]ReportableException `json:"backupFolderErrors,omitempty"`
4877	// BackupShareCredentialsErrors - READ-ONLY; Errors associated with backup share user name and password credentials
4878	BackupShareCredentialsErrors *[]ReportableException `json:"backupShareCredentialsErrors,omitempty"`
4879	// BackupStorageAccountErrors - READ-ONLY; Errors associated with the storage account provided.
4880	BackupStorageAccountErrors *[]ReportableException `json:"backupStorageAccountErrors,omitempty"`
4881}
4882
4883// MarshalJSON is the custom marshaler for ValidateMigrationInputSQLServerSQLMITaskOutput.
4884func (vmisssmto ValidateMigrationInputSQLServerSQLMITaskOutput) MarshalJSON() ([]byte, error) {
4885	objectMap := make(map[string]interface{})
4886	return json.Marshal(objectMap)
4887}
4888
4889// ValidateMigrationInputSQLServerSQLMITaskProperties properties for task that validates migration input
4890// for SQL to Azure SQL Database Managed Instance
4891type ValidateMigrationInputSQLServerSQLMITaskProperties struct {
4892	// Input - Task input
4893	Input *ValidateMigrationInputSQLServerSQLMITaskInput `json:"input,omitempty"`
4894	// Output - READ-ONLY; Task output. This is ignored if submitted.
4895	Output *[]ValidateMigrationInputSQLServerSQLMITaskOutput `json:"output,omitempty"`
4896	// Errors - READ-ONLY; Array of errors. This is ignored if submitted.
4897	Errors *[]ODataError `json:"errors,omitempty"`
4898	// State - READ-ONLY; The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted'
4899	State TaskState `json:"state,omitempty"`
4900	// TaskType - Possible values include: 'TaskTypeProjectTaskProperties', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeConnectToSourceSQLServer'
4901	TaskType TaskType `json:"taskType,omitempty"`
4902}
4903
4904// MarshalJSON is the custom marshaler for ValidateMigrationInputSQLServerSQLMITaskProperties.
4905func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) MarshalJSON() ([]byte, error) {
4906	vmisssmtp.TaskType = TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI
4907	objectMap := make(map[string]interface{})
4908	if vmisssmtp.Input != nil {
4909		objectMap["input"] = vmisssmtp.Input
4910	}
4911	if vmisssmtp.TaskType != "" {
4912		objectMap["taskType"] = vmisssmtp.TaskType
4913	}
4914	return json.Marshal(objectMap)
4915}
4916
4917// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties.
4918func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) {
4919	return &vmisssmtp, true
4920}
4921
4922// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties.
4923func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) {
4924	return nil, false
4925}
4926
4927// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties.
4928func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) {
4929	return nil, false
4930}
4931
4932// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties.
4933func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) {
4934	return nil, false
4935}
4936
4937// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties.
4938func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) {
4939	return nil, false
4940}
4941
4942// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties.
4943func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) {
4944	return nil, false
4945}
4946
4947// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties.
4948func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) {
4949	return nil, false
4950}
4951
4952// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties.
4953func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) {
4954	return nil, false
4955}
4956
4957// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties.
4958func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) {
4959	return &vmisssmtp, true
4960}
4961
4962// ValidationError description about the errors happen while performing migration validation
4963type ValidationError struct {
4964	// Text - Error Text
4965	Text *string `json:"text,omitempty"`
4966	// Severity - Severity of the error. Possible values include: 'SeverityMessage', 'SeverityWarning', 'SeverityError'
4967	Severity Severity `json:"severity,omitempty"`
4968}
4969
4970// WaitStatistics wait statistics gathered during query batch execution
4971type WaitStatistics struct {
4972	// WaitType - Type of the Wait
4973	WaitType *string `json:"waitType,omitempty"`
4974	// WaitTimeMs - Total wait time in millisecond(s)
4975	WaitTimeMs *float64 `json:"waitTimeMs,omitempty"`
4976	// WaitCount - Total no. of waits
4977	WaitCount *int64 `json:"waitCount,omitempty"`
4978}
4979