forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
6800 lines (6184 loc) · 260 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 backup
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// 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/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/recoveryservices/mgmt/2016-06-01/backup"
// AzureBackupServerEngine the backup engine type when Azure Backup Server is used to manage the backups.
type AzureBackupServerEngine struct {
// FriendlyName - The friendly name of the backup engine.
FriendlyName *string `json:"friendlyName,omitempty"`
// BackupManagementType - The type of backup management associated with the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL'
BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
// RegistrationStatus - The status of the backup engine registration with the Recovery Services vault.
RegistrationStatus *string `json:"registrationStatus,omitempty"`
// HealthStatus - The backup status of the backup engine.
HealthStatus *string `json:"healthStatus,omitempty"`
// CanReRegister - The flag indicating whether the backup engine be registered again, once the engine has been initially registered.
CanReRegister *bool `json:"canReRegister,omitempty"`
// BackupEngineID - The ID of the backup engine.
BackupEngineID *string `json:"backupEngineId,omitempty"`
// BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine'
BackupEngineType EngineType `json:"backupEngineType,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureBackupServerEngine.
func (abse AzureBackupServerEngine) MarshalJSON() ([]byte, error) {
abse.BackupEngineType = BackupEngineTypeAzureBackupServerEngine
objectMap := make(map[string]interface{})
if abse.FriendlyName != nil {
objectMap["friendlyName"] = abse.FriendlyName
}
if abse.BackupManagementType != "" {
objectMap["backupManagementType"] = abse.BackupManagementType
}
if abse.RegistrationStatus != nil {
objectMap["registrationStatus"] = abse.RegistrationStatus
}
if abse.HealthStatus != nil {
objectMap["healthStatus"] = abse.HealthStatus
}
if abse.CanReRegister != nil {
objectMap["canReRegister"] = abse.CanReRegister
}
if abse.BackupEngineID != nil {
objectMap["backupEngineId"] = abse.BackupEngineID
}
if abse.BackupEngineType != "" {
objectMap["backupEngineType"] = abse.BackupEngineType
}
return json.Marshal(objectMap)
}
// AsAzureBackupServerEngine is the BasicEngineBase implementation for AzureBackupServerEngine.
func (abse AzureBackupServerEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
return &abse, true
}
// AsDpmBackupEngine is the BasicEngineBase implementation for AzureBackupServerEngine.
func (abse AzureBackupServerEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
return nil, false
}
// AsEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine.
func (abse AzureBackupServerEngine) AsEngineBase() (*EngineBase, bool) {
return nil, false
}
// AsBasicEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine.
func (abse AzureBackupServerEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
return &abse, true
}
// AzureIaaSClassicComputeVMContainer iaaS VM workload-specific backup item representing a classic-deployed
// virtual machine.
type AzureIaaSClassicComputeVMContainer struct {
// VirtualMachineID - The fully qualified Resource Manager URL of the virtual machine represented by this Azure IaaS VM container.
VirtualMachineID *string `json:"virtualMachineId,omitempty"`
// VirtualMachineVersion - Specifies whether the container represents a classic or a Resource Manager-deployed virtual machine.
VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
// ResourceGroup - The resource group name associated with the Recovery Services vault.
ResourceGroup *string `json:"resourceGroup,omitempty"`
// FriendlyName - Friendly name of the container.
FriendlyName *string `json:"friendlyName,omitempty"`
// BackupManagementType - The backup management type for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL'
BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
// RegistrationStatus - The container's registration status with the Recovery Services vault.
RegistrationStatus *string `json:"registrationStatus,omitempty"`
// HealthStatus - The status of the container's health.
HealthStatus *string `json:"healthStatus,omitempty"`
// ContainerType - READ-ONLY; The type assigned to the container. The values to use for each of these properties are:<br/> 1. Compute Azure VM is Microsoft.Compute/virtualMachines<br/> 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines<br/> 3. Windows machines (like Azure Backup Server and DPM) is Windows<br/> 4. Azure SQL instance is AzureSqlContainer.
ContainerType *string `json:"containerType,omitempty"`
// ProtectableObjectType - Possible values include: 'ProtectableObjectTypeProtectionContainer', 'ProtectableObjectTypeAzureSQLContainer', 'ProtectableObjectTypeIaaSVMContainer', 'ProtectableObjectTypeMABWindowsContainer', 'ProtectableObjectTypeMicrosoftComputevirtualMachines', 'ProtectableObjectTypeMicrosoftClassicComputevirtualMachines'
ProtectableObjectType ProtectableObjectType `json:"protectableObjectType,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMContainer.
func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) {
aisccvc.ProtectableObjectType = ProtectableObjectTypeMicrosoftClassicComputevirtualMachines
objectMap := make(map[string]interface{})
if aisccvc.VirtualMachineID != nil {
objectMap["virtualMachineId"] = aisccvc.VirtualMachineID
}
if aisccvc.VirtualMachineVersion != nil {
objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion
}
if aisccvc.ResourceGroup != nil {
objectMap["resourceGroup"] = aisccvc.ResourceGroup
}
if aisccvc.FriendlyName != nil {
objectMap["friendlyName"] = aisccvc.FriendlyName
}
if aisccvc.BackupManagementType != "" {
objectMap["backupManagementType"] = aisccvc.BackupManagementType
}
if aisccvc.RegistrationStatus != nil {
objectMap["registrationStatus"] = aisccvc.RegistrationStatus
}
if aisccvc.HealthStatus != nil {
objectMap["healthStatus"] = aisccvc.HealthStatus
}
if aisccvc.ProtectableObjectType != "" {
objectMap["protectableObjectType"] = aisccvc.ProtectableObjectType
}
return json.Marshal(objectMap)
}
// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
return nil, false
}
// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
return nil, false
}
// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
return &aisccvc, true
}
// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
return nil, false
}
// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
return nil, false
}
// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
return &aisccvc, true
}
// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
return nil, false
}
// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
return &aisccvc, true
}
// AzureIaaSClassicComputeVMProtectableItem iaaS VM workload-specific backup item representing a classic
// VM.
type AzureIaaSClassicComputeVMProtectableItem struct {
// VirtualMachineID - The fully qualified Resource Manager ID of the virtual machine.
VirtualMachineID *string `json:"virtualMachineId,omitempty"`
// BackupManagementType - The backup management type.
BackupManagementType *string `json:"backupManagementType,omitempty"`
// FriendlyName - The friendly name of the backup item.
FriendlyName *string `json:"friendlyName,omitempty"`
// ProtectionState - The state of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected'
ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeIaaSVMProtectableItem', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines'
ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectableItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines
objectMap := make(map[string]interface{})
if aisccvpi.VirtualMachineID != nil {
objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
}
if aisccvpi.BackupManagementType != nil {
objectMap["backupManagementType"] = aisccvpi.BackupManagementType
}
if aisccvpi.FriendlyName != nil {
objectMap["friendlyName"] = aisccvpi.FriendlyName
}
if aisccvpi.ProtectionState != "" {
objectMap["protectionState"] = aisccvpi.ProtectionState
}
if aisccvpi.ProtectableItemType != "" {
objectMap["protectableItemType"] = aisccvpi.ProtectableItemType
}
return json.Marshal(objectMap)
}
// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
return nil, false
}
// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
return &aisccvpi, true
}
// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
return nil, false
}
// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
return &aisccvpi, true
}
// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
return nil, false
}
// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
return &aisccvpi, true
}
// AzureIaaSClassicComputeVMProtectedItem iaaS VM workload-specific backup item representing the classic
// VM.
type AzureIaaSClassicComputeVMProtectedItem struct {
// FriendlyName - The friendly name of the VM represented by this backup item.
FriendlyName *string `json:"friendlyName,omitempty"`
// VirtualMachineID - The fully qualified Resource Manager ID of the virtual machine represented by this item.
VirtualMachineID *string `json:"virtualMachineId,omitempty"`
// ProtectionStatus - The backup status of this backup item.
ProtectionStatus *string `json:"protectionStatus,omitempty"`
// ProtectionState - The backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
ProtectionState ProtectionState `json:"protectionState,omitempty"`
// LastBackupStatus - The last backup operation status. The possible values are: Healthy or Unhealthy.
LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
// LastBackupTime - The timestamp of the last backup operation for this backup item.
LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
// ExtendedInfo - Additional information for this backup item.
ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
// BackupManagementType - The backup management type associated with the backup item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL'
BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
// WorkloadType - The workload type for this item. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSQLDb', 'SQLDB', 'Exchange', 'Sharepoint', 'DPMUnknown'
WorkloadType DataSourceType `json:"workloadType,omitempty"`
// SourceResourceID - The ID of the resource to be backed up.
SourceResourceID *string `json:"sourceResourceId,omitempty"`
// PolicyID - The ID of the backup policy associated with this backup item.
PolicyID *string `json:"policyId,omitempty"`
// LastRecoveryPoint - The timestamp when the most recent backup copy was created for this backup item.
LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines'
ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectedItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines
objectMap := make(map[string]interface{})
if aisccvpi.FriendlyName != nil {
objectMap["friendlyName"] = aisccvpi.FriendlyName
}
if aisccvpi.VirtualMachineID != nil {
objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
}
if aisccvpi.ProtectionStatus != nil {
objectMap["protectionStatus"] = aisccvpi.ProtectionStatus
}
if aisccvpi.ProtectionState != "" {
objectMap["protectionState"] = aisccvpi.ProtectionState
}
if aisccvpi.LastBackupStatus != nil {
objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus
}
if aisccvpi.LastBackupTime != nil {
objectMap["lastBackupTime"] = aisccvpi.LastBackupTime
}
if aisccvpi.ExtendedInfo != nil {
objectMap["extendedInfo"] = aisccvpi.ExtendedInfo
}
if aisccvpi.BackupManagementType != "" {
objectMap["backupManagementType"] = aisccvpi.BackupManagementType
}
if aisccvpi.WorkloadType != "" {
objectMap["workloadType"] = aisccvpi.WorkloadType
}
if aisccvpi.SourceResourceID != nil {
objectMap["sourceResourceId"] = aisccvpi.SourceResourceID
}
if aisccvpi.PolicyID != nil {
objectMap["policyId"] = aisccvpi.PolicyID
}
if aisccvpi.LastRecoveryPoint != nil {
objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint
}
if aisccvpi.ProtectedItemType != "" {
objectMap["protectedItemType"] = aisccvpi.ProtectedItemType
}
return json.Marshal(objectMap)
}
// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
return nil, false
}
// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
return &aisccvpi, true
}
// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
return nil, false
}
// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
return nil, false
}
// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
return nil, false
}
// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
return &aisccvpi, true
}
// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
return nil, false
}
// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
return &aisccvpi, true
}
// AzureIaaSComputeVMContainer iaaS VM workload-specific backup item representing a Resource
// Manager-deployed virtual machine.
type AzureIaaSComputeVMContainer struct {
// VirtualMachineID - The fully qualified Resource Manager URL of the virtual machine represented by this Azure IaaS VM container.
VirtualMachineID *string `json:"virtualMachineId,omitempty"`
// VirtualMachineVersion - Specifies whether the container represents a classic or a Resource Manager-deployed virtual machine.
VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
// ResourceGroup - The resource group name associated with the Recovery Services vault.
ResourceGroup *string `json:"resourceGroup,omitempty"`
// FriendlyName - Friendly name of the container.
FriendlyName *string `json:"friendlyName,omitempty"`
// BackupManagementType - The backup management type for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL'
BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
// RegistrationStatus - The container's registration status with the Recovery Services vault.
RegistrationStatus *string `json:"registrationStatus,omitempty"`
// HealthStatus - The status of the container's health.
HealthStatus *string `json:"healthStatus,omitempty"`
// ContainerType - READ-ONLY; The type assigned to the container. The values to use for each of these properties are:<br/> 1. Compute Azure VM is Microsoft.Compute/virtualMachines<br/> 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines<br/> 3. Windows machines (like Azure Backup Server and DPM) is Windows<br/> 4. Azure SQL instance is AzureSqlContainer.
ContainerType *string `json:"containerType,omitempty"`
// ProtectableObjectType - Possible values include: 'ProtectableObjectTypeProtectionContainer', 'ProtectableObjectTypeAzureSQLContainer', 'ProtectableObjectTypeIaaSVMContainer', 'ProtectableObjectTypeMABWindowsContainer', 'ProtectableObjectTypeMicrosoftComputevirtualMachines', 'ProtectableObjectTypeMicrosoftClassicComputevirtualMachines'
ProtectableObjectType ProtectableObjectType `json:"protectableObjectType,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureIaaSComputeVMContainer.
func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) {
aiscvc.ProtectableObjectType = ProtectableObjectTypeMicrosoftComputevirtualMachines
objectMap := make(map[string]interface{})
if aiscvc.VirtualMachineID != nil {
objectMap["virtualMachineId"] = aiscvc.VirtualMachineID
}
if aiscvc.VirtualMachineVersion != nil {
objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion
}
if aiscvc.ResourceGroup != nil {
objectMap["resourceGroup"] = aiscvc.ResourceGroup
}
if aiscvc.FriendlyName != nil {
objectMap["friendlyName"] = aiscvc.FriendlyName
}
if aiscvc.BackupManagementType != "" {
objectMap["backupManagementType"] = aiscvc.BackupManagementType
}
if aiscvc.RegistrationStatus != nil {
objectMap["registrationStatus"] = aiscvc.RegistrationStatus
}
if aiscvc.HealthStatus != nil {
objectMap["healthStatus"] = aiscvc.HealthStatus
}
if aiscvc.ProtectableObjectType != "" {
objectMap["protectableObjectType"] = aiscvc.ProtectableObjectType
}
return json.Marshal(objectMap)
}
// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
return nil, false
}
// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
return nil, false
}
// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
return &aiscvc, true
}
// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
return nil, false
}
// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
return &aiscvc, true
}
// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
return nil, false
}
// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
return nil, false
}
// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
return &aiscvc, true
}
// AzureIaaSComputeVMProtectableItem iaaS VM workload-specific backup item representing a Resource Manager
// VM.
type AzureIaaSComputeVMProtectableItem struct {
// VirtualMachineID - The fully qualified Resource Manager ID of the virtual machine.
VirtualMachineID *string `json:"virtualMachineId,omitempty"`
// BackupManagementType - The backup management type.
BackupManagementType *string `json:"backupManagementType,omitempty"`
// FriendlyName - The friendly name of the backup item.
FriendlyName *string `json:"friendlyName,omitempty"`
// ProtectionState - The state of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected'
ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeIaaSVMProtectableItem', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines'
ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectableItem.
func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines
objectMap := make(map[string]interface{})
if aiscvpi.VirtualMachineID != nil {
objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
}
if aiscvpi.BackupManagementType != nil {
objectMap["backupManagementType"] = aiscvpi.BackupManagementType
}
if aiscvpi.FriendlyName != nil {
objectMap["friendlyName"] = aiscvpi.FriendlyName
}
if aiscvpi.ProtectionState != "" {
objectMap["protectionState"] = aiscvpi.ProtectionState
}
if aiscvpi.ProtectableItemType != "" {
objectMap["protectableItemType"] = aiscvpi.ProtectableItemType
}
return json.Marshal(objectMap)
}
// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
return nil, false
}
// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
return &aiscvpi, true
}
// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
return &aiscvpi, true
}
// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
return nil, false
}
// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
return nil, false
}
// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
return &aiscvpi, true
}
// AzureIaaSComputeVMProtectedItem iaaS VM workload-specific backup item representing the Resource Manager
// VM.
type AzureIaaSComputeVMProtectedItem struct {
// FriendlyName - The friendly name of the VM represented by this backup item.
FriendlyName *string `json:"friendlyName,omitempty"`
// VirtualMachineID - The fully qualified Resource Manager ID of the virtual machine represented by this item.
VirtualMachineID *string `json:"virtualMachineId,omitempty"`
// ProtectionStatus - The backup status of this backup item.
ProtectionStatus *string `json:"protectionStatus,omitempty"`
// ProtectionState - The backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
ProtectionState ProtectionState `json:"protectionState,omitempty"`
// LastBackupStatus - The last backup operation status. The possible values are: Healthy or Unhealthy.
LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
// LastBackupTime - The timestamp of the last backup operation for this backup item.
LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
// ExtendedInfo - Additional information for this backup item.
ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
// BackupManagementType - The backup management type associated with the backup item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL'
BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
// WorkloadType - The workload type for this item. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSQLDb', 'SQLDB', 'Exchange', 'Sharepoint', 'DPMUnknown'
WorkloadType DataSourceType `json:"workloadType,omitempty"`
// SourceResourceID - The ID of the resource to be backed up.
SourceResourceID *string `json:"sourceResourceId,omitempty"`
// PolicyID - The ID of the backup policy associated with this backup item.
PolicyID *string `json:"policyId,omitempty"`
// LastRecoveryPoint - The timestamp when the most recent backup copy was created for this backup item.
LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines'
ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectedItem.
func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines
objectMap := make(map[string]interface{})
if aiscvpi.FriendlyName != nil {
objectMap["friendlyName"] = aiscvpi.FriendlyName
}
if aiscvpi.VirtualMachineID != nil {
objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
}
if aiscvpi.ProtectionStatus != nil {
objectMap["protectionStatus"] = aiscvpi.ProtectionStatus
}
if aiscvpi.ProtectionState != "" {
objectMap["protectionState"] = aiscvpi.ProtectionState
}
if aiscvpi.LastBackupStatus != nil {
objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus
}
if aiscvpi.LastBackupTime != nil {
objectMap["lastBackupTime"] = aiscvpi.LastBackupTime
}
if aiscvpi.ExtendedInfo != nil {
objectMap["extendedInfo"] = aiscvpi.ExtendedInfo
}
if aiscvpi.BackupManagementType != "" {
objectMap["backupManagementType"] = aiscvpi.BackupManagementType
}
if aiscvpi.WorkloadType != "" {
objectMap["workloadType"] = aiscvpi.WorkloadType
}
if aiscvpi.SourceResourceID != nil {
objectMap["sourceResourceId"] = aiscvpi.SourceResourceID
}
if aiscvpi.PolicyID != nil {
objectMap["policyId"] = aiscvpi.PolicyID
}
if aiscvpi.LastRecoveryPoint != nil {
objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint
}
if aiscvpi.ProtectedItemType != "" {
objectMap["protectedItemType"] = aiscvpi.ProtectedItemType
}
return json.Marshal(objectMap)
}
// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
return nil, false
}
// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
return &aiscvpi, true
}
// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
return nil, false
}
// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
return nil, false
}
// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
return &aiscvpi, true
}
// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
return nil, false
}
// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
return nil, false
}
// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
return &aiscvpi, true
}
// AzureIaaSVMErrorInfo azure IaaS VM workload-specific error information.
type AzureIaaSVMErrorInfo struct {
// ErrorCode - Error code.
ErrorCode *int32 `json:"errorCode,omitempty"`
// ErrorTitle - Title: typically, the entity associated the error.
ErrorTitle *string `json:"errorTitle,omitempty"`
// ErrorString - Localized error string.
ErrorString *string `json:"errorString,omitempty"`
// Recommendations - List of localized recommendations for the error string.
Recommendations *[]string `json:"recommendations,omitempty"`
}
// AzureIaaSVMJob the Azure IaaS VM workload-specific job object.
type AzureIaaSVMJob struct {
// Duration - The time that elapsed during the execution of this job.
Duration *string `json:"duration,omitempty"`
// ActionsInfo - Gets or sets the state, or actions, applicable on this job. Examples of the actions are: Cancel or Retry.
ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
// ErrorDetails - Error details about this job.
ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"`
// VirtualMachineVersion - Specifies whether the backup item is a Classic VM or a Resource Manager VM.
VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
// ExtendedInfo - Additional information for this job.
ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"`
// EntityFriendlyName - The friendly name of the entity on which the current job is executing.
EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
// BackupManagementType - The backup management type for the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL'
BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
// Operation - The operation name.
Operation *string `json:"operation,omitempty"`
// Status - The job status.
Status *string `json:"status,omitempty"`
// StartTime - The start time.
StartTime *date.Time `json:"startTime,omitempty"`
// EndTime - The end time.
EndTime *date.Time `json:"endTime,omitempty"`
// ActivityID - ActivityId of job.
ActivityID *string `json:"activityId,omitempty"`
// JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeDpmJob', 'JobTypeMabJob'
JobType JobType `json:"jobType,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureIaaSVMJob.
func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) {
aisj.JobType = JobTypeAzureIaaSVMJob
objectMap := make(map[string]interface{})
if aisj.Duration != nil {
objectMap["duration"] = aisj.Duration
}
if aisj.ActionsInfo != nil {
objectMap["actionsInfo"] = aisj.ActionsInfo
}
if aisj.ErrorDetails != nil {
objectMap["errorDetails"] = aisj.ErrorDetails
}
if aisj.VirtualMachineVersion != nil {
objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion
}
if aisj.ExtendedInfo != nil {
objectMap["extendedInfo"] = aisj.ExtendedInfo
}
if aisj.EntityFriendlyName != nil {
objectMap["entityFriendlyName"] = aisj.EntityFriendlyName
}
if aisj.BackupManagementType != "" {
objectMap["backupManagementType"] = aisj.BackupManagementType
}
if aisj.Operation != nil {
objectMap["operation"] = aisj.Operation
}
if aisj.Status != nil {
objectMap["status"] = aisj.Status
}
if aisj.StartTime != nil {
objectMap["startTime"] = aisj.StartTime
}
if aisj.EndTime != nil {
objectMap["endTime"] = aisj.EndTime
}
if aisj.ActivityID != nil {
objectMap["activityId"] = aisj.ActivityID
}
if aisj.JobType != "" {
objectMap["jobType"] = aisj.JobType
}
return json.Marshal(objectMap)
}
// AsAzureIaaSVMJob is the BasicJob implementation for AzureIaaSVMJob.
func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
return &aisj, true
}
// AsDpmJob is the BasicJob implementation for AzureIaaSVMJob.
func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) {
return nil, false
}
// AsMabJob is the BasicJob implementation for AzureIaaSVMJob.
func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) {
return nil, false
}
// AsJob is the BasicJob implementation for AzureIaaSVMJob.
func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) {
return nil, false
}
// AsBasicJob is the BasicJob implementation for AzureIaaSVMJob.
func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) {
return &aisj, true
}
// AzureIaaSVMJobExtendedInfo additional information for the Azure IaaS VM workload-specific job.
type AzureIaaSVMJobExtendedInfo struct {
// TasksList - List of tasks associated with this job.
TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"`
// PropertyBag - Job properties.
PropertyBag map[string]*string `json:"propertyBag"`
// ProgressPercentage - Indicates progress of the job. Null if it has not started or completed.
ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
// DynamicErrorMessage - Non-localized error message for job execution.
DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureIaaSVMJobExtendedInfo.
func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if aisjei.TasksList != nil {
objectMap["tasksList"] = aisjei.TasksList
}
if aisjei.PropertyBag != nil {
objectMap["propertyBag"] = aisjei.PropertyBag
}
if aisjei.ProgressPercentage != nil {
objectMap["progressPercentage"] = aisjei.ProgressPercentage
}
if aisjei.DynamicErrorMessage != nil {
objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage
}
return json.Marshal(objectMap)
}
// AzureIaaSVMJobTaskDetails azure IaaS VM workload-specific job task details.
type AzureIaaSVMJobTaskDetails struct {
// TaskID - The task display name.
TaskID *string `json:"taskId,omitempty"`
// StartTime - The start time.
StartTime *date.Time `json:"startTime,omitempty"`
// EndTime - The end time.
EndTime *date.Time `json:"endTime,omitempty"`
// InstanceID - The instance ID.
InstanceID *string `json:"instanceId,omitempty"`
// Duration - The time elapsed for the task.
Duration *string `json:"duration,omitempty"`
// Status - The status.
Status *string `json:"status,omitempty"`
// ProgressPercentage - The progress of the task, as a percentage.
ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
}
// BasicAzureIaaSVMProtectedItem this Azure VM workload-specific (also known as IaaS VM workload-specific) backup item
// has been backed up.
type BasicAzureIaaSVMProtectedItem interface {
AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
}
// AzureIaaSVMProtectedItem this Azure VM workload-specific (also known as IaaS VM workload-specific) backup
// item has been backed up.
type AzureIaaSVMProtectedItem struct {
// FriendlyName - The friendly name of the VM represented by this backup item.
FriendlyName *string `json:"friendlyName,omitempty"`
// VirtualMachineID - The fully qualified Resource Manager ID of the virtual machine represented by this item.
VirtualMachineID *string `json:"virtualMachineId,omitempty"`
// ProtectionStatus - The backup status of this backup item.
ProtectionStatus *string `json:"protectionStatus,omitempty"`
// ProtectionState - The backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
ProtectionState ProtectionState `json:"protectionState,omitempty"`
// LastBackupStatus - The last backup operation status. The possible values are: Healthy or Unhealthy.
LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
// LastBackupTime - The timestamp of the last backup operation for this backup item.
LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
// ExtendedInfo - Additional information for this backup item.
ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
// BackupManagementType - The backup management type associated with the backup item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL'
BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
// WorkloadType - The workload type for this item. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSQLDb', 'SQLDB', 'Exchange', 'Sharepoint', 'DPMUnknown'
WorkloadType DataSourceType `json:"workloadType,omitempty"`
// SourceResourceID - The ID of the resource to be backed up.
SourceResourceID *string `json:"sourceResourceId,omitempty"`
// PolicyID - The ID of the backup policy associated with this backup item.
PolicyID *string `json:"policyId,omitempty"`
// LastRecoveryPoint - The timestamp when the most recent backup copy was created for this backup item.
LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines'
ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
}
func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) {
var m map[string]interface{}
err := json.Unmarshal(body, &m)
if err != nil {
return nil, err
}
switch m["protectedItemType"] {
case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
var aiscvpi AzureIaaSComputeVMProtectedItem
err := json.Unmarshal(body, &aiscvpi)
return aiscvpi, err
case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
var aisccvpi AzureIaaSClassicComputeVMProtectedItem
err := json.Unmarshal(body, &aisccvpi)
return aisccvpi, err
default:
var aispi AzureIaaSVMProtectedItem
err := json.Unmarshal(body, &aispi)
return aispi, err
}
}
func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) {
var rawMessages []*json.RawMessage
err := json.Unmarshal(body, &rawMessages)
if err != nil {
return nil, err
}
aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages))
for index, rawMessage := range rawMessages {
aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage)
if err != nil {
return nil, err
}
aispiArray[index] = aispi
}
return aispiArray, nil
}
// MarshalJSON is the custom marshaler for AzureIaaSVMProtectedItem.
func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) {
aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem
objectMap := make(map[string]interface{})
if aispi.FriendlyName != nil {
objectMap["friendlyName"] = aispi.FriendlyName
}
if aispi.VirtualMachineID != nil {
objectMap["virtualMachineId"] = aispi.VirtualMachineID
}
if aispi.ProtectionStatus != nil {
objectMap["protectionStatus"] = aispi.ProtectionStatus
}
if aispi.ProtectionState != "" {
objectMap["protectionState"] = aispi.ProtectionState
}
if aispi.LastBackupStatus != nil {
objectMap["lastBackupStatus"] = aispi.LastBackupStatus
}
if aispi.LastBackupTime != nil {
objectMap["lastBackupTime"] = aispi.LastBackupTime
}
if aispi.ExtendedInfo != nil {
objectMap["extendedInfo"] = aispi.ExtendedInfo
}
if aispi.BackupManagementType != "" {
objectMap["backupManagementType"] = aispi.BackupManagementType
}
if aispi.WorkloadType != "" {
objectMap["workloadType"] = aispi.WorkloadType
}
if aispi.SourceResourceID != nil {
objectMap["sourceResourceId"] = aispi.SourceResourceID
}
if aispi.PolicyID != nil {
objectMap["policyId"] = aispi.PolicyID
}
if aispi.LastRecoveryPoint != nil {
objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint
}
if aispi.ProtectedItemType != "" {
objectMap["protectedItemType"] = aispi.ProtectedItemType
}
return json.Marshal(objectMap)
}
// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
return &aispi, true
}
// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
return &aispi, true
}
// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
return nil, false
}
// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
return nil, false
}
// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
return nil, false
}
// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
return nil, false
}
// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
return nil, false
}
// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
return &aispi, true
}
// AzureIaaSVMProtectedItemExtendedInfo additional information for the Azure VM (also known as IaaS
// VM)-specific backup item.
type AzureIaaSVMProtectedItemExtendedInfo struct {
// OldestRecoveryPoint - The oldest backup copy available for this backup item.
OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
// RecoveryPointCount - The number of backup copies available for this backup item.
RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
// PolicyInconsistent - Specifies if the backup policy associated with the backup item is inconsistent.
PolicyInconsistent *bool `json:"policyInconsistent,omitempty"`
}
// AzureIaaSVMProtectionPolicy azure VM (also known as IaaS VM) workload-specific backup policy.
type AzureIaaSVMProtectionPolicy struct {
// SchedulePolicy - The backup schedule specified as part of backup policy.
SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
// RetentionPolicy - The retention policy with the details on backup copy retention ranges.
RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
// ProtectedItemsCount - The number of items associated with this policy.
ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`