forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
4978 lines (4462 loc) · 219 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package datamigration
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration"
// APIError error information.
type APIError struct {
// Error - Error information in OData format
Error *ODataError `json:"error,omitempty"`
}
// AvailableServiceSku describes the available service SKU.
type AvailableServiceSku struct {
// ResourceType - The resource type, including the provider namespace
ResourceType *string `json:"resourceType,omitempty"`
// Sku - SKU name, tier, etc.
Sku *AvailableServiceSkuSku `json:"sku,omitempty"`
// Capacity - A description of the scaling capacities of the SKU
Capacity *AvailableServiceSkuCapacity `json:"capacity,omitempty"`
}
// AvailableServiceSkuCapacity a description of the scaling capacities of the SKU
type AvailableServiceSkuCapacity struct {
// Minimum - The minimum capacity, usually 0 or 1.
Minimum *int32 `json:"minimum,omitempty"`
// Maximum - The maximum capacity
Maximum *int32 `json:"maximum,omitempty"`
// Default - The default capacity
Default *int32 `json:"default,omitempty"`
// ScaleType - The scalability approach. Possible values include: 'ServiceScalabilityNone', 'ServiceScalabilityManual', 'ServiceScalabilityAutomatic'
ScaleType ServiceScalability `json:"scaleType,omitempty"`
}
// AvailableServiceSkuSku SKU name, tier, etc.
type AvailableServiceSkuSku struct {
// Name - The name of the SKU
Name *string `json:"name,omitempty"`
// Family - SKU family
Family *string `json:"family,omitempty"`
// Size - SKU size
Size *string `json:"size,omitempty"`
// Tier - The tier of the SKU, such as "Free", "Basic", "Standard", or "Premium"
Tier *string `json:"tier,omitempty"`
}
// BlobShare blob container storage information.
type BlobShare struct {
// SasURI - SAS URI of Azure Storage Account Container.
SasURI *string `json:"sasUri,omitempty"`
}
// BasicConnectionInfo defines the connection properties of a server
type BasicConnectionInfo interface {
AsSQLConnectionInfo() (*SQLConnectionInfo, bool)
AsConnectionInfo() (*ConnectionInfo, bool)
}
// ConnectionInfo defines the connection properties of a server
type ConnectionInfo struct {
// UserName - User name
UserName *string `json:"userName,omitempty"`
// Password - Password credential.
Password *string `json:"password,omitempty"`
// Type - Possible values include: 'TypeConnectionInfo', 'TypeSQLConnectionInfo'
Type Type `json:"type,omitempty"`
}
func unmarshalBasicConnectionInfo(body []byte) (BasicConnectionInfo, error) {
var m map[string]interface{}
err := json.Unmarshal(body, &m)
if err != nil {
return nil, err
}
switch m["type"] {
case string(TypeSQLConnectionInfo):
var sci SQLConnectionInfo
err := json.Unmarshal(body, &sci)
return sci, err
default:
var ci ConnectionInfo
err := json.Unmarshal(body, &ci)
return ci, err
}
}
func unmarshalBasicConnectionInfoArray(body []byte) ([]BasicConnectionInfo, error) {
var rawMessages []*json.RawMessage
err := json.Unmarshal(body, &rawMessages)
if err != nil {
return nil, err
}
ciArray := make([]BasicConnectionInfo, len(rawMessages))
for index, rawMessage := range rawMessages {
ci, err := unmarshalBasicConnectionInfo(*rawMessage)
if err != nil {
return nil, err
}
ciArray[index] = ci
}
return ciArray, nil
}
// MarshalJSON is the custom marshaler for ConnectionInfo.
func (ci ConnectionInfo) MarshalJSON() ([]byte, error) {
ci.Type = TypeConnectionInfo
objectMap := make(map[string]interface{})
if ci.UserName != nil {
objectMap["userName"] = ci.UserName
}
if ci.Password != nil {
objectMap["password"] = ci.Password
}
if ci.Type != "" {
objectMap["type"] = ci.Type
}
return json.Marshal(objectMap)
}
// AsSQLConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo.
func (ci ConnectionInfo) AsSQLConnectionInfo() (*SQLConnectionInfo, bool) {
return nil, false
}
// AsConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo.
func (ci ConnectionInfo) AsConnectionInfo() (*ConnectionInfo, bool) {
return &ci, true
}
// AsBasicConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo.
func (ci ConnectionInfo) AsBasicConnectionInfo() (BasicConnectionInfo, bool) {
return &ci, true
}
// ConnectToSourceSQLServerTaskInput input for the task that validates connection to SQL Server and also
// validates source server requirements
type ConnectToSourceSQLServerTaskInput struct {
// SourceConnectionInfo - Connection information for Source SQL Server
SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"`
// CheckPermissionsGroup - Permission group for validations. Possible values include: 'Default', 'MigrationFromSQLServerToAzureDB'
CheckPermissionsGroup ServerLevelPermissionsGroup `json:"checkPermissionsGroup,omitempty"`
// CollectLogins - Flag for whether to collect logins from source server.
CollectLogins *bool `json:"CollectLogins,omitempty"`
// CollectAgentJobs - Flag for whether to collect agent jobs from source server.
CollectAgentJobs *bool `json:"CollectAgentJobs,omitempty"`
}
// BasicConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also
// validates source server requirements
type BasicConnectToSourceSQLServerTaskOutput interface {
AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool)
AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool)
AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool)
AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool)
AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool)
}
// ConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also
// validates source server requirements
type ConnectToSourceSQLServerTaskOutput struct {
// ID - READ-ONLY; Result identifier
ID *string `json:"id,omitempty"`
// ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput'
ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"`
}
func unmarshalBasicConnectToSourceSQLServerTaskOutput(body []byte) (BasicConnectToSourceSQLServerTaskOutput, error) {
var m map[string]interface{}
err := json.Unmarshal(body, &m)
if err != nil {
return nil, err
}
switch m["resultType"] {
case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput):
var ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel
err := json.Unmarshal(body, &ctssstoajl)
return ctssstoajl, err
case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput):
var ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel
err := json.Unmarshal(body, &ctssstoll)
return ctssstoll, err
case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput):
var ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel
err := json.Unmarshal(body, &ctssstodl)
return ctssstodl, err
case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput):
var ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel
err := json.Unmarshal(body, &ctssstotl)
return ctssstotl, err
default:
var ctsssto ConnectToSourceSQLServerTaskOutput
err := json.Unmarshal(body, &ctsssto)
return ctsssto, err
}
}
func unmarshalBasicConnectToSourceSQLServerTaskOutputArray(body []byte) ([]BasicConnectToSourceSQLServerTaskOutput, error) {
var rawMessages []*json.RawMessage
err := json.Unmarshal(body, &rawMessages)
if err != nil {
return nil, err
}
ctssstoArray := make([]BasicConnectToSourceSQLServerTaskOutput, len(rawMessages))
for index, rawMessage := range rawMessages {
ctsssto, err := unmarshalBasicConnectToSourceSQLServerTaskOutput(*rawMessage)
if err != nil {
return nil, err
}
ctssstoArray[index] = ctsssto
}
return ctssstoArray, nil
}
// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutput.
func (ctsssto ConnectToSourceSQLServerTaskOutput) MarshalJSON() ([]byte, error) {
ctsssto.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput
objectMap := make(map[string]interface{})
if ctsssto.ResultType != "" {
objectMap["resultType"] = ctsssto.ResultType
}
return json.Marshal(objectMap)
}
// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) {
return &ctsssto, true
}
// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput.
func (ctsssto ConnectToSourceSQLServerTaskOutput) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) {
return &ctsssto, true
}
// ConnectToSourceSQLServerTaskOutputAgentJobLevel agentJob level output for the task that validates
// connection to SQL Server and also validates source server requirements
type ConnectToSourceSQLServerTaskOutputAgentJobLevel struct {
// Name - READ-ONLY; AgentJob name
Name *string `json:"name,omitempty"`
// JobCategory - READ-ONLY; The type of AgentJob.
JobCategory *string `json:"jobCategory,omitempty"`
// IsEnabled - READ-ONLY; The state of the original AgentJob.
IsEnabled *bool `json:"isEnabled,omitempty"`
// JobOwner - READ-ONLY; The owner of the AgentJob
JobOwner *string `json:"jobOwner,omitempty"`
// LastExecutedOn - READ-ONLY; UTC Date and time when the AgentJob was last executed.
LastExecutedOn *date.Time `json:"lastExecutedOn,omitempty"`
// MigrationEligibility - READ-ONLY; Information about eligibility of agent job for migration.
MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"`
// ID - READ-ONLY; Result identifier
ID *string `json:"id,omitempty"`
// ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput'
ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"`
}
// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) MarshalJSON() ([]byte, error) {
ctssstoajl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput
objectMap := make(map[string]interface{})
if ctssstoajl.ResultType != "" {
objectMap["resultType"] = ctssstoajl.ResultType
}
return json.Marshal(objectMap)
}
// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) {
return &ctssstoajl, true
}
// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) {
return nil, false
}
// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel.
func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) {
return &ctssstoajl, true
}
// ConnectToSourceSQLServerTaskOutputDatabaseLevel database level output for the task that validates
// connection to SQL Server and also validates source server requirements
type ConnectToSourceSQLServerTaskOutputDatabaseLevel struct {
// Name - READ-ONLY; Database name
Name *string `json:"name,omitempty"`
// SizeMB - READ-ONLY; Size of the file in megabytes
SizeMB *float64 `json:"sizeMB,omitempty"`
// DatabaseFiles - READ-ONLY; The list of database files
DatabaseFiles *[]DatabaseFileInfo `json:"databaseFiles,omitempty"`
// CompatibilityLevel - READ-ONLY; SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'
CompatibilityLevel DatabaseCompatLevel `json:"compatibilityLevel,omitempty"`
// DatabaseState - READ-ONLY; State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'
DatabaseState DatabaseState `json:"databaseState,omitempty"`
// ID - READ-ONLY; Result identifier
ID *string `json:"id,omitempty"`
// ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput'
ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"`
}
// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) {
ctssstodl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput
objectMap := make(map[string]interface{})
if ctssstodl.ResultType != "" {
objectMap["resultType"] = ctssstodl.ResultType
}
return json.Marshal(objectMap)
}
// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) {
return &ctssstodl, true
}
// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) {
return nil, false
}
// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel.
func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) {
return &ctssstodl, true
}
// ConnectToSourceSQLServerTaskOutputLoginLevel login level output for the task that validates connection
// to SQL Server and also validates source server requirements
type ConnectToSourceSQLServerTaskOutputLoginLevel struct {
// Name - READ-ONLY; Login name.
Name *string `json:"name,omitempty"`
// LoginType - READ-ONLY; The type of login. Possible values include: 'WindowsUser', 'WindowsGroup', 'SQLLogin', 'Certificate', 'AsymmetricKey', 'ExternalUser', 'ExternalGroup'
LoginType LoginType `json:"loginType,omitempty"`
// DefaultDatabase - READ-ONLY; The default database for the login.
DefaultDatabase *string `json:"defaultDatabase,omitempty"`
// IsEnabled - READ-ONLY; The state of the login.
IsEnabled *bool `json:"isEnabled,omitempty"`
// MigrationEligibility - READ-ONLY; Information about eligibility of login for migration.
MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"`
// ID - READ-ONLY; Result identifier
ID *string `json:"id,omitempty"`
// ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput'
ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"`
}
// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputLoginLevel.
func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) MarshalJSON() ([]byte, error) {
ctssstoll.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput
objectMap := make(map[string]interface{})
if ctssstoll.ResultType != "" {
objectMap["resultType"] = ctssstoll.ResultType
}
return json.Marshal(objectMap)
}
// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) {
return &ctssstoll, true
}
// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) {
return nil, false
}
// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel.
func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) {
return &ctssstoll, true
}
// ConnectToSourceSQLServerTaskOutputTaskLevel task level output for the task that validates connection to
// SQL Server and also validates source server requirements
type ConnectToSourceSQLServerTaskOutputTaskLevel struct {
// Databases - READ-ONLY; Source databases as a map from database name to database id
Databases map[string]*string `json:"databases"`
// Logins - READ-ONLY; Source logins as a map from login name to login id.
Logins map[string]*string `json:"Logins"`
// AgentJobs - READ-ONLY; Source agent jobs as a map from agent job name to id.
AgentJobs map[string]*string `json:"AgentJobs"`
// SourceServerVersion - READ-ONLY; Source server version
SourceServerVersion *string `json:"sourceServerVersion,omitempty"`
// SourceServerBrandVersion - READ-ONLY; Source server brand version
SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"`
// ValidationErrors - READ-ONLY; Validation errors
ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"`
// ID - READ-ONLY; Result identifier
ID *string `json:"id,omitempty"`
// ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput'
ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"`
}
// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputTaskLevel.
func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) MarshalJSON() ([]byte, error) {
ctssstotl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput
objectMap := make(map[string]interface{})
if ctssstotl.ResultType != "" {
objectMap["resultType"] = ctssstotl.ResultType
}
return json.Marshal(objectMap)
}
// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) {
return &ctssstotl, true
}
// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) {
return nil, false
}
// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel.
func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) {
return &ctssstotl, true
}
// ConnectToSourceSQLServerTaskProperties properties for the task that validates connection to SQL Server
// and also validates source server requirements
type ConnectToSourceSQLServerTaskProperties struct {
// Input - Task input
Input *ConnectToSourceSQLServerTaskInput `json:"input,omitempty"`
// Output - READ-ONLY; Task output. This is ignored if submitted.
Output *[]BasicConnectToSourceSQLServerTaskOutput `json:"output,omitempty"`
// Errors - READ-ONLY; Array of errors. This is ignored if submitted.
Errors *[]ODataError `json:"errors,omitempty"`
// State - READ-ONLY; The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted'
State TaskState `json:"state,omitempty"`
// TaskType - Possible values include: 'TaskTypeProjectTaskProperties', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeConnectToSourceSQLServer'
TaskType TaskType `json:"taskType,omitempty"`
}
// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskProperties.
func (ctssstp ConnectToSourceSQLServerTaskProperties) MarshalJSON() ([]byte, error) {
ctssstp.TaskType = TaskTypeConnectToSourceSQLServer
objectMap := make(map[string]interface{})
if ctssstp.Input != nil {
objectMap["input"] = ctssstp.Input
}
if ctssstp.TaskType != "" {
objectMap["taskType"] = ctssstp.TaskType
}
return json.Marshal(objectMap)
}
// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
func (ctssstp ConnectToSourceSQLServerTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) {
return nil, false
}
// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) {
return nil, false
}
// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) {
return nil, false
}
// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
func (ctssstp ConnectToSourceSQLServerTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) {
return nil, false
}
// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) {
return nil, false
}
// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) {
return &ctssstp, true
}
// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
func (ctssstp ConnectToSourceSQLServerTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) {
return nil, false
}
// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties.
func (ctssstp ConnectToSourceSQLServerTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) {
return &ctssstp, true
}
// UnmarshalJSON is the custom unmarshaler for ConnectToSourceSQLServerTaskProperties struct.
func (ctssstp *ConnectToSourceSQLServerTaskProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "input":
if v != nil {
var input ConnectToSourceSQLServerTaskInput
err = json.Unmarshal(*v, &input)
if err != nil {
return err
}
ctssstp.Input = &input
}
case "output":
if v != nil {
output, err := unmarshalBasicConnectToSourceSQLServerTaskOutputArray(*v)
if err != nil {
return err
}
ctssstp.Output = &output
}
case "errors":
if v != nil {
var errorsVar []ODataError
err = json.Unmarshal(*v, &errorsVar)
if err != nil {
return err
}
ctssstp.Errors = &errorsVar
}
case "state":
if v != nil {
var state TaskState
err = json.Unmarshal(*v, &state)
if err != nil {
return err
}
ctssstp.State = state
}
case "taskType":
if v != nil {
var taskType TaskType
err = json.Unmarshal(*v, &taskType)
if err != nil {
return err
}
ctssstp.TaskType = taskType
}
}
}
return nil
}
// ConnectToTargetSQLDbTaskInput input for the task that validates connection to SQL DB and target server
// requirements
type ConnectToTargetSQLDbTaskInput struct {
// TargetConnectionInfo - Connection information for target SQL DB
TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"`
}
// ConnectToTargetSQLDbTaskOutput output for the task that validates connection to SQL DB and target server
// requirements
type ConnectToTargetSQLDbTaskOutput struct {
// ID - READ-ONLY; Result identifier
ID *string `json:"id,omitempty"`
// Databases - READ-ONLY; Source databases as a map from database name to database id
Databases map[string]*string `json:"databases"`
// TargetServerVersion - READ-ONLY; Version of the target server
TargetServerVersion *string `json:"targetServerVersion,omitempty"`
// TargetServerBrandVersion - READ-ONLY; Target server brand version
TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"`
}
// MarshalJSON is the custom marshaler for ConnectToTargetSQLDbTaskOutput.
func (cttsdto ConnectToTargetSQLDbTaskOutput) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// ConnectToTargetSQLDbTaskProperties properties for the task that validates connection to SQL DB and
// target server requirements
type ConnectToTargetSQLDbTaskProperties struct {
// Input - Task input
Input *ConnectToTargetSQLDbTaskInput `json:"input,omitempty"`
// Output - READ-ONLY; Task output. This is ignored if submitted.
Output *[]ConnectToTargetSQLDbTaskOutput `json:"output,omitempty"`
// Errors - READ-ONLY; Array of errors. This is ignored if submitted.
Errors *[]ODataError `json:"errors,omitempty"`
// State - READ-ONLY; The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted'
State TaskState `json:"state,omitempty"`
// TaskType - Possible values include: 'TaskTypeProjectTaskProperties', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeConnectToSourceSQLServer'
TaskType TaskType `json:"taskType,omitempty"`
}
// MarshalJSON is the custom marshaler for ConnectToTargetSQLDbTaskProperties.
func (cttsdtp ConnectToTargetSQLDbTaskProperties) MarshalJSON() ([]byte, error) {
cttsdtp.TaskType = TaskTypeConnectToTargetSQLDb
objectMap := make(map[string]interface{})
if cttsdtp.Input != nil {
objectMap["input"] = cttsdtp.Input
}
if cttsdtp.TaskType != "" {
objectMap["taskType"] = cttsdtp.TaskType
}
return json.Marshal(objectMap)
}
// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) {
return nil, false
}
// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) {
return nil, false
}
// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) {
return nil, false
}
// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) {
return nil, false
}
// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) {
return &cttsdtp, true
}
// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) {
return nil, false
}
// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) {
return nil, false
}
// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) {
return nil, false
}
// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties.
func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) {
return &cttsdtp, true
}
// ConnectToTargetSQLMITaskInput input for the task that validates connection to Azure SQL Database Managed
// Instance.
type ConnectToTargetSQLMITaskInput struct {
// TargetConnectionInfo - Connection information for target SQL Server
TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"`
}
// ConnectToTargetSQLMITaskOutput output for the task that validates connection to Azure SQL Database
// Managed Instance.
type ConnectToTargetSQLMITaskOutput struct {
// ID - READ-ONLY; Result identifier
ID *string `json:"id,omitempty"`
// TargetServerVersion - READ-ONLY; Target server version
TargetServerVersion *string `json:"targetServerVersion,omitempty"`
// TargetServerBrandVersion - READ-ONLY; Target server brand version
TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"`
// Logins - READ-ONLY; List of logins on the target server.
Logins *[]string `json:"Logins,omitempty"`
// AgentJobs - READ-ONLY; List of agent jobs on the target server.
AgentJobs *[]string `json:"AgentJobs,omitempty"`
// ValidationErrors - READ-ONLY; Validation errors
ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"`
}
// MarshalJSON is the custom marshaler for ConnectToTargetSQLMITaskOutput.
func (cttsmto ConnectToTargetSQLMITaskOutput) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// ConnectToTargetSQLMITaskProperties properties for the task that validates connection to Azure SQL
// Database Managed Instance
type ConnectToTargetSQLMITaskProperties struct {
// Input - Task input
Input *ConnectToTargetSQLMITaskInput `json:"input,omitempty"`
// Output - READ-ONLY; Task output. This is ignored if submitted.
Output *[]ConnectToTargetSQLMITaskOutput `json:"output,omitempty"`
// Errors - READ-ONLY; Array of errors. This is ignored if submitted.
Errors *[]ODataError `json:"errors,omitempty"`
// State - READ-ONLY; The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted'
State TaskState `json:"state,omitempty"`
// TaskType - Possible values include: 'TaskTypeProjectTaskProperties', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeConnectToSourceSQLServer'
TaskType TaskType `json:"taskType,omitempty"`
}
// MarshalJSON is the custom marshaler for ConnectToTargetSQLMITaskProperties.
func (cttsmtp ConnectToTargetSQLMITaskProperties) MarshalJSON() ([]byte, error) {
cttsmtp.TaskType = TaskTypeConnectToTargetAzureSQLDbMI
objectMap := make(map[string]interface{})
if cttsmtp.Input != nil {
objectMap["input"] = cttsmtp.Input
}
if cttsmtp.TaskType != "" {
objectMap["taskType"] = cttsmtp.TaskType
}
return json.Marshal(objectMap)
}
// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
func (cttsmtp ConnectToTargetSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) {
return nil, false
}
// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) {
return nil, false
}
// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) {
return nil, false
}
// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
func (cttsmtp ConnectToTargetSQLMITaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) {
return nil, false
}
// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) {
return nil, false
}
// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) {
return &cttsmtp, true
}
// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) {
return nil, false
}
// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
func (cttsmtp ConnectToTargetSQLMITaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) {
return nil, false
}
// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties.
func (cttsmtp ConnectToTargetSQLMITaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) {
return &cttsmtp, true
}
// Database information about a single database
type Database struct {
// ID - Unique identifier for the database
ID *string `json:"id,omitempty"`
// Name - Name of the database
Name *string `json:"name,omitempty"`
// CompatibilityLevel - SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'
CompatibilityLevel DatabaseCompatLevel `json:"compatibilityLevel,omitempty"`
// Collation - Collation name of the database
Collation *string `json:"collation,omitempty"`
// ServerName - Name of the server
ServerName *string `json:"serverName,omitempty"`
// Fqdn - Fully qualified name
Fqdn *string `json:"fqdn,omitempty"`
// InstallID - Install id of the database
InstallID *string `json:"installId,omitempty"`
// ServerVersion - Version of the server
ServerVersion *string `json:"serverVersion,omitempty"`
// ServerEdition - Edition of the server
ServerEdition *string `json:"serverEdition,omitempty"`
// ServerLevel - Product level of the server (RTM, SP, CTP).
ServerLevel *string `json:"serverLevel,omitempty"`
// ServerDefaultDataPath - Default path of the data files
ServerDefaultDataPath *string `json:"serverDefaultDataPath,omitempty"`
// ServerDefaultLogPath - Default path of the log files
ServerDefaultLogPath *string `json:"serverDefaultLogPath,omitempty"`
// ServerDefaultBackupPath - Default path of the backup folder
ServerDefaultBackupPath *string `json:"serverDefaultBackupPath,omitempty"`
// ServerCoreCount - Number of cores on the server
ServerCoreCount *int32 `json:"serverCoreCount,omitempty"`
// ServerVisibleOnlineCoreCount - Number of cores on the server that have VISIBLE ONLINE status
ServerVisibleOnlineCoreCount *int32 `json:"serverVisibleOnlineCoreCount,omitempty"`
// DatabaseState - State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'
DatabaseState DatabaseState `json:"databaseState,omitempty"`
// ServerID - The unique Server Id
ServerID *string `json:"serverId,omitempty"`
}
// DatabaseFileInfo database file specific information
type DatabaseFileInfo struct {
// DatabaseName - Name of the database
DatabaseName *string `json:"databaseName,omitempty"`
// ID - Unique identifier for database file
ID *string `json:"id,omitempty"`
// LogicalName - Logical name of the file
LogicalName *string `json:"logicalName,omitempty"`
// PhysicalFullName - Operating-system full path of the file
PhysicalFullName *string `json:"physicalFullName,omitempty"`
// RestoreFullName - Suggested full path of the file for restoring
RestoreFullName *string `json:"restoreFullName,omitempty"`
// FileType - Database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'
FileType DatabaseFileType `json:"fileType,omitempty"`
// SizeMB - Size of the file in megabytes
SizeMB *float64 `json:"sizeMB,omitempty"`
}
// DatabaseFileInput database file specific information for input
type DatabaseFileInput struct {
// ID - Unique identifier for database file
ID *string `json:"id,omitempty"`
// LogicalName - Logical name of the file
LogicalName *string `json:"logicalName,omitempty"`
// PhysicalFullName - Operating-system full path of the file
PhysicalFullName *string `json:"physicalFullName,omitempty"`
// RestoreFullName - Suggested full path of the file for restoring
RestoreFullName *string `json:"restoreFullName,omitempty"`
// FileType - Database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'
FileType DatabaseFileType `json:"fileType,omitempty"`
}
// DatabaseInfo project Database Details
type DatabaseInfo struct {
// SourceDatabaseName - Name of the database
SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"`
}
// DatabaseObjectName a representation of the name of an object in a database
type DatabaseObjectName struct {
// DatabaseName - READ-ONLY; The unescaped name of the database containing the object
DatabaseName *string `json:"databaseName,omitempty"`
// ObjectName - READ-ONLY; The unescaped name of the object
ObjectName *string `json:"objectName,omitempty"`
// SchemaName - READ-ONLY; The unescaped name of the schema containing the object
SchemaName *string `json:"schemaName,omitempty"`
// ObjectType - Type of the object in the database. Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'
ObjectType ObjectType `json:"objectType,omitempty"`
}
// MarshalJSON is the custom marshaler for DatabaseObjectName.
func (don DatabaseObjectName) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if don.ObjectType != "" {
objectMap["objectType"] = don.ObjectType
}
return json.Marshal(objectMap)
}
// DatabaseSummaryResult summary of database results in the migration
type DatabaseSummaryResult struct {
// SizeMB - READ-ONLY; Size of the database in megabytes
SizeMB *float64 `json:"sizeMB,omitempty"`
// Name - READ-ONLY; Name of the item
Name *string `json:"name,omitempty"`
// StartedOn - READ-ONLY; Migration start time
StartedOn *date.Time `json:"startedOn,omitempty"`
// EndedOn - READ-ONLY; Migration end time
EndedOn *date.Time `json:"endedOn,omitempty"`
// State - READ-ONLY; Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped'
State MigrationState `json:"state,omitempty"`
// StatusMessage - READ-ONLY; Status message
StatusMessage *string `json:"statusMessage,omitempty"`
// ItemsCount - READ-ONLY; Number of items
ItemsCount *int64 `json:"itemsCount,omitempty"`
// ItemsCompletedCount - READ-ONLY; Number of successfully completed items
ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"`
// ErrorPrefix - READ-ONLY; Wildcard string prefix to use for querying all errors of the item
ErrorPrefix *string `json:"errorPrefix,omitempty"`
// ResultPrefix - READ-ONLY; Wildcard string prefix to use for querying all sub-tem results of the item
ResultPrefix *string `json:"resultPrefix,omitempty"`
}
// MarshalJSON is the custom marshaler for DatabaseSummaryResult.
func (dsr DatabaseSummaryResult) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// DatabaseTable table properties
type DatabaseTable struct {
// HasRows - READ-ONLY; Indicates whether table is empty or not
HasRows *bool `json:"hasRows,omitempty"`
// Name - READ-ONLY; Schema-qualified name of the table
Name *string `json:"name,omitempty"`
}
// MarshalJSON is the custom marshaler for DatabaseTable.
func (dt DatabaseTable) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// DataIntegrityValidationResult results for checksum based Data Integrity validation results
type DataIntegrityValidationResult struct {
// FailedObjects - List of failed table names of source and target pair
FailedObjects map[string]*string `json:"failedObjects"`
// ValidationErrors - List of errors that happened while performing data integrity validation
ValidationErrors *ValidationError `json:"validationErrors,omitempty"`
}
// MarshalJSON is the custom marshaler for DataIntegrityValidationResult.
func (divr DataIntegrityValidationResult) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if divr.FailedObjects != nil {