1 package backup
2
3
4
5
6
7
8
9 import (
10 "context"
11 "encoding/json"
12 "github.com/Azure/go-autorest/autorest"
13 "github.com/Azure/go-autorest/autorest/date"
14 "github.com/Azure/go-autorest/autorest/to"
15 "github.com/Azure/go-autorest/tracing"
16 "net/http"
17 )
18
19
20 const fqdn = "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-06-15/backup"
21
22
23 type AzureBackupGoalFeatureSupportRequest struct {
24
25 FeatureType FeatureType `json:"featureType,omitempty"`
26 }
27
28
29 func (abgfsr AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) {
30 abgfsr.FeatureType = FeatureTypeAzureBackupGoals
31 objectMap := make(map[string]interface{})
32 if abgfsr.FeatureType != "" {
33 objectMap["featureType"] = abgfsr.FeatureType
34 }
35 return json.Marshal(objectMap)
36 }
37
38
39 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
40 return &abgfsr, true
41 }
42
43
44 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
45 return nil, false
46 }
47
48
49 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
50 return nil, false
51 }
52
53
54 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
55 return &abgfsr, true
56 }
57
58
59 type AzureBackupServerContainer struct {
60
61 CanReRegister *bool `json:"canReRegister,omitempty"`
62
63 ContainerID *string `json:"containerId,omitempty"`
64
65 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
66
67 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
68
69 DpmServers *[]string `json:"dpmServers,omitempty"`
70
71 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
72
73 ProtectionStatus *string `json:"protectionStatus,omitempty"`
74
75 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
76
77 FriendlyName *string `json:"friendlyName,omitempty"`
78
79 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
80
81 RegistrationStatus *string `json:"registrationStatus,omitempty"`
82
83 HealthStatus *string `json:"healthStatus,omitempty"`
84
85 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
86 }
87
88
89 func (absc AzureBackupServerContainer) MarshalJSON() ([]byte, error) {
90 absc.ContainerType = ContainerTypeAzureBackupServerContainer1
91 objectMap := make(map[string]interface{})
92 if absc.CanReRegister != nil {
93 objectMap["canReRegister"] = absc.CanReRegister
94 }
95 if absc.ContainerID != nil {
96 objectMap["containerId"] = absc.ContainerID
97 }
98 if absc.ProtectedItemCount != nil {
99 objectMap["protectedItemCount"] = absc.ProtectedItemCount
100 }
101 if absc.DpmAgentVersion != nil {
102 objectMap["dpmAgentVersion"] = absc.DpmAgentVersion
103 }
104 if absc.DpmServers != nil {
105 objectMap["dpmServers"] = absc.DpmServers
106 }
107 if absc.UpgradeAvailable != nil {
108 objectMap["upgradeAvailable"] = absc.UpgradeAvailable
109 }
110 if absc.ProtectionStatus != nil {
111 objectMap["protectionStatus"] = absc.ProtectionStatus
112 }
113 if absc.ExtendedInfo != nil {
114 objectMap["extendedInfo"] = absc.ExtendedInfo
115 }
116 if absc.FriendlyName != nil {
117 objectMap["friendlyName"] = absc.FriendlyName
118 }
119 if absc.BackupManagementType != "" {
120 objectMap["backupManagementType"] = absc.BackupManagementType
121 }
122 if absc.RegistrationStatus != nil {
123 objectMap["registrationStatus"] = absc.RegistrationStatus
124 }
125 if absc.HealthStatus != nil {
126 objectMap["healthStatus"] = absc.HealthStatus
127 }
128 if absc.ContainerType != "" {
129 objectMap["containerType"] = absc.ContainerType
130 }
131 return json.Marshal(objectMap)
132 }
133
134
135 func (absc AzureBackupServerContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
136 return &absc, true
137 }
138
139
140 func (absc AzureBackupServerContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
141 return nil, false
142 }
143
144
145 func (absc AzureBackupServerContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
146 return nil, false
147 }
148
149
150 func (absc AzureBackupServerContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
151 return nil, false
152 }
153
154
155 func (absc AzureBackupServerContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
156 return nil, false
157 }
158
159
160 func (absc AzureBackupServerContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
161 return nil, false
162 }
163
164
165 func (absc AzureBackupServerContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
166 return nil, false
167 }
168
169
170 func (absc AzureBackupServerContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
171 return nil, false
172 }
173
174
175 func (absc AzureBackupServerContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
176 return nil, false
177 }
178
179
180 func (absc AzureBackupServerContainer) AsDpmContainer() (*DpmContainer, bool) {
181 return nil, false
182 }
183
184
185 func (absc AzureBackupServerContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
186 return &absc, true
187 }
188
189
190 func (absc AzureBackupServerContainer) AsGenericContainer() (*GenericContainer, bool) {
191 return nil, false
192 }
193
194
195 func (absc AzureBackupServerContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
196 return nil, false
197 }
198
199
200 func (absc AzureBackupServerContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
201 return nil, false
202 }
203
204
205 func (absc AzureBackupServerContainer) AsMabContainer() (*MabContainer, bool) {
206 return nil, false
207 }
208
209
210 func (absc AzureBackupServerContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
211 return nil, false
212 }
213
214
215 func (absc AzureBackupServerContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
216 return &absc, true
217 }
218
219
220 type AzureBackupServerEngine struct {
221
222 FriendlyName *string `json:"friendlyName,omitempty"`
223
224 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
225
226 RegistrationStatus *string `json:"registrationStatus,omitempty"`
227
228 BackupEngineState *string `json:"backupEngineState,omitempty"`
229
230 HealthStatus *string `json:"healthStatus,omitempty"`
231
232 CanReRegister *bool `json:"canReRegister,omitempty"`
233
234 BackupEngineID *string `json:"backupEngineId,omitempty"`
235
236 DpmVersion *string `json:"dpmVersion,omitempty"`
237
238 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
239
240 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
241
242 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
243
244 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
245
246 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
247 }
248
249
250 func (abse AzureBackupServerEngine) MarshalJSON() ([]byte, error) {
251 abse.BackupEngineType = BackupEngineTypeAzureBackupServerEngine
252 objectMap := make(map[string]interface{})
253 if abse.FriendlyName != nil {
254 objectMap["friendlyName"] = abse.FriendlyName
255 }
256 if abse.BackupManagementType != "" {
257 objectMap["backupManagementType"] = abse.BackupManagementType
258 }
259 if abse.RegistrationStatus != nil {
260 objectMap["registrationStatus"] = abse.RegistrationStatus
261 }
262 if abse.BackupEngineState != nil {
263 objectMap["backupEngineState"] = abse.BackupEngineState
264 }
265 if abse.HealthStatus != nil {
266 objectMap["healthStatus"] = abse.HealthStatus
267 }
268 if abse.CanReRegister != nil {
269 objectMap["canReRegister"] = abse.CanReRegister
270 }
271 if abse.BackupEngineID != nil {
272 objectMap["backupEngineId"] = abse.BackupEngineID
273 }
274 if abse.DpmVersion != nil {
275 objectMap["dpmVersion"] = abse.DpmVersion
276 }
277 if abse.AzureBackupAgentVersion != nil {
278 objectMap["azureBackupAgentVersion"] = abse.AzureBackupAgentVersion
279 }
280 if abse.IsAzureBackupAgentUpgradeAvailable != nil {
281 objectMap["isAzureBackupAgentUpgradeAvailable"] = abse.IsAzureBackupAgentUpgradeAvailable
282 }
283 if abse.IsDpmUpgradeAvailable != nil {
284 objectMap["isDpmUpgradeAvailable"] = abse.IsDpmUpgradeAvailable
285 }
286 if abse.ExtendedInfo != nil {
287 objectMap["extendedInfo"] = abse.ExtendedInfo
288 }
289 if abse.BackupEngineType != "" {
290 objectMap["backupEngineType"] = abse.BackupEngineType
291 }
292 return json.Marshal(objectMap)
293 }
294
295
296 func (abse AzureBackupServerEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
297 return &abse, true
298 }
299
300
301 func (abse AzureBackupServerEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
302 return nil, false
303 }
304
305
306 func (abse AzureBackupServerEngine) AsEngineBase() (*EngineBase, bool) {
307 return nil, false
308 }
309
310
311 func (abse AzureBackupServerEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
312 return &abse, true
313 }
314
315
316 type AzureFileShareBackupRequest struct {
317
318 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
319
320 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
321 }
322
323
324 func (afsbr AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) {
325 afsbr.ObjectType = ObjectTypeAzureFileShareBackupRequest
326 objectMap := make(map[string]interface{})
327 if afsbr.RecoveryPointExpiryTimeInUTC != nil {
328 objectMap["recoveryPointExpiryTimeInUTC"] = afsbr.RecoveryPointExpiryTimeInUTC
329 }
330 if afsbr.ObjectType != "" {
331 objectMap["objectType"] = afsbr.ObjectType
332 }
333 return json.Marshal(objectMap)
334 }
335
336
337 func (afsbr AzureFileShareBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
338 return &afsbr, true
339 }
340
341
342 func (afsbr AzureFileShareBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
343 return nil, false
344 }
345
346
347 func (afsbr AzureFileShareBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
348 return nil, false
349 }
350
351
352 func (afsbr AzureFileShareBackupRequest) AsRequest() (*Request, bool) {
353 return nil, false
354 }
355
356
357 func (afsbr AzureFileShareBackupRequest) AsBasicRequest() (BasicRequest, bool) {
358 return &afsbr, true
359 }
360
361
362 type AzureFileShareProtectableItem struct {
363
364 ParentContainerFabricID *string `json:"parentContainerFabricId,omitempty"`
365
366 ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"`
367
368 AzureFileShareType AzureFileShareType `json:"azureFileShareType,omitempty"`
369
370 BackupManagementType *string `json:"backupManagementType,omitempty"`
371
372 WorkloadType *string `json:"workloadType,omitempty"`
373
374 FriendlyName *string `json:"friendlyName,omitempty"`
375
376 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
377
378 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
379 }
380
381
382 func (afspi AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) {
383 afspi.ProtectableItemType = ProtectableItemTypeAzureFileShare
384 objectMap := make(map[string]interface{})
385 if afspi.ParentContainerFabricID != nil {
386 objectMap["parentContainerFabricId"] = afspi.ParentContainerFabricID
387 }
388 if afspi.ParentContainerFriendlyName != nil {
389 objectMap["parentContainerFriendlyName"] = afspi.ParentContainerFriendlyName
390 }
391 if afspi.AzureFileShareType != "" {
392 objectMap["azureFileShareType"] = afspi.AzureFileShareType
393 }
394 if afspi.BackupManagementType != nil {
395 objectMap["backupManagementType"] = afspi.BackupManagementType
396 }
397 if afspi.WorkloadType != nil {
398 objectMap["workloadType"] = afspi.WorkloadType
399 }
400 if afspi.FriendlyName != nil {
401 objectMap["friendlyName"] = afspi.FriendlyName
402 }
403 if afspi.ProtectionState != "" {
404 objectMap["protectionState"] = afspi.ProtectionState
405 }
406 if afspi.ProtectableItemType != "" {
407 objectMap["protectableItemType"] = afspi.ProtectableItemType
408 }
409 return json.Marshal(objectMap)
410 }
411
412
413 func (afspi AzureFileShareProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
414 return &afspi, true
415 }
416
417
418 func (afspi AzureFileShareProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
419 return nil, false
420 }
421
422
423 func (afspi AzureFileShareProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
424 return nil, false
425 }
426
427
428 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
429 return nil, false
430 }
431
432
433 func (afspi AzureFileShareProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
434 return nil, false
435 }
436
437
438 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
439 return nil, false
440 }
441
442
443 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
444 return nil, false
445 }
446
447
448 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
449 return nil, false
450 }
451
452
453 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
454 return nil, false
455 }
456
457
458 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
459 return nil, false
460 }
461
462
463 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
464 return nil, false
465 }
466
467
468 func (afspi AzureFileShareProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
469 return nil, false
470 }
471
472
473 func (afspi AzureFileShareProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
474 return nil, false
475 }
476
477
478 func (afspi AzureFileShareProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
479 return nil, false
480 }
481
482
483 func (afspi AzureFileShareProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
484 return &afspi, true
485 }
486
487
488 type AzureFileshareProtectedItem struct {
489
490 FriendlyName *string `json:"friendlyName,omitempty"`
491
492 ProtectionStatus *string `json:"protectionStatus,omitempty"`
493
494 ProtectionState ProtectionState `json:"protectionState,omitempty"`
495
496 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
497
498 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
499
500 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
501
502 ExtendedInfo *AzureFileshareProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
503
504 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
505
506 WorkloadType DataSourceType `json:"workloadType,omitempty"`
507
508 ContainerName *string `json:"containerName,omitempty"`
509
510 SourceResourceID *string `json:"sourceResourceId,omitempty"`
511
512 PolicyID *string `json:"policyId,omitempty"`
513
514 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
515
516 BackupSetName *string `json:"backupSetName,omitempty"`
517
518 CreateMode CreateMode `json:"createMode,omitempty"`
519
520 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
521
522 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
523
524 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
525
526 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
527
528 IsRehydrate *bool `json:"isRehydrate,omitempty"`
529
530 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
531 }
532
533
534 func (afpi AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) {
535 afpi.ProtectedItemType = ProtectedItemTypeAzureFileShareProtectedItem
536 objectMap := make(map[string]interface{})
537 if afpi.FriendlyName != nil {
538 objectMap["friendlyName"] = afpi.FriendlyName
539 }
540 if afpi.ProtectionStatus != nil {
541 objectMap["protectionStatus"] = afpi.ProtectionStatus
542 }
543 if afpi.ProtectionState != "" {
544 objectMap["protectionState"] = afpi.ProtectionState
545 }
546 if afpi.LastBackupStatus != nil {
547 objectMap["lastBackupStatus"] = afpi.LastBackupStatus
548 }
549 if afpi.LastBackupTime != nil {
550 objectMap["lastBackupTime"] = afpi.LastBackupTime
551 }
552 if afpi.KpisHealths != nil {
553 objectMap["kpisHealths"] = afpi.KpisHealths
554 }
555 if afpi.ExtendedInfo != nil {
556 objectMap["extendedInfo"] = afpi.ExtendedInfo
557 }
558 if afpi.BackupManagementType != "" {
559 objectMap["backupManagementType"] = afpi.BackupManagementType
560 }
561 if afpi.WorkloadType != "" {
562 objectMap["workloadType"] = afpi.WorkloadType
563 }
564 if afpi.ContainerName != nil {
565 objectMap["containerName"] = afpi.ContainerName
566 }
567 if afpi.SourceResourceID != nil {
568 objectMap["sourceResourceId"] = afpi.SourceResourceID
569 }
570 if afpi.PolicyID != nil {
571 objectMap["policyId"] = afpi.PolicyID
572 }
573 if afpi.LastRecoveryPoint != nil {
574 objectMap["lastRecoveryPoint"] = afpi.LastRecoveryPoint
575 }
576 if afpi.BackupSetName != nil {
577 objectMap["backupSetName"] = afpi.BackupSetName
578 }
579 if afpi.CreateMode != "" {
580 objectMap["createMode"] = afpi.CreateMode
581 }
582 if afpi.DeferredDeleteTimeInUTC != nil {
583 objectMap["deferredDeleteTimeInUTC"] = afpi.DeferredDeleteTimeInUTC
584 }
585 if afpi.IsScheduledForDeferredDelete != nil {
586 objectMap["isScheduledForDeferredDelete"] = afpi.IsScheduledForDeferredDelete
587 }
588 if afpi.DeferredDeleteTimeRemaining != nil {
589 objectMap["deferredDeleteTimeRemaining"] = afpi.DeferredDeleteTimeRemaining
590 }
591 if afpi.IsDeferredDeleteScheduleUpcoming != nil {
592 objectMap["isDeferredDeleteScheduleUpcoming"] = afpi.IsDeferredDeleteScheduleUpcoming
593 }
594 if afpi.IsRehydrate != nil {
595 objectMap["isRehydrate"] = afpi.IsRehydrate
596 }
597 if afpi.ProtectedItemType != "" {
598 objectMap["protectedItemType"] = afpi.ProtectedItemType
599 }
600 return json.Marshal(objectMap)
601 }
602
603
604 func (afpi AzureFileshareProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
605 return &afpi, true
606 }
607
608
609 func (afpi AzureFileshareProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
610 return nil, false
611 }
612
613
614 func (afpi AzureFileshareProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
615 return nil, false
616 }
617
618
619 func (afpi AzureFileshareProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
620 return nil, false
621 }
622
623
624 func (afpi AzureFileshareProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
625 return nil, false
626 }
627
628
629 func (afpi AzureFileshareProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
630 return nil, false
631 }
632
633
634 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
635 return nil, false
636 }
637
638
639 func (afpi AzureFileshareProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
640 return nil, false
641 }
642
643
644 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
645 return nil, false
646 }
647
648
649 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
650 return nil, false
651 }
652
653
654 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
655 return nil, false
656 }
657
658
659 func (afpi AzureFileshareProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
660 return nil, false
661 }
662
663
664 func (afpi AzureFileshareProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
665 return nil, false
666 }
667
668
669 func (afpi AzureFileshareProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
670 return nil, false
671 }
672
673
674 func (afpi AzureFileshareProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
675 return nil, false
676 }
677
678
679 func (afpi AzureFileshareProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
680 return &afpi, true
681 }
682
683
684 type AzureFileshareProtectedItemExtendedInfo struct {
685
686 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
687
688 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
689
690 PolicyState *string `json:"policyState,omitempty"`
691
692 ResourceState *string `json:"resourceState,omitempty"`
693
694 ResourceStateSyncTime *date.Time `json:"resourceStateSyncTime,omitempty"`
695 }
696
697
698 func (afpiei AzureFileshareProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
699 objectMap := make(map[string]interface{})
700 if afpiei.OldestRecoveryPoint != nil {
701 objectMap["oldestRecoveryPoint"] = afpiei.OldestRecoveryPoint
702 }
703 if afpiei.RecoveryPointCount != nil {
704 objectMap["recoveryPointCount"] = afpiei.RecoveryPointCount
705 }
706 if afpiei.PolicyState != nil {
707 objectMap["policyState"] = afpiei.PolicyState
708 }
709 return json.Marshal(objectMap)
710 }
711
712
713 type AzureFileShareProtectionPolicy struct {
714
715 WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
716
717 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
718
719 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
720
721 TimeZone *string `json:"timeZone,omitempty"`
722
723 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
724
725 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
726 }
727
728
729 func (afspp AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) {
730 afspp.BackupManagementType = BackupManagementTypeAzureStorage
731 objectMap := make(map[string]interface{})
732 if afspp.WorkLoadType != "" {
733 objectMap["workLoadType"] = afspp.WorkLoadType
734 }
735 objectMap["schedulePolicy"] = afspp.SchedulePolicy
736 objectMap["retentionPolicy"] = afspp.RetentionPolicy
737 if afspp.TimeZone != nil {
738 objectMap["timeZone"] = afspp.TimeZone
739 }
740 if afspp.ProtectedItemsCount != nil {
741 objectMap["protectedItemsCount"] = afspp.ProtectedItemsCount
742 }
743 if afspp.BackupManagementType != "" {
744 objectMap["backupManagementType"] = afspp.BackupManagementType
745 }
746 return json.Marshal(objectMap)
747 }
748
749
750 func (afspp AzureFileShareProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
751 return nil, false
752 }
753
754
755 func (afspp AzureFileShareProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
756 return &afspp, true
757 }
758
759
760 func (afspp AzureFileShareProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
761 return nil, false
762 }
763
764
765 func (afspp AzureFileShareProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
766 return nil, false
767 }
768
769
770 func (afspp AzureFileShareProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
771 return nil, false
772 }
773
774
775 func (afspp AzureFileShareProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
776 return nil, false
777 }
778
779
780 func (afspp AzureFileShareProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
781 return nil, false
782 }
783
784
785 func (afspp AzureFileShareProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
786 return &afspp, true
787 }
788
789
790 func (afspp *AzureFileShareProtectionPolicy) UnmarshalJSON(body []byte) error {
791 var m map[string]*json.RawMessage
792 err := json.Unmarshal(body, &m)
793 if err != nil {
794 return err
795 }
796 for k, v := range m {
797 switch k {
798 case "workLoadType":
799 if v != nil {
800 var workLoadType WorkloadType
801 err = json.Unmarshal(*v, &workLoadType)
802 if err != nil {
803 return err
804 }
805 afspp.WorkLoadType = workLoadType
806 }
807 case "schedulePolicy":
808 if v != nil {
809 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
810 if err != nil {
811 return err
812 }
813 afspp.SchedulePolicy = schedulePolicy
814 }
815 case "retentionPolicy":
816 if v != nil {
817 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
818 if err != nil {
819 return err
820 }
821 afspp.RetentionPolicy = retentionPolicy
822 }
823 case "timeZone":
824 if v != nil {
825 var timeZone string
826 err = json.Unmarshal(*v, &timeZone)
827 if err != nil {
828 return err
829 }
830 afspp.TimeZone = &timeZone
831 }
832 case "protectedItemsCount":
833 if v != nil {
834 var protectedItemsCount int32
835 err = json.Unmarshal(*v, &protectedItemsCount)
836 if err != nil {
837 return err
838 }
839 afspp.ProtectedItemsCount = &protectedItemsCount
840 }
841 case "backupManagementType":
842 if v != nil {
843 var backupManagementType ManagementTypeBasicProtectionPolicy
844 err = json.Unmarshal(*v, &backupManagementType)
845 if err != nil {
846 return err
847 }
848 afspp.BackupManagementType = backupManagementType
849 }
850 }
851 }
852
853 return nil
854 }
855
856
857
858 type AzureFileShareProvisionILRRequest struct {
859
860 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
861
862 SourceResourceID *string `json:"sourceResourceId,omitempty"`
863
864 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
865 }
866
867
868 func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) {
869 afspir.ObjectType = ObjectTypeAzureFileShareProvisionILRRequest
870 objectMap := make(map[string]interface{})
871 if afspir.RecoveryPointID != nil {
872 objectMap["recoveryPointId"] = afspir.RecoveryPointID
873 }
874 if afspir.SourceResourceID != nil {
875 objectMap["sourceResourceId"] = afspir.SourceResourceID
876 }
877 if afspir.ObjectType != "" {
878 objectMap["objectType"] = afspir.ObjectType
879 }
880 return json.Marshal(objectMap)
881 }
882
883
884 func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
885 return &afspir, true
886 }
887
888
889 func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
890 return nil, false
891 }
892
893
894 func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) {
895 return nil, false
896 }
897
898
899 func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
900 return &afspir, true
901 }
902
903
904 type AzureFileShareRecoveryPoint struct {
905
906 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
907
908 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
909
910 FileShareSnapshotURI *string `json:"fileShareSnapshotUri,omitempty"`
911
912 RecoveryPointSizeInGB *int32 `json:"recoveryPointSizeInGB,omitempty"`
913
914 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
915 }
916
917
918 func (afsrp AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) {
919 afsrp.ObjectType = ObjectTypeAzureFileShareRecoveryPoint
920 objectMap := make(map[string]interface{})
921 if afsrp.ObjectType != "" {
922 objectMap["objectType"] = afsrp.ObjectType
923 }
924 return json.Marshal(objectMap)
925 }
926
927
928 func (afsrp AzureFileShareRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
929 return &afsrp, true
930 }
931
932
933 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
934 return nil, false
935 }
936
937
938 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
939 return nil, false
940 }
941
942
943 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
944 return nil, false
945 }
946
947
948 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
949 return nil, false
950 }
951
952
953 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
954 return nil, false
955 }
956
957
958 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
959 return nil, false
960 }
961
962
963 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
964 return nil, false
965 }
966
967
968 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
969 return nil, false
970 }
971
972
973 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
974 return nil, false
975 }
976
977
978 func (afsrp AzureFileShareRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
979 return nil, false
980 }
981
982
983 func (afsrp AzureFileShareRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
984 return nil, false
985 }
986
987
988 func (afsrp AzureFileShareRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
989 return nil, false
990 }
991
992
993 func (afsrp AzureFileShareRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
994 return &afsrp, true
995 }
996
997
998 type AzureFileShareRestoreRequest struct {
999
1000 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
1001
1002 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1003
1004 CopyOptions CopyOptions `json:"copyOptions,omitempty"`
1005
1006 RestoreRequestType RestoreRequestType `json:"restoreRequestType,omitempty"`
1007
1008 RestoreFileSpecs *[]RestoreFileSpecs `json:"restoreFileSpecs,omitempty"`
1009
1010 TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"`
1011
1012 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
1013 }
1014
1015
1016 func (afsrr AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) {
1017 afsrr.ObjectType = ObjectTypeAzureFileShareRestoreRequest
1018 objectMap := make(map[string]interface{})
1019 if afsrr.RecoveryType != "" {
1020 objectMap["recoveryType"] = afsrr.RecoveryType
1021 }
1022 if afsrr.SourceResourceID != nil {
1023 objectMap["sourceResourceId"] = afsrr.SourceResourceID
1024 }
1025 if afsrr.CopyOptions != "" {
1026 objectMap["copyOptions"] = afsrr.CopyOptions
1027 }
1028 if afsrr.RestoreRequestType != "" {
1029 objectMap["restoreRequestType"] = afsrr.RestoreRequestType
1030 }
1031 if afsrr.RestoreFileSpecs != nil {
1032 objectMap["restoreFileSpecs"] = afsrr.RestoreFileSpecs
1033 }
1034 if afsrr.TargetDetails != nil {
1035 objectMap["targetDetails"] = afsrr.TargetDetails
1036 }
1037 if afsrr.ObjectType != "" {
1038 objectMap["objectType"] = afsrr.ObjectType
1039 }
1040 return json.Marshal(objectMap)
1041 }
1042
1043
1044 func (afsrr AzureFileShareRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
1045 return &afsrr, true
1046 }
1047
1048
1049 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
1050 return nil, false
1051 }
1052
1053
1054 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
1055 return nil, false
1056 }
1057
1058
1059 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
1060 return nil, false
1061 }
1062
1063
1064 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
1065 return nil, false
1066 }
1067
1068
1069 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
1070 return nil, false
1071 }
1072
1073
1074 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
1075 return nil, false
1076 }
1077
1078
1079 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
1080 return nil, false
1081 }
1082
1083
1084 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
1085 return nil, false
1086 }
1087
1088
1089 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
1090 return nil, false
1091 }
1092
1093
1094 func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
1095 return nil, false
1096 }
1097
1098
1099 func (afsrr AzureFileShareRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
1100 return nil, false
1101 }
1102
1103
1104 func (afsrr AzureFileShareRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
1105 return &afsrr, true
1106 }
1107
1108
1109
1110 type AzureIaaSClassicComputeVMContainer struct {
1111
1112 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1113
1114 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1115
1116 ResourceGroup *string `json:"resourceGroup,omitempty"`
1117
1118 FriendlyName *string `json:"friendlyName,omitempty"`
1119
1120 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1121
1122 RegistrationStatus *string `json:"registrationStatus,omitempty"`
1123
1124 HealthStatus *string `json:"healthStatus,omitempty"`
1125
1126 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
1127 }
1128
1129
1130 func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) {
1131 aisccvc.ContainerType = ContainerTypeMicrosoftClassicComputevirtualMachines
1132 objectMap := make(map[string]interface{})
1133 if aisccvc.VirtualMachineID != nil {
1134 objectMap["virtualMachineId"] = aisccvc.VirtualMachineID
1135 }
1136 if aisccvc.VirtualMachineVersion != nil {
1137 objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion
1138 }
1139 if aisccvc.ResourceGroup != nil {
1140 objectMap["resourceGroup"] = aisccvc.ResourceGroup
1141 }
1142 if aisccvc.FriendlyName != nil {
1143 objectMap["friendlyName"] = aisccvc.FriendlyName
1144 }
1145 if aisccvc.BackupManagementType != "" {
1146 objectMap["backupManagementType"] = aisccvc.BackupManagementType
1147 }
1148 if aisccvc.RegistrationStatus != nil {
1149 objectMap["registrationStatus"] = aisccvc.RegistrationStatus
1150 }
1151 if aisccvc.HealthStatus != nil {
1152 objectMap["healthStatus"] = aisccvc.HealthStatus
1153 }
1154 if aisccvc.ContainerType != "" {
1155 objectMap["containerType"] = aisccvc.ContainerType
1156 }
1157 return json.Marshal(objectMap)
1158 }
1159
1160
1161 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
1162 return nil, false
1163 }
1164
1165
1166 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
1167 return &aisccvc, true
1168 }
1169
1170
1171 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
1172 return nil, false
1173 }
1174
1175
1176 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
1177 return nil, false
1178 }
1179
1180
1181 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
1182 return nil, false
1183 }
1184
1185
1186 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
1187 return nil, false
1188 }
1189
1190
1191 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
1192 return nil, false
1193 }
1194
1195
1196 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
1197 return nil, false
1198 }
1199
1200
1201 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
1202 return nil, false
1203 }
1204
1205
1206 func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
1207 return nil, false
1208 }
1209
1210
1211 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
1212 return nil, false
1213 }
1214
1215
1216 func (aisccvc AzureIaaSClassicComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
1217 return nil, false
1218 }
1219
1220
1221 func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
1222 return nil, false
1223 }
1224
1225
1226 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
1227 return &aisccvc, true
1228 }
1229
1230
1231 func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
1232 return nil, false
1233 }
1234
1235
1236 func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
1237 return nil, false
1238 }
1239
1240
1241 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
1242 return &aisccvc, true
1243 }
1244
1245
1246
1247 type AzureIaaSClassicComputeVMProtectableItem struct {
1248
1249 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1250
1251 BackupManagementType *string `json:"backupManagementType,omitempty"`
1252
1253 WorkloadType *string `json:"workloadType,omitempty"`
1254
1255 FriendlyName *string `json:"friendlyName,omitempty"`
1256
1257 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
1258
1259 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
1260 }
1261
1262
1263 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
1264 aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines
1265 objectMap := make(map[string]interface{})
1266 if aisccvpi.VirtualMachineID != nil {
1267 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
1268 }
1269 if aisccvpi.BackupManagementType != nil {
1270 objectMap["backupManagementType"] = aisccvpi.BackupManagementType
1271 }
1272 if aisccvpi.WorkloadType != nil {
1273 objectMap["workloadType"] = aisccvpi.WorkloadType
1274 }
1275 if aisccvpi.FriendlyName != nil {
1276 objectMap["friendlyName"] = aisccvpi.FriendlyName
1277 }
1278 if aisccvpi.ProtectionState != "" {
1279 objectMap["protectionState"] = aisccvpi.ProtectionState
1280 }
1281 if aisccvpi.ProtectableItemType != "" {
1282 objectMap["protectableItemType"] = aisccvpi.ProtectableItemType
1283 }
1284 return json.Marshal(objectMap)
1285 }
1286
1287
1288 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
1289 return nil, false
1290 }
1291
1292
1293 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
1294 return &aisccvpi, true
1295 }
1296
1297
1298 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
1299 return nil, false
1300 }
1301
1302
1303 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
1304 return nil, false
1305 }
1306
1307
1308 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
1309 return nil, false
1310 }
1311
1312
1313 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
1314 return nil, false
1315 }
1316
1317
1318 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
1319 return nil, false
1320 }
1321
1322
1323 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
1324 return nil, false
1325 }
1326
1327
1328 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
1329 return nil, false
1330 }
1331
1332
1333 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
1334 return nil, false
1335 }
1336
1337
1338 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
1339 return nil, false
1340 }
1341
1342
1343 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
1344 return nil, false
1345 }
1346
1347
1348 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
1349 return &aisccvpi, true
1350 }
1351
1352
1353 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
1354 return nil, false
1355 }
1356
1357
1358 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
1359 return &aisccvpi, true
1360 }
1361
1362
1363
1364 type AzureIaaSClassicComputeVMProtectedItem struct {
1365
1366 FriendlyName *string `json:"friendlyName,omitempty"`
1367
1368 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1369
1370 ProtectionStatus *string `json:"protectionStatus,omitempty"`
1371
1372 ProtectionState ProtectionState `json:"protectionState,omitempty"`
1373
1374 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
1375
1376 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
1377
1378 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
1379
1380 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1381
1382 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1383
1384 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1385
1386 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1387 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
1388
1389 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1390
1391 WorkloadType DataSourceType `json:"workloadType,omitempty"`
1392
1393 ContainerName *string `json:"containerName,omitempty"`
1394
1395 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1396
1397 PolicyID *string `json:"policyId,omitempty"`
1398
1399 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
1400
1401 BackupSetName *string `json:"backupSetName,omitempty"`
1402
1403 CreateMode CreateMode `json:"createMode,omitempty"`
1404
1405 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
1406
1407 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
1408
1409 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
1410
1411 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
1412
1413 IsRehydrate *bool `json:"isRehydrate,omitempty"`
1414
1415 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
1416 }
1417
1418
1419 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
1420 aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines
1421 objectMap := make(map[string]interface{})
1422 if aisccvpi.FriendlyName != nil {
1423 objectMap["friendlyName"] = aisccvpi.FriendlyName
1424 }
1425 if aisccvpi.VirtualMachineID != nil {
1426 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
1427 }
1428 if aisccvpi.ProtectionStatus != nil {
1429 objectMap["protectionStatus"] = aisccvpi.ProtectionStatus
1430 }
1431 if aisccvpi.ProtectionState != "" {
1432 objectMap["protectionState"] = aisccvpi.ProtectionState
1433 }
1434 if aisccvpi.HealthStatus != "" {
1435 objectMap["healthStatus"] = aisccvpi.HealthStatus
1436 }
1437 if aisccvpi.HealthDetails != nil {
1438 objectMap["healthDetails"] = aisccvpi.HealthDetails
1439 }
1440 if aisccvpi.KpisHealths != nil {
1441 objectMap["kpisHealths"] = aisccvpi.KpisHealths
1442 }
1443 if aisccvpi.LastBackupStatus != nil {
1444 objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus
1445 }
1446 if aisccvpi.LastBackupTime != nil {
1447 objectMap["lastBackupTime"] = aisccvpi.LastBackupTime
1448 }
1449 if aisccvpi.ProtectedItemDataID != nil {
1450 objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID
1451 }
1452 if aisccvpi.ExtendedInfo != nil {
1453 objectMap["extendedInfo"] = aisccvpi.ExtendedInfo
1454 }
1455 if aisccvpi.ExtendedProperties != nil {
1456 objectMap["extendedProperties"] = aisccvpi.ExtendedProperties
1457 }
1458 if aisccvpi.BackupManagementType != "" {
1459 objectMap["backupManagementType"] = aisccvpi.BackupManagementType
1460 }
1461 if aisccvpi.WorkloadType != "" {
1462 objectMap["workloadType"] = aisccvpi.WorkloadType
1463 }
1464 if aisccvpi.ContainerName != nil {
1465 objectMap["containerName"] = aisccvpi.ContainerName
1466 }
1467 if aisccvpi.SourceResourceID != nil {
1468 objectMap["sourceResourceId"] = aisccvpi.SourceResourceID
1469 }
1470 if aisccvpi.PolicyID != nil {
1471 objectMap["policyId"] = aisccvpi.PolicyID
1472 }
1473 if aisccvpi.LastRecoveryPoint != nil {
1474 objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint
1475 }
1476 if aisccvpi.BackupSetName != nil {
1477 objectMap["backupSetName"] = aisccvpi.BackupSetName
1478 }
1479 if aisccvpi.CreateMode != "" {
1480 objectMap["createMode"] = aisccvpi.CreateMode
1481 }
1482 if aisccvpi.DeferredDeleteTimeInUTC != nil {
1483 objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC
1484 }
1485 if aisccvpi.IsScheduledForDeferredDelete != nil {
1486 objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete
1487 }
1488 if aisccvpi.DeferredDeleteTimeRemaining != nil {
1489 objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining
1490 }
1491 if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil {
1492 objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming
1493 }
1494 if aisccvpi.IsRehydrate != nil {
1495 objectMap["isRehydrate"] = aisccvpi.IsRehydrate
1496 }
1497 if aisccvpi.ProtectedItemType != "" {
1498 objectMap["protectedItemType"] = aisccvpi.ProtectedItemType
1499 }
1500 return json.Marshal(objectMap)
1501 }
1502
1503
1504 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
1505 return nil, false
1506 }
1507
1508
1509 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
1510 return &aisccvpi, true
1511 }
1512
1513
1514 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
1515 return nil, false
1516 }
1517
1518
1519 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
1520 return nil, false
1521 }
1522
1523
1524 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
1525 return &aisccvpi, true
1526 }
1527
1528
1529 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
1530 return nil, false
1531 }
1532
1533
1534 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
1535 return nil, false
1536 }
1537
1538
1539 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
1540 return nil, false
1541 }
1542
1543
1544 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
1545 return nil, false
1546 }
1547
1548
1549 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
1550 return nil, false
1551 }
1552
1553
1554 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
1555 return nil, false
1556 }
1557
1558
1559 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
1560 return nil, false
1561 }
1562
1563
1564 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
1565 return nil, false
1566 }
1567
1568
1569 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
1570 return nil, false
1571 }
1572
1573
1574 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
1575 return nil, false
1576 }
1577
1578
1579 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
1580 return &aisccvpi, true
1581 }
1582
1583
1584
1585 type AzureIaaSComputeVMContainer struct {
1586
1587 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1588
1589 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1590
1591 ResourceGroup *string `json:"resourceGroup,omitempty"`
1592
1593 FriendlyName *string `json:"friendlyName,omitempty"`
1594
1595 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1596
1597 RegistrationStatus *string `json:"registrationStatus,omitempty"`
1598
1599 HealthStatus *string `json:"healthStatus,omitempty"`
1600
1601 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
1602 }
1603
1604
1605 func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) {
1606 aiscvc.ContainerType = ContainerTypeMicrosoftComputevirtualMachines
1607 objectMap := make(map[string]interface{})
1608 if aiscvc.VirtualMachineID != nil {
1609 objectMap["virtualMachineId"] = aiscvc.VirtualMachineID
1610 }
1611 if aiscvc.VirtualMachineVersion != nil {
1612 objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion
1613 }
1614 if aiscvc.ResourceGroup != nil {
1615 objectMap["resourceGroup"] = aiscvc.ResourceGroup
1616 }
1617 if aiscvc.FriendlyName != nil {
1618 objectMap["friendlyName"] = aiscvc.FriendlyName
1619 }
1620 if aiscvc.BackupManagementType != "" {
1621 objectMap["backupManagementType"] = aiscvc.BackupManagementType
1622 }
1623 if aiscvc.RegistrationStatus != nil {
1624 objectMap["registrationStatus"] = aiscvc.RegistrationStatus
1625 }
1626 if aiscvc.HealthStatus != nil {
1627 objectMap["healthStatus"] = aiscvc.HealthStatus
1628 }
1629 if aiscvc.ContainerType != "" {
1630 objectMap["containerType"] = aiscvc.ContainerType
1631 }
1632 return json.Marshal(objectMap)
1633 }
1634
1635
1636 func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
1637 return nil, false
1638 }
1639
1640
1641 func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
1642 return nil, false
1643 }
1644
1645
1646 func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
1647 return &aiscvc, true
1648 }
1649
1650
1651 func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
1652 return nil, false
1653 }
1654
1655
1656 func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
1657 return nil, false
1658 }
1659
1660
1661 func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
1662 return nil, false
1663 }
1664
1665
1666 func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
1667 return nil, false
1668 }
1669
1670
1671 func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
1672 return nil, false
1673 }
1674
1675
1676 func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
1677 return nil, false
1678 }
1679
1680
1681 func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
1682 return nil, false
1683 }
1684
1685
1686 func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
1687 return nil, false
1688 }
1689
1690
1691 func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
1692 return nil, false
1693 }
1694
1695
1696 func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
1697 return nil, false
1698 }
1699
1700
1701 func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
1702 return &aiscvc, true
1703 }
1704
1705
1706 func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
1707 return nil, false
1708 }
1709
1710
1711 func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
1712 return nil, false
1713 }
1714
1715
1716 func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
1717 return &aiscvc, true
1718 }
1719
1720
1721
1722 type AzureIaaSComputeVMProtectableItem struct {
1723
1724 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1725
1726 BackupManagementType *string `json:"backupManagementType,omitempty"`
1727
1728 WorkloadType *string `json:"workloadType,omitempty"`
1729
1730 FriendlyName *string `json:"friendlyName,omitempty"`
1731
1732 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
1733
1734 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
1735 }
1736
1737
1738 func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
1739 aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines
1740 objectMap := make(map[string]interface{})
1741 if aiscvpi.VirtualMachineID != nil {
1742 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
1743 }
1744 if aiscvpi.BackupManagementType != nil {
1745 objectMap["backupManagementType"] = aiscvpi.BackupManagementType
1746 }
1747 if aiscvpi.WorkloadType != nil {
1748 objectMap["workloadType"] = aiscvpi.WorkloadType
1749 }
1750 if aiscvpi.FriendlyName != nil {
1751 objectMap["friendlyName"] = aiscvpi.FriendlyName
1752 }
1753 if aiscvpi.ProtectionState != "" {
1754 objectMap["protectionState"] = aiscvpi.ProtectionState
1755 }
1756 if aiscvpi.ProtectableItemType != "" {
1757 objectMap["protectableItemType"] = aiscvpi.ProtectableItemType
1758 }
1759 return json.Marshal(objectMap)
1760 }
1761
1762
1763 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
1764 return nil, false
1765 }
1766
1767
1768 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
1769 return nil, false
1770 }
1771
1772
1773 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
1774 return &aiscvpi, true
1775 }
1776
1777
1778 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
1779 return nil, false
1780 }
1781
1782
1783 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
1784 return nil, false
1785 }
1786
1787
1788 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
1789 return nil, false
1790 }
1791
1792
1793 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
1794 return nil, false
1795 }
1796
1797
1798 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
1799 return nil, false
1800 }
1801
1802
1803 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
1804 return nil, false
1805 }
1806
1807
1808 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
1809 return nil, false
1810 }
1811
1812
1813 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
1814 return nil, false
1815 }
1816
1817
1818 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
1819 return nil, false
1820 }
1821
1822
1823 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
1824 return &aiscvpi, true
1825 }
1826
1827
1828 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
1829 return nil, false
1830 }
1831
1832
1833 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
1834 return &aiscvpi, true
1835 }
1836
1837
1838
1839 type AzureIaaSComputeVMProtectedItem struct {
1840
1841 FriendlyName *string `json:"friendlyName,omitempty"`
1842
1843 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1844
1845 ProtectionStatus *string `json:"protectionStatus,omitempty"`
1846
1847 ProtectionState ProtectionState `json:"protectionState,omitempty"`
1848
1849 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
1850
1851 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
1852
1853 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
1854
1855 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1856
1857 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1858
1859 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1860
1861 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1862 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
1863
1864 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1865
1866 WorkloadType DataSourceType `json:"workloadType,omitempty"`
1867
1868 ContainerName *string `json:"containerName,omitempty"`
1869
1870 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1871
1872 PolicyID *string `json:"policyId,omitempty"`
1873
1874 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
1875
1876 BackupSetName *string `json:"backupSetName,omitempty"`
1877
1878 CreateMode CreateMode `json:"createMode,omitempty"`
1879
1880 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
1881
1882 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
1883
1884 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
1885
1886 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
1887
1888 IsRehydrate *bool `json:"isRehydrate,omitempty"`
1889
1890 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
1891 }
1892
1893
1894 func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
1895 aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines
1896 objectMap := make(map[string]interface{})
1897 if aiscvpi.FriendlyName != nil {
1898 objectMap["friendlyName"] = aiscvpi.FriendlyName
1899 }
1900 if aiscvpi.VirtualMachineID != nil {
1901 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
1902 }
1903 if aiscvpi.ProtectionStatus != nil {
1904 objectMap["protectionStatus"] = aiscvpi.ProtectionStatus
1905 }
1906 if aiscvpi.ProtectionState != "" {
1907 objectMap["protectionState"] = aiscvpi.ProtectionState
1908 }
1909 if aiscvpi.HealthStatus != "" {
1910 objectMap["healthStatus"] = aiscvpi.HealthStatus
1911 }
1912 if aiscvpi.HealthDetails != nil {
1913 objectMap["healthDetails"] = aiscvpi.HealthDetails
1914 }
1915 if aiscvpi.KpisHealths != nil {
1916 objectMap["kpisHealths"] = aiscvpi.KpisHealths
1917 }
1918 if aiscvpi.LastBackupStatus != nil {
1919 objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus
1920 }
1921 if aiscvpi.LastBackupTime != nil {
1922 objectMap["lastBackupTime"] = aiscvpi.LastBackupTime
1923 }
1924 if aiscvpi.ProtectedItemDataID != nil {
1925 objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID
1926 }
1927 if aiscvpi.ExtendedInfo != nil {
1928 objectMap["extendedInfo"] = aiscvpi.ExtendedInfo
1929 }
1930 if aiscvpi.ExtendedProperties != nil {
1931 objectMap["extendedProperties"] = aiscvpi.ExtendedProperties
1932 }
1933 if aiscvpi.BackupManagementType != "" {
1934 objectMap["backupManagementType"] = aiscvpi.BackupManagementType
1935 }
1936 if aiscvpi.WorkloadType != "" {
1937 objectMap["workloadType"] = aiscvpi.WorkloadType
1938 }
1939 if aiscvpi.ContainerName != nil {
1940 objectMap["containerName"] = aiscvpi.ContainerName
1941 }
1942 if aiscvpi.SourceResourceID != nil {
1943 objectMap["sourceResourceId"] = aiscvpi.SourceResourceID
1944 }
1945 if aiscvpi.PolicyID != nil {
1946 objectMap["policyId"] = aiscvpi.PolicyID
1947 }
1948 if aiscvpi.LastRecoveryPoint != nil {
1949 objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint
1950 }
1951 if aiscvpi.BackupSetName != nil {
1952 objectMap["backupSetName"] = aiscvpi.BackupSetName
1953 }
1954 if aiscvpi.CreateMode != "" {
1955 objectMap["createMode"] = aiscvpi.CreateMode
1956 }
1957 if aiscvpi.DeferredDeleteTimeInUTC != nil {
1958 objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC
1959 }
1960 if aiscvpi.IsScheduledForDeferredDelete != nil {
1961 objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete
1962 }
1963 if aiscvpi.DeferredDeleteTimeRemaining != nil {
1964 objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining
1965 }
1966 if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil {
1967 objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming
1968 }
1969 if aiscvpi.IsRehydrate != nil {
1970 objectMap["isRehydrate"] = aiscvpi.IsRehydrate
1971 }
1972 if aiscvpi.ProtectedItemType != "" {
1973 objectMap["protectedItemType"] = aiscvpi.ProtectedItemType
1974 }
1975 return json.Marshal(objectMap)
1976 }
1977
1978
1979 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
1980 return nil, false
1981 }
1982
1983
1984 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
1985 return nil, false
1986 }
1987
1988
1989 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
1990 return &aiscvpi, true
1991 }
1992
1993
1994 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
1995 return nil, false
1996 }
1997
1998
1999 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
2000 return &aiscvpi, true
2001 }
2002
2003
2004 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
2005 return nil, false
2006 }
2007
2008
2009 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2010 return nil, false
2011 }
2012
2013
2014 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2015 return nil, false
2016 }
2017
2018
2019 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2020 return nil, false
2021 }
2022
2023
2024 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2025 return nil, false
2026 }
2027
2028
2029 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2030 return nil, false
2031 }
2032
2033
2034 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2035 return nil, false
2036 }
2037
2038
2039 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2040 return nil, false
2041 }
2042
2043
2044 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2045 return nil, false
2046 }
2047
2048
2049 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2050 return nil, false
2051 }
2052
2053
2054 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2055 return &aiscvpi, true
2056 }
2057
2058
2059 type AzureIaaSVMErrorInfo struct {
2060
2061 ErrorCode *int32 `json:"errorCode,omitempty"`
2062
2063 ErrorTitle *string `json:"errorTitle,omitempty"`
2064
2065 ErrorString *string `json:"errorString,omitempty"`
2066
2067 Recommendations *[]string `json:"recommendations,omitempty"`
2068 }
2069
2070
2071 func (aisei AzureIaaSVMErrorInfo) MarshalJSON() ([]byte, error) {
2072 objectMap := make(map[string]interface{})
2073 return json.Marshal(objectMap)
2074 }
2075
2076
2077 type AzureIaaSVMHealthDetails struct {
2078
2079 Code *int32 `json:"code,omitempty"`
2080
2081 Title *string `json:"title,omitempty"`
2082
2083 Message *string `json:"message,omitempty"`
2084
2085 Recommendations *[]string `json:"recommendations,omitempty"`
2086 }
2087
2088
2089 func (aishd AzureIaaSVMHealthDetails) MarshalJSON() ([]byte, error) {
2090 objectMap := make(map[string]interface{})
2091 return json.Marshal(objectMap)
2092 }
2093
2094
2095 type AzureIaaSVMJob struct {
2096
2097 Duration *string `json:"duration,omitempty"`
2098
2099 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
2100
2101 ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"`
2102
2103 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
2104
2105 ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"`
2106
2107 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
2108
2109 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2110
2111 Operation *string `json:"operation,omitempty"`
2112
2113 Status *string `json:"status,omitempty"`
2114
2115 StartTime *date.Time `json:"startTime,omitempty"`
2116
2117 EndTime *date.Time `json:"endTime,omitempty"`
2118
2119 ActivityID *string `json:"activityId,omitempty"`
2120
2121 JobType JobType `json:"jobType,omitempty"`
2122 }
2123
2124
2125 func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) {
2126 aisj.JobType = JobTypeAzureIaaSVMJob
2127 objectMap := make(map[string]interface{})
2128 if aisj.Duration != nil {
2129 objectMap["duration"] = aisj.Duration
2130 }
2131 if aisj.ActionsInfo != nil {
2132 objectMap["actionsInfo"] = aisj.ActionsInfo
2133 }
2134 if aisj.ErrorDetails != nil {
2135 objectMap["errorDetails"] = aisj.ErrorDetails
2136 }
2137 if aisj.VirtualMachineVersion != nil {
2138 objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion
2139 }
2140 if aisj.ExtendedInfo != nil {
2141 objectMap["extendedInfo"] = aisj.ExtendedInfo
2142 }
2143 if aisj.EntityFriendlyName != nil {
2144 objectMap["entityFriendlyName"] = aisj.EntityFriendlyName
2145 }
2146 if aisj.BackupManagementType != "" {
2147 objectMap["backupManagementType"] = aisj.BackupManagementType
2148 }
2149 if aisj.Operation != nil {
2150 objectMap["operation"] = aisj.Operation
2151 }
2152 if aisj.Status != nil {
2153 objectMap["status"] = aisj.Status
2154 }
2155 if aisj.StartTime != nil {
2156 objectMap["startTime"] = aisj.StartTime
2157 }
2158 if aisj.EndTime != nil {
2159 objectMap["endTime"] = aisj.EndTime
2160 }
2161 if aisj.ActivityID != nil {
2162 objectMap["activityId"] = aisj.ActivityID
2163 }
2164 if aisj.JobType != "" {
2165 objectMap["jobType"] = aisj.JobType
2166 }
2167 return json.Marshal(objectMap)
2168 }
2169
2170
2171 func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
2172 return &aisj, true
2173 }
2174
2175
2176 func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
2177 return nil, false
2178 }
2179
2180
2181 func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
2182 return nil, false
2183 }
2184
2185
2186 func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) {
2187 return nil, false
2188 }
2189
2190
2191 func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) {
2192 return nil, false
2193 }
2194
2195
2196 func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) {
2197 return nil, false
2198 }
2199
2200
2201 func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) {
2202 return &aisj, true
2203 }
2204
2205
2206 type AzureIaaSVMJobExtendedInfo struct {
2207
2208 TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"`
2209
2210 PropertyBag map[string]*string `json:"propertyBag"`
2211
2212 InternalPropertyBag map[string]*string `json:"internalPropertyBag"`
2213
2214 ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2215
2216 EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"`
2217
2218 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
2219 }
2220
2221
2222 func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) {
2223 objectMap := make(map[string]interface{})
2224 if aisjei.TasksList != nil {
2225 objectMap["tasksList"] = aisjei.TasksList
2226 }
2227 if aisjei.PropertyBag != nil {
2228 objectMap["propertyBag"] = aisjei.PropertyBag
2229 }
2230 if aisjei.InternalPropertyBag != nil {
2231 objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag
2232 }
2233 if aisjei.ProgressPercentage != nil {
2234 objectMap["progressPercentage"] = aisjei.ProgressPercentage
2235 }
2236 if aisjei.EstimatedRemainingDuration != nil {
2237 objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration
2238 }
2239 if aisjei.DynamicErrorMessage != nil {
2240 objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage
2241 }
2242 return json.Marshal(objectMap)
2243 }
2244
2245
2246 type AzureIaaSVMJobTaskDetails struct {
2247
2248 TaskID *string `json:"taskId,omitempty"`
2249
2250 StartTime *date.Time `json:"startTime,omitempty"`
2251
2252 EndTime *date.Time `json:"endTime,omitempty"`
2253
2254 InstanceID *string `json:"instanceId,omitempty"`
2255
2256 Duration *string `json:"duration,omitempty"`
2257
2258 Status *string `json:"status,omitempty"`
2259
2260 ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2261
2262
2263 TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"`
2264 }
2265
2266
2267 type BasicAzureIaaSVMProtectedItem interface {
2268 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
2269 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
2270 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
2271 }
2272
2273
2274 type AzureIaaSVMProtectedItem struct {
2275
2276 FriendlyName *string `json:"friendlyName,omitempty"`
2277
2278 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
2279
2280 ProtectionStatus *string `json:"protectionStatus,omitempty"`
2281
2282 ProtectionState ProtectionState `json:"protectionState,omitempty"`
2283
2284 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
2285
2286 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
2287
2288 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
2289
2290 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
2291
2292 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
2293
2294 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
2295
2296 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
2297 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
2298
2299 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2300
2301 WorkloadType DataSourceType `json:"workloadType,omitempty"`
2302
2303 ContainerName *string `json:"containerName,omitempty"`
2304
2305 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2306
2307 PolicyID *string `json:"policyId,omitempty"`
2308
2309 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
2310
2311 BackupSetName *string `json:"backupSetName,omitempty"`
2312
2313 CreateMode CreateMode `json:"createMode,omitempty"`
2314
2315 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
2316
2317 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
2318
2319 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
2320
2321 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
2322
2323 IsRehydrate *bool `json:"isRehydrate,omitempty"`
2324
2325 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
2326 }
2327
2328 func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) {
2329 var m map[string]interface{}
2330 err := json.Unmarshal(body, &m)
2331 if err != nil {
2332 return nil, err
2333 }
2334
2335 switch m["protectedItemType"] {
2336 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
2337 var aisccvpi AzureIaaSClassicComputeVMProtectedItem
2338 err := json.Unmarshal(body, &aisccvpi)
2339 return aisccvpi, err
2340 case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
2341 var aiscvpi AzureIaaSComputeVMProtectedItem
2342 err := json.Unmarshal(body, &aiscvpi)
2343 return aiscvpi, err
2344 default:
2345 var aispi AzureIaaSVMProtectedItem
2346 err := json.Unmarshal(body, &aispi)
2347 return aispi, err
2348 }
2349 }
2350 func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) {
2351 var rawMessages []*json.RawMessage
2352 err := json.Unmarshal(body, &rawMessages)
2353 if err != nil {
2354 return nil, err
2355 }
2356
2357 aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages))
2358
2359 for index, rawMessage := range rawMessages {
2360 aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage)
2361 if err != nil {
2362 return nil, err
2363 }
2364 aispiArray[index] = aispi
2365 }
2366 return aispiArray, nil
2367 }
2368
2369
2370 func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) {
2371 aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem
2372 objectMap := make(map[string]interface{})
2373 if aispi.FriendlyName != nil {
2374 objectMap["friendlyName"] = aispi.FriendlyName
2375 }
2376 if aispi.VirtualMachineID != nil {
2377 objectMap["virtualMachineId"] = aispi.VirtualMachineID
2378 }
2379 if aispi.ProtectionStatus != nil {
2380 objectMap["protectionStatus"] = aispi.ProtectionStatus
2381 }
2382 if aispi.ProtectionState != "" {
2383 objectMap["protectionState"] = aispi.ProtectionState
2384 }
2385 if aispi.HealthStatus != "" {
2386 objectMap["healthStatus"] = aispi.HealthStatus
2387 }
2388 if aispi.HealthDetails != nil {
2389 objectMap["healthDetails"] = aispi.HealthDetails
2390 }
2391 if aispi.KpisHealths != nil {
2392 objectMap["kpisHealths"] = aispi.KpisHealths
2393 }
2394 if aispi.LastBackupStatus != nil {
2395 objectMap["lastBackupStatus"] = aispi.LastBackupStatus
2396 }
2397 if aispi.LastBackupTime != nil {
2398 objectMap["lastBackupTime"] = aispi.LastBackupTime
2399 }
2400 if aispi.ProtectedItemDataID != nil {
2401 objectMap["protectedItemDataId"] = aispi.ProtectedItemDataID
2402 }
2403 if aispi.ExtendedInfo != nil {
2404 objectMap["extendedInfo"] = aispi.ExtendedInfo
2405 }
2406 if aispi.ExtendedProperties != nil {
2407 objectMap["extendedProperties"] = aispi.ExtendedProperties
2408 }
2409 if aispi.BackupManagementType != "" {
2410 objectMap["backupManagementType"] = aispi.BackupManagementType
2411 }
2412 if aispi.WorkloadType != "" {
2413 objectMap["workloadType"] = aispi.WorkloadType
2414 }
2415 if aispi.ContainerName != nil {
2416 objectMap["containerName"] = aispi.ContainerName
2417 }
2418 if aispi.SourceResourceID != nil {
2419 objectMap["sourceResourceId"] = aispi.SourceResourceID
2420 }
2421 if aispi.PolicyID != nil {
2422 objectMap["policyId"] = aispi.PolicyID
2423 }
2424 if aispi.LastRecoveryPoint != nil {
2425 objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint
2426 }
2427 if aispi.BackupSetName != nil {
2428 objectMap["backupSetName"] = aispi.BackupSetName
2429 }
2430 if aispi.CreateMode != "" {
2431 objectMap["createMode"] = aispi.CreateMode
2432 }
2433 if aispi.DeferredDeleteTimeInUTC != nil {
2434 objectMap["deferredDeleteTimeInUTC"] = aispi.DeferredDeleteTimeInUTC
2435 }
2436 if aispi.IsScheduledForDeferredDelete != nil {
2437 objectMap["isScheduledForDeferredDelete"] = aispi.IsScheduledForDeferredDelete
2438 }
2439 if aispi.DeferredDeleteTimeRemaining != nil {
2440 objectMap["deferredDeleteTimeRemaining"] = aispi.DeferredDeleteTimeRemaining
2441 }
2442 if aispi.IsDeferredDeleteScheduleUpcoming != nil {
2443 objectMap["isDeferredDeleteScheduleUpcoming"] = aispi.IsDeferredDeleteScheduleUpcoming
2444 }
2445 if aispi.IsRehydrate != nil {
2446 objectMap["isRehydrate"] = aispi.IsRehydrate
2447 }
2448 if aispi.ProtectedItemType != "" {
2449 objectMap["protectedItemType"] = aispi.ProtectedItemType
2450 }
2451 return json.Marshal(objectMap)
2452 }
2453
2454
2455 func (aispi AzureIaaSVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
2456 return nil, false
2457 }
2458
2459
2460 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
2461 return nil, false
2462 }
2463
2464
2465 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
2466 return nil, false
2467 }
2468
2469
2470 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
2471 return &aispi, true
2472 }
2473
2474
2475 func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
2476 return &aispi, true
2477 }
2478
2479
2480 func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
2481 return nil, false
2482 }
2483
2484
2485 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2486 return nil, false
2487 }
2488
2489
2490 func (aispi AzureIaaSVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2491 return nil, false
2492 }
2493
2494
2495 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2496 return nil, false
2497 }
2498
2499
2500 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2501 return nil, false
2502 }
2503
2504
2505 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2506 return nil, false
2507 }
2508
2509
2510 func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2511 return nil, false
2512 }
2513
2514
2515 func (aispi AzureIaaSVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2516 return nil, false
2517 }
2518
2519
2520 func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2521 return nil, false
2522 }
2523
2524
2525 func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2526 return nil, false
2527 }
2528
2529
2530 func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2531 return &aispi, true
2532 }
2533
2534
2535 type AzureIaaSVMProtectedItemExtendedInfo struct {
2536
2537 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
2538
2539 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
2540
2541 PolicyInconsistent *bool `json:"policyInconsistent,omitempty"`
2542 }
2543
2544
2545 type AzureIaaSVMProtectionPolicy struct {
2546 InstantRPDetails *InstantRPAdditionalDetails `json:"instantRPDetails,omitempty"`
2547
2548 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
2549
2550 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
2551
2552 InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"`
2553
2554 TimeZone *string `json:"timeZone,omitempty"`
2555
2556 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
2557
2558 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
2559 }
2560
2561
2562 func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) {
2563 aispp.BackupManagementType = BackupManagementTypeAzureIaasVM
2564 objectMap := make(map[string]interface{})
2565 if aispp.InstantRPDetails != nil {
2566 objectMap["instantRPDetails"] = aispp.InstantRPDetails
2567 }
2568 objectMap["schedulePolicy"] = aispp.SchedulePolicy
2569 objectMap["retentionPolicy"] = aispp.RetentionPolicy
2570 if aispp.InstantRpRetentionRangeInDays != nil {
2571 objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays
2572 }
2573 if aispp.TimeZone != nil {
2574 objectMap["timeZone"] = aispp.TimeZone
2575 }
2576 if aispp.ProtectedItemsCount != nil {
2577 objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount
2578 }
2579 if aispp.BackupManagementType != "" {
2580 objectMap["backupManagementType"] = aispp.BackupManagementType
2581 }
2582 return json.Marshal(objectMap)
2583 }
2584
2585
2586 func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
2587 return nil, false
2588 }
2589
2590
2591 func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
2592 return nil, false
2593 }
2594
2595
2596 func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
2597 return &aispp, true
2598 }
2599
2600
2601 func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
2602 return nil, false
2603 }
2604
2605
2606 func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
2607 return nil, false
2608 }
2609
2610
2611 func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
2612 return nil, false
2613 }
2614
2615
2616 func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
2617 return nil, false
2618 }
2619
2620
2621 func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
2622 return &aispp, true
2623 }
2624
2625
2626 func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error {
2627 var m map[string]*json.RawMessage
2628 err := json.Unmarshal(body, &m)
2629 if err != nil {
2630 return err
2631 }
2632 for k, v := range m {
2633 switch k {
2634 case "instantRPDetails":
2635 if v != nil {
2636 var instantRPDetails InstantRPAdditionalDetails
2637 err = json.Unmarshal(*v, &instantRPDetails)
2638 if err != nil {
2639 return err
2640 }
2641 aispp.InstantRPDetails = &instantRPDetails
2642 }
2643 case "schedulePolicy":
2644 if v != nil {
2645 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
2646 if err != nil {
2647 return err
2648 }
2649 aispp.SchedulePolicy = schedulePolicy
2650 }
2651 case "retentionPolicy":
2652 if v != nil {
2653 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
2654 if err != nil {
2655 return err
2656 }
2657 aispp.RetentionPolicy = retentionPolicy
2658 }
2659 case "instantRpRetentionRangeInDays":
2660 if v != nil {
2661 var instantRpRetentionRangeInDays int32
2662 err = json.Unmarshal(*v, &instantRpRetentionRangeInDays)
2663 if err != nil {
2664 return err
2665 }
2666 aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays
2667 }
2668 case "timeZone":
2669 if v != nil {
2670 var timeZone string
2671 err = json.Unmarshal(*v, &timeZone)
2672 if err != nil {
2673 return err
2674 }
2675 aispp.TimeZone = &timeZone
2676 }
2677 case "protectedItemsCount":
2678 if v != nil {
2679 var protectedItemsCount int32
2680 err = json.Unmarshal(*v, &protectedItemsCount)
2681 if err != nil {
2682 return err
2683 }
2684 aispp.ProtectedItemsCount = &protectedItemsCount
2685 }
2686 case "backupManagementType":
2687 if v != nil {
2688 var backupManagementType ManagementTypeBasicProtectionPolicy
2689 err = json.Unmarshal(*v, &backupManagementType)
2690 if err != nil {
2691 return err
2692 }
2693 aispp.BackupManagementType = backupManagementType
2694 }
2695 }
2696 }
2697
2698 return nil
2699 }
2700
2701
2702 type BasicAzureRecoveryServiceVaultProtectionIntent interface {
2703 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
2704 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
2705 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
2706 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
2707 }
2708
2709
2710 type AzureRecoveryServiceVaultProtectionIntent struct {
2711
2712 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2713
2714 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2715
2716 ItemID *string `json:"itemId,omitempty"`
2717
2718 PolicyID *string `json:"policyId,omitempty"`
2719
2720 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
2721
2722 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
2723 }
2724
2725 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) {
2726 var m map[string]interface{}
2727 err := json.Unmarshal(body, &m)
2728 if err != nil {
2729 return nil, err
2730 }
2731
2732 switch m["protectionIntentItemType"] {
2733 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
2734 var awapi AzureWorkloadAutoProtectionIntent
2735 err := json.Unmarshal(body, &awapi)
2736 return awapi, err
2737 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
2738 var awsapi AzureWorkloadSQLAutoProtectionIntent
2739 err := json.Unmarshal(body, &awsapi)
2740 return awsapi, err
2741 default:
2742 var arsvpi AzureRecoveryServiceVaultProtectionIntent
2743 err := json.Unmarshal(body, &arsvpi)
2744 return arsvpi, err
2745 }
2746 }
2747 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) {
2748 var rawMessages []*json.RawMessage
2749 err := json.Unmarshal(body, &rawMessages)
2750 if err != nil {
2751 return nil, err
2752 }
2753
2754 arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages))
2755
2756 for index, rawMessage := range rawMessages {
2757 arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage)
2758 if err != nil {
2759 return nil, err
2760 }
2761 arsvpiArray[index] = arsvpi
2762 }
2763 return arsvpiArray, nil
2764 }
2765
2766
2767 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) {
2768 arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem
2769 objectMap := make(map[string]interface{})
2770 if arsvpi.BackupManagementType != "" {
2771 objectMap["backupManagementType"] = arsvpi.BackupManagementType
2772 }
2773 if arsvpi.SourceResourceID != nil {
2774 objectMap["sourceResourceId"] = arsvpi.SourceResourceID
2775 }
2776 if arsvpi.ItemID != nil {
2777 objectMap["itemId"] = arsvpi.ItemID
2778 }
2779 if arsvpi.PolicyID != nil {
2780 objectMap["policyId"] = arsvpi.PolicyID
2781 }
2782 if arsvpi.ProtectionState != "" {
2783 objectMap["protectionState"] = arsvpi.ProtectionState
2784 }
2785 if arsvpi.ProtectionIntentItemType != "" {
2786 objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType
2787 }
2788 return json.Marshal(objectMap)
2789 }
2790
2791
2792 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
2793 return &arsvpi, true
2794 }
2795
2796
2797 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
2798 return &arsvpi, true
2799 }
2800
2801
2802 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
2803 return nil, false
2804 }
2805
2806
2807 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
2808 return nil, false
2809 }
2810
2811
2812 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
2813 return nil, false
2814 }
2815
2816
2817 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
2818 return nil, false
2819 }
2820
2821
2822 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
2823 return nil, false
2824 }
2825
2826
2827 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
2828 return &arsvpi, true
2829 }
2830
2831
2832 type AzureResourceProtectionIntent struct {
2833
2834 FriendlyName *string `json:"friendlyName,omitempty"`
2835
2836 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2837
2838 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2839
2840 ItemID *string `json:"itemId,omitempty"`
2841
2842 PolicyID *string `json:"policyId,omitempty"`
2843
2844 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
2845
2846 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
2847 }
2848
2849
2850 func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) {
2851 arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem
2852 objectMap := make(map[string]interface{})
2853 if arpi.FriendlyName != nil {
2854 objectMap["friendlyName"] = arpi.FriendlyName
2855 }
2856 if arpi.BackupManagementType != "" {
2857 objectMap["backupManagementType"] = arpi.BackupManagementType
2858 }
2859 if arpi.SourceResourceID != nil {
2860 objectMap["sourceResourceId"] = arpi.SourceResourceID
2861 }
2862 if arpi.ItemID != nil {
2863 objectMap["itemId"] = arpi.ItemID
2864 }
2865 if arpi.PolicyID != nil {
2866 objectMap["policyId"] = arpi.PolicyID
2867 }
2868 if arpi.ProtectionState != "" {
2869 objectMap["protectionState"] = arpi.ProtectionState
2870 }
2871 if arpi.ProtectionIntentItemType != "" {
2872 objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType
2873 }
2874 return json.Marshal(objectMap)
2875 }
2876
2877
2878 func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
2879 return nil, false
2880 }
2881
2882
2883 func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
2884 return nil, false
2885 }
2886
2887
2888 func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
2889 return &arpi, true
2890 }
2891
2892
2893 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
2894 return nil, false
2895 }
2896
2897
2898 func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
2899 return nil, false
2900 }
2901
2902
2903 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
2904 return nil, false
2905 }
2906
2907
2908 func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
2909 return nil, false
2910 }
2911
2912
2913 func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
2914 return &arpi, true
2915 }
2916
2917
2918 type AzureSQLAGWorkloadContainerProtectionContainer struct {
2919
2920 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2921
2922 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
2923
2924 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
2925
2926 WorkloadType WorkloadType `json:"workloadType,omitempty"`
2927
2928 OperationType OperationType `json:"operationType,omitempty"`
2929
2930 FriendlyName *string `json:"friendlyName,omitempty"`
2931
2932 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2933
2934 RegistrationStatus *string `json:"registrationStatus,omitempty"`
2935
2936 HealthStatus *string `json:"healthStatus,omitempty"`
2937
2938 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
2939 }
2940
2941
2942 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) {
2943 aswcpc.ContainerType = ContainerTypeSQLAGWorkLoadContainer1
2944 objectMap := make(map[string]interface{})
2945 if aswcpc.SourceResourceID != nil {
2946 objectMap["sourceResourceId"] = aswcpc.SourceResourceID
2947 }
2948 if aswcpc.LastUpdatedTime != nil {
2949 objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime
2950 }
2951 if aswcpc.ExtendedInfo != nil {
2952 objectMap["extendedInfo"] = aswcpc.ExtendedInfo
2953 }
2954 if aswcpc.WorkloadType != "" {
2955 objectMap["workloadType"] = aswcpc.WorkloadType
2956 }
2957 if aswcpc.OperationType != "" {
2958 objectMap["operationType"] = aswcpc.OperationType
2959 }
2960 if aswcpc.FriendlyName != nil {
2961 objectMap["friendlyName"] = aswcpc.FriendlyName
2962 }
2963 if aswcpc.BackupManagementType != "" {
2964 objectMap["backupManagementType"] = aswcpc.BackupManagementType
2965 }
2966 if aswcpc.RegistrationStatus != nil {
2967 objectMap["registrationStatus"] = aswcpc.RegistrationStatus
2968 }
2969 if aswcpc.HealthStatus != nil {
2970 objectMap["healthStatus"] = aswcpc.HealthStatus
2971 }
2972 if aswcpc.ContainerType != "" {
2973 objectMap["containerType"] = aswcpc.ContainerType
2974 }
2975 return json.Marshal(objectMap)
2976 }
2977
2978
2979 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
2980 return nil, false
2981 }
2982
2983
2984 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
2985 return nil, false
2986 }
2987
2988
2989 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
2990 return nil, false
2991 }
2992
2993
2994 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
2995 return &aswcpc, true
2996 }
2997
2998
2999 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3000 return nil, false
3001 }
3002
3003
3004 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3005 return nil, false
3006 }
3007
3008
3009 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3010 return nil, false
3011 }
3012
3013
3014 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3015 return nil, false
3016 }
3017
3018
3019 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3020 return &aswcpc, true
3021 }
3022
3023
3024 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
3025 return nil, false
3026 }
3027
3028
3029 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3030 return nil, false
3031 }
3032
3033
3034 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
3035 return nil, false
3036 }
3037
3038
3039 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3040 return nil, false
3041 }
3042
3043
3044 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3045 return nil, false
3046 }
3047
3048
3049 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
3050 return nil, false
3051 }
3052
3053
3054 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3055 return nil, false
3056 }
3057
3058
3059 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3060 return &aswcpc, true
3061 }
3062
3063
3064 type AzureSQLContainer struct {
3065
3066 FriendlyName *string `json:"friendlyName,omitempty"`
3067
3068 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3069
3070 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3071
3072 HealthStatus *string `json:"healthStatus,omitempty"`
3073
3074 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3075 }
3076
3077
3078 func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) {
3079 asc.ContainerType = ContainerTypeAzureSQLContainer1
3080 objectMap := make(map[string]interface{})
3081 if asc.FriendlyName != nil {
3082 objectMap["friendlyName"] = asc.FriendlyName
3083 }
3084 if asc.BackupManagementType != "" {
3085 objectMap["backupManagementType"] = asc.BackupManagementType
3086 }
3087 if asc.RegistrationStatus != nil {
3088 objectMap["registrationStatus"] = asc.RegistrationStatus
3089 }
3090 if asc.HealthStatus != nil {
3091 objectMap["healthStatus"] = asc.HealthStatus
3092 }
3093 if asc.ContainerType != "" {
3094 objectMap["containerType"] = asc.ContainerType
3095 }
3096 return json.Marshal(objectMap)
3097 }
3098
3099
3100 func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3101 return nil, false
3102 }
3103
3104
3105 func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3106 return nil, false
3107 }
3108
3109
3110 func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3111 return nil, false
3112 }
3113
3114
3115 func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3116 return nil, false
3117 }
3118
3119
3120 func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3121 return &asc, true
3122 }
3123
3124
3125 func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3126 return nil, false
3127 }
3128
3129
3130 func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3131 return nil, false
3132 }
3133
3134
3135 func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3136 return nil, false
3137 }
3138
3139
3140 func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3141 return nil, false
3142 }
3143
3144
3145 func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) {
3146 return nil, false
3147 }
3148
3149
3150 func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3151 return nil, false
3152 }
3153
3154
3155 func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) {
3156 return nil, false
3157 }
3158
3159
3160 func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3161 return nil, false
3162 }
3163
3164
3165 func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3166 return nil, false
3167 }
3168
3169
3170 func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) {
3171 return nil, false
3172 }
3173
3174
3175 func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3176 return nil, false
3177 }
3178
3179
3180 func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3181 return &asc, true
3182 }
3183
3184
3185 type AzureSQLProtectedItem struct {
3186
3187 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
3188
3189 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
3190
3191 ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
3192
3193 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3194
3195 WorkloadType DataSourceType `json:"workloadType,omitempty"`
3196
3197 ContainerName *string `json:"containerName,omitempty"`
3198
3199 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3200
3201 PolicyID *string `json:"policyId,omitempty"`
3202
3203 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
3204
3205 BackupSetName *string `json:"backupSetName,omitempty"`
3206
3207 CreateMode CreateMode `json:"createMode,omitempty"`
3208
3209 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
3210
3211 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
3212
3213 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
3214
3215 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
3216
3217 IsRehydrate *bool `json:"isRehydrate,omitempty"`
3218
3219 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
3220 }
3221
3222
3223 func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) {
3224 aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases
3225 objectMap := make(map[string]interface{})
3226 if aspi.ProtectedItemDataID != nil {
3227 objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID
3228 }
3229 if aspi.ProtectionState != "" {
3230 objectMap["protectionState"] = aspi.ProtectionState
3231 }
3232 if aspi.ExtendedInfo != nil {
3233 objectMap["extendedInfo"] = aspi.ExtendedInfo
3234 }
3235 if aspi.BackupManagementType != "" {
3236 objectMap["backupManagementType"] = aspi.BackupManagementType
3237 }
3238 if aspi.WorkloadType != "" {
3239 objectMap["workloadType"] = aspi.WorkloadType
3240 }
3241 if aspi.ContainerName != nil {
3242 objectMap["containerName"] = aspi.ContainerName
3243 }
3244 if aspi.SourceResourceID != nil {
3245 objectMap["sourceResourceId"] = aspi.SourceResourceID
3246 }
3247 if aspi.PolicyID != nil {
3248 objectMap["policyId"] = aspi.PolicyID
3249 }
3250 if aspi.LastRecoveryPoint != nil {
3251 objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint
3252 }
3253 if aspi.BackupSetName != nil {
3254 objectMap["backupSetName"] = aspi.BackupSetName
3255 }
3256 if aspi.CreateMode != "" {
3257 objectMap["createMode"] = aspi.CreateMode
3258 }
3259 if aspi.DeferredDeleteTimeInUTC != nil {
3260 objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC
3261 }
3262 if aspi.IsScheduledForDeferredDelete != nil {
3263 objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete
3264 }
3265 if aspi.DeferredDeleteTimeRemaining != nil {
3266 objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining
3267 }
3268 if aspi.IsDeferredDeleteScheduleUpcoming != nil {
3269 objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming
3270 }
3271 if aspi.IsRehydrate != nil {
3272 objectMap["isRehydrate"] = aspi.IsRehydrate
3273 }
3274 if aspi.ProtectedItemType != "" {
3275 objectMap["protectedItemType"] = aspi.ProtectedItemType
3276 }
3277 return json.Marshal(objectMap)
3278 }
3279
3280
3281 func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
3282 return nil, false
3283 }
3284
3285
3286 func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
3287 return nil, false
3288 }
3289
3290
3291 func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
3292 return nil, false
3293 }
3294
3295
3296 func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
3297 return nil, false
3298 }
3299
3300
3301 func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
3302 return nil, false
3303 }
3304
3305
3306 func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
3307 return &aspi, true
3308 }
3309
3310
3311 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
3312 return nil, false
3313 }
3314
3315
3316 func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
3317 return nil, false
3318 }
3319
3320
3321 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
3322 return nil, false
3323 }
3324
3325
3326 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
3327 return nil, false
3328 }
3329
3330
3331 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
3332 return nil, false
3333 }
3334
3335
3336 func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
3337 return nil, false
3338 }
3339
3340
3341 func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
3342 return nil, false
3343 }
3344
3345
3346 func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
3347 return nil, false
3348 }
3349
3350
3351 func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
3352 return nil, false
3353 }
3354
3355
3356 func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
3357 return &aspi, true
3358 }
3359
3360
3361 type AzureSQLProtectedItemExtendedInfo struct {
3362
3363 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
3364
3365 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
3366
3367 PolicyState *string `json:"policyState,omitempty"`
3368 }
3369
3370
3371 type AzureSQLProtectionPolicy struct {
3372
3373 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
3374
3375 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
3376
3377 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
3378 }
3379
3380
3381 func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) {
3382 aspp.BackupManagementType = BackupManagementTypeAzureSQL
3383 objectMap := make(map[string]interface{})
3384 objectMap["retentionPolicy"] = aspp.RetentionPolicy
3385 if aspp.ProtectedItemsCount != nil {
3386 objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount
3387 }
3388 if aspp.BackupManagementType != "" {
3389 objectMap["backupManagementType"] = aspp.BackupManagementType
3390 }
3391 return json.Marshal(objectMap)
3392 }
3393
3394
3395 func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
3396 return nil, false
3397 }
3398
3399
3400 func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
3401 return nil, false
3402 }
3403
3404
3405 func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
3406 return nil, false
3407 }
3408
3409
3410 func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
3411 return &aspp, true
3412 }
3413
3414
3415 func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
3416 return nil, false
3417 }
3418
3419
3420 func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
3421 return nil, false
3422 }
3423
3424
3425 func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
3426 return nil, false
3427 }
3428
3429
3430 func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
3431 return &aspp, true
3432 }
3433
3434
3435 func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error {
3436 var m map[string]*json.RawMessage
3437 err := json.Unmarshal(body, &m)
3438 if err != nil {
3439 return err
3440 }
3441 for k, v := range m {
3442 switch k {
3443 case "retentionPolicy":
3444 if v != nil {
3445 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
3446 if err != nil {
3447 return err
3448 }
3449 aspp.RetentionPolicy = retentionPolicy
3450 }
3451 case "protectedItemsCount":
3452 if v != nil {
3453 var protectedItemsCount int32
3454 err = json.Unmarshal(*v, &protectedItemsCount)
3455 if err != nil {
3456 return err
3457 }
3458 aspp.ProtectedItemsCount = &protectedItemsCount
3459 }
3460 case "backupManagementType":
3461 if v != nil {
3462 var backupManagementType ManagementTypeBasicProtectionPolicy
3463 err = json.Unmarshal(*v, &backupManagementType)
3464 if err != nil {
3465 return err
3466 }
3467 aspp.BackupManagementType = backupManagementType
3468 }
3469 }
3470 }
3471
3472 return nil
3473 }
3474
3475
3476 type AzureStorageContainer struct {
3477
3478 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3479
3480 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3481
3482 ResourceGroup *string `json:"resourceGroup,omitempty"`
3483
3484 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
3485
3486 FriendlyName *string `json:"friendlyName,omitempty"`
3487
3488 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3489
3490 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3491
3492 HealthStatus *string `json:"healthStatus,omitempty"`
3493
3494 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3495 }
3496
3497
3498 func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) {
3499 asc.ContainerType = ContainerTypeStorageContainer1
3500 objectMap := make(map[string]interface{})
3501 if asc.SourceResourceID != nil {
3502 objectMap["sourceResourceId"] = asc.SourceResourceID
3503 }
3504 if asc.StorageAccountVersion != nil {
3505 objectMap["storageAccountVersion"] = asc.StorageAccountVersion
3506 }
3507 if asc.ResourceGroup != nil {
3508 objectMap["resourceGroup"] = asc.ResourceGroup
3509 }
3510 if asc.ProtectedItemCount != nil {
3511 objectMap["protectedItemCount"] = asc.ProtectedItemCount
3512 }
3513 if asc.FriendlyName != nil {
3514 objectMap["friendlyName"] = asc.FriendlyName
3515 }
3516 if asc.BackupManagementType != "" {
3517 objectMap["backupManagementType"] = asc.BackupManagementType
3518 }
3519 if asc.RegistrationStatus != nil {
3520 objectMap["registrationStatus"] = asc.RegistrationStatus
3521 }
3522 if asc.HealthStatus != nil {
3523 objectMap["healthStatus"] = asc.HealthStatus
3524 }
3525 if asc.ContainerType != "" {
3526 objectMap["containerType"] = asc.ContainerType
3527 }
3528 return json.Marshal(objectMap)
3529 }
3530
3531
3532 func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3533 return nil, false
3534 }
3535
3536
3537 func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3538 return nil, false
3539 }
3540
3541
3542 func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3543 return nil, false
3544 }
3545
3546
3547 func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3548 return nil, false
3549 }
3550
3551
3552 func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3553 return nil, false
3554 }
3555
3556
3557 func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3558 return &asc, true
3559 }
3560
3561
3562 func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3563 return nil, false
3564 }
3565
3566
3567 func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3568 return nil, false
3569 }
3570
3571
3572 func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3573 return nil, false
3574 }
3575
3576
3577 func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) {
3578 return nil, false
3579 }
3580
3581
3582 func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3583 return nil, false
3584 }
3585
3586
3587 func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) {
3588 return nil, false
3589 }
3590
3591
3592 func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3593 return nil, false
3594 }
3595
3596
3597 func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3598 return nil, false
3599 }
3600
3601
3602 func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) {
3603 return nil, false
3604 }
3605
3606
3607 func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3608 return nil, false
3609 }
3610
3611
3612 func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3613 return &asc, true
3614 }
3615
3616
3617 type AzureStorageErrorInfo struct {
3618
3619 ErrorCode *int32 `json:"errorCode,omitempty"`
3620
3621 ErrorString *string `json:"errorString,omitempty"`
3622
3623 Recommendations *[]string `json:"recommendations,omitempty"`
3624 }
3625
3626
3627 type AzureStorageJob struct {
3628
3629 Duration *string `json:"duration,omitempty"`
3630
3631 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
3632
3633 ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"`
3634
3635 StorageAccountName *string `json:"storageAccountName,omitempty"`
3636
3637 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3638
3639 ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"`
3640
3641 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
3642
3643 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3644
3645 Operation *string `json:"operation,omitempty"`
3646
3647 Status *string `json:"status,omitempty"`
3648
3649 StartTime *date.Time `json:"startTime,omitempty"`
3650
3651 EndTime *date.Time `json:"endTime,omitempty"`
3652
3653 ActivityID *string `json:"activityId,omitempty"`
3654
3655 JobType JobType `json:"jobType,omitempty"`
3656 }
3657
3658
3659 func (asj AzureStorageJob) MarshalJSON() ([]byte, error) {
3660 asj.JobType = JobTypeAzureStorageJob
3661 objectMap := make(map[string]interface{})
3662 if asj.Duration != nil {
3663 objectMap["duration"] = asj.Duration
3664 }
3665 if asj.ActionsInfo != nil {
3666 objectMap["actionsInfo"] = asj.ActionsInfo
3667 }
3668 if asj.ErrorDetails != nil {
3669 objectMap["errorDetails"] = asj.ErrorDetails
3670 }
3671 if asj.StorageAccountName != nil {
3672 objectMap["storageAccountName"] = asj.StorageAccountName
3673 }
3674 if asj.StorageAccountVersion != nil {
3675 objectMap["storageAccountVersion"] = asj.StorageAccountVersion
3676 }
3677 if asj.ExtendedInfo != nil {
3678 objectMap["extendedInfo"] = asj.ExtendedInfo
3679 }
3680 if asj.EntityFriendlyName != nil {
3681 objectMap["entityFriendlyName"] = asj.EntityFriendlyName
3682 }
3683 if asj.BackupManagementType != "" {
3684 objectMap["backupManagementType"] = asj.BackupManagementType
3685 }
3686 if asj.Operation != nil {
3687 objectMap["operation"] = asj.Operation
3688 }
3689 if asj.Status != nil {
3690 objectMap["status"] = asj.Status
3691 }
3692 if asj.StartTime != nil {
3693 objectMap["startTime"] = asj.StartTime
3694 }
3695 if asj.EndTime != nil {
3696 objectMap["endTime"] = asj.EndTime
3697 }
3698 if asj.ActivityID != nil {
3699 objectMap["activityId"] = asj.ActivityID
3700 }
3701 if asj.JobType != "" {
3702 objectMap["jobType"] = asj.JobType
3703 }
3704 return json.Marshal(objectMap)
3705 }
3706
3707
3708 func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
3709 return nil, false
3710 }
3711
3712
3713 func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
3714 return &asj, true
3715 }
3716
3717
3718 func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
3719 return nil, false
3720 }
3721
3722
3723 func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) {
3724 return nil, false
3725 }
3726
3727
3728 func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) {
3729 return nil, false
3730 }
3731
3732
3733 func (asj AzureStorageJob) AsJob() (*Job, bool) {
3734 return nil, false
3735 }
3736
3737
3738 func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) {
3739 return &asj, true
3740 }
3741
3742
3743 type AzureStorageJobExtendedInfo struct {
3744
3745 TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"`
3746
3747 PropertyBag map[string]*string `json:"propertyBag"`
3748
3749 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
3750 }
3751
3752
3753 func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) {
3754 objectMap := make(map[string]interface{})
3755 if asjei.TasksList != nil {
3756 objectMap["tasksList"] = asjei.TasksList
3757 }
3758 if asjei.PropertyBag != nil {
3759 objectMap["propertyBag"] = asjei.PropertyBag
3760 }
3761 if asjei.DynamicErrorMessage != nil {
3762 objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage
3763 }
3764 return json.Marshal(objectMap)
3765 }
3766
3767
3768 type AzureStorageJobTaskDetails struct {
3769
3770 TaskID *string `json:"taskId,omitempty"`
3771
3772 Status *string `json:"status,omitempty"`
3773 }
3774
3775
3776 type AzureStorageProtectableContainer struct {
3777
3778 FriendlyName *string `json:"friendlyName,omitempty"`
3779
3780 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3781
3782 HealthStatus *string `json:"healthStatus,omitempty"`
3783
3784 ContainerID *string `json:"containerId,omitempty"`
3785
3786 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
3787 }
3788
3789
3790 func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) {
3791 aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer
3792 objectMap := make(map[string]interface{})
3793 if aspc.FriendlyName != nil {
3794 objectMap["friendlyName"] = aspc.FriendlyName
3795 }
3796 if aspc.BackupManagementType != "" {
3797 objectMap["backupManagementType"] = aspc.BackupManagementType
3798 }
3799 if aspc.HealthStatus != nil {
3800 objectMap["healthStatus"] = aspc.HealthStatus
3801 }
3802 if aspc.ContainerID != nil {
3803 objectMap["containerId"] = aspc.ContainerID
3804 }
3805 if aspc.ProtectableContainerType != "" {
3806 objectMap["protectableContainerType"] = aspc.ProtectableContainerType
3807 }
3808 return json.Marshal(objectMap)
3809 }
3810
3811
3812 func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
3813 return &aspc, true
3814 }
3815
3816
3817 func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
3818 return nil, false
3819 }
3820
3821
3822 func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
3823 return nil, false
3824 }
3825
3826
3827 func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
3828 return &aspc, true
3829 }
3830
3831
3832 type AzureVMAppContainerProtectableContainer struct {
3833
3834 FriendlyName *string `json:"friendlyName,omitempty"`
3835
3836 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3837
3838 HealthStatus *string `json:"healthStatus,omitempty"`
3839
3840 ContainerID *string `json:"containerId,omitempty"`
3841
3842 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
3843 }
3844
3845
3846 func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) {
3847 avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer
3848 objectMap := make(map[string]interface{})
3849 if avacpc.FriendlyName != nil {
3850 objectMap["friendlyName"] = avacpc.FriendlyName
3851 }
3852 if avacpc.BackupManagementType != "" {
3853 objectMap["backupManagementType"] = avacpc.BackupManagementType
3854 }
3855 if avacpc.HealthStatus != nil {
3856 objectMap["healthStatus"] = avacpc.HealthStatus
3857 }
3858 if avacpc.ContainerID != nil {
3859 objectMap["containerId"] = avacpc.ContainerID
3860 }
3861 if avacpc.ProtectableContainerType != "" {
3862 objectMap["protectableContainerType"] = avacpc.ProtectableContainerType
3863 }
3864 return json.Marshal(objectMap)
3865 }
3866
3867
3868 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
3869 return nil, false
3870 }
3871
3872
3873 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
3874 return &avacpc, true
3875 }
3876
3877
3878 func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
3879 return nil, false
3880 }
3881
3882
3883 func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
3884 return &avacpc, true
3885 }
3886
3887
3888 type AzureVMAppContainerProtectionContainer struct {
3889
3890 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3891
3892 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
3893
3894 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
3895
3896 WorkloadType WorkloadType `json:"workloadType,omitempty"`
3897
3898 OperationType OperationType `json:"operationType,omitempty"`
3899
3900 FriendlyName *string `json:"friendlyName,omitempty"`
3901
3902 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3903
3904 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3905
3906 HealthStatus *string `json:"healthStatus,omitempty"`
3907
3908 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3909 }
3910
3911
3912 func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) {
3913 avacpc.ContainerType = ContainerTypeVMAppContainer1
3914 objectMap := make(map[string]interface{})
3915 if avacpc.SourceResourceID != nil {
3916 objectMap["sourceResourceId"] = avacpc.SourceResourceID
3917 }
3918 if avacpc.LastUpdatedTime != nil {
3919 objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime
3920 }
3921 if avacpc.ExtendedInfo != nil {
3922 objectMap["extendedInfo"] = avacpc.ExtendedInfo
3923 }
3924 if avacpc.WorkloadType != "" {
3925 objectMap["workloadType"] = avacpc.WorkloadType
3926 }
3927 if avacpc.OperationType != "" {
3928 objectMap["operationType"] = avacpc.OperationType
3929 }
3930 if avacpc.FriendlyName != nil {
3931 objectMap["friendlyName"] = avacpc.FriendlyName
3932 }
3933 if avacpc.BackupManagementType != "" {
3934 objectMap["backupManagementType"] = avacpc.BackupManagementType
3935 }
3936 if avacpc.RegistrationStatus != nil {
3937 objectMap["registrationStatus"] = avacpc.RegistrationStatus
3938 }
3939 if avacpc.HealthStatus != nil {
3940 objectMap["healthStatus"] = avacpc.HealthStatus
3941 }
3942 if avacpc.ContainerType != "" {
3943 objectMap["containerType"] = avacpc.ContainerType
3944 }
3945 return json.Marshal(objectMap)
3946 }
3947
3948
3949 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3950 return nil, false
3951 }
3952
3953
3954 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3955 return nil, false
3956 }
3957
3958
3959 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3960 return nil, false
3961 }
3962
3963
3964 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3965 return nil, false
3966 }
3967
3968
3969 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3970 return nil, false
3971 }
3972
3973
3974 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3975 return nil, false
3976 }
3977
3978
3979 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3980 return &avacpc, true
3981 }
3982
3983
3984 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3985 return nil, false
3986 }
3987
3988
3989 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3990 return &avacpc, true
3991 }
3992
3993
3994 func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
3995 return nil, false
3996 }
3997
3998
3999 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
4000 return nil, false
4001 }
4002
4003
4004 func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
4005 return nil, false
4006 }
4007
4008
4009 func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
4010 return nil, false
4011 }
4012
4013
4014 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
4015 return nil, false
4016 }
4017
4018
4019 func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
4020 return nil, false
4021 }
4022
4023
4024 func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
4025 return nil, false
4026 }
4027
4028
4029 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
4030 return &avacpc, true
4031 }
4032
4033
4034 type AzureVMResourceFeatureSupportRequest struct {
4035
4036 VMSize *string `json:"vmSize,omitempty"`
4037
4038 VMSku *string `json:"vmSku,omitempty"`
4039
4040 FeatureType FeatureType `json:"featureType,omitempty"`
4041 }
4042
4043
4044 func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) {
4045 avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup
4046 objectMap := make(map[string]interface{})
4047 if avrfsr.VMSize != nil {
4048 objectMap["vmSize"] = avrfsr.VMSize
4049 }
4050 if avrfsr.VMSku != nil {
4051 objectMap["vmSku"] = avrfsr.VMSku
4052 }
4053 if avrfsr.FeatureType != "" {
4054 objectMap["featureType"] = avrfsr.FeatureType
4055 }
4056 return json.Marshal(objectMap)
4057 }
4058
4059
4060 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
4061 return nil, false
4062 }
4063
4064
4065 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
4066 return &avrfsr, true
4067 }
4068
4069
4070 func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
4071 return nil, false
4072 }
4073
4074
4075 func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
4076 return &avrfsr, true
4077 }
4078
4079
4080 type AzureVMResourceFeatureSupportResponse struct {
4081 autorest.Response `json:"-"`
4082
4083 SupportStatus SupportStatus `json:"supportStatus,omitempty"`
4084 }
4085
4086
4087 type BasicAzureVMWorkloadItem interface {
4088 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
4089 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
4090 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
4091 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
4092 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
4093 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
4094 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
4095 }
4096
4097
4098 type AzureVMWorkloadItem struct {
4099
4100 ParentName *string `json:"parentName,omitempty"`
4101
4102 ServerName *string `json:"serverName,omitempty"`
4103
4104 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4105
4106 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4107
4108 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
4109
4110 BackupManagementType *string `json:"backupManagementType,omitempty"`
4111
4112 WorkloadType *string `json:"workloadType,omitempty"`
4113
4114 FriendlyName *string `json:"friendlyName,omitempty"`
4115
4116 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4117
4118 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
4119 }
4120
4121 func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) {
4122 var m map[string]interface{}
4123 err := json.Unmarshal(body, &m)
4124 if err != nil {
4125 return nil, err
4126 }
4127
4128 switch m["workloadItemType"] {
4129 case string(WorkloadItemTypeSAPAseDatabase1):
4130 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
4131 err := json.Unmarshal(body, &avwsadwi)
4132 return avwsadwi, err
4133 case string(WorkloadItemTypeSAPAseSystem1):
4134 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
4135 err := json.Unmarshal(body, &avwsaswi)
4136 return avwsaswi, err
4137 case string(WorkloadItemTypeSAPHanaDatabase1):
4138 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
4139 err := json.Unmarshal(body, &avwshdwi)
4140 return avwshdwi, err
4141 case string(WorkloadItemTypeSAPHanaSystem1):
4142 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
4143 err := json.Unmarshal(body, &avwshswi)
4144 return avwshswi, err
4145 case string(WorkloadItemTypeSQLDataBase1):
4146 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
4147 err := json.Unmarshal(body, &avwsdwi)
4148 return avwsdwi, err
4149 case string(WorkloadItemTypeSQLInstance1):
4150 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
4151 err := json.Unmarshal(body, &avwsiwi)
4152 return avwsiwi, err
4153 default:
4154 var avwi AzureVMWorkloadItem
4155 err := json.Unmarshal(body, &avwi)
4156 return avwi, err
4157 }
4158 }
4159 func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) {
4160 var rawMessages []*json.RawMessage
4161 err := json.Unmarshal(body, &rawMessages)
4162 if err != nil {
4163 return nil, err
4164 }
4165
4166 avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages))
4167
4168 for index, rawMessage := range rawMessages {
4169 avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage)
4170 if err != nil {
4171 return nil, err
4172 }
4173 avwiArray[index] = avwi
4174 }
4175 return avwiArray, nil
4176 }
4177
4178
4179 func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) {
4180 avwi.WorkloadItemType = WorkloadItemTypeAzureVMWorkloadItem
4181 objectMap := make(map[string]interface{})
4182 if avwi.ParentName != nil {
4183 objectMap["parentName"] = avwi.ParentName
4184 }
4185 if avwi.ServerName != nil {
4186 objectMap["serverName"] = avwi.ServerName
4187 }
4188 if avwi.IsAutoProtectable != nil {
4189 objectMap["isAutoProtectable"] = avwi.IsAutoProtectable
4190 }
4191 if avwi.Subinquireditemcount != nil {
4192 objectMap["subinquireditemcount"] = avwi.Subinquireditemcount
4193 }
4194 if avwi.SubWorkloadItemCount != nil {
4195 objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount
4196 }
4197 if avwi.BackupManagementType != nil {
4198 objectMap["backupManagementType"] = avwi.BackupManagementType
4199 }
4200 if avwi.WorkloadType != nil {
4201 objectMap["workloadType"] = avwi.WorkloadType
4202 }
4203 if avwi.FriendlyName != nil {
4204 objectMap["friendlyName"] = avwi.FriendlyName
4205 }
4206 if avwi.ProtectionState != "" {
4207 objectMap["protectionState"] = avwi.ProtectionState
4208 }
4209 if avwi.WorkloadItemType != "" {
4210 objectMap["workloadItemType"] = avwi.WorkloadItemType
4211 }
4212 return json.Marshal(objectMap)
4213 }
4214
4215
4216 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
4217 return &avwi, true
4218 }
4219
4220
4221 func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
4222 return &avwi, true
4223 }
4224
4225
4226 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
4227 return nil, false
4228 }
4229
4230
4231 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
4232 return nil, false
4233 }
4234
4235
4236 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
4237 return nil, false
4238 }
4239
4240
4241 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
4242 return nil, false
4243 }
4244
4245
4246 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
4247 return nil, false
4248 }
4249
4250
4251 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
4252 return nil, false
4253 }
4254
4255
4256 func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
4257 return nil, false
4258 }
4259
4260
4261 func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
4262 return &avwi, true
4263 }
4264
4265
4266 type BasicAzureVMWorkloadProtectableItem interface {
4267 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
4268 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
4269 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
4270 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
4271 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
4272 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
4273 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
4274 }
4275
4276
4277 type AzureVMWorkloadProtectableItem struct {
4278
4279 ParentName *string `json:"parentName,omitempty"`
4280
4281
4282 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
4283
4284 ServerName *string `json:"serverName,omitempty"`
4285
4286 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4287
4288 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
4289
4290 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4291
4292 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
4293
4294 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
4295
4296 BackupManagementType *string `json:"backupManagementType,omitempty"`
4297
4298 WorkloadType *string `json:"workloadType,omitempty"`
4299
4300 FriendlyName *string `json:"friendlyName,omitempty"`
4301
4302 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4303
4304 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
4305 }
4306
4307 func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) {
4308 var m map[string]interface{}
4309 err := json.Unmarshal(body, &m)
4310 if err != nil {
4311 return nil, err
4312 }
4313
4314 switch m["protectableItemType"] {
4315 case string(ProtectableItemTypeSAPAseSystem):
4316 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
4317 err := json.Unmarshal(body, &avwsaspi)
4318 return avwsaspi, err
4319 case string(ProtectableItemTypeSAPHanaDatabase):
4320 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
4321 err := json.Unmarshal(body, &avwshdpi)
4322 return avwshdpi, err
4323 case string(ProtectableItemTypeSAPHanaSystem):
4324 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
4325 err := json.Unmarshal(body, &avwshspi)
4326 return avwshspi, err
4327 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
4328 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
4329 err := json.Unmarshal(body, &avwsagpi)
4330 return avwsagpi, err
4331 case string(ProtectableItemTypeSQLDataBase):
4332 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
4333 err := json.Unmarshal(body, &avwsdpi)
4334 return avwsdpi, err
4335 case string(ProtectableItemTypeSQLInstance):
4336 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
4337 err := json.Unmarshal(body, &avwsipi)
4338 return avwsipi, err
4339 default:
4340 var avwpi AzureVMWorkloadProtectableItem
4341 err := json.Unmarshal(body, &avwpi)
4342 return avwpi, err
4343 }
4344 }
4345 func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) {
4346 var rawMessages []*json.RawMessage
4347 err := json.Unmarshal(body, &rawMessages)
4348 if err != nil {
4349 return nil, err
4350 }
4351
4352 avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages))
4353
4354 for index, rawMessage := range rawMessages {
4355 avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage)
4356 if err != nil {
4357 return nil, err
4358 }
4359 avwpiArray[index] = avwpi
4360 }
4361 return avwpiArray, nil
4362 }
4363
4364
4365 func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) {
4366 avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem
4367 objectMap := make(map[string]interface{})
4368 if avwpi.ParentName != nil {
4369 objectMap["parentName"] = avwpi.ParentName
4370 }
4371 if avwpi.ParentUniqueName != nil {
4372 objectMap["parentUniqueName"] = avwpi.ParentUniqueName
4373 }
4374 if avwpi.ServerName != nil {
4375 objectMap["serverName"] = avwpi.ServerName
4376 }
4377 if avwpi.IsAutoProtectable != nil {
4378 objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable
4379 }
4380 if avwpi.IsAutoProtected != nil {
4381 objectMap["isAutoProtected"] = avwpi.IsAutoProtected
4382 }
4383 if avwpi.Subinquireditemcount != nil {
4384 objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount
4385 }
4386 if avwpi.Subprotectableitemcount != nil {
4387 objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount
4388 }
4389 if avwpi.Prebackupvalidation != nil {
4390 objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation
4391 }
4392 if avwpi.BackupManagementType != nil {
4393 objectMap["backupManagementType"] = avwpi.BackupManagementType
4394 }
4395 if avwpi.WorkloadType != nil {
4396 objectMap["workloadType"] = avwpi.WorkloadType
4397 }
4398 if avwpi.FriendlyName != nil {
4399 objectMap["friendlyName"] = avwpi.FriendlyName
4400 }
4401 if avwpi.ProtectionState != "" {
4402 objectMap["protectionState"] = avwpi.ProtectionState
4403 }
4404 if avwpi.ProtectableItemType != "" {
4405 objectMap["protectableItemType"] = avwpi.ProtectableItemType
4406 }
4407 return json.Marshal(objectMap)
4408 }
4409
4410
4411 func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
4412 return nil, false
4413 }
4414
4415
4416 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
4417 return nil, false
4418 }
4419
4420
4421 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
4422 return nil, false
4423 }
4424
4425
4426 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
4427 return &avwpi, true
4428 }
4429
4430
4431 func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
4432 return &avwpi, true
4433 }
4434
4435
4436 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
4437 return nil, false
4438 }
4439
4440
4441 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
4442 return nil, false
4443 }
4444
4445
4446 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
4447 return nil, false
4448 }
4449
4450
4451 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
4452 return nil, false
4453 }
4454
4455
4456 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
4457 return nil, false
4458 }
4459
4460
4461 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
4462 return nil, false
4463 }
4464
4465
4466 func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
4467 return nil, false
4468 }
4469
4470
4471 func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
4472 return nil, false
4473 }
4474
4475
4476 func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
4477 return nil, false
4478 }
4479
4480
4481 func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
4482 return &avwpi, true
4483 }
4484
4485
4486 type BasicAzureVMWorkloadProtectedItem interface {
4487 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
4488 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
4489 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
4490 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
4491 }
4492
4493
4494 type AzureVMWorkloadProtectedItem struct {
4495
4496 FriendlyName *string `json:"friendlyName,omitempty"`
4497
4498 ServerName *string `json:"serverName,omitempty"`
4499
4500 ParentName *string `json:"parentName,omitempty"`
4501
4502 ParentType *string `json:"parentType,omitempty"`
4503
4504 ProtectionStatus *string `json:"protectionStatus,omitempty"`
4505
4506 ProtectionState ProtectionState `json:"protectionState,omitempty"`
4507
4508 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
4509
4510 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
4511
4512 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
4513
4514 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
4515
4516 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
4517
4518 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
4519
4520 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
4521
4522 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4523
4524 WorkloadType DataSourceType `json:"workloadType,omitempty"`
4525
4526 ContainerName *string `json:"containerName,omitempty"`
4527
4528 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4529
4530 PolicyID *string `json:"policyId,omitempty"`
4531
4532 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
4533
4534 BackupSetName *string `json:"backupSetName,omitempty"`
4535
4536 CreateMode CreateMode `json:"createMode,omitempty"`
4537
4538 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
4539
4540 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
4541
4542 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
4543
4544 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
4545
4546 IsRehydrate *bool `json:"isRehydrate,omitempty"`
4547
4548 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
4549 }
4550
4551 func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) {
4552 var m map[string]interface{}
4553 err := json.Unmarshal(body, &m)
4554 if err != nil {
4555 return nil, err
4556 }
4557
4558 switch m["protectedItemType"] {
4559 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
4560 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
4561 err := json.Unmarshal(body, &avwsadpi)
4562 return avwsadpi, err
4563 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
4564 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
4565 err := json.Unmarshal(body, &avwshdpi)
4566 return avwshdpi, err
4567 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
4568 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
4569 err := json.Unmarshal(body, &avwsdpi)
4570 return avwsdpi, err
4571 default:
4572 var avwpi AzureVMWorkloadProtectedItem
4573 err := json.Unmarshal(body, &avwpi)
4574 return avwpi, err
4575 }
4576 }
4577 func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) {
4578 var rawMessages []*json.RawMessage
4579 err := json.Unmarshal(body, &rawMessages)
4580 if err != nil {
4581 return nil, err
4582 }
4583
4584 avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages))
4585
4586 for index, rawMessage := range rawMessages {
4587 avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage)
4588 if err != nil {
4589 return nil, err
4590 }
4591 avwpiArray[index] = avwpi
4592 }
4593 return avwpiArray, nil
4594 }
4595
4596
4597 func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) {
4598 avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem
4599 objectMap := make(map[string]interface{})
4600 if avwpi.FriendlyName != nil {
4601 objectMap["friendlyName"] = avwpi.FriendlyName
4602 }
4603 if avwpi.ServerName != nil {
4604 objectMap["serverName"] = avwpi.ServerName
4605 }
4606 if avwpi.ParentName != nil {
4607 objectMap["parentName"] = avwpi.ParentName
4608 }
4609 if avwpi.ParentType != nil {
4610 objectMap["parentType"] = avwpi.ParentType
4611 }
4612 if avwpi.ProtectionStatus != nil {
4613 objectMap["protectionStatus"] = avwpi.ProtectionStatus
4614 }
4615 if avwpi.ProtectionState != "" {
4616 objectMap["protectionState"] = avwpi.ProtectionState
4617 }
4618 if avwpi.LastBackupStatus != "" {
4619 objectMap["lastBackupStatus"] = avwpi.LastBackupStatus
4620 }
4621 if avwpi.LastBackupTime != nil {
4622 objectMap["lastBackupTime"] = avwpi.LastBackupTime
4623 }
4624 if avwpi.LastBackupErrorDetail != nil {
4625 objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail
4626 }
4627 if avwpi.ProtectedItemDataSourceID != nil {
4628 objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID
4629 }
4630 if avwpi.ProtectedItemHealthStatus != "" {
4631 objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus
4632 }
4633 if avwpi.ExtendedInfo != nil {
4634 objectMap["extendedInfo"] = avwpi.ExtendedInfo
4635 }
4636 if avwpi.KpisHealths != nil {
4637 objectMap["kpisHealths"] = avwpi.KpisHealths
4638 }
4639 if avwpi.BackupManagementType != "" {
4640 objectMap["backupManagementType"] = avwpi.BackupManagementType
4641 }
4642 if avwpi.WorkloadType != "" {
4643 objectMap["workloadType"] = avwpi.WorkloadType
4644 }
4645 if avwpi.ContainerName != nil {
4646 objectMap["containerName"] = avwpi.ContainerName
4647 }
4648 if avwpi.SourceResourceID != nil {
4649 objectMap["sourceResourceId"] = avwpi.SourceResourceID
4650 }
4651 if avwpi.PolicyID != nil {
4652 objectMap["policyId"] = avwpi.PolicyID
4653 }
4654 if avwpi.LastRecoveryPoint != nil {
4655 objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint
4656 }
4657 if avwpi.BackupSetName != nil {
4658 objectMap["backupSetName"] = avwpi.BackupSetName
4659 }
4660 if avwpi.CreateMode != "" {
4661 objectMap["createMode"] = avwpi.CreateMode
4662 }
4663 if avwpi.DeferredDeleteTimeInUTC != nil {
4664 objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC
4665 }
4666 if avwpi.IsScheduledForDeferredDelete != nil {
4667 objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete
4668 }
4669 if avwpi.DeferredDeleteTimeRemaining != nil {
4670 objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining
4671 }
4672 if avwpi.IsDeferredDeleteScheduleUpcoming != nil {
4673 objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming
4674 }
4675 if avwpi.IsRehydrate != nil {
4676 objectMap["isRehydrate"] = avwpi.IsRehydrate
4677 }
4678 if avwpi.ProtectedItemType != "" {
4679 objectMap["protectedItemType"] = avwpi.ProtectedItemType
4680 }
4681 return json.Marshal(objectMap)
4682 }
4683
4684
4685 func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
4686 return nil, false
4687 }
4688
4689
4690 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
4691 return nil, false
4692 }
4693
4694
4695 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
4696 return nil, false
4697 }
4698
4699
4700 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
4701 return nil, false
4702 }
4703
4704
4705 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
4706 return nil, false
4707 }
4708
4709
4710 func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
4711 return nil, false
4712 }
4713
4714
4715 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
4716 return &avwpi, true
4717 }
4718
4719
4720 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
4721 return &avwpi, true
4722 }
4723
4724
4725 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
4726 return nil, false
4727 }
4728
4729
4730 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
4731 return nil, false
4732 }
4733
4734
4735 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
4736 return nil, false
4737 }
4738
4739
4740 func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
4741 return nil, false
4742 }
4743
4744
4745 func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
4746 return nil, false
4747 }
4748
4749
4750 func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
4751 return nil, false
4752 }
4753
4754
4755 func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
4756 return nil, false
4757 }
4758
4759
4760 func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
4761 return &avwpi, true
4762 }
4763
4764
4765
4766 type AzureVMWorkloadProtectedItemExtendedInfo struct {
4767
4768 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
4769
4770 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
4771
4772 PolicyState *string `json:"policyState,omitempty"`
4773 }
4774
4775
4776 type AzureVMWorkloadProtectionPolicy struct {
4777
4778 WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
4779
4780 Settings *Settings `json:"settings,omitempty"`
4781
4782 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
4783
4784 MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"`
4785
4786 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
4787
4788 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
4789 }
4790
4791
4792 func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) {
4793 avwpp.BackupManagementType = BackupManagementTypeAzureWorkload
4794 objectMap := make(map[string]interface{})
4795 if avwpp.WorkLoadType != "" {
4796 objectMap["workLoadType"] = avwpp.WorkLoadType
4797 }
4798 if avwpp.Settings != nil {
4799 objectMap["settings"] = avwpp.Settings
4800 }
4801 if avwpp.SubProtectionPolicy != nil {
4802 objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy
4803 }
4804 if avwpp.MakePolicyConsistent != nil {
4805 objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent
4806 }
4807 if avwpp.ProtectedItemsCount != nil {
4808 objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount
4809 }
4810 if avwpp.BackupManagementType != "" {
4811 objectMap["backupManagementType"] = avwpp.BackupManagementType
4812 }
4813 return json.Marshal(objectMap)
4814 }
4815
4816
4817 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
4818 return &avwpp, true
4819 }
4820
4821
4822 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
4823 return nil, false
4824 }
4825
4826
4827 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
4828 return nil, false
4829 }
4830
4831
4832 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
4833 return nil, false
4834 }
4835
4836
4837 func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
4838 return nil, false
4839 }
4840
4841
4842 func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
4843 return nil, false
4844 }
4845
4846
4847 func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
4848 return nil, false
4849 }
4850
4851
4852 func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
4853 return &avwpp, true
4854 }
4855
4856
4857
4858 type AzureVMWorkloadSAPAseDatabaseProtectedItem struct {
4859
4860 FriendlyName *string `json:"friendlyName,omitempty"`
4861
4862 ServerName *string `json:"serverName,omitempty"`
4863
4864 ParentName *string `json:"parentName,omitempty"`
4865
4866 ParentType *string `json:"parentType,omitempty"`
4867
4868 ProtectionStatus *string `json:"protectionStatus,omitempty"`
4869
4870 ProtectionState ProtectionState `json:"protectionState,omitempty"`
4871
4872 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
4873
4874 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
4875
4876 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
4877
4878 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
4879
4880 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
4881
4882 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
4883
4884 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
4885
4886 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4887
4888 WorkloadType DataSourceType `json:"workloadType,omitempty"`
4889
4890 ContainerName *string `json:"containerName,omitempty"`
4891
4892 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4893
4894 PolicyID *string `json:"policyId,omitempty"`
4895
4896 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
4897
4898 BackupSetName *string `json:"backupSetName,omitempty"`
4899
4900 CreateMode CreateMode `json:"createMode,omitempty"`
4901
4902 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
4903
4904 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
4905
4906 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
4907
4908 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
4909
4910 IsRehydrate *bool `json:"isRehydrate,omitempty"`
4911
4912 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
4913 }
4914
4915
4916 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
4917 avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase
4918 objectMap := make(map[string]interface{})
4919 if avwsadpi.FriendlyName != nil {
4920 objectMap["friendlyName"] = avwsadpi.FriendlyName
4921 }
4922 if avwsadpi.ServerName != nil {
4923 objectMap["serverName"] = avwsadpi.ServerName
4924 }
4925 if avwsadpi.ParentName != nil {
4926 objectMap["parentName"] = avwsadpi.ParentName
4927 }
4928 if avwsadpi.ParentType != nil {
4929 objectMap["parentType"] = avwsadpi.ParentType
4930 }
4931 if avwsadpi.ProtectionStatus != nil {
4932 objectMap["protectionStatus"] = avwsadpi.ProtectionStatus
4933 }
4934 if avwsadpi.ProtectionState != "" {
4935 objectMap["protectionState"] = avwsadpi.ProtectionState
4936 }
4937 if avwsadpi.LastBackupStatus != "" {
4938 objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus
4939 }
4940 if avwsadpi.LastBackupTime != nil {
4941 objectMap["lastBackupTime"] = avwsadpi.LastBackupTime
4942 }
4943 if avwsadpi.LastBackupErrorDetail != nil {
4944 objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail
4945 }
4946 if avwsadpi.ProtectedItemDataSourceID != nil {
4947 objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID
4948 }
4949 if avwsadpi.ProtectedItemHealthStatus != "" {
4950 objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus
4951 }
4952 if avwsadpi.ExtendedInfo != nil {
4953 objectMap["extendedInfo"] = avwsadpi.ExtendedInfo
4954 }
4955 if avwsadpi.KpisHealths != nil {
4956 objectMap["kpisHealths"] = avwsadpi.KpisHealths
4957 }
4958 if avwsadpi.BackupManagementType != "" {
4959 objectMap["backupManagementType"] = avwsadpi.BackupManagementType
4960 }
4961 if avwsadpi.WorkloadType != "" {
4962 objectMap["workloadType"] = avwsadpi.WorkloadType
4963 }
4964 if avwsadpi.ContainerName != nil {
4965 objectMap["containerName"] = avwsadpi.ContainerName
4966 }
4967 if avwsadpi.SourceResourceID != nil {
4968 objectMap["sourceResourceId"] = avwsadpi.SourceResourceID
4969 }
4970 if avwsadpi.PolicyID != nil {
4971 objectMap["policyId"] = avwsadpi.PolicyID
4972 }
4973 if avwsadpi.LastRecoveryPoint != nil {
4974 objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint
4975 }
4976 if avwsadpi.BackupSetName != nil {
4977 objectMap["backupSetName"] = avwsadpi.BackupSetName
4978 }
4979 if avwsadpi.CreateMode != "" {
4980 objectMap["createMode"] = avwsadpi.CreateMode
4981 }
4982 if avwsadpi.DeferredDeleteTimeInUTC != nil {
4983 objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC
4984 }
4985 if avwsadpi.IsScheduledForDeferredDelete != nil {
4986 objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete
4987 }
4988 if avwsadpi.DeferredDeleteTimeRemaining != nil {
4989 objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining
4990 }
4991 if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil {
4992 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming
4993 }
4994 if avwsadpi.IsRehydrate != nil {
4995 objectMap["isRehydrate"] = avwsadpi.IsRehydrate
4996 }
4997 if avwsadpi.ProtectedItemType != "" {
4998 objectMap["protectedItemType"] = avwsadpi.ProtectedItemType
4999 }
5000 return json.Marshal(objectMap)
5001 }
5002
5003
5004 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5005 return nil, false
5006 }
5007
5008
5009 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5010 return nil, false
5011 }
5012
5013
5014 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5015 return nil, false
5016 }
5017
5018
5019 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5020 return nil, false
5021 }
5022
5023
5024 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5025 return nil, false
5026 }
5027
5028
5029 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5030 return nil, false
5031 }
5032
5033
5034 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5035 return nil, false
5036 }
5037
5038
5039 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5040 return &avwsadpi, true
5041 }
5042
5043
5044 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5045 return &avwsadpi, true
5046 }
5047
5048
5049 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5050 return nil, false
5051 }
5052
5053
5054 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5055 return nil, false
5056 }
5057
5058
5059 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5060 return nil, false
5061 }
5062
5063
5064 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5065 return nil, false
5066 }
5067
5068
5069 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5070 return nil, false
5071 }
5072
5073
5074 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5075 return nil, false
5076 }
5077
5078
5079 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5080 return &avwsadpi, true
5081 }
5082
5083
5084
5085 type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct {
5086
5087 ParentName *string `json:"parentName,omitempty"`
5088
5089 ServerName *string `json:"serverName,omitempty"`
5090
5091 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5092
5093 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5094
5095 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5096
5097 BackupManagementType *string `json:"backupManagementType,omitempty"`
5098
5099 WorkloadType *string `json:"workloadType,omitempty"`
5100
5101 FriendlyName *string `json:"friendlyName,omitempty"`
5102
5103 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5104
5105 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5106 }
5107
5108
5109 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
5110 avwsadwi.WorkloadItemType = WorkloadItemTypeSAPAseDatabase1
5111 objectMap := make(map[string]interface{})
5112 if avwsadwi.ParentName != nil {
5113 objectMap["parentName"] = avwsadwi.ParentName
5114 }
5115 if avwsadwi.ServerName != nil {
5116 objectMap["serverName"] = avwsadwi.ServerName
5117 }
5118 if avwsadwi.IsAutoProtectable != nil {
5119 objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable
5120 }
5121 if avwsadwi.Subinquireditemcount != nil {
5122 objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount
5123 }
5124 if avwsadwi.SubWorkloadItemCount != nil {
5125 objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount
5126 }
5127 if avwsadwi.BackupManagementType != nil {
5128 objectMap["backupManagementType"] = avwsadwi.BackupManagementType
5129 }
5130 if avwsadwi.WorkloadType != nil {
5131 objectMap["workloadType"] = avwsadwi.WorkloadType
5132 }
5133 if avwsadwi.FriendlyName != nil {
5134 objectMap["friendlyName"] = avwsadwi.FriendlyName
5135 }
5136 if avwsadwi.ProtectionState != "" {
5137 objectMap["protectionState"] = avwsadwi.ProtectionState
5138 }
5139 if avwsadwi.WorkloadItemType != "" {
5140 objectMap["workloadItemType"] = avwsadwi.WorkloadItemType
5141 }
5142 return json.Marshal(objectMap)
5143 }
5144
5145
5146 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5147 return nil, false
5148 }
5149
5150
5151 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5152 return &avwsadwi, true
5153 }
5154
5155
5156 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5157 return &avwsadwi, true
5158 }
5159
5160
5161 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5162 return nil, false
5163 }
5164
5165
5166 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5167 return nil, false
5168 }
5169
5170
5171 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5172 return nil, false
5173 }
5174
5175
5176 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5177 return nil, false
5178 }
5179
5180
5181 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5182 return nil, false
5183 }
5184
5185
5186 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5187 return nil, false
5188 }
5189
5190
5191 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5192 return &avwsadwi, true
5193 }
5194
5195
5196
5197 type AzureVMWorkloadSAPAseSystemProtectableItem struct {
5198
5199 ParentName *string `json:"parentName,omitempty"`
5200
5201
5202 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5203
5204 ServerName *string `json:"serverName,omitempty"`
5205
5206 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5207
5208 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5209
5210 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5211
5212 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5213
5214 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5215
5216 BackupManagementType *string `json:"backupManagementType,omitempty"`
5217
5218 WorkloadType *string `json:"workloadType,omitempty"`
5219
5220 FriendlyName *string `json:"friendlyName,omitempty"`
5221
5222 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5223
5224 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5225 }
5226
5227
5228 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) {
5229 avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem
5230 objectMap := make(map[string]interface{})
5231 if avwsaspi.ParentName != nil {
5232 objectMap["parentName"] = avwsaspi.ParentName
5233 }
5234 if avwsaspi.ParentUniqueName != nil {
5235 objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName
5236 }
5237 if avwsaspi.ServerName != nil {
5238 objectMap["serverName"] = avwsaspi.ServerName
5239 }
5240 if avwsaspi.IsAutoProtectable != nil {
5241 objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable
5242 }
5243 if avwsaspi.IsAutoProtected != nil {
5244 objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected
5245 }
5246 if avwsaspi.Subinquireditemcount != nil {
5247 objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount
5248 }
5249 if avwsaspi.Subprotectableitemcount != nil {
5250 objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount
5251 }
5252 if avwsaspi.Prebackupvalidation != nil {
5253 objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation
5254 }
5255 if avwsaspi.BackupManagementType != nil {
5256 objectMap["backupManagementType"] = avwsaspi.BackupManagementType
5257 }
5258 if avwsaspi.WorkloadType != nil {
5259 objectMap["workloadType"] = avwsaspi.WorkloadType
5260 }
5261 if avwsaspi.FriendlyName != nil {
5262 objectMap["friendlyName"] = avwsaspi.FriendlyName
5263 }
5264 if avwsaspi.ProtectionState != "" {
5265 objectMap["protectionState"] = avwsaspi.ProtectionState
5266 }
5267 if avwsaspi.ProtectableItemType != "" {
5268 objectMap["protectableItemType"] = avwsaspi.ProtectableItemType
5269 }
5270 return json.Marshal(objectMap)
5271 }
5272
5273
5274 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5275 return nil, false
5276 }
5277
5278
5279 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5280 return nil, false
5281 }
5282
5283
5284 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5285 return nil, false
5286 }
5287
5288
5289 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5290 return nil, false
5291 }
5292
5293
5294 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5295 return &avwsaspi, true
5296 }
5297
5298
5299 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5300 return &avwsaspi, true
5301 }
5302
5303
5304 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5305 return nil, false
5306 }
5307
5308
5309 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5310 return nil, false
5311 }
5312
5313
5314 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5315 return nil, false
5316 }
5317
5318
5319 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5320 return nil, false
5321 }
5322
5323
5324 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5325 return nil, false
5326 }
5327
5328
5329 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5330 return nil, false
5331 }
5332
5333
5334 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5335 return nil, false
5336 }
5337
5338
5339 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5340 return nil, false
5341 }
5342
5343
5344 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5345 return &avwsaspi, true
5346 }
5347
5348
5349
5350 type AzureVMWorkloadSAPAseSystemWorkloadItem struct {
5351
5352 ParentName *string `json:"parentName,omitempty"`
5353
5354 ServerName *string `json:"serverName,omitempty"`
5355
5356 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5357
5358 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5359
5360 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5361
5362 BackupManagementType *string `json:"backupManagementType,omitempty"`
5363
5364 WorkloadType *string `json:"workloadType,omitempty"`
5365
5366 FriendlyName *string `json:"friendlyName,omitempty"`
5367
5368 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5369
5370 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5371 }
5372
5373
5374 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) {
5375 avwsaswi.WorkloadItemType = WorkloadItemTypeSAPAseSystem1
5376 objectMap := make(map[string]interface{})
5377 if avwsaswi.ParentName != nil {
5378 objectMap["parentName"] = avwsaswi.ParentName
5379 }
5380 if avwsaswi.ServerName != nil {
5381 objectMap["serverName"] = avwsaswi.ServerName
5382 }
5383 if avwsaswi.IsAutoProtectable != nil {
5384 objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable
5385 }
5386 if avwsaswi.Subinquireditemcount != nil {
5387 objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount
5388 }
5389 if avwsaswi.SubWorkloadItemCount != nil {
5390 objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount
5391 }
5392 if avwsaswi.BackupManagementType != nil {
5393 objectMap["backupManagementType"] = avwsaswi.BackupManagementType
5394 }
5395 if avwsaswi.WorkloadType != nil {
5396 objectMap["workloadType"] = avwsaswi.WorkloadType
5397 }
5398 if avwsaswi.FriendlyName != nil {
5399 objectMap["friendlyName"] = avwsaswi.FriendlyName
5400 }
5401 if avwsaswi.ProtectionState != "" {
5402 objectMap["protectionState"] = avwsaswi.ProtectionState
5403 }
5404 if avwsaswi.WorkloadItemType != "" {
5405 objectMap["workloadItemType"] = avwsaswi.WorkloadItemType
5406 }
5407 return json.Marshal(objectMap)
5408 }
5409
5410
5411 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5412 return nil, false
5413 }
5414
5415
5416 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5417 return &avwsaswi, true
5418 }
5419
5420
5421 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5422 return nil, false
5423 }
5424
5425
5426 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5427 return &avwsaswi, true
5428 }
5429
5430
5431 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5432 return nil, false
5433 }
5434
5435
5436 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5437 return nil, false
5438 }
5439
5440
5441 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5442 return nil, false
5443 }
5444
5445
5446 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5447 return nil, false
5448 }
5449
5450
5451 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5452 return nil, false
5453 }
5454
5455
5456 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5457 return &avwsaswi, true
5458 }
5459
5460
5461
5462 type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct {
5463
5464 ParentName *string `json:"parentName,omitempty"`
5465
5466
5467 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5468
5469 ServerName *string `json:"serverName,omitempty"`
5470
5471 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5472
5473 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5474
5475 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5476
5477 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5478
5479 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5480
5481 BackupManagementType *string `json:"backupManagementType,omitempty"`
5482
5483 WorkloadType *string `json:"workloadType,omitempty"`
5484
5485 FriendlyName *string `json:"friendlyName,omitempty"`
5486
5487 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5488
5489 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5490 }
5491
5492
5493 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
5494 avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase
5495 objectMap := make(map[string]interface{})
5496 if avwshdpi.ParentName != nil {
5497 objectMap["parentName"] = avwshdpi.ParentName
5498 }
5499 if avwshdpi.ParentUniqueName != nil {
5500 objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName
5501 }
5502 if avwshdpi.ServerName != nil {
5503 objectMap["serverName"] = avwshdpi.ServerName
5504 }
5505 if avwshdpi.IsAutoProtectable != nil {
5506 objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable
5507 }
5508 if avwshdpi.IsAutoProtected != nil {
5509 objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected
5510 }
5511 if avwshdpi.Subinquireditemcount != nil {
5512 objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount
5513 }
5514 if avwshdpi.Subprotectableitemcount != nil {
5515 objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount
5516 }
5517 if avwshdpi.Prebackupvalidation != nil {
5518 objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation
5519 }
5520 if avwshdpi.BackupManagementType != nil {
5521 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
5522 }
5523 if avwshdpi.WorkloadType != nil {
5524 objectMap["workloadType"] = avwshdpi.WorkloadType
5525 }
5526 if avwshdpi.FriendlyName != nil {
5527 objectMap["friendlyName"] = avwshdpi.FriendlyName
5528 }
5529 if avwshdpi.ProtectionState != "" {
5530 objectMap["protectionState"] = avwshdpi.ProtectionState
5531 }
5532 if avwshdpi.ProtectableItemType != "" {
5533 objectMap["protectableItemType"] = avwshdpi.ProtectableItemType
5534 }
5535 return json.Marshal(objectMap)
5536 }
5537
5538
5539 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5540 return nil, false
5541 }
5542
5543
5544 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5545 return nil, false
5546 }
5547
5548
5549 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5550 return nil, false
5551 }
5552
5553
5554 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5555 return nil, false
5556 }
5557
5558
5559 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5560 return &avwshdpi, true
5561 }
5562
5563
5564 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5565 return nil, false
5566 }
5567
5568
5569 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5570 return &avwshdpi, true
5571 }
5572
5573
5574 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5575 return nil, false
5576 }
5577
5578
5579 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5580 return nil, false
5581 }
5582
5583
5584 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5585 return nil, false
5586 }
5587
5588
5589 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5590 return nil, false
5591 }
5592
5593
5594 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5595 return nil, false
5596 }
5597
5598
5599 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5600 return nil, false
5601 }
5602
5603
5604 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5605 return nil, false
5606 }
5607
5608
5609 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5610 return &avwshdpi, true
5611 }
5612
5613
5614
5615 type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct {
5616
5617 FriendlyName *string `json:"friendlyName,omitempty"`
5618
5619 ServerName *string `json:"serverName,omitempty"`
5620
5621 ParentName *string `json:"parentName,omitempty"`
5622
5623 ParentType *string `json:"parentType,omitempty"`
5624
5625 ProtectionStatus *string `json:"protectionStatus,omitempty"`
5626
5627 ProtectionState ProtectionState `json:"protectionState,omitempty"`
5628
5629 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
5630
5631 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
5632
5633 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
5634
5635 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
5636
5637 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
5638
5639 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
5640
5641 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
5642
5643 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
5644
5645 WorkloadType DataSourceType `json:"workloadType,omitempty"`
5646
5647 ContainerName *string `json:"containerName,omitempty"`
5648
5649 SourceResourceID *string `json:"sourceResourceId,omitempty"`
5650
5651 PolicyID *string `json:"policyId,omitempty"`
5652
5653 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
5654
5655 BackupSetName *string `json:"backupSetName,omitempty"`
5656
5657 CreateMode CreateMode `json:"createMode,omitempty"`
5658
5659 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
5660
5661 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
5662
5663 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
5664
5665 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
5666
5667 IsRehydrate *bool `json:"isRehydrate,omitempty"`
5668
5669 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
5670 }
5671
5672
5673 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
5674 avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase
5675 objectMap := make(map[string]interface{})
5676 if avwshdpi.FriendlyName != nil {
5677 objectMap["friendlyName"] = avwshdpi.FriendlyName
5678 }
5679 if avwshdpi.ServerName != nil {
5680 objectMap["serverName"] = avwshdpi.ServerName
5681 }
5682 if avwshdpi.ParentName != nil {
5683 objectMap["parentName"] = avwshdpi.ParentName
5684 }
5685 if avwshdpi.ParentType != nil {
5686 objectMap["parentType"] = avwshdpi.ParentType
5687 }
5688 if avwshdpi.ProtectionStatus != nil {
5689 objectMap["protectionStatus"] = avwshdpi.ProtectionStatus
5690 }
5691 if avwshdpi.ProtectionState != "" {
5692 objectMap["protectionState"] = avwshdpi.ProtectionState
5693 }
5694 if avwshdpi.LastBackupStatus != "" {
5695 objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus
5696 }
5697 if avwshdpi.LastBackupTime != nil {
5698 objectMap["lastBackupTime"] = avwshdpi.LastBackupTime
5699 }
5700 if avwshdpi.LastBackupErrorDetail != nil {
5701 objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail
5702 }
5703 if avwshdpi.ProtectedItemDataSourceID != nil {
5704 objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID
5705 }
5706 if avwshdpi.ProtectedItemHealthStatus != "" {
5707 objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus
5708 }
5709 if avwshdpi.ExtendedInfo != nil {
5710 objectMap["extendedInfo"] = avwshdpi.ExtendedInfo
5711 }
5712 if avwshdpi.KpisHealths != nil {
5713 objectMap["kpisHealths"] = avwshdpi.KpisHealths
5714 }
5715 if avwshdpi.BackupManagementType != "" {
5716 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
5717 }
5718 if avwshdpi.WorkloadType != "" {
5719 objectMap["workloadType"] = avwshdpi.WorkloadType
5720 }
5721 if avwshdpi.ContainerName != nil {
5722 objectMap["containerName"] = avwshdpi.ContainerName
5723 }
5724 if avwshdpi.SourceResourceID != nil {
5725 objectMap["sourceResourceId"] = avwshdpi.SourceResourceID
5726 }
5727 if avwshdpi.PolicyID != nil {
5728 objectMap["policyId"] = avwshdpi.PolicyID
5729 }
5730 if avwshdpi.LastRecoveryPoint != nil {
5731 objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint
5732 }
5733 if avwshdpi.BackupSetName != nil {
5734 objectMap["backupSetName"] = avwshdpi.BackupSetName
5735 }
5736 if avwshdpi.CreateMode != "" {
5737 objectMap["createMode"] = avwshdpi.CreateMode
5738 }
5739 if avwshdpi.DeferredDeleteTimeInUTC != nil {
5740 objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC
5741 }
5742 if avwshdpi.IsScheduledForDeferredDelete != nil {
5743 objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete
5744 }
5745 if avwshdpi.DeferredDeleteTimeRemaining != nil {
5746 objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining
5747 }
5748 if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil {
5749 objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming
5750 }
5751 if avwshdpi.IsRehydrate != nil {
5752 objectMap["isRehydrate"] = avwshdpi.IsRehydrate
5753 }
5754 if avwshdpi.ProtectedItemType != "" {
5755 objectMap["protectedItemType"] = avwshdpi.ProtectedItemType
5756 }
5757 return json.Marshal(objectMap)
5758 }
5759
5760
5761 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5762 return nil, false
5763 }
5764
5765
5766 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5767 return nil, false
5768 }
5769
5770
5771 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5772 return nil, false
5773 }
5774
5775
5776 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5777 return nil, false
5778 }
5779
5780
5781 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5782 return nil, false
5783 }
5784
5785
5786 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5787 return nil, false
5788 }
5789
5790
5791 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5792 return nil, false
5793 }
5794
5795
5796 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5797 return &avwshdpi, true
5798 }
5799
5800
5801 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5802 return nil, false
5803 }
5804
5805
5806 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5807 return &avwshdpi, true
5808 }
5809
5810
5811 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5812 return nil, false
5813 }
5814
5815
5816 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5817 return nil, false
5818 }
5819
5820
5821 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5822 return nil, false
5823 }
5824
5825
5826 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5827 return nil, false
5828 }
5829
5830
5831 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5832 return nil, false
5833 }
5834
5835
5836 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5837 return &avwshdpi, true
5838 }
5839
5840
5841
5842 type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct {
5843
5844 ParentName *string `json:"parentName,omitempty"`
5845
5846 ServerName *string `json:"serverName,omitempty"`
5847
5848 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5849
5850 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5851
5852 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5853
5854 BackupManagementType *string `json:"backupManagementType,omitempty"`
5855
5856 WorkloadType *string `json:"workloadType,omitempty"`
5857
5858 FriendlyName *string `json:"friendlyName,omitempty"`
5859
5860 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5861
5862 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5863 }
5864
5865
5866 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
5867 avwshdwi.WorkloadItemType = WorkloadItemTypeSAPHanaDatabase1
5868 objectMap := make(map[string]interface{})
5869 if avwshdwi.ParentName != nil {
5870 objectMap["parentName"] = avwshdwi.ParentName
5871 }
5872 if avwshdwi.ServerName != nil {
5873 objectMap["serverName"] = avwshdwi.ServerName
5874 }
5875 if avwshdwi.IsAutoProtectable != nil {
5876 objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable
5877 }
5878 if avwshdwi.Subinquireditemcount != nil {
5879 objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount
5880 }
5881 if avwshdwi.SubWorkloadItemCount != nil {
5882 objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount
5883 }
5884 if avwshdwi.BackupManagementType != nil {
5885 objectMap["backupManagementType"] = avwshdwi.BackupManagementType
5886 }
5887 if avwshdwi.WorkloadType != nil {
5888 objectMap["workloadType"] = avwshdwi.WorkloadType
5889 }
5890 if avwshdwi.FriendlyName != nil {
5891 objectMap["friendlyName"] = avwshdwi.FriendlyName
5892 }
5893 if avwshdwi.ProtectionState != "" {
5894 objectMap["protectionState"] = avwshdwi.ProtectionState
5895 }
5896 if avwshdwi.WorkloadItemType != "" {
5897 objectMap["workloadItemType"] = avwshdwi.WorkloadItemType
5898 }
5899 return json.Marshal(objectMap)
5900 }
5901
5902
5903 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5904 return nil, false
5905 }
5906
5907
5908 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5909 return &avwshdwi, true
5910 }
5911
5912
5913 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5914 return nil, false
5915 }
5916
5917
5918 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5919 return nil, false
5920 }
5921
5922
5923 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5924 return &avwshdwi, true
5925 }
5926
5927
5928 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5929 return nil, false
5930 }
5931
5932
5933 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5934 return nil, false
5935 }
5936
5937
5938 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5939 return nil, false
5940 }
5941
5942
5943 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5944 return nil, false
5945 }
5946
5947
5948 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5949 return &avwshdwi, true
5950 }
5951
5952
5953
5954 type AzureVMWorkloadSAPHanaSystemProtectableItem struct {
5955
5956 ParentName *string `json:"parentName,omitempty"`
5957
5958
5959 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5960
5961 ServerName *string `json:"serverName,omitempty"`
5962
5963 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5964
5965 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5966
5967 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5968
5969 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5970
5971 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5972
5973 BackupManagementType *string `json:"backupManagementType,omitempty"`
5974
5975 WorkloadType *string `json:"workloadType,omitempty"`
5976
5977 FriendlyName *string `json:"friendlyName,omitempty"`
5978
5979 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5980
5981 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5982 }
5983
5984
5985 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) {
5986 avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem
5987 objectMap := make(map[string]interface{})
5988 if avwshspi.ParentName != nil {
5989 objectMap["parentName"] = avwshspi.ParentName
5990 }
5991 if avwshspi.ParentUniqueName != nil {
5992 objectMap["parentUniqueName"] = avwshspi.ParentUniqueName
5993 }
5994 if avwshspi.ServerName != nil {
5995 objectMap["serverName"] = avwshspi.ServerName
5996 }
5997 if avwshspi.IsAutoProtectable != nil {
5998 objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable
5999 }
6000 if avwshspi.IsAutoProtected != nil {
6001 objectMap["isAutoProtected"] = avwshspi.IsAutoProtected
6002 }
6003 if avwshspi.Subinquireditemcount != nil {
6004 objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount
6005 }
6006 if avwshspi.Subprotectableitemcount != nil {
6007 objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount
6008 }
6009 if avwshspi.Prebackupvalidation != nil {
6010 objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation
6011 }
6012 if avwshspi.BackupManagementType != nil {
6013 objectMap["backupManagementType"] = avwshspi.BackupManagementType
6014 }
6015 if avwshspi.WorkloadType != nil {
6016 objectMap["workloadType"] = avwshspi.WorkloadType
6017 }
6018 if avwshspi.FriendlyName != nil {
6019 objectMap["friendlyName"] = avwshspi.FriendlyName
6020 }
6021 if avwshspi.ProtectionState != "" {
6022 objectMap["protectionState"] = avwshspi.ProtectionState
6023 }
6024 if avwshspi.ProtectableItemType != "" {
6025 objectMap["protectableItemType"] = avwshspi.ProtectableItemType
6026 }
6027 return json.Marshal(objectMap)
6028 }
6029
6030
6031 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6032 return nil, false
6033 }
6034
6035
6036 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6037 return nil, false
6038 }
6039
6040
6041 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6042 return nil, false
6043 }
6044
6045
6046 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6047 return nil, false
6048 }
6049
6050
6051 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6052 return &avwshspi, true
6053 }
6054
6055
6056 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6057 return nil, false
6058 }
6059
6060
6061 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6062 return nil, false
6063 }
6064
6065
6066 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6067 return &avwshspi, true
6068 }
6069
6070
6071 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6072 return nil, false
6073 }
6074
6075
6076 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6077 return nil, false
6078 }
6079
6080
6081 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6082 return nil, false
6083 }
6084
6085
6086 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6087 return nil, false
6088 }
6089
6090
6091 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6092 return nil, false
6093 }
6094
6095
6096 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6097 return nil, false
6098 }
6099
6100
6101 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6102 return &avwshspi, true
6103 }
6104
6105
6106
6107 type AzureVMWorkloadSAPHanaSystemWorkloadItem struct {
6108
6109 ParentName *string `json:"parentName,omitempty"`
6110
6111 ServerName *string `json:"serverName,omitempty"`
6112
6113 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6114
6115 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6116
6117 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6118
6119 BackupManagementType *string `json:"backupManagementType,omitempty"`
6120
6121 WorkloadType *string `json:"workloadType,omitempty"`
6122
6123 FriendlyName *string `json:"friendlyName,omitempty"`
6124
6125 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6126
6127 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6128 }
6129
6130
6131 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) {
6132 avwshswi.WorkloadItemType = WorkloadItemTypeSAPHanaSystem1
6133 objectMap := make(map[string]interface{})
6134 if avwshswi.ParentName != nil {
6135 objectMap["parentName"] = avwshswi.ParentName
6136 }
6137 if avwshswi.ServerName != nil {
6138 objectMap["serverName"] = avwshswi.ServerName
6139 }
6140 if avwshswi.IsAutoProtectable != nil {
6141 objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable
6142 }
6143 if avwshswi.Subinquireditemcount != nil {
6144 objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount
6145 }
6146 if avwshswi.SubWorkloadItemCount != nil {
6147 objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount
6148 }
6149 if avwshswi.BackupManagementType != nil {
6150 objectMap["backupManagementType"] = avwshswi.BackupManagementType
6151 }
6152 if avwshswi.WorkloadType != nil {
6153 objectMap["workloadType"] = avwshswi.WorkloadType
6154 }
6155 if avwshswi.FriendlyName != nil {
6156 objectMap["friendlyName"] = avwshswi.FriendlyName
6157 }
6158 if avwshswi.ProtectionState != "" {
6159 objectMap["protectionState"] = avwshswi.ProtectionState
6160 }
6161 if avwshswi.WorkloadItemType != "" {
6162 objectMap["workloadItemType"] = avwshswi.WorkloadItemType
6163 }
6164 return json.Marshal(objectMap)
6165 }
6166
6167
6168 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6169 return nil, false
6170 }
6171
6172
6173 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6174 return &avwshswi, true
6175 }
6176
6177
6178 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6179 return nil, false
6180 }
6181
6182
6183 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6184 return nil, false
6185 }
6186
6187
6188 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6189 return nil, false
6190 }
6191
6192
6193 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6194 return &avwshswi, true
6195 }
6196
6197
6198 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6199 return nil, false
6200 }
6201
6202
6203 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6204 return nil, false
6205 }
6206
6207
6208 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6209 return nil, false
6210 }
6211
6212
6213 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6214 return &avwshswi, true
6215 }
6216
6217
6218
6219 type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct {
6220
6221 ParentName *string `json:"parentName,omitempty"`
6222
6223
6224 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6225
6226 ServerName *string `json:"serverName,omitempty"`
6227
6228 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6229
6230 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6231
6232 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6233
6234 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6235
6236 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6237
6238 BackupManagementType *string `json:"backupManagementType,omitempty"`
6239
6240 WorkloadType *string `json:"workloadType,omitempty"`
6241
6242 FriendlyName *string `json:"friendlyName,omitempty"`
6243
6244 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6245
6246 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6247 }
6248
6249
6250 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) {
6251 avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer
6252 objectMap := make(map[string]interface{})
6253 if avwsagpi.ParentName != nil {
6254 objectMap["parentName"] = avwsagpi.ParentName
6255 }
6256 if avwsagpi.ParentUniqueName != nil {
6257 objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName
6258 }
6259 if avwsagpi.ServerName != nil {
6260 objectMap["serverName"] = avwsagpi.ServerName
6261 }
6262 if avwsagpi.IsAutoProtectable != nil {
6263 objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable
6264 }
6265 if avwsagpi.IsAutoProtected != nil {
6266 objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected
6267 }
6268 if avwsagpi.Subinquireditemcount != nil {
6269 objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount
6270 }
6271 if avwsagpi.Subprotectableitemcount != nil {
6272 objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount
6273 }
6274 if avwsagpi.Prebackupvalidation != nil {
6275 objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation
6276 }
6277 if avwsagpi.BackupManagementType != nil {
6278 objectMap["backupManagementType"] = avwsagpi.BackupManagementType
6279 }
6280 if avwsagpi.WorkloadType != nil {
6281 objectMap["workloadType"] = avwsagpi.WorkloadType
6282 }
6283 if avwsagpi.FriendlyName != nil {
6284 objectMap["friendlyName"] = avwsagpi.FriendlyName
6285 }
6286 if avwsagpi.ProtectionState != "" {
6287 objectMap["protectionState"] = avwsagpi.ProtectionState
6288 }
6289 if avwsagpi.ProtectableItemType != "" {
6290 objectMap["protectableItemType"] = avwsagpi.ProtectableItemType
6291 }
6292 return json.Marshal(objectMap)
6293 }
6294
6295
6296 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6297 return nil, false
6298 }
6299
6300
6301 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6302 return nil, false
6303 }
6304
6305
6306 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6307 return nil, false
6308 }
6309
6310
6311 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6312 return nil, false
6313 }
6314
6315
6316 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6317 return &avwsagpi, true
6318 }
6319
6320
6321 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6322 return nil, false
6323 }
6324
6325
6326 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6327 return nil, false
6328 }
6329
6330
6331 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6332 return nil, false
6333 }
6334
6335
6336 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6337 return &avwsagpi, true
6338 }
6339
6340
6341 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6342 return nil, false
6343 }
6344
6345
6346 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6347 return nil, false
6348 }
6349
6350
6351 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6352 return nil, false
6353 }
6354
6355
6356 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6357 return nil, false
6358 }
6359
6360
6361 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6362 return nil, false
6363 }
6364
6365
6366 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6367 return &avwsagpi, true
6368 }
6369
6370
6371
6372 type AzureVMWorkloadSQLDatabaseProtectableItem struct {
6373
6374 ParentName *string `json:"parentName,omitempty"`
6375
6376
6377 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6378
6379 ServerName *string `json:"serverName,omitempty"`
6380
6381 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6382
6383 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6384
6385 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6386
6387 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6388
6389 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6390
6391 BackupManagementType *string `json:"backupManagementType,omitempty"`
6392
6393 WorkloadType *string `json:"workloadType,omitempty"`
6394
6395 FriendlyName *string `json:"friendlyName,omitempty"`
6396
6397 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6398
6399 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6400 }
6401
6402
6403 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
6404 avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase
6405 objectMap := make(map[string]interface{})
6406 if avwsdpi.ParentName != nil {
6407 objectMap["parentName"] = avwsdpi.ParentName
6408 }
6409 if avwsdpi.ParentUniqueName != nil {
6410 objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName
6411 }
6412 if avwsdpi.ServerName != nil {
6413 objectMap["serverName"] = avwsdpi.ServerName
6414 }
6415 if avwsdpi.IsAutoProtectable != nil {
6416 objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable
6417 }
6418 if avwsdpi.IsAutoProtected != nil {
6419 objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected
6420 }
6421 if avwsdpi.Subinquireditemcount != nil {
6422 objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount
6423 }
6424 if avwsdpi.Subprotectableitemcount != nil {
6425 objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount
6426 }
6427 if avwsdpi.Prebackupvalidation != nil {
6428 objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation
6429 }
6430 if avwsdpi.BackupManagementType != nil {
6431 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6432 }
6433 if avwsdpi.WorkloadType != nil {
6434 objectMap["workloadType"] = avwsdpi.WorkloadType
6435 }
6436 if avwsdpi.FriendlyName != nil {
6437 objectMap["friendlyName"] = avwsdpi.FriendlyName
6438 }
6439 if avwsdpi.ProtectionState != "" {
6440 objectMap["protectionState"] = avwsdpi.ProtectionState
6441 }
6442 if avwsdpi.ProtectableItemType != "" {
6443 objectMap["protectableItemType"] = avwsdpi.ProtectableItemType
6444 }
6445 return json.Marshal(objectMap)
6446 }
6447
6448
6449 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6450 return nil, false
6451 }
6452
6453
6454 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6455 return nil, false
6456 }
6457
6458
6459 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6460 return nil, false
6461 }
6462
6463
6464 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6465 return nil, false
6466 }
6467
6468
6469 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6470 return &avwsdpi, true
6471 }
6472
6473
6474 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6475 return nil, false
6476 }
6477
6478
6479 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6480 return nil, false
6481 }
6482
6483
6484 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6485 return nil, false
6486 }
6487
6488
6489 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6490 return nil, false
6491 }
6492
6493
6494 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6495 return &avwsdpi, true
6496 }
6497
6498
6499 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6500 return nil, false
6501 }
6502
6503
6504 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6505 return nil, false
6506 }
6507
6508
6509 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6510 return nil, false
6511 }
6512
6513
6514 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6515 return nil, false
6516 }
6517
6518
6519 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6520 return &avwsdpi, true
6521 }
6522
6523
6524
6525 type AzureVMWorkloadSQLDatabaseProtectedItem struct {
6526
6527 FriendlyName *string `json:"friendlyName,omitempty"`
6528
6529 ServerName *string `json:"serverName,omitempty"`
6530
6531 ParentName *string `json:"parentName,omitempty"`
6532
6533 ParentType *string `json:"parentType,omitempty"`
6534
6535 ProtectionStatus *string `json:"protectionStatus,omitempty"`
6536
6537 ProtectionState ProtectionState `json:"protectionState,omitempty"`
6538
6539 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
6540
6541 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
6542
6543 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
6544
6545 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
6546
6547 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
6548
6549 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
6550
6551 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
6552
6553 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
6554
6555 WorkloadType DataSourceType `json:"workloadType,omitempty"`
6556
6557 ContainerName *string `json:"containerName,omitempty"`
6558
6559 SourceResourceID *string `json:"sourceResourceId,omitempty"`
6560
6561 PolicyID *string `json:"policyId,omitempty"`
6562
6563 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
6564
6565 BackupSetName *string `json:"backupSetName,omitempty"`
6566
6567 CreateMode CreateMode `json:"createMode,omitempty"`
6568
6569 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
6570
6571 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
6572
6573 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
6574
6575 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
6576
6577 IsRehydrate *bool `json:"isRehydrate,omitempty"`
6578
6579 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
6580 }
6581
6582
6583 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
6584 avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase
6585 objectMap := make(map[string]interface{})
6586 if avwsdpi.FriendlyName != nil {
6587 objectMap["friendlyName"] = avwsdpi.FriendlyName
6588 }
6589 if avwsdpi.ServerName != nil {
6590 objectMap["serverName"] = avwsdpi.ServerName
6591 }
6592 if avwsdpi.ParentName != nil {
6593 objectMap["parentName"] = avwsdpi.ParentName
6594 }
6595 if avwsdpi.ParentType != nil {
6596 objectMap["parentType"] = avwsdpi.ParentType
6597 }
6598 if avwsdpi.ProtectionStatus != nil {
6599 objectMap["protectionStatus"] = avwsdpi.ProtectionStatus
6600 }
6601 if avwsdpi.ProtectionState != "" {
6602 objectMap["protectionState"] = avwsdpi.ProtectionState
6603 }
6604 if avwsdpi.LastBackupStatus != "" {
6605 objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus
6606 }
6607 if avwsdpi.LastBackupTime != nil {
6608 objectMap["lastBackupTime"] = avwsdpi.LastBackupTime
6609 }
6610 if avwsdpi.LastBackupErrorDetail != nil {
6611 objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail
6612 }
6613 if avwsdpi.ProtectedItemDataSourceID != nil {
6614 objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID
6615 }
6616 if avwsdpi.ProtectedItemHealthStatus != "" {
6617 objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus
6618 }
6619 if avwsdpi.ExtendedInfo != nil {
6620 objectMap["extendedInfo"] = avwsdpi.ExtendedInfo
6621 }
6622 if avwsdpi.KpisHealths != nil {
6623 objectMap["kpisHealths"] = avwsdpi.KpisHealths
6624 }
6625 if avwsdpi.BackupManagementType != "" {
6626 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6627 }
6628 if avwsdpi.WorkloadType != "" {
6629 objectMap["workloadType"] = avwsdpi.WorkloadType
6630 }
6631 if avwsdpi.ContainerName != nil {
6632 objectMap["containerName"] = avwsdpi.ContainerName
6633 }
6634 if avwsdpi.SourceResourceID != nil {
6635 objectMap["sourceResourceId"] = avwsdpi.SourceResourceID
6636 }
6637 if avwsdpi.PolicyID != nil {
6638 objectMap["policyId"] = avwsdpi.PolicyID
6639 }
6640 if avwsdpi.LastRecoveryPoint != nil {
6641 objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint
6642 }
6643 if avwsdpi.BackupSetName != nil {
6644 objectMap["backupSetName"] = avwsdpi.BackupSetName
6645 }
6646 if avwsdpi.CreateMode != "" {
6647 objectMap["createMode"] = avwsdpi.CreateMode
6648 }
6649 if avwsdpi.DeferredDeleteTimeInUTC != nil {
6650 objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC
6651 }
6652 if avwsdpi.IsScheduledForDeferredDelete != nil {
6653 objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete
6654 }
6655 if avwsdpi.DeferredDeleteTimeRemaining != nil {
6656 objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining
6657 }
6658 if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil {
6659 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming
6660 }
6661 if avwsdpi.IsRehydrate != nil {
6662 objectMap["isRehydrate"] = avwsdpi.IsRehydrate
6663 }
6664 if avwsdpi.ProtectedItemType != "" {
6665 objectMap["protectedItemType"] = avwsdpi.ProtectedItemType
6666 }
6667 return json.Marshal(objectMap)
6668 }
6669
6670
6671 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
6672 return nil, false
6673 }
6674
6675
6676 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
6677 return nil, false
6678 }
6679
6680
6681 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
6682 return nil, false
6683 }
6684
6685
6686 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
6687 return nil, false
6688 }
6689
6690
6691 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
6692 return nil, false
6693 }
6694
6695
6696 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
6697 return nil, false
6698 }
6699
6700
6701 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
6702 return nil, false
6703 }
6704
6705
6706 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
6707 return &avwsdpi, true
6708 }
6709
6710
6711 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
6712 return nil, false
6713 }
6714
6715
6716 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
6717 return nil, false
6718 }
6719
6720
6721 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
6722 return &avwsdpi, true
6723 }
6724
6725
6726 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
6727 return nil, false
6728 }
6729
6730
6731 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
6732 return nil, false
6733 }
6734
6735
6736 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
6737 return nil, false
6738 }
6739
6740
6741 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
6742 return nil, false
6743 }
6744
6745
6746 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
6747 return &avwsdpi, true
6748 }
6749
6750
6751
6752 type AzureVMWorkloadSQLDatabaseWorkloadItem struct {
6753
6754 ParentName *string `json:"parentName,omitempty"`
6755
6756 ServerName *string `json:"serverName,omitempty"`
6757
6758 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6759
6760 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6761
6762 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6763
6764 BackupManagementType *string `json:"backupManagementType,omitempty"`
6765
6766 WorkloadType *string `json:"workloadType,omitempty"`
6767
6768 FriendlyName *string `json:"friendlyName,omitempty"`
6769
6770 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6771
6772 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6773 }
6774
6775
6776 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
6777 avwsdwi.WorkloadItemType = WorkloadItemTypeSQLDataBase1
6778 objectMap := make(map[string]interface{})
6779 if avwsdwi.ParentName != nil {
6780 objectMap["parentName"] = avwsdwi.ParentName
6781 }
6782 if avwsdwi.ServerName != nil {
6783 objectMap["serverName"] = avwsdwi.ServerName
6784 }
6785 if avwsdwi.IsAutoProtectable != nil {
6786 objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable
6787 }
6788 if avwsdwi.Subinquireditemcount != nil {
6789 objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount
6790 }
6791 if avwsdwi.SubWorkloadItemCount != nil {
6792 objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount
6793 }
6794 if avwsdwi.BackupManagementType != nil {
6795 objectMap["backupManagementType"] = avwsdwi.BackupManagementType
6796 }
6797 if avwsdwi.WorkloadType != nil {
6798 objectMap["workloadType"] = avwsdwi.WorkloadType
6799 }
6800 if avwsdwi.FriendlyName != nil {
6801 objectMap["friendlyName"] = avwsdwi.FriendlyName
6802 }
6803 if avwsdwi.ProtectionState != "" {
6804 objectMap["protectionState"] = avwsdwi.ProtectionState
6805 }
6806 if avwsdwi.WorkloadItemType != "" {
6807 objectMap["workloadItemType"] = avwsdwi.WorkloadItemType
6808 }
6809 return json.Marshal(objectMap)
6810 }
6811
6812
6813 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6814 return nil, false
6815 }
6816
6817
6818 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6819 return &avwsdwi, true
6820 }
6821
6822
6823 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6824 return nil, false
6825 }
6826
6827
6828 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6829 return nil, false
6830 }
6831
6832
6833 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6834 return nil, false
6835 }
6836
6837
6838 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6839 return nil, false
6840 }
6841
6842
6843 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6844 return &avwsdwi, true
6845 }
6846
6847
6848 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6849 return nil, false
6850 }
6851
6852
6853 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6854 return nil, false
6855 }
6856
6857
6858 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6859 return &avwsdwi, true
6860 }
6861
6862
6863
6864 type AzureVMWorkloadSQLInstanceProtectableItem struct {
6865
6866 ParentName *string `json:"parentName,omitempty"`
6867
6868
6869 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6870
6871 ServerName *string `json:"serverName,omitempty"`
6872
6873 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6874
6875 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6876
6877 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6878
6879 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6880
6881 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6882
6883 BackupManagementType *string `json:"backupManagementType,omitempty"`
6884
6885 WorkloadType *string `json:"workloadType,omitempty"`
6886
6887 FriendlyName *string `json:"friendlyName,omitempty"`
6888
6889 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6890
6891 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6892 }
6893
6894
6895 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) {
6896 avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance
6897 objectMap := make(map[string]interface{})
6898 if avwsipi.ParentName != nil {
6899 objectMap["parentName"] = avwsipi.ParentName
6900 }
6901 if avwsipi.ParentUniqueName != nil {
6902 objectMap["parentUniqueName"] = avwsipi.ParentUniqueName
6903 }
6904 if avwsipi.ServerName != nil {
6905 objectMap["serverName"] = avwsipi.ServerName
6906 }
6907 if avwsipi.IsAutoProtectable != nil {
6908 objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable
6909 }
6910 if avwsipi.IsAutoProtected != nil {
6911 objectMap["isAutoProtected"] = avwsipi.IsAutoProtected
6912 }
6913 if avwsipi.Subinquireditemcount != nil {
6914 objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount
6915 }
6916 if avwsipi.Subprotectableitemcount != nil {
6917 objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount
6918 }
6919 if avwsipi.Prebackupvalidation != nil {
6920 objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation
6921 }
6922 if avwsipi.BackupManagementType != nil {
6923 objectMap["backupManagementType"] = avwsipi.BackupManagementType
6924 }
6925 if avwsipi.WorkloadType != nil {
6926 objectMap["workloadType"] = avwsipi.WorkloadType
6927 }
6928 if avwsipi.FriendlyName != nil {
6929 objectMap["friendlyName"] = avwsipi.FriendlyName
6930 }
6931 if avwsipi.ProtectionState != "" {
6932 objectMap["protectionState"] = avwsipi.ProtectionState
6933 }
6934 if avwsipi.ProtectableItemType != "" {
6935 objectMap["protectableItemType"] = avwsipi.ProtectableItemType
6936 }
6937 return json.Marshal(objectMap)
6938 }
6939
6940
6941 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6942 return nil, false
6943 }
6944
6945
6946 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6947 return nil, false
6948 }
6949
6950
6951 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6952 return nil, false
6953 }
6954
6955
6956 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6957 return nil, false
6958 }
6959
6960
6961 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6962 return &avwsipi, true
6963 }
6964
6965
6966 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6967 return nil, false
6968 }
6969
6970
6971 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6972 return nil, false
6973 }
6974
6975
6976 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6977 return nil, false
6978 }
6979
6980
6981 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6982 return nil, false
6983 }
6984
6985
6986 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6987 return nil, false
6988 }
6989
6990
6991 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6992 return &avwsipi, true
6993 }
6994
6995
6996 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6997 return nil, false
6998 }
6999
7000
7001 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
7002 return nil, false
7003 }
7004
7005
7006 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
7007 return nil, false
7008 }
7009
7010
7011 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
7012 return &avwsipi, true
7013 }
7014
7015
7016
7017 type AzureVMWorkloadSQLInstanceWorkloadItem struct {
7018
7019 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
7020
7021 ParentName *string `json:"parentName,omitempty"`
7022
7023 ServerName *string `json:"serverName,omitempty"`
7024
7025 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
7026
7027 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
7028
7029 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
7030
7031 BackupManagementType *string `json:"backupManagementType,omitempty"`
7032
7033 WorkloadType *string `json:"workloadType,omitempty"`
7034
7035 FriendlyName *string `json:"friendlyName,omitempty"`
7036
7037 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7038
7039 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
7040 }
7041
7042
7043 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) {
7044 avwsiwi.WorkloadItemType = WorkloadItemTypeSQLInstance1
7045 objectMap := make(map[string]interface{})
7046 if avwsiwi.DataDirectoryPaths != nil {
7047 objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths
7048 }
7049 if avwsiwi.ParentName != nil {
7050 objectMap["parentName"] = avwsiwi.ParentName
7051 }
7052 if avwsiwi.ServerName != nil {
7053 objectMap["serverName"] = avwsiwi.ServerName
7054 }
7055 if avwsiwi.IsAutoProtectable != nil {
7056 objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable
7057 }
7058 if avwsiwi.Subinquireditemcount != nil {
7059 objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount
7060 }
7061 if avwsiwi.SubWorkloadItemCount != nil {
7062 objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount
7063 }
7064 if avwsiwi.BackupManagementType != nil {
7065 objectMap["backupManagementType"] = avwsiwi.BackupManagementType
7066 }
7067 if avwsiwi.WorkloadType != nil {
7068 objectMap["workloadType"] = avwsiwi.WorkloadType
7069 }
7070 if avwsiwi.FriendlyName != nil {
7071 objectMap["friendlyName"] = avwsiwi.FriendlyName
7072 }
7073 if avwsiwi.ProtectionState != "" {
7074 objectMap["protectionState"] = avwsiwi.ProtectionState
7075 }
7076 if avwsiwi.WorkloadItemType != "" {
7077 objectMap["workloadItemType"] = avwsiwi.WorkloadItemType
7078 }
7079 return json.Marshal(objectMap)
7080 }
7081
7082
7083 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
7084 return nil, false
7085 }
7086
7087
7088 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
7089 return &avwsiwi, true
7090 }
7091
7092
7093 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
7094 return nil, false
7095 }
7096
7097
7098 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
7099 return nil, false
7100 }
7101
7102
7103 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
7104 return nil, false
7105 }
7106
7107
7108 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
7109 return nil, false
7110 }
7111
7112
7113 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
7114 return nil, false
7115 }
7116
7117
7118 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
7119 return &avwsiwi, true
7120 }
7121
7122
7123 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
7124 return nil, false
7125 }
7126
7127
7128 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
7129 return &avwsiwi, true
7130 }
7131
7132
7133 type BasicAzureWorkloadAutoProtectionIntent interface {
7134 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
7135 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
7136 }
7137
7138
7139 type AzureWorkloadAutoProtectionIntent struct {
7140
7141 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7142
7143 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7144
7145 ItemID *string `json:"itemId,omitempty"`
7146
7147 PolicyID *string `json:"policyId,omitempty"`
7148
7149 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7150
7151 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
7152 }
7153
7154 func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) {
7155 var m map[string]interface{}
7156 err := json.Unmarshal(body, &m)
7157 if err != nil {
7158 return nil, err
7159 }
7160
7161 switch m["protectionIntentItemType"] {
7162 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
7163 var awsapi AzureWorkloadSQLAutoProtectionIntent
7164 err := json.Unmarshal(body, &awsapi)
7165 return awsapi, err
7166 default:
7167 var awapi AzureWorkloadAutoProtectionIntent
7168 err := json.Unmarshal(body, &awapi)
7169 return awapi, err
7170 }
7171 }
7172 func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) {
7173 var rawMessages []*json.RawMessage
7174 err := json.Unmarshal(body, &rawMessages)
7175 if err != nil {
7176 return nil, err
7177 }
7178
7179 awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages))
7180
7181 for index, rawMessage := range rawMessages {
7182 awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage)
7183 if err != nil {
7184 return nil, err
7185 }
7186 awapiArray[index] = awapi
7187 }
7188 return awapiArray, nil
7189 }
7190
7191
7192 func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) {
7193 awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent
7194 objectMap := make(map[string]interface{})
7195 if awapi.BackupManagementType != "" {
7196 objectMap["backupManagementType"] = awapi.BackupManagementType
7197 }
7198 if awapi.SourceResourceID != nil {
7199 objectMap["sourceResourceId"] = awapi.SourceResourceID
7200 }
7201 if awapi.ItemID != nil {
7202 objectMap["itemId"] = awapi.ItemID
7203 }
7204 if awapi.PolicyID != nil {
7205 objectMap["policyId"] = awapi.PolicyID
7206 }
7207 if awapi.ProtectionState != "" {
7208 objectMap["protectionState"] = awapi.ProtectionState
7209 }
7210 if awapi.ProtectionIntentItemType != "" {
7211 objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType
7212 }
7213 return json.Marshal(objectMap)
7214 }
7215
7216
7217 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
7218 return nil, false
7219 }
7220
7221
7222 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
7223 return &awapi, true
7224 }
7225
7226
7227 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
7228 return nil, false
7229 }
7230
7231
7232 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
7233 return &awapi, true
7234 }
7235
7236
7237 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
7238 return &awapi, true
7239 }
7240
7241
7242 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
7243 return nil, false
7244 }
7245
7246
7247 func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
7248 return nil, false
7249 }
7250
7251
7252 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
7253 return &awapi, true
7254 }
7255
7256
7257 type AzureWorkloadBackupRequest struct {
7258
7259 BackupType TypeEnum `json:"backupType,omitempty"`
7260
7261 EnableCompression *bool `json:"enableCompression,omitempty"`
7262
7263 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
7264
7265 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
7266 }
7267
7268
7269 func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) {
7270 awbr.ObjectType = ObjectTypeAzureWorkloadBackupRequest
7271 objectMap := make(map[string]interface{})
7272 if awbr.BackupType != "" {
7273 objectMap["backupType"] = awbr.BackupType
7274 }
7275 if awbr.EnableCompression != nil {
7276 objectMap["enableCompression"] = awbr.EnableCompression
7277 }
7278 if awbr.RecoveryPointExpiryTimeInUTC != nil {
7279 objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC
7280 }
7281 if awbr.ObjectType != "" {
7282 objectMap["objectType"] = awbr.ObjectType
7283 }
7284 return json.Marshal(objectMap)
7285 }
7286
7287
7288 func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
7289 return nil, false
7290 }
7291
7292
7293 func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
7294 return &awbr, true
7295 }
7296
7297
7298 func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
7299 return nil, false
7300 }
7301
7302
7303 func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) {
7304 return nil, false
7305 }
7306
7307
7308 func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) {
7309 return &awbr, true
7310 }
7311
7312
7313 type BasicAzureWorkloadContainer interface {
7314 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
7315 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
7316 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
7317 }
7318
7319
7320 type AzureWorkloadContainer struct {
7321
7322 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7323
7324 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
7325
7326 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
7327
7328 WorkloadType WorkloadType `json:"workloadType,omitempty"`
7329
7330 OperationType OperationType `json:"operationType,omitempty"`
7331
7332 FriendlyName *string `json:"friendlyName,omitempty"`
7333
7334 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7335
7336 RegistrationStatus *string `json:"registrationStatus,omitempty"`
7337
7338 HealthStatus *string `json:"healthStatus,omitempty"`
7339
7340 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
7341 }
7342
7343 func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) {
7344 var m map[string]interface{}
7345 err := json.Unmarshal(body, &m)
7346 if err != nil {
7347 return nil, err
7348 }
7349
7350 switch m["containerType"] {
7351 case string(ContainerTypeSQLAGWorkLoadContainer1):
7352 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
7353 err := json.Unmarshal(body, &aswcpc)
7354 return aswcpc, err
7355 case string(ContainerTypeVMAppContainer1):
7356 var avacpc AzureVMAppContainerProtectionContainer
7357 err := json.Unmarshal(body, &avacpc)
7358 return avacpc, err
7359 default:
7360 var awc AzureWorkloadContainer
7361 err := json.Unmarshal(body, &awc)
7362 return awc, err
7363 }
7364 }
7365 func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) {
7366 var rawMessages []*json.RawMessage
7367 err := json.Unmarshal(body, &rawMessages)
7368 if err != nil {
7369 return nil, err
7370 }
7371
7372 awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages))
7373
7374 for index, rawMessage := range rawMessages {
7375 awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage)
7376 if err != nil {
7377 return nil, err
7378 }
7379 awcArray[index] = awc
7380 }
7381 return awcArray, nil
7382 }
7383
7384
7385 func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) {
7386 awc.ContainerType = ContainerTypeAzureWorkloadContainer
7387 objectMap := make(map[string]interface{})
7388 if awc.SourceResourceID != nil {
7389 objectMap["sourceResourceId"] = awc.SourceResourceID
7390 }
7391 if awc.LastUpdatedTime != nil {
7392 objectMap["lastUpdatedTime"] = awc.LastUpdatedTime
7393 }
7394 if awc.ExtendedInfo != nil {
7395 objectMap["extendedInfo"] = awc.ExtendedInfo
7396 }
7397 if awc.WorkloadType != "" {
7398 objectMap["workloadType"] = awc.WorkloadType
7399 }
7400 if awc.OperationType != "" {
7401 objectMap["operationType"] = awc.OperationType
7402 }
7403 if awc.FriendlyName != nil {
7404 objectMap["friendlyName"] = awc.FriendlyName
7405 }
7406 if awc.BackupManagementType != "" {
7407 objectMap["backupManagementType"] = awc.BackupManagementType
7408 }
7409 if awc.RegistrationStatus != nil {
7410 objectMap["registrationStatus"] = awc.RegistrationStatus
7411 }
7412 if awc.HealthStatus != nil {
7413 objectMap["healthStatus"] = awc.HealthStatus
7414 }
7415 if awc.ContainerType != "" {
7416 objectMap["containerType"] = awc.ContainerType
7417 }
7418 return json.Marshal(objectMap)
7419 }
7420
7421
7422 func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
7423 return nil, false
7424 }
7425
7426
7427 func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
7428 return nil, false
7429 }
7430
7431
7432 func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
7433 return nil, false
7434 }
7435
7436
7437 func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
7438 return nil, false
7439 }
7440
7441
7442 func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
7443 return nil, false
7444 }
7445
7446
7447 func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
7448 return nil, false
7449 }
7450
7451
7452 func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
7453 return nil, false
7454 }
7455
7456
7457 func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
7458 return &awc, true
7459 }
7460
7461
7462 func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
7463 return &awc, true
7464 }
7465
7466
7467 func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) {
7468 return nil, false
7469 }
7470
7471
7472 func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
7473 return nil, false
7474 }
7475
7476
7477 func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) {
7478 return nil, false
7479 }
7480
7481
7482 func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
7483 return nil, false
7484 }
7485
7486
7487 func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
7488 return nil, false
7489 }
7490
7491
7492 func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) {
7493 return nil, false
7494 }
7495
7496
7497 func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
7498 return nil, false
7499 }
7500
7501
7502 func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
7503 return &awc, true
7504 }
7505
7506
7507 type AzureWorkloadContainerExtendedInfo struct {
7508
7509 HostServerName *string `json:"hostServerName,omitempty"`
7510
7511 InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"`
7512
7513 NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"`
7514 }
7515
7516
7517 type AzureWorkloadErrorInfo struct {
7518
7519 ErrorCode *int32 `json:"errorCode,omitempty"`
7520
7521 ErrorString *string `json:"errorString,omitempty"`
7522
7523 ErrorTitle *string `json:"errorTitle,omitempty"`
7524
7525 Recommendations *[]string `json:"recommendations,omitempty"`
7526
7527 AdditionalDetails *string `json:"additionalDetails,omitempty"`
7528 }
7529
7530
7531 type AzureWorkloadJob struct {
7532
7533 WorkloadType *string `json:"workloadType,omitempty"`
7534
7535 Duration *string `json:"duration,omitempty"`
7536
7537 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
7538
7539 ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"`
7540
7541 ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"`
7542
7543 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
7544
7545 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7546
7547 Operation *string `json:"operation,omitempty"`
7548
7549 Status *string `json:"status,omitempty"`
7550
7551 StartTime *date.Time `json:"startTime,omitempty"`
7552
7553 EndTime *date.Time `json:"endTime,omitempty"`
7554
7555 ActivityID *string `json:"activityId,omitempty"`
7556
7557 JobType JobType `json:"jobType,omitempty"`
7558 }
7559
7560
7561 func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) {
7562 awj.JobType = JobTypeAzureWorkloadJob
7563 objectMap := make(map[string]interface{})
7564 if awj.WorkloadType != nil {
7565 objectMap["workloadType"] = awj.WorkloadType
7566 }
7567 if awj.Duration != nil {
7568 objectMap["duration"] = awj.Duration
7569 }
7570 if awj.ActionsInfo != nil {
7571 objectMap["actionsInfo"] = awj.ActionsInfo
7572 }
7573 if awj.ErrorDetails != nil {
7574 objectMap["errorDetails"] = awj.ErrorDetails
7575 }
7576 if awj.ExtendedInfo != nil {
7577 objectMap["extendedInfo"] = awj.ExtendedInfo
7578 }
7579 if awj.EntityFriendlyName != nil {
7580 objectMap["entityFriendlyName"] = awj.EntityFriendlyName
7581 }
7582 if awj.BackupManagementType != "" {
7583 objectMap["backupManagementType"] = awj.BackupManagementType
7584 }
7585 if awj.Operation != nil {
7586 objectMap["operation"] = awj.Operation
7587 }
7588 if awj.Status != nil {
7589 objectMap["status"] = awj.Status
7590 }
7591 if awj.StartTime != nil {
7592 objectMap["startTime"] = awj.StartTime
7593 }
7594 if awj.EndTime != nil {
7595 objectMap["endTime"] = awj.EndTime
7596 }
7597 if awj.ActivityID != nil {
7598 objectMap["activityId"] = awj.ActivityID
7599 }
7600 if awj.JobType != "" {
7601 objectMap["jobType"] = awj.JobType
7602 }
7603 return json.Marshal(objectMap)
7604 }
7605
7606
7607 func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
7608 return nil, false
7609 }
7610
7611
7612 func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
7613 return nil, false
7614 }
7615
7616
7617 func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
7618 return &awj, true
7619 }
7620
7621
7622 func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) {
7623 return nil, false
7624 }
7625
7626
7627 func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) {
7628 return nil, false
7629 }
7630
7631
7632 func (awj AzureWorkloadJob) AsJob() (*Job, bool) {
7633 return nil, false
7634 }
7635
7636
7637 func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) {
7638 return &awj, true
7639 }
7640
7641
7642 type AzureWorkloadJobExtendedInfo struct {
7643
7644 TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"`
7645
7646 PropertyBag map[string]*string `json:"propertyBag"`
7647
7648 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
7649 }
7650
7651
7652 func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) {
7653 objectMap := make(map[string]interface{})
7654 if awjei.TasksList != nil {
7655 objectMap["tasksList"] = awjei.TasksList
7656 }
7657 if awjei.PropertyBag != nil {
7658 objectMap["propertyBag"] = awjei.PropertyBag
7659 }
7660 if awjei.DynamicErrorMessage != nil {
7661 objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage
7662 }
7663 return json.Marshal(objectMap)
7664 }
7665
7666
7667 type AzureWorkloadJobTaskDetails struct {
7668
7669 TaskID *string `json:"taskId,omitempty"`
7670
7671 Status *string `json:"status,omitempty"`
7672 }
7673
7674
7675 type BasicAzureWorkloadPointInTimeRecoveryPoint interface {
7676 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
7677 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
7678 }
7679
7680
7681 type AzureWorkloadPointInTimeRecoveryPoint struct {
7682
7683 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
7684
7685 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
7686
7687 Type RestorePointType `json:"type,omitempty"`
7688
7689 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
7690 }
7691
7692 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
7693 var m map[string]interface{}
7694 err := json.Unmarshal(body, &m)
7695 if err != nil {
7696 return nil, err
7697 }
7698
7699 switch m["objectType"] {
7700 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
7701 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
7702 err := json.Unmarshal(body, &awshpitrp)
7703 return awshpitrp, err
7704 default:
7705 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
7706 err := json.Unmarshal(body, &awpitrp)
7707 return awpitrp, err
7708 }
7709 }
7710 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
7711 var rawMessages []*json.RawMessage
7712 err := json.Unmarshal(body, &rawMessages)
7713 if err != nil {
7714 return nil, err
7715 }
7716
7717 awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages))
7718
7719 for index, rawMessage := range rawMessages {
7720 awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage)
7721 if err != nil {
7722 return nil, err
7723 }
7724 awpitrpArray[index] = awpitrp
7725 }
7726 return awpitrpArray, nil
7727 }
7728
7729
7730 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
7731 awpitrp.ObjectType = ObjectTypeAzureWorkloadPointInTimeRecoveryPoint
7732 objectMap := make(map[string]interface{})
7733 if awpitrp.TimeRanges != nil {
7734 objectMap["timeRanges"] = awpitrp.TimeRanges
7735 }
7736 if awpitrp.ObjectType != "" {
7737 objectMap["objectType"] = awpitrp.ObjectType
7738 }
7739 return json.Marshal(objectMap)
7740 }
7741
7742
7743 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
7744 return nil, false
7745 }
7746
7747
7748 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
7749 return &awpitrp, true
7750 }
7751
7752
7753 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
7754 return &awpitrp, true
7755 }
7756
7757
7758 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
7759 return nil, false
7760 }
7761
7762
7763 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
7764 return &awpitrp, true
7765 }
7766
7767
7768 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
7769 return nil, false
7770 }
7771
7772
7773 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
7774 return nil, false
7775 }
7776
7777
7778 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
7779 return nil, false
7780 }
7781
7782
7783 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
7784 return nil, false
7785 }
7786
7787
7788 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
7789 return nil, false
7790 }
7791
7792
7793 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
7794 return nil, false
7795 }
7796
7797
7798 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
7799 return nil, false
7800 }
7801
7802
7803 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
7804 return nil, false
7805 }
7806
7807
7808 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
7809 return &awpitrp, true
7810 }
7811
7812
7813
7814 type AzureWorkloadPointInTimeRestoreRequest struct {
7815
7816 PointInTime *date.Time `json:"pointInTime,omitempty"`
7817
7818 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
7819
7820 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7821
7822 PropertyBag map[string]*string `json:"propertyBag"`
7823
7824 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
7825
7826 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
7827
7828 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
7829 }
7830
7831
7832 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
7833 awpitrr.ObjectType = ObjectTypeAzureWorkloadPointInTimeRestoreRequest
7834 objectMap := make(map[string]interface{})
7835 if awpitrr.PointInTime != nil {
7836 objectMap["pointInTime"] = awpitrr.PointInTime
7837 }
7838 if awpitrr.RecoveryType != "" {
7839 objectMap["recoveryType"] = awpitrr.RecoveryType
7840 }
7841 if awpitrr.SourceResourceID != nil {
7842 objectMap["sourceResourceId"] = awpitrr.SourceResourceID
7843 }
7844 if awpitrr.PropertyBag != nil {
7845 objectMap["propertyBag"] = awpitrr.PropertyBag
7846 }
7847 if awpitrr.TargetInfo != nil {
7848 objectMap["targetInfo"] = awpitrr.TargetInfo
7849 }
7850 if awpitrr.RecoveryMode != "" {
7851 objectMap["recoveryMode"] = awpitrr.RecoveryMode
7852 }
7853 if awpitrr.ObjectType != "" {
7854 objectMap["objectType"] = awpitrr.ObjectType
7855 }
7856 return json.Marshal(objectMap)
7857 }
7858
7859
7860 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
7861 return nil, false
7862 }
7863
7864
7865 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
7866 return &awpitrr, true
7867 }
7868
7869
7870 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
7871 return nil, false
7872 }
7873
7874
7875 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
7876 return &awpitrr, true
7877 }
7878
7879
7880 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
7881 return nil, false
7882 }
7883
7884
7885 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
7886 return nil, false
7887 }
7888
7889
7890 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
7891 return nil, false
7892 }
7893
7894
7895 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
7896 return nil, false
7897 }
7898
7899
7900 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
7901 return nil, false
7902 }
7903
7904
7905 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
7906 return nil, false
7907 }
7908
7909
7910 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
7911 return nil, false
7912 }
7913
7914
7915 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
7916 return nil, false
7917 }
7918
7919
7920 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
7921 return &awpitrr, true
7922 }
7923
7924
7925 type BasicAzureWorkloadRecoveryPoint interface {
7926 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
7927 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
7928 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
7929 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
7930 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
7931 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
7932 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
7933 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
7934 }
7935
7936
7937
7938 type AzureWorkloadRecoveryPoint struct {
7939
7940 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
7941
7942 Type RestorePointType `json:"type,omitempty"`
7943
7944 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
7945 }
7946
7947 func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) {
7948 var m map[string]interface{}
7949 err := json.Unmarshal(body, &m)
7950 if err != nil {
7951 return nil, err
7952 }
7953
7954 switch m["objectType"] {
7955 case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
7956 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
7957 err := json.Unmarshal(body, &awpitrp)
7958 return awpitrp, err
7959 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
7960 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
7961 err := json.Unmarshal(body, &awshpitrp)
7962 return awshpitrp, err
7963 case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
7964 var awshrp AzureWorkloadSAPHanaRecoveryPoint
7965 err := json.Unmarshal(body, &awshrp)
7966 return awshrp, err
7967 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
7968 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
7969 err := json.Unmarshal(body, &awspitrp)
7970 return awspitrp, err
7971 case string(ObjectTypeAzureWorkloadSQLRecoveryPoint):
7972 var awsrp AzureWorkloadSQLRecoveryPoint
7973 err := json.Unmarshal(body, &awsrp)
7974 return awsrp, err
7975 default:
7976 var awrp AzureWorkloadRecoveryPoint
7977 err := json.Unmarshal(body, &awrp)
7978 return awrp, err
7979 }
7980 }
7981 func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) {
7982 var rawMessages []*json.RawMessage
7983 err := json.Unmarshal(body, &rawMessages)
7984 if err != nil {
7985 return nil, err
7986 }
7987
7988 awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages))
7989
7990 for index, rawMessage := range rawMessages {
7991 awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage)
7992 if err != nil {
7993 return nil, err
7994 }
7995 awrpArray[index] = awrp
7996 }
7997 return awrpArray, nil
7998 }
7999
8000
8001 func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) {
8002 awrp.ObjectType = ObjectTypeAzureWorkloadRecoveryPoint
8003 objectMap := make(map[string]interface{})
8004 if awrp.ObjectType != "" {
8005 objectMap["objectType"] = awrp.ObjectType
8006 }
8007 return json.Marshal(objectMap)
8008 }
8009
8010
8011 func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8012 return nil, false
8013 }
8014
8015
8016 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8017 return nil, false
8018 }
8019
8020
8021 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8022 return nil, false
8023 }
8024
8025
8026 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8027 return &awrp, true
8028 }
8029
8030
8031 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8032 return &awrp, true
8033 }
8034
8035
8036 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8037 return nil, false
8038 }
8039
8040
8041 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8042 return nil, false
8043 }
8044
8045
8046 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8047 return nil, false
8048 }
8049
8050
8051 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8052 return nil, false
8053 }
8054
8055
8056 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8057 return nil, false
8058 }
8059
8060
8061 func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8062 return nil, false
8063 }
8064
8065
8066 func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8067 return nil, false
8068 }
8069
8070
8071 func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8072 return nil, false
8073 }
8074
8075
8076 func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8077 return &awrp, true
8078 }
8079
8080
8081 type BasicAzureWorkloadRestoreRequest interface {
8082 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
8083 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8084 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
8085 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
8086 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
8087 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
8088 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
8089 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
8090 }
8091
8092
8093 type AzureWorkloadRestoreRequest struct {
8094
8095 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8096
8097 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8098
8099 PropertyBag map[string]*string `json:"propertyBag"`
8100
8101 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8102
8103 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8104
8105 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8106 }
8107
8108 func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) {
8109 var m map[string]interface{}
8110 err := json.Unmarshal(body, &m)
8111 if err != nil {
8112 return nil, err
8113 }
8114
8115 switch m["objectType"] {
8116 case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest):
8117 var awpitrr AzureWorkloadPointInTimeRestoreRequest
8118 err := json.Unmarshal(body, &awpitrr)
8119 return awpitrr, err
8120 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
8121 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8122 err := json.Unmarshal(body, &awshpitrr)
8123 return awshpitrr, err
8124 case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest):
8125 var awshrr AzureWorkloadSAPHanaRestoreRequest
8126 err := json.Unmarshal(body, &awshrr)
8127 return awshrr, err
8128 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
8129 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
8130 err := json.Unmarshal(body, &awspitrr)
8131 return awspitrr, err
8132 case string(ObjectTypeAzureWorkloadSQLRestoreRequest):
8133 var awsrr AzureWorkloadSQLRestoreRequest
8134 err := json.Unmarshal(body, &awsrr)
8135 return awsrr, err
8136 default:
8137 var awrr AzureWorkloadRestoreRequest
8138 err := json.Unmarshal(body, &awrr)
8139 return awrr, err
8140 }
8141 }
8142 func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) {
8143 var rawMessages []*json.RawMessage
8144 err := json.Unmarshal(body, &rawMessages)
8145 if err != nil {
8146 return nil, err
8147 }
8148
8149 awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages))
8150
8151 for index, rawMessage := range rawMessages {
8152 awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage)
8153 if err != nil {
8154 return nil, err
8155 }
8156 awrrArray[index] = awrr
8157 }
8158 return awrrArray, nil
8159 }
8160
8161
8162 func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) {
8163 awrr.ObjectType = ObjectTypeAzureWorkloadRestoreRequest
8164 objectMap := make(map[string]interface{})
8165 if awrr.RecoveryType != "" {
8166 objectMap["recoveryType"] = awrr.RecoveryType
8167 }
8168 if awrr.SourceResourceID != nil {
8169 objectMap["sourceResourceId"] = awrr.SourceResourceID
8170 }
8171 if awrr.PropertyBag != nil {
8172 objectMap["propertyBag"] = awrr.PropertyBag
8173 }
8174 if awrr.TargetInfo != nil {
8175 objectMap["targetInfo"] = awrr.TargetInfo
8176 }
8177 if awrr.RecoveryMode != "" {
8178 objectMap["recoveryMode"] = awrr.RecoveryMode
8179 }
8180 if awrr.ObjectType != "" {
8181 objectMap["objectType"] = awrr.ObjectType
8182 }
8183 return json.Marshal(objectMap)
8184 }
8185
8186
8187 func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8188 return nil, false
8189 }
8190
8191
8192 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8193 return nil, false
8194 }
8195
8196
8197 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8198 return &awrr, true
8199 }
8200
8201
8202 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8203 return &awrr, true
8204 }
8205
8206
8207 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8208 return nil, false
8209 }
8210
8211
8212 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8213 return nil, false
8214 }
8215
8216
8217 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8218 return nil, false
8219 }
8220
8221
8222 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8223 return nil, false
8224 }
8225
8226
8227 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8228 return nil, false
8229 }
8230
8231
8232 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8233 return nil, false
8234 }
8235
8236
8237 func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8238 return nil, false
8239 }
8240
8241
8242 func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8243 return nil, false
8244 }
8245
8246
8247 func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8248 return &awrr, true
8249 }
8250
8251
8252 type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct {
8253
8254 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
8255
8256 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8257
8258 Type RestorePointType `json:"type,omitempty"`
8259
8260 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8261 }
8262
8263
8264 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
8265 awshpitrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint
8266 objectMap := make(map[string]interface{})
8267 if awshpitrp.TimeRanges != nil {
8268 objectMap["timeRanges"] = awshpitrp.TimeRanges
8269 }
8270 if awshpitrp.ObjectType != "" {
8271 objectMap["objectType"] = awshpitrp.ObjectType
8272 }
8273 return json.Marshal(objectMap)
8274 }
8275
8276
8277 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8278 return nil, false
8279 }
8280
8281
8282 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8283 return nil, false
8284 }
8285
8286
8287 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8288 return &awshpitrp, true
8289 }
8290
8291
8292 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8293 return nil, false
8294 }
8295
8296
8297 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8298 return &awshpitrp, true
8299 }
8300
8301
8302 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8303 return &awshpitrp, true
8304 }
8305
8306
8307 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8308 return nil, false
8309 }
8310
8311
8312 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8313 return nil, false
8314 }
8315
8316
8317 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8318 return nil, false
8319 }
8320
8321
8322 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8323 return nil, false
8324 }
8325
8326
8327 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8328 return nil, false
8329 }
8330
8331
8332 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8333 return nil, false
8334 }
8335
8336
8337 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8338 return nil, false
8339 }
8340
8341
8342 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8343 return &awshpitrp, true
8344 }
8345
8346
8347
8348 type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct {
8349
8350 PointInTime *date.Time `json:"pointInTime,omitempty"`
8351
8352 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8353
8354 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8355
8356 PropertyBag map[string]*string `json:"propertyBag"`
8357
8358 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8359
8360 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8361
8362 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8363 }
8364
8365
8366 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
8367 awshpitrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest
8368 objectMap := make(map[string]interface{})
8369 if awshpitrr.PointInTime != nil {
8370 objectMap["pointInTime"] = awshpitrr.PointInTime
8371 }
8372 if awshpitrr.RecoveryType != "" {
8373 objectMap["recoveryType"] = awshpitrr.RecoveryType
8374 }
8375 if awshpitrr.SourceResourceID != nil {
8376 objectMap["sourceResourceId"] = awshpitrr.SourceResourceID
8377 }
8378 if awshpitrr.PropertyBag != nil {
8379 objectMap["propertyBag"] = awshpitrr.PropertyBag
8380 }
8381 if awshpitrr.TargetInfo != nil {
8382 objectMap["targetInfo"] = awshpitrr.TargetInfo
8383 }
8384 if awshpitrr.RecoveryMode != "" {
8385 objectMap["recoveryMode"] = awshpitrr.RecoveryMode
8386 }
8387 if awshpitrr.ObjectType != "" {
8388 objectMap["objectType"] = awshpitrr.ObjectType
8389 }
8390 return json.Marshal(objectMap)
8391 }
8392
8393
8394 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8395 return nil, false
8396 }
8397
8398
8399 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8400 return nil, false
8401 }
8402
8403
8404 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8405 return nil, false
8406 }
8407
8408
8409 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8410 return &awshpitrr, true
8411 }
8412
8413
8414 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8415 return &awshpitrr, true
8416 }
8417
8418
8419 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8420 return nil, false
8421 }
8422
8423
8424 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8425 return &awshpitrr, true
8426 }
8427
8428
8429 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8430 return nil, false
8431 }
8432
8433
8434 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8435 return nil, false
8436 }
8437
8438
8439 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8440 return nil, false
8441 }
8442
8443
8444 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8445 return nil, false
8446 }
8447
8448
8449 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8450 return nil, false
8451 }
8452
8453
8454 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8455 return &awshpitrr, true
8456 }
8457
8458
8459
8460 type AzureWorkloadSAPHanaRecoveryPoint struct {
8461
8462 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8463
8464 Type RestorePointType `json:"type,omitempty"`
8465
8466 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8467 }
8468
8469
8470 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) {
8471 awshrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaRecoveryPoint
8472 objectMap := make(map[string]interface{})
8473 if awshrp.ObjectType != "" {
8474 objectMap["objectType"] = awshrp.ObjectType
8475 }
8476 return json.Marshal(objectMap)
8477 }
8478
8479
8480 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8481 return nil, false
8482 }
8483
8484
8485 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8486 return nil, false
8487 }
8488
8489
8490 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8491 return nil, false
8492 }
8493
8494
8495 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8496 return nil, false
8497 }
8498
8499
8500 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8501 return &awshrp, true
8502 }
8503
8504
8505 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8506 return nil, false
8507 }
8508
8509
8510 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8511 return &awshrp, true
8512 }
8513
8514
8515 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8516 return nil, false
8517 }
8518
8519
8520 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8521 return nil, false
8522 }
8523
8524
8525 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8526 return nil, false
8527 }
8528
8529
8530 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8531 return nil, false
8532 }
8533
8534
8535 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8536 return nil, false
8537 }
8538
8539
8540 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8541 return nil, false
8542 }
8543
8544
8545 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8546 return &awshrp, true
8547 }
8548
8549
8550 type BasicAzureWorkloadSAPHanaRestoreRequest interface {
8551 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8552 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
8553 }
8554
8555
8556 type AzureWorkloadSAPHanaRestoreRequest struct {
8557
8558 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8559
8560 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8561
8562 PropertyBag map[string]*string `json:"propertyBag"`
8563
8564 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8565
8566 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8567
8568 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8569 }
8570
8571 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) {
8572 var m map[string]interface{}
8573 err := json.Unmarshal(body, &m)
8574 if err != nil {
8575 return nil, err
8576 }
8577
8578 switch m["objectType"] {
8579 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
8580 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8581 err := json.Unmarshal(body, &awshpitrr)
8582 return awshpitrr, err
8583 default:
8584 var awshrr AzureWorkloadSAPHanaRestoreRequest
8585 err := json.Unmarshal(body, &awshrr)
8586 return awshrr, err
8587 }
8588 }
8589 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) {
8590 var rawMessages []*json.RawMessage
8591 err := json.Unmarshal(body, &rawMessages)
8592 if err != nil {
8593 return nil, err
8594 }
8595
8596 awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages))
8597
8598 for index, rawMessage := range rawMessages {
8599 awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage)
8600 if err != nil {
8601 return nil, err
8602 }
8603 awshrrArray[index] = awshrr
8604 }
8605 return awshrrArray, nil
8606 }
8607
8608
8609 func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) {
8610 awshrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaRestoreRequest
8611 objectMap := make(map[string]interface{})
8612 if awshrr.RecoveryType != "" {
8613 objectMap["recoveryType"] = awshrr.RecoveryType
8614 }
8615 if awshrr.SourceResourceID != nil {
8616 objectMap["sourceResourceId"] = awshrr.SourceResourceID
8617 }
8618 if awshrr.PropertyBag != nil {
8619 objectMap["propertyBag"] = awshrr.PropertyBag
8620 }
8621 if awshrr.TargetInfo != nil {
8622 objectMap["targetInfo"] = awshrr.TargetInfo
8623 }
8624 if awshrr.RecoveryMode != "" {
8625 objectMap["recoveryMode"] = awshrr.RecoveryMode
8626 }
8627 if awshrr.ObjectType != "" {
8628 objectMap["objectType"] = awshrr.ObjectType
8629 }
8630 return json.Marshal(objectMap)
8631 }
8632
8633
8634 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8635 return nil, false
8636 }
8637
8638
8639 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8640 return nil, false
8641 }
8642
8643
8644 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8645 return nil, false
8646 }
8647
8648
8649 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8650 return &awshrr, true
8651 }
8652
8653
8654 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8655 return nil, false
8656 }
8657
8658
8659 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8660 return &awshrr, true
8661 }
8662
8663
8664 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8665 return &awshrr, true
8666 }
8667
8668
8669 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8670 return nil, false
8671 }
8672
8673
8674 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8675 return nil, false
8676 }
8677
8678
8679 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8680 return nil, false
8681 }
8682
8683
8684 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8685 return nil, false
8686 }
8687
8688
8689 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8690 return nil, false
8691 }
8692
8693
8694 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8695 return &awshrr, true
8696 }
8697
8698
8699 type AzureWorkloadSQLAutoProtectionIntent struct {
8700
8701 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
8702
8703 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
8704
8705 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8706
8707 ItemID *string `json:"itemId,omitempty"`
8708
8709 PolicyID *string `json:"policyId,omitempty"`
8710
8711 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
8712
8713 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
8714 }
8715
8716
8717 func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) {
8718 awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent
8719 objectMap := make(map[string]interface{})
8720 if awsapi.WorkloadItemType != "" {
8721 objectMap["workloadItemType"] = awsapi.WorkloadItemType
8722 }
8723 if awsapi.BackupManagementType != "" {
8724 objectMap["backupManagementType"] = awsapi.BackupManagementType
8725 }
8726 if awsapi.SourceResourceID != nil {
8727 objectMap["sourceResourceId"] = awsapi.SourceResourceID
8728 }
8729 if awsapi.ItemID != nil {
8730 objectMap["itemId"] = awsapi.ItemID
8731 }
8732 if awsapi.PolicyID != nil {
8733 objectMap["policyId"] = awsapi.PolicyID
8734 }
8735 if awsapi.ProtectionState != "" {
8736 objectMap["protectionState"] = awsapi.ProtectionState
8737 }
8738 if awsapi.ProtectionIntentItemType != "" {
8739 objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType
8740 }
8741 return json.Marshal(objectMap)
8742 }
8743
8744
8745 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
8746 return nil, false
8747 }
8748
8749
8750 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
8751 return &awsapi, true
8752 }
8753
8754
8755 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
8756 return nil, false
8757 }
8758
8759
8760 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
8761 return nil, false
8762 }
8763
8764
8765 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
8766 return &awsapi, true
8767 }
8768
8769
8770 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
8771 return &awsapi, true
8772 }
8773
8774
8775 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
8776 return nil, false
8777 }
8778
8779
8780 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
8781 return &awsapi, true
8782 }
8783
8784
8785 type AzureWorkloadSQLPointInTimeRecoveryPoint struct {
8786
8787 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
8788
8789
8790
8791 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
8792
8793 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8794
8795 Type RestorePointType `json:"type,omitempty"`
8796
8797 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8798 }
8799
8800
8801 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
8802 awspitrp.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint
8803 objectMap := make(map[string]interface{})
8804 if awspitrp.TimeRanges != nil {
8805 objectMap["timeRanges"] = awspitrp.TimeRanges
8806 }
8807 if awspitrp.ExtendedInfo != nil {
8808 objectMap["extendedInfo"] = awspitrp.ExtendedInfo
8809 }
8810 if awspitrp.ObjectType != "" {
8811 objectMap["objectType"] = awspitrp.ObjectType
8812 }
8813 return json.Marshal(objectMap)
8814 }
8815
8816
8817 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8818 return nil, false
8819 }
8820
8821
8822 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8823 return nil, false
8824 }
8825
8826
8827 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8828 return nil, false
8829 }
8830
8831
8832 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8833 return nil, false
8834 }
8835
8836
8837 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8838 return &awspitrp, true
8839 }
8840
8841
8842 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8843 return nil, false
8844 }
8845
8846
8847 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8848 return nil, false
8849 }
8850
8851
8852 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8853 return &awspitrp, true
8854 }
8855
8856
8857 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8858 return nil, false
8859 }
8860
8861
8862 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8863 return &awspitrp, true
8864 }
8865
8866
8867 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8868 return nil, false
8869 }
8870
8871
8872 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8873 return nil, false
8874 }
8875
8876
8877 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8878 return nil, false
8879 }
8880
8881
8882 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8883 return &awspitrp, true
8884 }
8885
8886
8887
8888 type AzureWorkloadSQLPointInTimeRestoreRequest struct {
8889
8890 PointInTime *date.Time `json:"pointInTime,omitempty"`
8891
8892 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
8893
8894 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
8895
8896 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
8897
8898 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8899
8900 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8901
8902 PropertyBag map[string]*string `json:"propertyBag"`
8903
8904 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8905
8906 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8907
8908 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8909 }
8910
8911
8912 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
8913 awspitrr.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest
8914 objectMap := make(map[string]interface{})
8915 if awspitrr.PointInTime != nil {
8916 objectMap["pointInTime"] = awspitrr.PointInTime
8917 }
8918 if awspitrr.ShouldUseAlternateTargetLocation != nil {
8919 objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation
8920 }
8921 if awspitrr.IsNonRecoverable != nil {
8922 objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable
8923 }
8924 if awspitrr.AlternateDirectoryPaths != nil {
8925 objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths
8926 }
8927 if awspitrr.RecoveryType != "" {
8928 objectMap["recoveryType"] = awspitrr.RecoveryType
8929 }
8930 if awspitrr.SourceResourceID != nil {
8931 objectMap["sourceResourceId"] = awspitrr.SourceResourceID
8932 }
8933 if awspitrr.PropertyBag != nil {
8934 objectMap["propertyBag"] = awspitrr.PropertyBag
8935 }
8936 if awspitrr.TargetInfo != nil {
8937 objectMap["targetInfo"] = awspitrr.TargetInfo
8938 }
8939 if awspitrr.RecoveryMode != "" {
8940 objectMap["recoveryMode"] = awspitrr.RecoveryMode
8941 }
8942 if awspitrr.ObjectType != "" {
8943 objectMap["objectType"] = awspitrr.ObjectType
8944 }
8945 return json.Marshal(objectMap)
8946 }
8947
8948
8949 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8950 return nil, false
8951 }
8952
8953
8954 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8955 return nil, false
8956 }
8957
8958
8959 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8960 return nil, false
8961 }
8962
8963
8964 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8965 return &awspitrr, true
8966 }
8967
8968
8969 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8970 return nil, false
8971 }
8972
8973
8974 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8975 return nil, false
8976 }
8977
8978
8979 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8980 return nil, false
8981 }
8982
8983
8984 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8985 return &awspitrr, true
8986 }
8987
8988
8989 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8990 return nil, false
8991 }
8992
8993
8994 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8995 return &awspitrr, true
8996 }
8997
8998
8999 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9000 return nil, false
9001 }
9002
9003
9004 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9005 return nil, false
9006 }
9007
9008
9009 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9010 return &awspitrr, true
9011 }
9012
9013
9014
9015 type BasicAzureWorkloadSQLRecoveryPoint interface {
9016 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
9017 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
9018 }
9019
9020
9021
9022 type AzureWorkloadSQLRecoveryPoint struct {
9023
9024
9025
9026 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
9027
9028 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
9029
9030 Type RestorePointType `json:"type,omitempty"`
9031
9032 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
9033 }
9034
9035 func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) {
9036 var m map[string]interface{}
9037 err := json.Unmarshal(body, &m)
9038 if err != nil {
9039 return nil, err
9040 }
9041
9042 switch m["objectType"] {
9043 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
9044 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
9045 err := json.Unmarshal(body, &awspitrp)
9046 return awspitrp, err
9047 default:
9048 var awsrp AzureWorkloadSQLRecoveryPoint
9049 err := json.Unmarshal(body, &awsrp)
9050 return awsrp, err
9051 }
9052 }
9053 func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) {
9054 var rawMessages []*json.RawMessage
9055 err := json.Unmarshal(body, &rawMessages)
9056 if err != nil {
9057 return nil, err
9058 }
9059
9060 awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages))
9061
9062 for index, rawMessage := range rawMessages {
9063 awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage)
9064 if err != nil {
9065 return nil, err
9066 }
9067 awsrpArray[index] = awsrp
9068 }
9069 return awsrpArray, nil
9070 }
9071
9072
9073 func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) {
9074 awsrp.ObjectType = ObjectTypeAzureWorkloadSQLRecoveryPoint
9075 objectMap := make(map[string]interface{})
9076 if awsrp.ExtendedInfo != nil {
9077 objectMap["extendedInfo"] = awsrp.ExtendedInfo
9078 }
9079 if awsrp.ObjectType != "" {
9080 objectMap["objectType"] = awsrp.ObjectType
9081 }
9082 return json.Marshal(objectMap)
9083 }
9084
9085
9086 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
9087 return nil, false
9088 }
9089
9090
9091 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9092 return nil, false
9093 }
9094
9095
9096 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9097 return nil, false
9098 }
9099
9100
9101 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9102 return nil, false
9103 }
9104
9105
9106 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9107 return &awsrp, true
9108 }
9109
9110
9111 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9112 return nil, false
9113 }
9114
9115
9116 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9117 return nil, false
9118 }
9119
9120
9121 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9122 return nil, false
9123 }
9124
9125
9126 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9127 return &awsrp, true
9128 }
9129
9130
9131 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9132 return &awsrp, true
9133 }
9134
9135
9136 func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9137 return nil, false
9138 }
9139
9140
9141 func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9142 return nil, false
9143 }
9144
9145
9146 func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9147 return nil, false
9148 }
9149
9150
9151 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9152 return &awsrp, true
9153 }
9154
9155
9156 type AzureWorkloadSQLRecoveryPointExtendedInfo struct {
9157
9158 DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"`
9159
9160 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
9161 }
9162
9163
9164 func (awsrpei AzureWorkloadSQLRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) {
9165 objectMap := make(map[string]interface{})
9166 return json.Marshal(objectMap)
9167 }
9168
9169
9170 type BasicAzureWorkloadSQLRestoreRequest interface {
9171 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
9172 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
9173 }
9174
9175
9176 type AzureWorkloadSQLRestoreRequest struct {
9177
9178 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
9179
9180 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
9181
9182 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
9183
9184 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9185
9186 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9187
9188 PropertyBag map[string]*string `json:"propertyBag"`
9189
9190 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9191
9192 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9193
9194 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9195 }
9196
9197 func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) {
9198 var m map[string]interface{}
9199 err := json.Unmarshal(body, &m)
9200 if err != nil {
9201 return nil, err
9202 }
9203
9204 switch m["objectType"] {
9205 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
9206 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
9207 err := json.Unmarshal(body, &awspitrr)
9208 return awspitrr, err
9209 default:
9210 var awsrr AzureWorkloadSQLRestoreRequest
9211 err := json.Unmarshal(body, &awsrr)
9212 return awsrr, err
9213 }
9214 }
9215 func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) {
9216 var rawMessages []*json.RawMessage
9217 err := json.Unmarshal(body, &rawMessages)
9218 if err != nil {
9219 return nil, err
9220 }
9221
9222 awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages))
9223
9224 for index, rawMessage := range rawMessages {
9225 awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage)
9226 if err != nil {
9227 return nil, err
9228 }
9229 awsrrArray[index] = awsrr
9230 }
9231 return awsrrArray, nil
9232 }
9233
9234
9235 func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) {
9236 awsrr.ObjectType = ObjectTypeAzureWorkloadSQLRestoreRequest
9237 objectMap := make(map[string]interface{})
9238 if awsrr.ShouldUseAlternateTargetLocation != nil {
9239 objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation
9240 }
9241 if awsrr.IsNonRecoverable != nil {
9242 objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable
9243 }
9244 if awsrr.AlternateDirectoryPaths != nil {
9245 objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths
9246 }
9247 if awsrr.RecoveryType != "" {
9248 objectMap["recoveryType"] = awsrr.RecoveryType
9249 }
9250 if awsrr.SourceResourceID != nil {
9251 objectMap["sourceResourceId"] = awsrr.SourceResourceID
9252 }
9253 if awsrr.PropertyBag != nil {
9254 objectMap["propertyBag"] = awsrr.PropertyBag
9255 }
9256 if awsrr.TargetInfo != nil {
9257 objectMap["targetInfo"] = awsrr.TargetInfo
9258 }
9259 if awsrr.RecoveryMode != "" {
9260 objectMap["recoveryMode"] = awsrr.RecoveryMode
9261 }
9262 if awsrr.ObjectType != "" {
9263 objectMap["objectType"] = awsrr.ObjectType
9264 }
9265 return json.Marshal(objectMap)
9266 }
9267
9268
9269 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9270 return nil, false
9271 }
9272
9273
9274 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9275 return nil, false
9276 }
9277
9278
9279 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9280 return nil, false
9281 }
9282
9283
9284 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9285 return &awsrr, true
9286 }
9287
9288
9289 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9290 return nil, false
9291 }
9292
9293
9294 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9295 return nil, false
9296 }
9297
9298
9299 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9300 return nil, false
9301 }
9302
9303
9304 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9305 return nil, false
9306 }
9307
9308
9309 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9310 return &awsrr, true
9311 }
9312
9313
9314 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9315 return &awsrr, true
9316 }
9317
9318
9319 func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9320 return nil, false
9321 }
9322
9323
9324 func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9325 return nil, false
9326 }
9327
9328
9329 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9330 return &awsrr, true
9331 }
9332
9333
9334 type BEKDetails struct {
9335
9336 SecretURL *string `json:"secretUrl,omitempty"`
9337
9338 SecretVaultID *string `json:"secretVaultId,omitempty"`
9339
9340 SecretData *string `json:"secretData,omitempty"`
9341 }
9342
9343
9344 type BMSBackupEngineQueryObject struct {
9345
9346 Expand *string `json:"expand,omitempty"`
9347 }
9348
9349
9350 type BMSBackupEnginesQueryObject struct {
9351
9352 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9353
9354 FriendlyName *string `json:"friendlyName,omitempty"`
9355
9356 Expand *string `json:"expand,omitempty"`
9357 }
9358
9359
9360 type BMSBackupSummariesQueryObject struct {
9361
9362 Type Type `json:"type,omitempty"`
9363 }
9364
9365
9366 type BMSContainerQueryObject struct {
9367
9368 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9369
9370 ContainerType ContainerType `json:"containerType,omitempty"`
9371
9372 BackupEngineName *string `json:"backupEngineName,omitempty"`
9373
9374 FabricName *string `json:"fabricName,omitempty"`
9375
9376 Status *string `json:"status,omitempty"`
9377
9378 FriendlyName *string `json:"friendlyName,omitempty"`
9379 }
9380
9381
9382 type BMSContainersInquiryQueryObject struct {
9383
9384 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9385
9386 WorkloadType WorkloadType `json:"workloadType,omitempty"`
9387 }
9388
9389
9390 type BMSPOQueryObject struct {
9391
9392 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9393
9394 WorkloadType WorkloadType `json:"workloadType,omitempty"`
9395
9396 ContainerName *string `json:"containerName,omitempty"`
9397
9398 Status *string `json:"status,omitempty"`
9399
9400 FriendlyName *string `json:"friendlyName,omitempty"`
9401 }
9402
9403
9404 type BMSRefreshContainersQueryObject struct {
9405
9406 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9407 }
9408
9409
9410 type BMSRPQueryObject struct {
9411
9412 StartDate *date.Time `json:"startDate,omitempty"`
9413
9414 EndDate *date.Time `json:"endDate,omitempty"`
9415
9416 RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"`
9417
9418 ExtendedInfo *bool `json:"extendedInfo,omitempty"`
9419 }
9420
9421
9422 type BMSWorkloadItemQueryObject struct {
9423
9424 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9425
9426 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
9427
9428 WorkloadType WorkloadType `json:"workloadType,omitempty"`
9429
9430 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
9431 }
9432
9433
9434 type ClientDiscoveryDisplay struct {
9435
9436 Provider *string `json:"provider,omitempty"`
9437
9438 Resource *string `json:"resource,omitempty"`
9439
9440 Operation *string `json:"operation,omitempty"`
9441
9442 Description *string `json:"description,omitempty"`
9443 }
9444
9445
9446
9447 type ClientDiscoveryForLogSpecification struct {
9448
9449 Name *string `json:"name,omitempty"`
9450
9451 DisplayName *string `json:"displayName,omitempty"`
9452
9453 BlobDuration *string `json:"blobDuration,omitempty"`
9454 }
9455
9456
9457 type ClientDiscoveryForProperties struct {
9458
9459 ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"`
9460 }
9461
9462
9463
9464 type ClientDiscoveryForServiceSpecification struct {
9465
9466 LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"`
9467 }
9468
9469
9470 type ClientDiscoveryResponse struct {
9471 autorest.Response `json:"-"`
9472
9473 Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"`
9474
9475 NextLink *string `json:"nextLink,omitempty"`
9476 }
9477
9478
9479
9480 type ClientDiscoveryResponseIterator struct {
9481 i int
9482 page ClientDiscoveryResponsePage
9483 }
9484
9485
9486
9487 func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) {
9488 if tracing.IsEnabled() {
9489 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext")
9490 defer func() {
9491 sc := -1
9492 if iter.Response().Response.Response != nil {
9493 sc = iter.Response().Response.Response.StatusCode
9494 }
9495 tracing.EndSpan(ctx, sc, err)
9496 }()
9497 }
9498 iter.i++
9499 if iter.i < len(iter.page.Values()) {
9500 return nil
9501 }
9502 err = iter.page.NextWithContext(ctx)
9503 if err != nil {
9504 iter.i--
9505 return err
9506 }
9507 iter.i = 0
9508 return nil
9509 }
9510
9511
9512
9513
9514 func (iter *ClientDiscoveryResponseIterator) Next() error {
9515 return iter.NextWithContext(context.Background())
9516 }
9517
9518
9519 func (iter ClientDiscoveryResponseIterator) NotDone() bool {
9520 return iter.page.NotDone() && iter.i < len(iter.page.Values())
9521 }
9522
9523
9524 func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse {
9525 return iter.page.Response()
9526 }
9527
9528
9529
9530 func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI {
9531 if !iter.page.NotDone() {
9532 return ClientDiscoveryValueForSingleAPI{}
9533 }
9534 return iter.page.Values()[iter.i]
9535 }
9536
9537
9538 func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator {
9539 return ClientDiscoveryResponseIterator{page: page}
9540 }
9541
9542
9543 func (cdr ClientDiscoveryResponse) IsEmpty() bool {
9544 return cdr.Value == nil || len(*cdr.Value) == 0
9545 }
9546
9547
9548 func (cdr ClientDiscoveryResponse) hasNextLink() bool {
9549 return cdr.NextLink != nil && len(*cdr.NextLink) != 0
9550 }
9551
9552
9553
9554 func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) {
9555 if !cdr.hasNextLink() {
9556 return nil, nil
9557 }
9558 return autorest.Prepare((&http.Request{}).WithContext(ctx),
9559 autorest.AsJSON(),
9560 autorest.AsGet(),
9561 autorest.WithBaseURL(to.String(cdr.NextLink)))
9562 }
9563
9564
9565 type ClientDiscoveryResponsePage struct {
9566 fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)
9567 cdr ClientDiscoveryResponse
9568 }
9569
9570
9571
9572 func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) {
9573 if tracing.IsEnabled() {
9574 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext")
9575 defer func() {
9576 sc := -1
9577 if page.Response().Response.Response != nil {
9578 sc = page.Response().Response.Response.StatusCode
9579 }
9580 tracing.EndSpan(ctx, sc, err)
9581 }()
9582 }
9583 for {
9584 next, err := page.fn(ctx, page.cdr)
9585 if err != nil {
9586 return err
9587 }
9588 page.cdr = next
9589 if !next.hasNextLink() || !next.IsEmpty() {
9590 break
9591 }
9592 }
9593 return nil
9594 }
9595
9596
9597
9598
9599 func (page *ClientDiscoveryResponsePage) Next() error {
9600 return page.NextWithContext(context.Background())
9601 }
9602
9603
9604 func (page ClientDiscoveryResponsePage) NotDone() bool {
9605 return !page.cdr.IsEmpty()
9606 }
9607
9608
9609 func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse {
9610 return page.cdr
9611 }
9612
9613
9614 func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI {
9615 if page.cdr.IsEmpty() {
9616 return nil
9617 }
9618 return *page.cdr.Value
9619 }
9620
9621
9622 func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage {
9623 return ClientDiscoveryResponsePage{
9624 fn: getNextPage,
9625 cdr: cur,
9626 }
9627 }
9628
9629
9630 type ClientDiscoveryValueForSingleAPI struct {
9631
9632 Name *string `json:"name,omitempty"`
9633
9634 Display *ClientDiscoveryDisplay `json:"display,omitempty"`
9635
9636 Origin *string `json:"origin,omitempty"`
9637
9638 Properties *ClientDiscoveryForProperties `json:"properties,omitempty"`
9639 }
9640
9641
9642 type ClientScriptForConnect struct {
9643
9644 ScriptContent *string `json:"scriptContent,omitempty"`
9645
9646 ScriptExtension *string `json:"scriptExtension,omitempty"`
9647
9648 OsType *string `json:"osType,omitempty"`
9649
9650 URL *string `json:"url,omitempty"`
9651
9652
9653 ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"`
9654 }
9655
9656
9657 type ContainerIdentityInfo struct {
9658
9659 UniqueName *string `json:"uniqueName,omitempty"`
9660
9661 AadTenantID *string `json:"aadTenantId,omitempty"`
9662
9663 ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
9664
9665 Audience *string `json:"audience,omitempty"`
9666 }
9667
9668
9669 type DailyRetentionFormat struct {
9670
9671 DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"`
9672 }
9673
9674
9675 type DailyRetentionSchedule struct {
9676
9677 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
9678
9679 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
9680 }
9681
9682
9683 type Day struct {
9684
9685 Date *int32 `json:"date,omitempty"`
9686
9687 IsLast *bool `json:"isLast,omitempty"`
9688 }
9689
9690
9691 type DiskExclusionProperties struct {
9692
9693 DiskLunList *[]int32 `json:"diskLunList,omitempty"`
9694
9695 IsInclusionList *bool `json:"isInclusionList,omitempty"`
9696 }
9697
9698
9699 type DiskInformation struct {
9700 Lun *int32 `json:"lun,omitempty"`
9701 Name *string `json:"name,omitempty"`
9702 }
9703
9704
9705 type DistributedNodesInfo struct {
9706
9707 NodeName *string `json:"nodeName,omitempty"`
9708
9709
9710 Status *string `json:"status,omitempty"`
9711
9712 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
9713 }
9714
9715
9716 type DpmBackupEngine struct {
9717
9718 FriendlyName *string `json:"friendlyName,omitempty"`
9719
9720 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9721
9722 RegistrationStatus *string `json:"registrationStatus,omitempty"`
9723
9724 BackupEngineState *string `json:"backupEngineState,omitempty"`
9725
9726 HealthStatus *string `json:"healthStatus,omitempty"`
9727
9728 CanReRegister *bool `json:"canReRegister,omitempty"`
9729
9730 BackupEngineID *string `json:"backupEngineId,omitempty"`
9731
9732 DpmVersion *string `json:"dpmVersion,omitempty"`
9733
9734 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
9735
9736 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
9737
9738 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
9739
9740 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
9741
9742 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
9743 }
9744
9745
9746 func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) {
9747 dbe.BackupEngineType = BackupEngineTypeDpmBackupEngine
9748 objectMap := make(map[string]interface{})
9749 if dbe.FriendlyName != nil {
9750 objectMap["friendlyName"] = dbe.FriendlyName
9751 }
9752 if dbe.BackupManagementType != "" {
9753 objectMap["backupManagementType"] = dbe.BackupManagementType
9754 }
9755 if dbe.RegistrationStatus != nil {
9756 objectMap["registrationStatus"] = dbe.RegistrationStatus
9757 }
9758 if dbe.BackupEngineState != nil {
9759 objectMap["backupEngineState"] = dbe.BackupEngineState
9760 }
9761 if dbe.HealthStatus != nil {
9762 objectMap["healthStatus"] = dbe.HealthStatus
9763 }
9764 if dbe.CanReRegister != nil {
9765 objectMap["canReRegister"] = dbe.CanReRegister
9766 }
9767 if dbe.BackupEngineID != nil {
9768 objectMap["backupEngineId"] = dbe.BackupEngineID
9769 }
9770 if dbe.DpmVersion != nil {
9771 objectMap["dpmVersion"] = dbe.DpmVersion
9772 }
9773 if dbe.AzureBackupAgentVersion != nil {
9774 objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion
9775 }
9776 if dbe.IsAzureBackupAgentUpgradeAvailable != nil {
9777 objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable
9778 }
9779 if dbe.IsDpmUpgradeAvailable != nil {
9780 objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable
9781 }
9782 if dbe.ExtendedInfo != nil {
9783 objectMap["extendedInfo"] = dbe.ExtendedInfo
9784 }
9785 if dbe.BackupEngineType != "" {
9786 objectMap["backupEngineType"] = dbe.BackupEngineType
9787 }
9788 return json.Marshal(objectMap)
9789 }
9790
9791
9792 func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
9793 return nil, false
9794 }
9795
9796
9797 func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
9798 return &dbe, true
9799 }
9800
9801
9802 func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) {
9803 return nil, false
9804 }
9805
9806
9807 func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
9808 return &dbe, true
9809 }
9810
9811
9812 type BasicDpmContainer interface {
9813 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
9814 AsDpmContainer() (*DpmContainer, bool)
9815 }
9816
9817
9818 type DpmContainer struct {
9819
9820 CanReRegister *bool `json:"canReRegister,omitempty"`
9821
9822 ContainerID *string `json:"containerId,omitempty"`
9823
9824 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
9825
9826 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
9827
9828 DpmServers *[]string `json:"dpmServers,omitempty"`
9829
9830 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
9831
9832 ProtectionStatus *string `json:"protectionStatus,omitempty"`
9833
9834 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
9835
9836 FriendlyName *string `json:"friendlyName,omitempty"`
9837
9838 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9839
9840 RegistrationStatus *string `json:"registrationStatus,omitempty"`
9841
9842 HealthStatus *string `json:"healthStatus,omitempty"`
9843
9844 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
9845 }
9846
9847 func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) {
9848 var m map[string]interface{}
9849 err := json.Unmarshal(body, &m)
9850 if err != nil {
9851 return nil, err
9852 }
9853
9854 switch m["containerType"] {
9855 case string(ContainerTypeAzureBackupServerContainer1):
9856 var absc AzureBackupServerContainer
9857 err := json.Unmarshal(body, &absc)
9858 return absc, err
9859 default:
9860 var dc DpmContainer
9861 err := json.Unmarshal(body, &dc)
9862 return dc, err
9863 }
9864 }
9865 func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) {
9866 var rawMessages []*json.RawMessage
9867 err := json.Unmarshal(body, &rawMessages)
9868 if err != nil {
9869 return nil, err
9870 }
9871
9872 dcArray := make([]BasicDpmContainer, len(rawMessages))
9873
9874 for index, rawMessage := range rawMessages {
9875 dc, err := unmarshalBasicDpmContainer(*rawMessage)
9876 if err != nil {
9877 return nil, err
9878 }
9879 dcArray[index] = dc
9880 }
9881 return dcArray, nil
9882 }
9883
9884
9885 func (dc DpmContainer) MarshalJSON() ([]byte, error) {
9886 dc.ContainerType = ContainerTypeDPMContainer1
9887 objectMap := make(map[string]interface{})
9888 if dc.CanReRegister != nil {
9889 objectMap["canReRegister"] = dc.CanReRegister
9890 }
9891 if dc.ContainerID != nil {
9892 objectMap["containerId"] = dc.ContainerID
9893 }
9894 if dc.ProtectedItemCount != nil {
9895 objectMap["protectedItemCount"] = dc.ProtectedItemCount
9896 }
9897 if dc.DpmAgentVersion != nil {
9898 objectMap["dpmAgentVersion"] = dc.DpmAgentVersion
9899 }
9900 if dc.DpmServers != nil {
9901 objectMap["dpmServers"] = dc.DpmServers
9902 }
9903 if dc.UpgradeAvailable != nil {
9904 objectMap["upgradeAvailable"] = dc.UpgradeAvailable
9905 }
9906 if dc.ProtectionStatus != nil {
9907 objectMap["protectionStatus"] = dc.ProtectionStatus
9908 }
9909 if dc.ExtendedInfo != nil {
9910 objectMap["extendedInfo"] = dc.ExtendedInfo
9911 }
9912 if dc.FriendlyName != nil {
9913 objectMap["friendlyName"] = dc.FriendlyName
9914 }
9915 if dc.BackupManagementType != "" {
9916 objectMap["backupManagementType"] = dc.BackupManagementType
9917 }
9918 if dc.RegistrationStatus != nil {
9919 objectMap["registrationStatus"] = dc.RegistrationStatus
9920 }
9921 if dc.HealthStatus != nil {
9922 objectMap["healthStatus"] = dc.HealthStatus
9923 }
9924 if dc.ContainerType != "" {
9925 objectMap["containerType"] = dc.ContainerType
9926 }
9927 return json.Marshal(objectMap)
9928 }
9929
9930
9931 func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
9932 return nil, false
9933 }
9934
9935
9936 func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
9937 return nil, false
9938 }
9939
9940
9941 func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
9942 return nil, false
9943 }
9944
9945
9946 func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
9947 return nil, false
9948 }
9949
9950
9951 func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
9952 return nil, false
9953 }
9954
9955
9956 func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
9957 return nil, false
9958 }
9959
9960
9961 func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
9962 return nil, false
9963 }
9964
9965
9966 func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
9967 return nil, false
9968 }
9969
9970
9971 func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
9972 return nil, false
9973 }
9974
9975
9976 func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) {
9977 return &dc, true
9978 }
9979
9980
9981 func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
9982 return &dc, true
9983 }
9984
9985
9986 func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) {
9987 return nil, false
9988 }
9989
9990
9991 func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
9992 return nil, false
9993 }
9994
9995
9996 func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
9997 return nil, false
9998 }
9999
10000
10001 func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) {
10002 return nil, false
10003 }
10004
10005
10006 func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
10007 return nil, false
10008 }
10009
10010
10011 func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
10012 return &dc, true
10013 }
10014
10015
10016 type DPMContainerExtendedInfo struct {
10017
10018 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
10019 }
10020
10021
10022 type DpmErrorInfo struct {
10023
10024 ErrorString *string `json:"errorString,omitempty"`
10025
10026 Recommendations *[]string `json:"recommendations,omitempty"`
10027 }
10028
10029
10030 type DpmJob struct {
10031
10032 Duration *string `json:"duration,omitempty"`
10033
10034 DpmServerName *string `json:"dpmServerName,omitempty"`
10035
10036 ContainerName *string `json:"containerName,omitempty"`
10037
10038 ContainerType *string `json:"containerType,omitempty"`
10039
10040 WorkloadType *string `json:"workloadType,omitempty"`
10041
10042 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
10043
10044 ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"`
10045
10046 ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"`
10047
10048 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
10049
10050 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10051
10052 Operation *string `json:"operation,omitempty"`
10053
10054 Status *string `json:"status,omitempty"`
10055
10056 StartTime *date.Time `json:"startTime,omitempty"`
10057
10058 EndTime *date.Time `json:"endTime,omitempty"`
10059
10060 ActivityID *string `json:"activityId,omitempty"`
10061
10062 JobType JobType `json:"jobType,omitempty"`
10063 }
10064
10065
10066 func (dj DpmJob) MarshalJSON() ([]byte, error) {
10067 dj.JobType = JobTypeDpmJob
10068 objectMap := make(map[string]interface{})
10069 if dj.Duration != nil {
10070 objectMap["duration"] = dj.Duration
10071 }
10072 if dj.DpmServerName != nil {
10073 objectMap["dpmServerName"] = dj.DpmServerName
10074 }
10075 if dj.ContainerName != nil {
10076 objectMap["containerName"] = dj.ContainerName
10077 }
10078 if dj.ContainerType != nil {
10079 objectMap["containerType"] = dj.ContainerType
10080 }
10081 if dj.WorkloadType != nil {
10082 objectMap["workloadType"] = dj.WorkloadType
10083 }
10084 if dj.ActionsInfo != nil {
10085 objectMap["actionsInfo"] = dj.ActionsInfo
10086 }
10087 if dj.ErrorDetails != nil {
10088 objectMap["errorDetails"] = dj.ErrorDetails
10089 }
10090 if dj.ExtendedInfo != nil {
10091 objectMap["extendedInfo"] = dj.ExtendedInfo
10092 }
10093 if dj.EntityFriendlyName != nil {
10094 objectMap["entityFriendlyName"] = dj.EntityFriendlyName
10095 }
10096 if dj.BackupManagementType != "" {
10097 objectMap["backupManagementType"] = dj.BackupManagementType
10098 }
10099 if dj.Operation != nil {
10100 objectMap["operation"] = dj.Operation
10101 }
10102 if dj.Status != nil {
10103 objectMap["status"] = dj.Status
10104 }
10105 if dj.StartTime != nil {
10106 objectMap["startTime"] = dj.StartTime
10107 }
10108 if dj.EndTime != nil {
10109 objectMap["endTime"] = dj.EndTime
10110 }
10111 if dj.ActivityID != nil {
10112 objectMap["activityId"] = dj.ActivityID
10113 }
10114 if dj.JobType != "" {
10115 objectMap["jobType"] = dj.JobType
10116 }
10117 return json.Marshal(objectMap)
10118 }
10119
10120
10121 func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
10122 return nil, false
10123 }
10124
10125
10126 func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
10127 return nil, false
10128 }
10129
10130
10131 func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
10132 return nil, false
10133 }
10134
10135
10136 func (dj DpmJob) AsDpmJob() (*DpmJob, bool) {
10137 return &dj, true
10138 }
10139
10140
10141 func (dj DpmJob) AsMabJob() (*MabJob, bool) {
10142 return nil, false
10143 }
10144
10145
10146 func (dj DpmJob) AsJob() (*Job, bool) {
10147 return nil, false
10148 }
10149
10150
10151 func (dj DpmJob) AsBasicJob() (BasicJob, bool) {
10152 return &dj, true
10153 }
10154
10155
10156 type DpmJobExtendedInfo struct {
10157
10158 TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"`
10159
10160 PropertyBag map[string]*string `json:"propertyBag"`
10161
10162 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
10163 }
10164
10165
10166 func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) {
10167 objectMap := make(map[string]interface{})
10168 if djei.TasksList != nil {
10169 objectMap["tasksList"] = djei.TasksList
10170 }
10171 if djei.PropertyBag != nil {
10172 objectMap["propertyBag"] = djei.PropertyBag
10173 }
10174 if djei.DynamicErrorMessage != nil {
10175 objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage
10176 }
10177 return json.Marshal(objectMap)
10178 }
10179
10180
10181 type DpmJobTaskDetails struct {
10182
10183 TaskID *string `json:"taskId,omitempty"`
10184
10185 StartTime *date.Time `json:"startTime,omitempty"`
10186
10187 EndTime *date.Time `json:"endTime,omitempty"`
10188
10189 Duration *string `json:"duration,omitempty"`
10190
10191 Status *string `json:"status,omitempty"`
10192 }
10193
10194
10195 type DPMProtectedItem struct {
10196
10197 FriendlyName *string `json:"friendlyName,omitempty"`
10198
10199 BackupEngineName *string `json:"backupEngineName,omitempty"`
10200
10201 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
10202
10203 ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
10204
10205 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10206
10207 WorkloadType DataSourceType `json:"workloadType,omitempty"`
10208
10209 ContainerName *string `json:"containerName,omitempty"`
10210
10211 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10212
10213 PolicyID *string `json:"policyId,omitempty"`
10214
10215 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
10216
10217 BackupSetName *string `json:"backupSetName,omitempty"`
10218
10219 CreateMode CreateMode `json:"createMode,omitempty"`
10220
10221 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
10222
10223 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
10224
10225 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
10226
10227 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
10228
10229 IsRehydrate *bool `json:"isRehydrate,omitempty"`
10230
10231 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
10232 }
10233
10234
10235 func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) {
10236 dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem
10237 objectMap := make(map[string]interface{})
10238 if dpi.FriendlyName != nil {
10239 objectMap["friendlyName"] = dpi.FriendlyName
10240 }
10241 if dpi.BackupEngineName != nil {
10242 objectMap["backupEngineName"] = dpi.BackupEngineName
10243 }
10244 if dpi.ProtectionState != "" {
10245 objectMap["protectionState"] = dpi.ProtectionState
10246 }
10247 if dpi.ExtendedInfo != nil {
10248 objectMap["extendedInfo"] = dpi.ExtendedInfo
10249 }
10250 if dpi.BackupManagementType != "" {
10251 objectMap["backupManagementType"] = dpi.BackupManagementType
10252 }
10253 if dpi.WorkloadType != "" {
10254 objectMap["workloadType"] = dpi.WorkloadType
10255 }
10256 if dpi.ContainerName != nil {
10257 objectMap["containerName"] = dpi.ContainerName
10258 }
10259 if dpi.SourceResourceID != nil {
10260 objectMap["sourceResourceId"] = dpi.SourceResourceID
10261 }
10262 if dpi.PolicyID != nil {
10263 objectMap["policyId"] = dpi.PolicyID
10264 }
10265 if dpi.LastRecoveryPoint != nil {
10266 objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint
10267 }
10268 if dpi.BackupSetName != nil {
10269 objectMap["backupSetName"] = dpi.BackupSetName
10270 }
10271 if dpi.CreateMode != "" {
10272 objectMap["createMode"] = dpi.CreateMode
10273 }
10274 if dpi.DeferredDeleteTimeInUTC != nil {
10275 objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC
10276 }
10277 if dpi.IsScheduledForDeferredDelete != nil {
10278 objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete
10279 }
10280 if dpi.DeferredDeleteTimeRemaining != nil {
10281 objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining
10282 }
10283 if dpi.IsDeferredDeleteScheduleUpcoming != nil {
10284 objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming
10285 }
10286 if dpi.IsRehydrate != nil {
10287 objectMap["isRehydrate"] = dpi.IsRehydrate
10288 }
10289 if dpi.ProtectedItemType != "" {
10290 objectMap["protectedItemType"] = dpi.ProtectedItemType
10291 }
10292 return json.Marshal(objectMap)
10293 }
10294
10295
10296 func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
10297 return nil, false
10298 }
10299
10300
10301 func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
10302 return nil, false
10303 }
10304
10305
10306 func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
10307 return nil, false
10308 }
10309
10310
10311 func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
10312 return nil, false
10313 }
10314
10315
10316 func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
10317 return nil, false
10318 }
10319
10320
10321 func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
10322 return nil, false
10323 }
10324
10325
10326 func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
10327 return nil, false
10328 }
10329
10330
10331 func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
10332 return nil, false
10333 }
10334
10335
10336 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
10337 return nil, false
10338 }
10339
10340
10341 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
10342 return nil, false
10343 }
10344
10345
10346 func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
10347 return nil, false
10348 }
10349
10350
10351 func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
10352 return &dpi, true
10353 }
10354
10355
10356 func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
10357 return nil, false
10358 }
10359
10360
10361 func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
10362 return nil, false
10363 }
10364
10365
10366 func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
10367 return nil, false
10368 }
10369
10370
10371 func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
10372 return &dpi, true
10373 }
10374
10375
10376 type DPMProtectedItemExtendedInfo struct {
10377
10378 ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"`
10379
10380 Protected *bool `json:"protected,omitempty"`
10381
10382 IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"`
10383
10384 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
10385
10386 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
10387
10388 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
10389
10390 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
10391
10392 OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"`
10393
10394 OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"`
10395
10396 OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"`
10397
10398 IsCollocated *bool `json:"isCollocated,omitempty"`
10399
10400 ProtectionGroupName *string `json:"protectionGroupName,omitempty"`
10401
10402 DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"`
10403
10404 TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"`
10405 }
10406
10407
10408 func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
10409 objectMap := make(map[string]interface{})
10410 if dpiei.ProtectableObjectLoadPath != nil {
10411 objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath
10412 }
10413 if dpiei.Protected != nil {
10414 objectMap["protected"] = dpiei.Protected
10415 }
10416 if dpiei.IsPresentOnCloud != nil {
10417 objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud
10418 }
10419 if dpiei.LastBackupStatus != nil {
10420 objectMap["lastBackupStatus"] = dpiei.LastBackupStatus
10421 }
10422 if dpiei.LastRefreshedAt != nil {
10423 objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt
10424 }
10425 if dpiei.OldestRecoveryPoint != nil {
10426 objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint
10427 }
10428 if dpiei.RecoveryPointCount != nil {
10429 objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount
10430 }
10431 if dpiei.OnPremiseOldestRecoveryPoint != nil {
10432 objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint
10433 }
10434 if dpiei.OnPremiseLatestRecoveryPoint != nil {
10435 objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint
10436 }
10437 if dpiei.OnPremiseRecoveryPointCount != nil {
10438 objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount
10439 }
10440 if dpiei.IsCollocated != nil {
10441 objectMap["isCollocated"] = dpiei.IsCollocated
10442 }
10443 if dpiei.ProtectionGroupName != nil {
10444 objectMap["protectionGroupName"] = dpiei.ProtectionGroupName
10445 }
10446 if dpiei.DiskStorageUsedInBytes != nil {
10447 objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes
10448 }
10449 if dpiei.TotalDiskStorageSizeInBytes != nil {
10450 objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes
10451 }
10452 return json.Marshal(objectMap)
10453 }
10454
10455
10456 type EncryptionDetails struct {
10457
10458 EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"`
10459
10460 KekURL *string `json:"kekUrl,omitempty"`
10461
10462 SecretKeyURL *string `json:"secretKeyUrl,omitempty"`
10463
10464 KekVaultID *string `json:"kekVaultId,omitempty"`
10465
10466 SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"`
10467 }
10468
10469
10470 type BasicEngineBase interface {
10471 AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool)
10472 AsDpmBackupEngine() (*DpmBackupEngine, bool)
10473 AsEngineBase() (*EngineBase, bool)
10474 }
10475
10476
10477 type EngineBase struct {
10478
10479 FriendlyName *string `json:"friendlyName,omitempty"`
10480
10481 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10482
10483 RegistrationStatus *string `json:"registrationStatus,omitempty"`
10484
10485 BackupEngineState *string `json:"backupEngineState,omitempty"`
10486
10487 HealthStatus *string `json:"healthStatus,omitempty"`
10488
10489 CanReRegister *bool `json:"canReRegister,omitempty"`
10490
10491 BackupEngineID *string `json:"backupEngineId,omitempty"`
10492
10493 DpmVersion *string `json:"dpmVersion,omitempty"`
10494
10495 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
10496
10497 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
10498
10499 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
10500
10501 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
10502
10503 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
10504 }
10505
10506 func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) {
10507 var m map[string]interface{}
10508 err := json.Unmarshal(body, &m)
10509 if err != nil {
10510 return nil, err
10511 }
10512
10513 switch m["backupEngineType"] {
10514 case string(BackupEngineTypeAzureBackupServerEngine):
10515 var abse AzureBackupServerEngine
10516 err := json.Unmarshal(body, &abse)
10517 return abse, err
10518 case string(BackupEngineTypeDpmBackupEngine):
10519 var dbe DpmBackupEngine
10520 err := json.Unmarshal(body, &dbe)
10521 return dbe, err
10522 default:
10523 var eb EngineBase
10524 err := json.Unmarshal(body, &eb)
10525 return eb, err
10526 }
10527 }
10528 func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) {
10529 var rawMessages []*json.RawMessage
10530 err := json.Unmarshal(body, &rawMessages)
10531 if err != nil {
10532 return nil, err
10533 }
10534
10535 ebArray := make([]BasicEngineBase, len(rawMessages))
10536
10537 for index, rawMessage := range rawMessages {
10538 eb, err := unmarshalBasicEngineBase(*rawMessage)
10539 if err != nil {
10540 return nil, err
10541 }
10542 ebArray[index] = eb
10543 }
10544 return ebArray, nil
10545 }
10546
10547
10548 func (eb EngineBase) MarshalJSON() ([]byte, error) {
10549 eb.BackupEngineType = BackupEngineTypeBackupEngineBase
10550 objectMap := make(map[string]interface{})
10551 if eb.FriendlyName != nil {
10552 objectMap["friendlyName"] = eb.FriendlyName
10553 }
10554 if eb.BackupManagementType != "" {
10555 objectMap["backupManagementType"] = eb.BackupManagementType
10556 }
10557 if eb.RegistrationStatus != nil {
10558 objectMap["registrationStatus"] = eb.RegistrationStatus
10559 }
10560 if eb.BackupEngineState != nil {
10561 objectMap["backupEngineState"] = eb.BackupEngineState
10562 }
10563 if eb.HealthStatus != nil {
10564 objectMap["healthStatus"] = eb.HealthStatus
10565 }
10566 if eb.CanReRegister != nil {
10567 objectMap["canReRegister"] = eb.CanReRegister
10568 }
10569 if eb.BackupEngineID != nil {
10570 objectMap["backupEngineId"] = eb.BackupEngineID
10571 }
10572 if eb.DpmVersion != nil {
10573 objectMap["dpmVersion"] = eb.DpmVersion
10574 }
10575 if eb.AzureBackupAgentVersion != nil {
10576 objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion
10577 }
10578 if eb.IsAzureBackupAgentUpgradeAvailable != nil {
10579 objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable
10580 }
10581 if eb.IsDpmUpgradeAvailable != nil {
10582 objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable
10583 }
10584 if eb.ExtendedInfo != nil {
10585 objectMap["extendedInfo"] = eb.ExtendedInfo
10586 }
10587 if eb.BackupEngineType != "" {
10588 objectMap["backupEngineType"] = eb.BackupEngineType
10589 }
10590 return json.Marshal(objectMap)
10591 }
10592
10593
10594 func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
10595 return nil, false
10596 }
10597
10598
10599 func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
10600 return nil, false
10601 }
10602
10603
10604 func (eb EngineBase) AsEngineBase() (*EngineBase, bool) {
10605 return &eb, true
10606 }
10607
10608
10609 func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) {
10610 return &eb, true
10611 }
10612
10613
10614
10615 type EngineBaseResource struct {
10616 autorest.Response `json:"-"`
10617
10618 Properties BasicEngineBase `json:"properties,omitempty"`
10619
10620 ID *string `json:"id,omitempty"`
10621
10622 Name *string `json:"name,omitempty"`
10623
10624 Type *string `json:"type,omitempty"`
10625
10626 Location *string `json:"location,omitempty"`
10627
10628 Tags map[string]*string `json:"tags"`
10629
10630 ETag *string `json:"eTag,omitempty"`
10631 }
10632
10633
10634 func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) {
10635 objectMap := make(map[string]interface{})
10636 objectMap["properties"] = ebr.Properties
10637 if ebr.Location != nil {
10638 objectMap["location"] = ebr.Location
10639 }
10640 if ebr.Tags != nil {
10641 objectMap["tags"] = ebr.Tags
10642 }
10643 if ebr.ETag != nil {
10644 objectMap["eTag"] = ebr.ETag
10645 }
10646 return json.Marshal(objectMap)
10647 }
10648
10649
10650 func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error {
10651 var m map[string]*json.RawMessage
10652 err := json.Unmarshal(body, &m)
10653 if err != nil {
10654 return err
10655 }
10656 for k, v := range m {
10657 switch k {
10658 case "properties":
10659 if v != nil {
10660 properties, err := unmarshalBasicEngineBase(*v)
10661 if err != nil {
10662 return err
10663 }
10664 ebr.Properties = properties
10665 }
10666 case "id":
10667 if v != nil {
10668 var ID string
10669 err = json.Unmarshal(*v, &ID)
10670 if err != nil {
10671 return err
10672 }
10673 ebr.ID = &ID
10674 }
10675 case "name":
10676 if v != nil {
10677 var name string
10678 err = json.Unmarshal(*v, &name)
10679 if err != nil {
10680 return err
10681 }
10682 ebr.Name = &name
10683 }
10684 case "type":
10685 if v != nil {
10686 var typeVar string
10687 err = json.Unmarshal(*v, &typeVar)
10688 if err != nil {
10689 return err
10690 }
10691 ebr.Type = &typeVar
10692 }
10693 case "location":
10694 if v != nil {
10695 var location string
10696 err = json.Unmarshal(*v, &location)
10697 if err != nil {
10698 return err
10699 }
10700 ebr.Location = &location
10701 }
10702 case "tags":
10703 if v != nil {
10704 var tags map[string]*string
10705 err = json.Unmarshal(*v, &tags)
10706 if err != nil {
10707 return err
10708 }
10709 ebr.Tags = tags
10710 }
10711 case "eTag":
10712 if v != nil {
10713 var eTag string
10714 err = json.Unmarshal(*v, &eTag)
10715 if err != nil {
10716 return err
10717 }
10718 ebr.ETag = &eTag
10719 }
10720 }
10721 }
10722
10723 return nil
10724 }
10725
10726
10727 type EngineBaseResourceList struct {
10728 autorest.Response `json:"-"`
10729
10730 Value *[]EngineBaseResource `json:"value,omitempty"`
10731
10732 NextLink *string `json:"nextLink,omitempty"`
10733 }
10734
10735
10736 type EngineBaseResourceListIterator struct {
10737 i int
10738 page EngineBaseResourceListPage
10739 }
10740
10741
10742
10743 func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) {
10744 if tracing.IsEnabled() {
10745 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext")
10746 defer func() {
10747 sc := -1
10748 if iter.Response().Response.Response != nil {
10749 sc = iter.Response().Response.Response.StatusCode
10750 }
10751 tracing.EndSpan(ctx, sc, err)
10752 }()
10753 }
10754 iter.i++
10755 if iter.i < len(iter.page.Values()) {
10756 return nil
10757 }
10758 err = iter.page.NextWithContext(ctx)
10759 if err != nil {
10760 iter.i--
10761 return err
10762 }
10763 iter.i = 0
10764 return nil
10765 }
10766
10767
10768
10769
10770 func (iter *EngineBaseResourceListIterator) Next() error {
10771 return iter.NextWithContext(context.Background())
10772 }
10773
10774
10775 func (iter EngineBaseResourceListIterator) NotDone() bool {
10776 return iter.page.NotDone() && iter.i < len(iter.page.Values())
10777 }
10778
10779
10780 func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList {
10781 return iter.page.Response()
10782 }
10783
10784
10785
10786 func (iter EngineBaseResourceListIterator) Value() EngineBaseResource {
10787 if !iter.page.NotDone() {
10788 return EngineBaseResource{}
10789 }
10790 return iter.page.Values()[iter.i]
10791 }
10792
10793
10794 func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator {
10795 return EngineBaseResourceListIterator{page: page}
10796 }
10797
10798
10799 func (ebrl EngineBaseResourceList) IsEmpty() bool {
10800 return ebrl.Value == nil || len(*ebrl.Value) == 0
10801 }
10802
10803
10804 func (ebrl EngineBaseResourceList) hasNextLink() bool {
10805 return ebrl.NextLink != nil && len(*ebrl.NextLink) != 0
10806 }
10807
10808
10809
10810 func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) {
10811 if !ebrl.hasNextLink() {
10812 return nil, nil
10813 }
10814 return autorest.Prepare((&http.Request{}).WithContext(ctx),
10815 autorest.AsJSON(),
10816 autorest.AsGet(),
10817 autorest.WithBaseURL(to.String(ebrl.NextLink)))
10818 }
10819
10820
10821 type EngineBaseResourceListPage struct {
10822 fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)
10823 ebrl EngineBaseResourceList
10824 }
10825
10826
10827
10828 func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) {
10829 if tracing.IsEnabled() {
10830 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext")
10831 defer func() {
10832 sc := -1
10833 if page.Response().Response.Response != nil {
10834 sc = page.Response().Response.Response.StatusCode
10835 }
10836 tracing.EndSpan(ctx, sc, err)
10837 }()
10838 }
10839 for {
10840 next, err := page.fn(ctx, page.ebrl)
10841 if err != nil {
10842 return err
10843 }
10844 page.ebrl = next
10845 if !next.hasNextLink() || !next.IsEmpty() {
10846 break
10847 }
10848 }
10849 return nil
10850 }
10851
10852
10853
10854
10855 func (page *EngineBaseResourceListPage) Next() error {
10856 return page.NextWithContext(context.Background())
10857 }
10858
10859
10860 func (page EngineBaseResourceListPage) NotDone() bool {
10861 return !page.ebrl.IsEmpty()
10862 }
10863
10864
10865 func (page EngineBaseResourceListPage) Response() EngineBaseResourceList {
10866 return page.ebrl
10867 }
10868
10869
10870 func (page EngineBaseResourceListPage) Values() []EngineBaseResource {
10871 if page.ebrl.IsEmpty() {
10872 return nil
10873 }
10874 return *page.ebrl.Value
10875 }
10876
10877
10878 func NewEngineBaseResourceListPage(cur EngineBaseResourceList, getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage {
10879 return EngineBaseResourceListPage{
10880 fn: getNextPage,
10881 ebrl: cur,
10882 }
10883 }
10884
10885
10886 type EngineExtendedInfo struct {
10887
10888 DatabaseName *string `json:"databaseName,omitempty"`
10889
10890 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
10891
10892 ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"`
10893
10894 DiskCount *int32 `json:"diskCount,omitempty"`
10895
10896 UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"`
10897
10898 AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"`
10899
10900 RefreshedAt *date.Time `json:"refreshedAt,omitempty"`
10901
10902 AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"`
10903 }
10904
10905
10906 type ErrorAdditionalInfo struct {
10907
10908 Type *string `json:"type,omitempty"`
10909
10910 Info interface{} `json:"info,omitempty"`
10911 }
10912
10913
10914 func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
10915 objectMap := make(map[string]interface{})
10916 return json.Marshal(objectMap)
10917 }
10918
10919
10920 type ErrorDetail struct {
10921
10922 Code *string `json:"code,omitempty"`
10923
10924 Message *string `json:"message,omitempty"`
10925
10926 Recommendations *[]string `json:"recommendations,omitempty"`
10927 }
10928
10929
10930 func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
10931 objectMap := make(map[string]interface{})
10932 return json.Marshal(objectMap)
10933 }
10934
10935
10936
10937 type ErrorResponse struct {
10938
10939 Code *string `json:"code,omitempty"`
10940
10941 Message *string `json:"message,omitempty"`
10942
10943 Target *string `json:"target,omitempty"`
10944
10945 Details *[]ErrorResponse `json:"details,omitempty"`
10946
10947 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
10948 }
10949
10950
10951 func (er ErrorResponse) MarshalJSON() ([]byte, error) {
10952 objectMap := make(map[string]interface{})
10953 return json.Marshal(objectMap)
10954 }
10955
10956
10957 type ExportJobsOperationResultInfo struct {
10958
10959 BlobURL *string `json:"blobUrl,omitempty"`
10960
10961 BlobSasKey *string `json:"blobSasKey,omitempty"`
10962
10963 ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"`
10964
10965 ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"`
10966
10967 ObjectType ObjectType `json:"objectType,omitempty"`
10968 }
10969
10970
10971 func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) {
10972 ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo
10973 objectMap := make(map[string]interface{})
10974 if ejori.BlobURL != nil {
10975 objectMap["blobUrl"] = ejori.BlobURL
10976 }
10977 if ejori.BlobSasKey != nil {
10978 objectMap["blobSasKey"] = ejori.BlobSasKey
10979 }
10980 if ejori.ExcelFileBlobURL != nil {
10981 objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL
10982 }
10983 if ejori.ExcelFileBlobSasKey != nil {
10984 objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey
10985 }
10986 if ejori.ObjectType != "" {
10987 objectMap["objectType"] = ejori.ObjectType
10988 }
10989 return json.Marshal(objectMap)
10990 }
10991
10992
10993 func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
10994 return &ejori, true
10995 }
10996
10997
10998 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
10999 return nil, false
11000 }
11001
11002
11003 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
11004 return nil, false
11005 }
11006
11007
11008 func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
11009 return &ejori, true
11010 }
11011
11012
11013 type ExtendedProperties struct {
11014
11015 DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"`
11016 }
11017
11018
11019 type BasicFeatureSupportRequest interface {
11020 AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool)
11021 AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool)
11022 AsFeatureSupportRequest() (*FeatureSupportRequest, bool)
11023 }
11024
11025
11026 type FeatureSupportRequest struct {
11027
11028 FeatureType FeatureType `json:"featureType,omitempty"`
11029 }
11030
11031 func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) {
11032 var m map[string]interface{}
11033 err := json.Unmarshal(body, &m)
11034 if err != nil {
11035 return nil, err
11036 }
11037
11038 switch m["featureType"] {
11039 case string(FeatureTypeAzureBackupGoals):
11040 var abgfsr AzureBackupGoalFeatureSupportRequest
11041 err := json.Unmarshal(body, &abgfsr)
11042 return abgfsr, err
11043 case string(FeatureTypeAzureVMResourceBackup):
11044 var avrfsr AzureVMResourceFeatureSupportRequest
11045 err := json.Unmarshal(body, &avrfsr)
11046 return avrfsr, err
11047 default:
11048 var fsr FeatureSupportRequest
11049 err := json.Unmarshal(body, &fsr)
11050 return fsr, err
11051 }
11052 }
11053 func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) {
11054 var rawMessages []*json.RawMessage
11055 err := json.Unmarshal(body, &rawMessages)
11056 if err != nil {
11057 return nil, err
11058 }
11059
11060 fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages))
11061
11062 for index, rawMessage := range rawMessages {
11063 fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage)
11064 if err != nil {
11065 return nil, err
11066 }
11067 fsrArray[index] = fsr
11068 }
11069 return fsrArray, nil
11070 }
11071
11072
11073 func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) {
11074 fsr.FeatureType = FeatureTypeFeatureSupportRequest
11075 objectMap := make(map[string]interface{})
11076 if fsr.FeatureType != "" {
11077 objectMap["featureType"] = fsr.FeatureType
11078 }
11079 return json.Marshal(objectMap)
11080 }
11081
11082
11083 func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
11084 return nil, false
11085 }
11086
11087
11088 func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
11089 return nil, false
11090 }
11091
11092
11093 func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
11094 return &fsr, true
11095 }
11096
11097
11098 func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
11099 return &fsr, true
11100 }
11101
11102
11103 type GenericContainer struct {
11104
11105 FabricName *string `json:"fabricName,omitempty"`
11106
11107 ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"`
11108
11109 FriendlyName *string `json:"friendlyName,omitempty"`
11110
11111 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11112
11113 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11114
11115 HealthStatus *string `json:"healthStatus,omitempty"`
11116
11117 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
11118 }
11119
11120
11121 func (gc GenericContainer) MarshalJSON() ([]byte, error) {
11122 gc.ContainerType = ContainerTypeGenericContainer1
11123 objectMap := make(map[string]interface{})
11124 if gc.FabricName != nil {
11125 objectMap["fabricName"] = gc.FabricName
11126 }
11127 if gc.ExtendedInformation != nil {
11128 objectMap["extendedInformation"] = gc.ExtendedInformation
11129 }
11130 if gc.FriendlyName != nil {
11131 objectMap["friendlyName"] = gc.FriendlyName
11132 }
11133 if gc.BackupManagementType != "" {
11134 objectMap["backupManagementType"] = gc.BackupManagementType
11135 }
11136 if gc.RegistrationStatus != nil {
11137 objectMap["registrationStatus"] = gc.RegistrationStatus
11138 }
11139 if gc.HealthStatus != nil {
11140 objectMap["healthStatus"] = gc.HealthStatus
11141 }
11142 if gc.ContainerType != "" {
11143 objectMap["containerType"] = gc.ContainerType
11144 }
11145 return json.Marshal(objectMap)
11146 }
11147
11148
11149 func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
11150 return nil, false
11151 }
11152
11153
11154 func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
11155 return nil, false
11156 }
11157
11158
11159 func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
11160 return nil, false
11161 }
11162
11163
11164 func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
11165 return nil, false
11166 }
11167
11168
11169 func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
11170 return nil, false
11171 }
11172
11173
11174 func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
11175 return nil, false
11176 }
11177
11178
11179 func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
11180 return nil, false
11181 }
11182
11183
11184 func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
11185 return nil, false
11186 }
11187
11188
11189 func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
11190 return nil, false
11191 }
11192
11193
11194 func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) {
11195 return nil, false
11196 }
11197
11198
11199 func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
11200 return nil, false
11201 }
11202
11203
11204 func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) {
11205 return &gc, true
11206 }
11207
11208
11209 func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
11210 return nil, false
11211 }
11212
11213
11214 func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
11215 return nil, false
11216 }
11217
11218
11219 func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) {
11220 return nil, false
11221 }
11222
11223
11224 func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
11225 return nil, false
11226 }
11227
11228
11229 func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
11230 return &gc, true
11231 }
11232
11233
11234 type GenericContainerExtendedInfo struct {
11235
11236 RawCertData *string `json:"rawCertData,omitempty"`
11237
11238 ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"`
11239
11240 ServiceEndpoints map[string]*string `json:"serviceEndpoints"`
11241 }
11242
11243
11244 func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) {
11245 objectMap := make(map[string]interface{})
11246 if gcei.RawCertData != nil {
11247 objectMap["rawCertData"] = gcei.RawCertData
11248 }
11249 if gcei.ContainerIdentityInfo != nil {
11250 objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo
11251 }
11252 if gcei.ServiceEndpoints != nil {
11253 objectMap["serviceEndpoints"] = gcei.ServiceEndpoints
11254 }
11255 return json.Marshal(objectMap)
11256 }
11257
11258
11259 type GenericProtectedItem struct {
11260
11261 FriendlyName *string `json:"friendlyName,omitempty"`
11262
11263 PolicyState *string `json:"policyState,omitempty"`
11264
11265 ProtectionState ProtectionState `json:"protectionState,omitempty"`
11266
11267 ProtectedItemID *int64 `json:"protectedItemId,omitempty"`
11268
11269 SourceAssociations map[string]*string `json:"sourceAssociations"`
11270
11271 FabricName *string `json:"fabricName,omitempty"`
11272
11273 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11274
11275 WorkloadType DataSourceType `json:"workloadType,omitempty"`
11276
11277 ContainerName *string `json:"containerName,omitempty"`
11278
11279 SourceResourceID *string `json:"sourceResourceId,omitempty"`
11280
11281 PolicyID *string `json:"policyId,omitempty"`
11282
11283 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
11284
11285 BackupSetName *string `json:"backupSetName,omitempty"`
11286
11287 CreateMode CreateMode `json:"createMode,omitempty"`
11288
11289 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
11290
11291 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
11292
11293 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
11294
11295 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
11296
11297 IsRehydrate *bool `json:"isRehydrate,omitempty"`
11298
11299 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
11300 }
11301
11302
11303 func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) {
11304 gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem
11305 objectMap := make(map[string]interface{})
11306 if gpi.FriendlyName != nil {
11307 objectMap["friendlyName"] = gpi.FriendlyName
11308 }
11309 if gpi.PolicyState != nil {
11310 objectMap["policyState"] = gpi.PolicyState
11311 }
11312 if gpi.ProtectionState != "" {
11313 objectMap["protectionState"] = gpi.ProtectionState
11314 }
11315 if gpi.ProtectedItemID != nil {
11316 objectMap["protectedItemId"] = gpi.ProtectedItemID
11317 }
11318 if gpi.SourceAssociations != nil {
11319 objectMap["sourceAssociations"] = gpi.SourceAssociations
11320 }
11321 if gpi.FabricName != nil {
11322 objectMap["fabricName"] = gpi.FabricName
11323 }
11324 if gpi.BackupManagementType != "" {
11325 objectMap["backupManagementType"] = gpi.BackupManagementType
11326 }
11327 if gpi.WorkloadType != "" {
11328 objectMap["workloadType"] = gpi.WorkloadType
11329 }
11330 if gpi.ContainerName != nil {
11331 objectMap["containerName"] = gpi.ContainerName
11332 }
11333 if gpi.SourceResourceID != nil {
11334 objectMap["sourceResourceId"] = gpi.SourceResourceID
11335 }
11336 if gpi.PolicyID != nil {
11337 objectMap["policyId"] = gpi.PolicyID
11338 }
11339 if gpi.LastRecoveryPoint != nil {
11340 objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint
11341 }
11342 if gpi.BackupSetName != nil {
11343 objectMap["backupSetName"] = gpi.BackupSetName
11344 }
11345 if gpi.CreateMode != "" {
11346 objectMap["createMode"] = gpi.CreateMode
11347 }
11348 if gpi.DeferredDeleteTimeInUTC != nil {
11349 objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC
11350 }
11351 if gpi.IsScheduledForDeferredDelete != nil {
11352 objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete
11353 }
11354 if gpi.DeferredDeleteTimeRemaining != nil {
11355 objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining
11356 }
11357 if gpi.IsDeferredDeleteScheduleUpcoming != nil {
11358 objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming
11359 }
11360 if gpi.IsRehydrate != nil {
11361 objectMap["isRehydrate"] = gpi.IsRehydrate
11362 }
11363 if gpi.ProtectedItemType != "" {
11364 objectMap["protectedItemType"] = gpi.ProtectedItemType
11365 }
11366 return json.Marshal(objectMap)
11367 }
11368
11369
11370 func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
11371 return nil, false
11372 }
11373
11374
11375 func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
11376 return nil, false
11377 }
11378
11379
11380 func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
11381 return nil, false
11382 }
11383
11384
11385 func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
11386 return nil, false
11387 }
11388
11389
11390 func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
11391 return nil, false
11392 }
11393
11394
11395 func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
11396 return nil, false
11397 }
11398
11399
11400 func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
11401 return nil, false
11402 }
11403
11404
11405 func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
11406 return nil, false
11407 }
11408
11409
11410 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
11411 return nil, false
11412 }
11413
11414
11415 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
11416 return nil, false
11417 }
11418
11419
11420 func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
11421 return nil, false
11422 }
11423
11424
11425 func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
11426 return nil, false
11427 }
11428
11429
11430 func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
11431 return &gpi, true
11432 }
11433
11434
11435 func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
11436 return nil, false
11437 }
11438
11439
11440 func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
11441 return nil, false
11442 }
11443
11444
11445 func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
11446 return &gpi, true
11447 }
11448
11449
11450 type GenericProtectionPolicy struct {
11451
11452 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
11453
11454 TimeZone *string `json:"timeZone,omitempty"`
11455
11456 FabricName *string `json:"fabricName,omitempty"`
11457
11458 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
11459
11460 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
11461 }
11462
11463
11464 func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) {
11465 gpp.BackupManagementType = BackupManagementTypeGenericProtectionPolicy
11466 objectMap := make(map[string]interface{})
11467 if gpp.SubProtectionPolicy != nil {
11468 objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy
11469 }
11470 if gpp.TimeZone != nil {
11471 objectMap["timeZone"] = gpp.TimeZone
11472 }
11473 if gpp.FabricName != nil {
11474 objectMap["fabricName"] = gpp.FabricName
11475 }
11476 if gpp.ProtectedItemsCount != nil {
11477 objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount
11478 }
11479 if gpp.BackupManagementType != "" {
11480 objectMap["backupManagementType"] = gpp.BackupManagementType
11481 }
11482 return json.Marshal(objectMap)
11483 }
11484
11485
11486 func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
11487 return nil, false
11488 }
11489
11490
11491 func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
11492 return nil, false
11493 }
11494
11495
11496 func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
11497 return nil, false
11498 }
11499
11500
11501 func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
11502 return nil, false
11503 }
11504
11505
11506 func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
11507 return &gpp, true
11508 }
11509
11510
11511 func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
11512 return nil, false
11513 }
11514
11515
11516 func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
11517 return nil, false
11518 }
11519
11520
11521 func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
11522 return &gpp, true
11523 }
11524
11525
11526 type GenericRecoveryPoint struct {
11527
11528 FriendlyName *string `json:"friendlyName,omitempty"`
11529
11530 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
11531
11532 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
11533
11534 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
11535
11536 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
11537 }
11538
11539
11540 func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) {
11541 grp.ObjectType = ObjectTypeGenericRecoveryPoint
11542 objectMap := make(map[string]interface{})
11543 if grp.FriendlyName != nil {
11544 objectMap["friendlyName"] = grp.FriendlyName
11545 }
11546 if grp.RecoveryPointType != nil {
11547 objectMap["recoveryPointType"] = grp.RecoveryPointType
11548 }
11549 if grp.RecoveryPointTime != nil {
11550 objectMap["recoveryPointTime"] = grp.RecoveryPointTime
11551 }
11552 if grp.RecoveryPointAdditionalInfo != nil {
11553 objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo
11554 }
11555 if grp.ObjectType != "" {
11556 objectMap["objectType"] = grp.ObjectType
11557 }
11558 return json.Marshal(objectMap)
11559 }
11560
11561
11562 func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
11563 return nil, false
11564 }
11565
11566
11567 func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
11568 return nil, false
11569 }
11570
11571
11572 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
11573 return nil, false
11574 }
11575
11576
11577 func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
11578 return nil, false
11579 }
11580
11581
11582 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
11583 return nil, false
11584 }
11585
11586
11587 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
11588 return nil, false
11589 }
11590
11591
11592 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
11593 return nil, false
11594 }
11595
11596
11597 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
11598 return nil, false
11599 }
11600
11601
11602 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
11603 return nil, false
11604 }
11605
11606
11607 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
11608 return nil, false
11609 }
11610
11611
11612 func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
11613 return &grp, true
11614 }
11615
11616
11617 func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
11618 return nil, false
11619 }
11620
11621
11622 func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
11623 return nil, false
11624 }
11625
11626
11627 func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
11628 return &grp, true
11629 }
11630
11631
11632 type GetProtectedItemQueryObject struct {
11633
11634 Expand *string `json:"expand,omitempty"`
11635 }
11636
11637
11638 type IaasVMBackupRequest struct {
11639
11640 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
11641
11642 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
11643 }
11644
11645
11646 func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) {
11647 ivbr.ObjectType = ObjectTypeIaasVMBackupRequest
11648 objectMap := make(map[string]interface{})
11649 if ivbr.RecoveryPointExpiryTimeInUTC != nil {
11650 objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC
11651 }
11652 if ivbr.ObjectType != "" {
11653 objectMap["objectType"] = ivbr.ObjectType
11654 }
11655 return json.Marshal(objectMap)
11656 }
11657
11658
11659 func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
11660 return nil, false
11661 }
11662
11663
11664 func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
11665 return nil, false
11666 }
11667
11668
11669 func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
11670 return &ivbr, true
11671 }
11672
11673
11674 func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) {
11675 return nil, false
11676 }
11677
11678
11679 func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) {
11680 return &ivbr, true
11681 }
11682
11683
11684 type BasicIaaSVMContainer interface {
11685 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
11686 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
11687 AsIaaSVMContainer() (*IaaSVMContainer, bool)
11688 }
11689
11690
11691 type IaaSVMContainer struct {
11692
11693 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
11694
11695 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
11696
11697 ResourceGroup *string `json:"resourceGroup,omitempty"`
11698
11699 FriendlyName *string `json:"friendlyName,omitempty"`
11700
11701 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11702
11703 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11704
11705 HealthStatus *string `json:"healthStatus,omitempty"`
11706
11707 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
11708 }
11709
11710 func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) {
11711 var m map[string]interface{}
11712 err := json.Unmarshal(body, &m)
11713 if err != nil {
11714 return nil, err
11715 }
11716
11717 switch m["containerType"] {
11718 case string(ContainerTypeMicrosoftClassicComputevirtualMachines):
11719 var aisccvc AzureIaaSClassicComputeVMContainer
11720 err := json.Unmarshal(body, &aisccvc)
11721 return aisccvc, err
11722 case string(ContainerTypeMicrosoftComputevirtualMachines):
11723 var aiscvc AzureIaaSComputeVMContainer
11724 err := json.Unmarshal(body, &aiscvc)
11725 return aiscvc, err
11726 default:
11727 var isc IaaSVMContainer
11728 err := json.Unmarshal(body, &isc)
11729 return isc, err
11730 }
11731 }
11732 func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) {
11733 var rawMessages []*json.RawMessage
11734 err := json.Unmarshal(body, &rawMessages)
11735 if err != nil {
11736 return nil, err
11737 }
11738
11739 iscArray := make([]BasicIaaSVMContainer, len(rawMessages))
11740
11741 for index, rawMessage := range rawMessages {
11742 isc, err := unmarshalBasicIaaSVMContainer(*rawMessage)
11743 if err != nil {
11744 return nil, err
11745 }
11746 iscArray[index] = isc
11747 }
11748 return iscArray, nil
11749 }
11750
11751
11752 func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) {
11753 isc.ContainerType = ContainerTypeIaaSVMContainer
11754 objectMap := make(map[string]interface{})
11755 if isc.VirtualMachineID != nil {
11756 objectMap["virtualMachineId"] = isc.VirtualMachineID
11757 }
11758 if isc.VirtualMachineVersion != nil {
11759 objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion
11760 }
11761 if isc.ResourceGroup != nil {
11762 objectMap["resourceGroup"] = isc.ResourceGroup
11763 }
11764 if isc.FriendlyName != nil {
11765 objectMap["friendlyName"] = isc.FriendlyName
11766 }
11767 if isc.BackupManagementType != "" {
11768 objectMap["backupManagementType"] = isc.BackupManagementType
11769 }
11770 if isc.RegistrationStatus != nil {
11771 objectMap["registrationStatus"] = isc.RegistrationStatus
11772 }
11773 if isc.HealthStatus != nil {
11774 objectMap["healthStatus"] = isc.HealthStatus
11775 }
11776 if isc.ContainerType != "" {
11777 objectMap["containerType"] = isc.ContainerType
11778 }
11779 return json.Marshal(objectMap)
11780 }
11781
11782
11783 func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
11784 return nil, false
11785 }
11786
11787
11788 func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
11789 return nil, false
11790 }
11791
11792
11793 func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
11794 return nil, false
11795 }
11796
11797
11798 func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
11799 return nil, false
11800 }
11801
11802
11803 func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
11804 return nil, false
11805 }
11806
11807
11808 func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
11809 return nil, false
11810 }
11811
11812
11813 func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
11814 return nil, false
11815 }
11816
11817
11818 func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
11819 return nil, false
11820 }
11821
11822
11823 func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
11824 return nil, false
11825 }
11826
11827
11828 func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) {
11829 return nil, false
11830 }
11831
11832
11833 func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
11834 return nil, false
11835 }
11836
11837
11838 func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) {
11839 return nil, false
11840 }
11841
11842
11843 func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
11844 return &isc, true
11845 }
11846
11847
11848 func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
11849 return &isc, true
11850 }
11851
11852
11853 func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) {
11854 return nil, false
11855 }
11856
11857
11858 func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
11859 return nil, false
11860 }
11861
11862
11863 func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
11864 return &isc, true
11865 }
11866
11867
11868 type IaasVMILRRegistrationRequest struct {
11869
11870 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
11871
11872 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
11873
11874 InitiatorName *string `json:"initiatorName,omitempty"`
11875
11876 RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"`
11877
11878 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
11879 }
11880
11881
11882 func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) {
11883 ivrr.ObjectType = ObjectTypeIaasVMILRRegistrationRequest
11884 objectMap := make(map[string]interface{})
11885 if ivrr.RecoveryPointID != nil {
11886 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
11887 }
11888 if ivrr.VirtualMachineID != nil {
11889 objectMap["virtualMachineId"] = ivrr.VirtualMachineID
11890 }
11891 if ivrr.InitiatorName != nil {
11892 objectMap["initiatorName"] = ivrr.InitiatorName
11893 }
11894 if ivrr.RenewExistingRegistration != nil {
11895 objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration
11896 }
11897 if ivrr.ObjectType != "" {
11898 objectMap["objectType"] = ivrr.ObjectType
11899 }
11900 return json.Marshal(objectMap)
11901 }
11902
11903
11904 func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
11905 return nil, false
11906 }
11907
11908
11909 func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
11910 return &ivrr, true
11911 }
11912
11913
11914 func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) {
11915 return nil, false
11916 }
11917
11918
11919 func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
11920 return &ivrr, true
11921 }
11922
11923
11924 type BasicIaaSVMProtectableItem interface {
11925 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
11926 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
11927 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
11928 }
11929
11930
11931 type IaaSVMProtectableItem struct {
11932
11933 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
11934
11935 BackupManagementType *string `json:"backupManagementType,omitempty"`
11936
11937 WorkloadType *string `json:"workloadType,omitempty"`
11938
11939 FriendlyName *string `json:"friendlyName,omitempty"`
11940
11941 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
11942
11943 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
11944 }
11945
11946 func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) {
11947 var m map[string]interface{}
11948 err := json.Unmarshal(body, &m)
11949 if err != nil {
11950 return nil, err
11951 }
11952
11953 switch m["protectableItemType"] {
11954 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
11955 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
11956 err := json.Unmarshal(body, &aisccvpi)
11957 return aisccvpi, err
11958 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
11959 var aiscvpi AzureIaaSComputeVMProtectableItem
11960 err := json.Unmarshal(body, &aiscvpi)
11961 return aiscvpi, err
11962 default:
11963 var ispi IaaSVMProtectableItem
11964 err := json.Unmarshal(body, &ispi)
11965 return ispi, err
11966 }
11967 }
11968 func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) {
11969 var rawMessages []*json.RawMessage
11970 err := json.Unmarshal(body, &rawMessages)
11971 if err != nil {
11972 return nil, err
11973 }
11974
11975 ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages))
11976
11977 for index, rawMessage := range rawMessages {
11978 ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage)
11979 if err != nil {
11980 return nil, err
11981 }
11982 ispiArray[index] = ispi
11983 }
11984 return ispiArray, nil
11985 }
11986
11987
11988 func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) {
11989 ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem
11990 objectMap := make(map[string]interface{})
11991 if ispi.VirtualMachineID != nil {
11992 objectMap["virtualMachineId"] = ispi.VirtualMachineID
11993 }
11994 if ispi.BackupManagementType != nil {
11995 objectMap["backupManagementType"] = ispi.BackupManagementType
11996 }
11997 if ispi.WorkloadType != nil {
11998 objectMap["workloadType"] = ispi.WorkloadType
11999 }
12000 if ispi.FriendlyName != nil {
12001 objectMap["friendlyName"] = ispi.FriendlyName
12002 }
12003 if ispi.ProtectionState != "" {
12004 objectMap["protectionState"] = ispi.ProtectionState
12005 }
12006 if ispi.ProtectableItemType != "" {
12007 objectMap["protectableItemType"] = ispi.ProtectableItemType
12008 }
12009 return json.Marshal(objectMap)
12010 }
12011
12012
12013 func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
12014 return nil, false
12015 }
12016
12017
12018 func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
12019 return nil, false
12020 }
12021
12022
12023 func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
12024 return nil, false
12025 }
12026
12027
12028 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
12029 return nil, false
12030 }
12031
12032
12033 func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
12034 return nil, false
12035 }
12036
12037
12038 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
12039 return nil, false
12040 }
12041
12042
12043 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
12044 return nil, false
12045 }
12046
12047
12048 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
12049 return nil, false
12050 }
12051
12052
12053 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
12054 return nil, false
12055 }
12056
12057
12058 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
12059 return nil, false
12060 }
12061
12062
12063 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
12064 return nil, false
12065 }
12066
12067
12068 func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
12069 return &ispi, true
12070 }
12071
12072
12073 func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
12074 return &ispi, true
12075 }
12076
12077
12078 func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
12079 return nil, false
12080 }
12081
12082
12083 func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
12084 return &ispi, true
12085 }
12086
12087
12088 type IaasVMRecoveryPoint struct {
12089
12090 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
12091
12092 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
12093
12094 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
12095
12096 SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"`
12097
12098 IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"`
12099
12100 KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"`
12101
12102 IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"`
12103
12104 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
12105
12106 IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"`
12107
12108 VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
12109
12110 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
12111
12112 OsType *string `json:"osType,omitempty"`
12113
12114 RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"`
12115
12116 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
12117 }
12118
12119
12120 func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) {
12121 ivrp.ObjectType = ObjectTypeIaasVMRecoveryPoint
12122 objectMap := make(map[string]interface{})
12123 if ivrp.KeyAndSecret != nil {
12124 objectMap["keyAndSecret"] = ivrp.KeyAndSecret
12125 }
12126 if ivrp.IsInstantIlrSessionActive != nil {
12127 objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive
12128 }
12129 if ivrp.RecoveryPointTierDetails != nil {
12130 objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails
12131 }
12132 if ivrp.IsManagedVirtualMachine != nil {
12133 objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine
12134 }
12135 if ivrp.VirtualMachineSize != nil {
12136 objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize
12137 }
12138 if ivrp.OriginalStorageAccountOption != nil {
12139 objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption
12140 }
12141 if ivrp.OsType != nil {
12142 objectMap["osType"] = ivrp.OsType
12143 }
12144 if ivrp.RecoveryPointDiskConfiguration != nil {
12145 objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration
12146 }
12147 if ivrp.ObjectType != "" {
12148 objectMap["objectType"] = ivrp.ObjectType
12149 }
12150 return json.Marshal(objectMap)
12151 }
12152
12153
12154 func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
12155 return nil, false
12156 }
12157
12158
12159 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
12160 return nil, false
12161 }
12162
12163
12164 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
12165 return nil, false
12166 }
12167
12168
12169 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
12170 return nil, false
12171 }
12172
12173
12174 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
12175 return nil, false
12176 }
12177
12178
12179 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
12180 return nil, false
12181 }
12182
12183
12184 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
12185 return nil, false
12186 }
12187
12188
12189 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
12190 return nil, false
12191 }
12192
12193
12194 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
12195 return nil, false
12196 }
12197
12198
12199 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
12200 return nil, false
12201 }
12202
12203
12204 func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
12205 return nil, false
12206 }
12207
12208
12209 func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
12210 return &ivrp, true
12211 }
12212
12213
12214 func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
12215 return nil, false
12216 }
12217
12218
12219 func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
12220 return &ivrp, true
12221 }
12222
12223
12224 type IaasVMRestoreRequest struct {
12225
12226 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
12227
12228 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
12229
12230 SourceResourceID *string `json:"sourceResourceId,omitempty"`
12231
12232
12233 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
12234
12235
12236 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
12237
12238 StorageAccountID *string `json:"storageAccountId,omitempty"`
12239
12240
12241 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
12242
12243
12244
12245 SubnetID *string `json:"subnetId,omitempty"`
12246
12247
12248 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
12249
12250 Region *string `json:"region,omitempty"`
12251
12252 AffinityGroup *string `json:"affinityGroup,omitempty"`
12253
12254
12255 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
12256
12257 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
12258
12259 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
12260
12261 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
12262
12263 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
12264 }
12265
12266
12267 func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) {
12268 ivrr.ObjectType = ObjectTypeIaasVMRestoreRequest
12269 objectMap := make(map[string]interface{})
12270 if ivrr.RecoveryPointID != nil {
12271 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
12272 }
12273 if ivrr.RecoveryType != "" {
12274 objectMap["recoveryType"] = ivrr.RecoveryType
12275 }
12276 if ivrr.SourceResourceID != nil {
12277 objectMap["sourceResourceId"] = ivrr.SourceResourceID
12278 }
12279 if ivrr.TargetVirtualMachineID != nil {
12280 objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID
12281 }
12282 if ivrr.TargetResourceGroupID != nil {
12283 objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID
12284 }
12285 if ivrr.StorageAccountID != nil {
12286 objectMap["storageAccountId"] = ivrr.StorageAccountID
12287 }
12288 if ivrr.VirtualNetworkID != nil {
12289 objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID
12290 }
12291 if ivrr.SubnetID != nil {
12292 objectMap["subnetId"] = ivrr.SubnetID
12293 }
12294 if ivrr.TargetDomainNameID != nil {
12295 objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID
12296 }
12297 if ivrr.Region != nil {
12298 objectMap["region"] = ivrr.Region
12299 }
12300 if ivrr.AffinityGroup != nil {
12301 objectMap["affinityGroup"] = ivrr.AffinityGroup
12302 }
12303 if ivrr.CreateNewCloudService != nil {
12304 objectMap["createNewCloudService"] = ivrr.CreateNewCloudService
12305 }
12306 if ivrr.OriginalStorageAccountOption != nil {
12307 objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption
12308 }
12309 if ivrr.EncryptionDetails != nil {
12310 objectMap["encryptionDetails"] = ivrr.EncryptionDetails
12311 }
12312 if ivrr.RestoreDiskLunList != nil {
12313 objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList
12314 }
12315 if ivrr.ObjectType != "" {
12316 objectMap["objectType"] = ivrr.ObjectType
12317 }
12318 return json.Marshal(objectMap)
12319 }
12320
12321
12322 func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
12323 return nil, false
12324 }
12325
12326
12327 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
12328 return nil, false
12329 }
12330
12331
12332 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
12333 return nil, false
12334 }
12335
12336
12337 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
12338 return nil, false
12339 }
12340
12341
12342 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
12343 return nil, false
12344 }
12345
12346
12347 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
12348 return nil, false
12349 }
12350
12351
12352 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
12353 return nil, false
12354 }
12355
12356
12357 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
12358 return nil, false
12359 }
12360
12361
12362 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
12363 return nil, false
12364 }
12365
12366
12367 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
12368 return nil, false
12369 }
12370
12371
12372 func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
12373 return &ivrr, true
12374 }
12375
12376
12377 func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
12378 return nil, false
12379 }
12380
12381
12382 func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
12383 return &ivrr, true
12384 }
12385
12386
12387 type BasicILRRequest interface {
12388 AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool)
12389 AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool)
12390 AsILRRequest() (*ILRRequest, bool)
12391 }
12392
12393
12394 type ILRRequest struct {
12395
12396 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
12397 }
12398
12399 func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) {
12400 var m map[string]interface{}
12401 err := json.Unmarshal(body, &m)
12402 if err != nil {
12403 return nil, err
12404 }
12405
12406 switch m["objectType"] {
12407 case string(ObjectTypeAzureFileShareProvisionILRRequest):
12408 var afspir AzureFileShareProvisionILRRequest
12409 err := json.Unmarshal(body, &afspir)
12410 return afspir, err
12411 case string(ObjectTypeIaasVMILRRegistrationRequest):
12412 var ivrr IaasVMILRRegistrationRequest
12413 err := json.Unmarshal(body, &ivrr)
12414 return ivrr, err
12415 default:
12416 var ir ILRRequest
12417 err := json.Unmarshal(body, &ir)
12418 return ir, err
12419 }
12420 }
12421 func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) {
12422 var rawMessages []*json.RawMessage
12423 err := json.Unmarshal(body, &rawMessages)
12424 if err != nil {
12425 return nil, err
12426 }
12427
12428 irArray := make([]BasicILRRequest, len(rawMessages))
12429
12430 for index, rawMessage := range rawMessages {
12431 ir, err := unmarshalBasicILRRequest(*rawMessage)
12432 if err != nil {
12433 return nil, err
12434 }
12435 irArray[index] = ir
12436 }
12437 return irArray, nil
12438 }
12439
12440
12441 func (ir ILRRequest) MarshalJSON() ([]byte, error) {
12442 ir.ObjectType = ObjectTypeILRRequest
12443 objectMap := make(map[string]interface{})
12444 if ir.ObjectType != "" {
12445 objectMap["objectType"] = ir.ObjectType
12446 }
12447 return json.Marshal(objectMap)
12448 }
12449
12450
12451 func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
12452 return nil, false
12453 }
12454
12455
12456 func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
12457 return nil, false
12458 }
12459
12460
12461 func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) {
12462 return &ir, true
12463 }
12464
12465
12466 func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
12467 return &ir, true
12468 }
12469
12470
12471 type ILRRequestResource struct {
12472
12473 Properties BasicILRRequest `json:"properties,omitempty"`
12474
12475 ID *string `json:"id,omitempty"`
12476
12477 Name *string `json:"name,omitempty"`
12478
12479 Type *string `json:"type,omitempty"`
12480
12481 Location *string `json:"location,omitempty"`
12482
12483 Tags map[string]*string `json:"tags"`
12484
12485 ETag *string `json:"eTag,omitempty"`
12486 }
12487
12488
12489 func (irr ILRRequestResource) MarshalJSON() ([]byte, error) {
12490 objectMap := make(map[string]interface{})
12491 objectMap["properties"] = irr.Properties
12492 if irr.Location != nil {
12493 objectMap["location"] = irr.Location
12494 }
12495 if irr.Tags != nil {
12496 objectMap["tags"] = irr.Tags
12497 }
12498 if irr.ETag != nil {
12499 objectMap["eTag"] = irr.ETag
12500 }
12501 return json.Marshal(objectMap)
12502 }
12503
12504
12505 func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error {
12506 var m map[string]*json.RawMessage
12507 err := json.Unmarshal(body, &m)
12508 if err != nil {
12509 return err
12510 }
12511 for k, v := range m {
12512 switch k {
12513 case "properties":
12514 if v != nil {
12515 properties, err := unmarshalBasicILRRequest(*v)
12516 if err != nil {
12517 return err
12518 }
12519 irr.Properties = properties
12520 }
12521 case "id":
12522 if v != nil {
12523 var ID string
12524 err = json.Unmarshal(*v, &ID)
12525 if err != nil {
12526 return err
12527 }
12528 irr.ID = &ID
12529 }
12530 case "name":
12531 if v != nil {
12532 var name string
12533 err = json.Unmarshal(*v, &name)
12534 if err != nil {
12535 return err
12536 }
12537 irr.Name = &name
12538 }
12539 case "type":
12540 if v != nil {
12541 var typeVar string
12542 err = json.Unmarshal(*v, &typeVar)
12543 if err != nil {
12544 return err
12545 }
12546 irr.Type = &typeVar
12547 }
12548 case "location":
12549 if v != nil {
12550 var location string
12551 err = json.Unmarshal(*v, &location)
12552 if err != nil {
12553 return err
12554 }
12555 irr.Location = &location
12556 }
12557 case "tags":
12558 if v != nil {
12559 var tags map[string]*string
12560 err = json.Unmarshal(*v, &tags)
12561 if err != nil {
12562 return err
12563 }
12564 irr.Tags = tags
12565 }
12566 case "eTag":
12567 if v != nil {
12568 var eTag string
12569 err = json.Unmarshal(*v, &eTag)
12570 if err != nil {
12571 return err
12572 }
12573 irr.ETag = &eTag
12574 }
12575 }
12576 }
12577
12578 return nil
12579 }
12580
12581
12582 type InquiryInfo struct {
12583
12584
12585 Status *string `json:"status,omitempty"`
12586
12587 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
12588
12589
12590 InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"`
12591 }
12592
12593
12594 type InquiryValidation struct {
12595
12596 Status *string `json:"status,omitempty"`
12597
12598 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
12599
12600 AdditionalDetail *string `json:"additionalDetail,omitempty"`
12601 }
12602
12603
12604 func (iv InquiryValidation) MarshalJSON() ([]byte, error) {
12605 objectMap := make(map[string]interface{})
12606 if iv.Status != nil {
12607 objectMap["status"] = iv.Status
12608 }
12609 if iv.ErrorDetail != nil {
12610 objectMap["errorDetail"] = iv.ErrorDetail
12611 }
12612 return json.Marshal(objectMap)
12613 }
12614
12615
12616 type InstantItemRecoveryTarget struct {
12617
12618 ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"`
12619 }
12620
12621
12622 type InstantRPAdditionalDetails struct {
12623 AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"`
12624 AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"`
12625 }
12626
12627
12628 type BasicJob interface {
12629 AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool)
12630 AsAzureStorageJob() (*AzureStorageJob, bool)
12631 AsAzureWorkloadJob() (*AzureWorkloadJob, bool)
12632 AsDpmJob() (*DpmJob, bool)
12633 AsMabJob() (*MabJob, bool)
12634 AsJob() (*Job, bool)
12635 }
12636
12637
12638 type Job struct {
12639
12640 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
12641
12642 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12643
12644 Operation *string `json:"operation,omitempty"`
12645
12646 Status *string `json:"status,omitempty"`
12647
12648 StartTime *date.Time `json:"startTime,omitempty"`
12649
12650 EndTime *date.Time `json:"endTime,omitempty"`
12651
12652 ActivityID *string `json:"activityId,omitempty"`
12653
12654 JobType JobType `json:"jobType,omitempty"`
12655 }
12656
12657 func unmarshalBasicJob(body []byte) (BasicJob, error) {
12658 var m map[string]interface{}
12659 err := json.Unmarshal(body, &m)
12660 if err != nil {
12661 return nil, err
12662 }
12663
12664 switch m["jobType"] {
12665 case string(JobTypeAzureIaaSVMJob):
12666 var aisj AzureIaaSVMJob
12667 err := json.Unmarshal(body, &aisj)
12668 return aisj, err
12669 case string(JobTypeAzureStorageJob):
12670 var asj AzureStorageJob
12671 err := json.Unmarshal(body, &asj)
12672 return asj, err
12673 case string(JobTypeAzureWorkloadJob):
12674 var awj AzureWorkloadJob
12675 err := json.Unmarshal(body, &awj)
12676 return awj, err
12677 case string(JobTypeDpmJob):
12678 var dj DpmJob
12679 err := json.Unmarshal(body, &dj)
12680 return dj, err
12681 case string(JobTypeMabJob):
12682 var mj MabJob
12683 err := json.Unmarshal(body, &mj)
12684 return mj, err
12685 default:
12686 var j Job
12687 err := json.Unmarshal(body, &j)
12688 return j, err
12689 }
12690 }
12691 func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) {
12692 var rawMessages []*json.RawMessage
12693 err := json.Unmarshal(body, &rawMessages)
12694 if err != nil {
12695 return nil, err
12696 }
12697
12698 jArray := make([]BasicJob, len(rawMessages))
12699
12700 for index, rawMessage := range rawMessages {
12701 j, err := unmarshalBasicJob(*rawMessage)
12702 if err != nil {
12703 return nil, err
12704 }
12705 jArray[index] = j
12706 }
12707 return jArray, nil
12708 }
12709
12710
12711 func (j Job) MarshalJSON() ([]byte, error) {
12712 j.JobType = JobTypeJob
12713 objectMap := make(map[string]interface{})
12714 if j.EntityFriendlyName != nil {
12715 objectMap["entityFriendlyName"] = j.EntityFriendlyName
12716 }
12717 if j.BackupManagementType != "" {
12718 objectMap["backupManagementType"] = j.BackupManagementType
12719 }
12720 if j.Operation != nil {
12721 objectMap["operation"] = j.Operation
12722 }
12723 if j.Status != nil {
12724 objectMap["status"] = j.Status
12725 }
12726 if j.StartTime != nil {
12727 objectMap["startTime"] = j.StartTime
12728 }
12729 if j.EndTime != nil {
12730 objectMap["endTime"] = j.EndTime
12731 }
12732 if j.ActivityID != nil {
12733 objectMap["activityId"] = j.ActivityID
12734 }
12735 if j.JobType != "" {
12736 objectMap["jobType"] = j.JobType
12737 }
12738 return json.Marshal(objectMap)
12739 }
12740
12741
12742 func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
12743 return nil, false
12744 }
12745
12746
12747 func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) {
12748 return nil, false
12749 }
12750
12751
12752 func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
12753 return nil, false
12754 }
12755
12756
12757 func (j Job) AsDpmJob() (*DpmJob, bool) {
12758 return nil, false
12759 }
12760
12761
12762 func (j Job) AsMabJob() (*MabJob, bool) {
12763 return nil, false
12764 }
12765
12766
12767 func (j Job) AsJob() (*Job, bool) {
12768 return &j, true
12769 }
12770
12771
12772 func (j Job) AsBasicJob() (BasicJob, bool) {
12773 return &j, true
12774 }
12775
12776
12777 type JobQueryObject struct {
12778
12779 Status JobStatus `json:"status,omitempty"`
12780
12781 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12782
12783 Operation JobOperationType `json:"operation,omitempty"`
12784
12785 JobID *string `json:"jobId,omitempty"`
12786
12787 StartTime *date.Time `json:"startTime,omitempty"`
12788
12789 EndTime *date.Time `json:"endTime,omitempty"`
12790 }
12791
12792
12793 type JobResource struct {
12794 autorest.Response `json:"-"`
12795
12796 Properties BasicJob `json:"properties,omitempty"`
12797
12798 ID *string `json:"id,omitempty"`
12799
12800 Name *string `json:"name,omitempty"`
12801
12802 Type *string `json:"type,omitempty"`
12803
12804 Location *string `json:"location,omitempty"`
12805
12806 Tags map[string]*string `json:"tags"`
12807
12808 ETag *string `json:"eTag,omitempty"`
12809 }
12810
12811
12812 func (jr JobResource) MarshalJSON() ([]byte, error) {
12813 objectMap := make(map[string]interface{})
12814 objectMap["properties"] = jr.Properties
12815 if jr.Location != nil {
12816 objectMap["location"] = jr.Location
12817 }
12818 if jr.Tags != nil {
12819 objectMap["tags"] = jr.Tags
12820 }
12821 if jr.ETag != nil {
12822 objectMap["eTag"] = jr.ETag
12823 }
12824 return json.Marshal(objectMap)
12825 }
12826
12827
12828 func (jr *JobResource) UnmarshalJSON(body []byte) error {
12829 var m map[string]*json.RawMessage
12830 err := json.Unmarshal(body, &m)
12831 if err != nil {
12832 return err
12833 }
12834 for k, v := range m {
12835 switch k {
12836 case "properties":
12837 if v != nil {
12838 properties, err := unmarshalBasicJob(*v)
12839 if err != nil {
12840 return err
12841 }
12842 jr.Properties = properties
12843 }
12844 case "id":
12845 if v != nil {
12846 var ID string
12847 err = json.Unmarshal(*v, &ID)
12848 if err != nil {
12849 return err
12850 }
12851 jr.ID = &ID
12852 }
12853 case "name":
12854 if v != nil {
12855 var name string
12856 err = json.Unmarshal(*v, &name)
12857 if err != nil {
12858 return err
12859 }
12860 jr.Name = &name
12861 }
12862 case "type":
12863 if v != nil {
12864 var typeVar string
12865 err = json.Unmarshal(*v, &typeVar)
12866 if err != nil {
12867 return err
12868 }
12869 jr.Type = &typeVar
12870 }
12871 case "location":
12872 if v != nil {
12873 var location string
12874 err = json.Unmarshal(*v, &location)
12875 if err != nil {
12876 return err
12877 }
12878 jr.Location = &location
12879 }
12880 case "tags":
12881 if v != nil {
12882 var tags map[string]*string
12883 err = json.Unmarshal(*v, &tags)
12884 if err != nil {
12885 return err
12886 }
12887 jr.Tags = tags
12888 }
12889 case "eTag":
12890 if v != nil {
12891 var eTag string
12892 err = json.Unmarshal(*v, &eTag)
12893 if err != nil {
12894 return err
12895 }
12896 jr.ETag = &eTag
12897 }
12898 }
12899 }
12900
12901 return nil
12902 }
12903
12904
12905 type JobResourceList struct {
12906 autorest.Response `json:"-"`
12907
12908 Value *[]JobResource `json:"value,omitempty"`
12909
12910 NextLink *string `json:"nextLink,omitempty"`
12911 }
12912
12913
12914 type JobResourceListIterator struct {
12915 i int
12916 page JobResourceListPage
12917 }
12918
12919
12920
12921 func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) {
12922 if tracing.IsEnabled() {
12923 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext")
12924 defer func() {
12925 sc := -1
12926 if iter.Response().Response.Response != nil {
12927 sc = iter.Response().Response.Response.StatusCode
12928 }
12929 tracing.EndSpan(ctx, sc, err)
12930 }()
12931 }
12932 iter.i++
12933 if iter.i < len(iter.page.Values()) {
12934 return nil
12935 }
12936 err = iter.page.NextWithContext(ctx)
12937 if err != nil {
12938 iter.i--
12939 return err
12940 }
12941 iter.i = 0
12942 return nil
12943 }
12944
12945
12946
12947
12948 func (iter *JobResourceListIterator) Next() error {
12949 return iter.NextWithContext(context.Background())
12950 }
12951
12952
12953 func (iter JobResourceListIterator) NotDone() bool {
12954 return iter.page.NotDone() && iter.i < len(iter.page.Values())
12955 }
12956
12957
12958 func (iter JobResourceListIterator) Response() JobResourceList {
12959 return iter.page.Response()
12960 }
12961
12962
12963
12964 func (iter JobResourceListIterator) Value() JobResource {
12965 if !iter.page.NotDone() {
12966 return JobResource{}
12967 }
12968 return iter.page.Values()[iter.i]
12969 }
12970
12971
12972 func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator {
12973 return JobResourceListIterator{page: page}
12974 }
12975
12976
12977 func (jrl JobResourceList) IsEmpty() bool {
12978 return jrl.Value == nil || len(*jrl.Value) == 0
12979 }
12980
12981
12982 func (jrl JobResourceList) hasNextLink() bool {
12983 return jrl.NextLink != nil && len(*jrl.NextLink) != 0
12984 }
12985
12986
12987
12988 func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) {
12989 if !jrl.hasNextLink() {
12990 return nil, nil
12991 }
12992 return autorest.Prepare((&http.Request{}).WithContext(ctx),
12993 autorest.AsJSON(),
12994 autorest.AsGet(),
12995 autorest.WithBaseURL(to.String(jrl.NextLink)))
12996 }
12997
12998
12999 type JobResourceListPage struct {
13000 fn func(context.Context, JobResourceList) (JobResourceList, error)
13001 jrl JobResourceList
13002 }
13003
13004
13005
13006 func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) {
13007 if tracing.IsEnabled() {
13008 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext")
13009 defer func() {
13010 sc := -1
13011 if page.Response().Response.Response != nil {
13012 sc = page.Response().Response.Response.StatusCode
13013 }
13014 tracing.EndSpan(ctx, sc, err)
13015 }()
13016 }
13017 for {
13018 next, err := page.fn(ctx, page.jrl)
13019 if err != nil {
13020 return err
13021 }
13022 page.jrl = next
13023 if !next.hasNextLink() || !next.IsEmpty() {
13024 break
13025 }
13026 }
13027 return nil
13028 }
13029
13030
13031
13032
13033 func (page *JobResourceListPage) Next() error {
13034 return page.NextWithContext(context.Background())
13035 }
13036
13037
13038 func (page JobResourceListPage) NotDone() bool {
13039 return !page.jrl.IsEmpty()
13040 }
13041
13042
13043 func (page JobResourceListPage) Response() JobResourceList {
13044 return page.jrl
13045 }
13046
13047
13048 func (page JobResourceListPage) Values() []JobResource {
13049 if page.jrl.IsEmpty() {
13050 return nil
13051 }
13052 return *page.jrl.Value
13053 }
13054
13055
13056 func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage {
13057 return JobResourceListPage{
13058 fn: getNextPage,
13059 jrl: cur,
13060 }
13061 }
13062
13063
13064 type KEKDetails struct {
13065
13066 KeyURL *string `json:"keyUrl,omitempty"`
13067
13068 KeyVaultID *string `json:"keyVaultId,omitempty"`
13069
13070 KeyBackupData *string `json:"keyBackupData,omitempty"`
13071 }
13072
13073
13074
13075
13076
13077
13078
13079
13080 type KeyAndSecretDetails struct {
13081
13082 KekDetails *KEKDetails `json:"kekDetails,omitempty"`
13083
13084 BekDetails *BEKDetails `json:"bekDetails,omitempty"`
13085
13086 EncryptionMechanism *string `json:"encryptionMechanism,omitempty"`
13087 }
13088
13089
13090 type KPIResourceHealthDetails struct {
13091
13092 ResourceHealthStatus ResourceHealthStatus `json:"resourceHealthStatus,omitempty"`
13093
13094 ResourceHealthDetails *[]ResourceHealthDetails `json:"resourceHealthDetails,omitempty"`
13095 }
13096
13097
13098 type LogSchedulePolicy struct {
13099
13100 ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"`
13101
13102 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
13103 }
13104
13105
13106 func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) {
13107 lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy
13108 objectMap := make(map[string]interface{})
13109 if lsp.ScheduleFrequencyInMins != nil {
13110 objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins
13111 }
13112 if lsp.SchedulePolicyType != "" {
13113 objectMap["schedulePolicyType"] = lsp.SchedulePolicyType
13114 }
13115 return json.Marshal(objectMap)
13116 }
13117
13118
13119 func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
13120 return &lsp, true
13121 }
13122
13123
13124 func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
13125 return nil, false
13126 }
13127
13128
13129 func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
13130 return nil, false
13131 }
13132
13133
13134 func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
13135 return nil, false
13136 }
13137
13138
13139 func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
13140 return &lsp, true
13141 }
13142
13143
13144 type LongTermRetentionPolicy struct {
13145
13146 DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"`
13147
13148 WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"`
13149
13150 MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"`
13151
13152 YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"`
13153
13154 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
13155 }
13156
13157
13158 func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) {
13159 ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy
13160 objectMap := make(map[string]interface{})
13161 if ltrp.DailySchedule != nil {
13162 objectMap["dailySchedule"] = ltrp.DailySchedule
13163 }
13164 if ltrp.WeeklySchedule != nil {
13165 objectMap["weeklySchedule"] = ltrp.WeeklySchedule
13166 }
13167 if ltrp.MonthlySchedule != nil {
13168 objectMap["monthlySchedule"] = ltrp.MonthlySchedule
13169 }
13170 if ltrp.YearlySchedule != nil {
13171 objectMap["yearlySchedule"] = ltrp.YearlySchedule
13172 }
13173 if ltrp.RetentionPolicyType != "" {
13174 objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType
13175 }
13176 return json.Marshal(objectMap)
13177 }
13178
13179
13180 func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
13181 return <rp, true
13182 }
13183
13184
13185 func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
13186 return nil, false
13187 }
13188
13189
13190 func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
13191 return nil, false
13192 }
13193
13194
13195 func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
13196 return <rp, true
13197 }
13198
13199
13200 type LongTermSchedulePolicy struct {
13201
13202 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
13203 }
13204
13205
13206 func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) {
13207 ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy
13208 objectMap := make(map[string]interface{})
13209 if ltsp.SchedulePolicyType != "" {
13210 objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType
13211 }
13212 return json.Marshal(objectMap)
13213 }
13214
13215
13216 func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
13217 return nil, false
13218 }
13219
13220
13221 func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
13222 return <sp, true
13223 }
13224
13225
13226 func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
13227 return nil, false
13228 }
13229
13230
13231 func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
13232 return nil, false
13233 }
13234
13235
13236 func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
13237 return <sp, true
13238 }
13239
13240
13241 type MabContainer struct {
13242
13243 CanReRegister *bool `json:"canReRegister,omitempty"`
13244
13245 ContainerID *int64 `json:"containerId,omitempty"`
13246
13247 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
13248
13249 AgentVersion *string `json:"agentVersion,omitempty"`
13250
13251 ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"`
13252
13253 MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"`
13254
13255 ContainerHealthState *string `json:"containerHealthState,omitempty"`
13256
13257 FriendlyName *string `json:"friendlyName,omitempty"`
13258
13259 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13260
13261 RegistrationStatus *string `json:"registrationStatus,omitempty"`
13262
13263 HealthStatus *string `json:"healthStatus,omitempty"`
13264
13265 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
13266 }
13267
13268
13269 func (mc MabContainer) MarshalJSON() ([]byte, error) {
13270 mc.ContainerType = ContainerTypeWindows1
13271 objectMap := make(map[string]interface{})
13272 if mc.CanReRegister != nil {
13273 objectMap["canReRegister"] = mc.CanReRegister
13274 }
13275 if mc.ContainerID != nil {
13276 objectMap["containerId"] = mc.ContainerID
13277 }
13278 if mc.ProtectedItemCount != nil {
13279 objectMap["protectedItemCount"] = mc.ProtectedItemCount
13280 }
13281 if mc.AgentVersion != nil {
13282 objectMap["agentVersion"] = mc.AgentVersion
13283 }
13284 if mc.ExtendedInfo != nil {
13285 objectMap["extendedInfo"] = mc.ExtendedInfo
13286 }
13287 if mc.MabContainerHealthDetails != nil {
13288 objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails
13289 }
13290 if mc.ContainerHealthState != nil {
13291 objectMap["containerHealthState"] = mc.ContainerHealthState
13292 }
13293 if mc.FriendlyName != nil {
13294 objectMap["friendlyName"] = mc.FriendlyName
13295 }
13296 if mc.BackupManagementType != "" {
13297 objectMap["backupManagementType"] = mc.BackupManagementType
13298 }
13299 if mc.RegistrationStatus != nil {
13300 objectMap["registrationStatus"] = mc.RegistrationStatus
13301 }
13302 if mc.HealthStatus != nil {
13303 objectMap["healthStatus"] = mc.HealthStatus
13304 }
13305 if mc.ContainerType != "" {
13306 objectMap["containerType"] = mc.ContainerType
13307 }
13308 return json.Marshal(objectMap)
13309 }
13310
13311
13312 func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
13313 return nil, false
13314 }
13315
13316
13317 func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
13318 return nil, false
13319 }
13320
13321
13322 func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
13323 return nil, false
13324 }
13325
13326
13327 func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
13328 return nil, false
13329 }
13330
13331
13332 func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
13333 return nil, false
13334 }
13335
13336
13337 func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
13338 return nil, false
13339 }
13340
13341
13342 func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
13343 return nil, false
13344 }
13345
13346
13347 func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
13348 return nil, false
13349 }
13350
13351
13352 func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
13353 return nil, false
13354 }
13355
13356
13357 func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) {
13358 return nil, false
13359 }
13360
13361
13362 func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13363 return nil, false
13364 }
13365
13366
13367 func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) {
13368 return nil, false
13369 }
13370
13371
13372 func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13373 return nil, false
13374 }
13375
13376
13377 func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13378 return nil, false
13379 }
13380
13381
13382 func (mc MabContainer) AsMabContainer() (*MabContainer, bool) {
13383 return &mc, true
13384 }
13385
13386
13387 func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13388 return nil, false
13389 }
13390
13391
13392 func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13393 return &mc, true
13394 }
13395
13396
13397 type MabContainerExtendedInfo struct {
13398
13399 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
13400
13401 BackupItemType ItemType `json:"backupItemType,omitempty"`
13402
13403 BackupItems *[]string `json:"backupItems,omitempty"`
13404
13405 PolicyName *string `json:"policyName,omitempty"`
13406
13407 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
13408 }
13409
13410
13411 type MABContainerHealthDetails struct {
13412
13413 Code *int32 `json:"code,omitempty"`
13414
13415 Title *string `json:"title,omitempty"`
13416
13417 Message *string `json:"message,omitempty"`
13418
13419 Recommendations *[]string `json:"recommendations,omitempty"`
13420 }
13421
13422
13423 type MabErrorInfo struct {
13424
13425 ErrorString *string `json:"errorString,omitempty"`
13426
13427 Recommendations *[]string `json:"recommendations,omitempty"`
13428 }
13429
13430
13431 func (mei MabErrorInfo) MarshalJSON() ([]byte, error) {
13432 objectMap := make(map[string]interface{})
13433 return json.Marshal(objectMap)
13434 }
13435
13436
13437 type MabFileFolderProtectedItem struct {
13438
13439 FriendlyName *string `json:"friendlyName,omitempty"`
13440
13441 ComputerName *string `json:"computerName,omitempty"`
13442
13443 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
13444
13445 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
13446
13447 ProtectionState *string `json:"protectionState,omitempty"`
13448
13449 DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"`
13450
13451 ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
13452
13453 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13454
13455 WorkloadType DataSourceType `json:"workloadType,omitempty"`
13456
13457 ContainerName *string `json:"containerName,omitempty"`
13458
13459 SourceResourceID *string `json:"sourceResourceId,omitempty"`
13460
13461 PolicyID *string `json:"policyId,omitempty"`
13462
13463 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
13464
13465 BackupSetName *string `json:"backupSetName,omitempty"`
13466
13467 CreateMode CreateMode `json:"createMode,omitempty"`
13468
13469 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
13470
13471 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
13472
13473 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
13474
13475 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
13476
13477 IsRehydrate *bool `json:"isRehydrate,omitempty"`
13478
13479 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
13480 }
13481
13482
13483 func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) {
13484 mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem
13485 objectMap := make(map[string]interface{})
13486 if mffpi.FriendlyName != nil {
13487 objectMap["friendlyName"] = mffpi.FriendlyName
13488 }
13489 if mffpi.ComputerName != nil {
13490 objectMap["computerName"] = mffpi.ComputerName
13491 }
13492 if mffpi.LastBackupStatus != nil {
13493 objectMap["lastBackupStatus"] = mffpi.LastBackupStatus
13494 }
13495 if mffpi.LastBackupTime != nil {
13496 objectMap["lastBackupTime"] = mffpi.LastBackupTime
13497 }
13498 if mffpi.ProtectionState != nil {
13499 objectMap["protectionState"] = mffpi.ProtectionState
13500 }
13501 if mffpi.DeferredDeleteSyncTimeInUTC != nil {
13502 objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC
13503 }
13504 if mffpi.ExtendedInfo != nil {
13505 objectMap["extendedInfo"] = mffpi.ExtendedInfo
13506 }
13507 if mffpi.BackupManagementType != "" {
13508 objectMap["backupManagementType"] = mffpi.BackupManagementType
13509 }
13510 if mffpi.WorkloadType != "" {
13511 objectMap["workloadType"] = mffpi.WorkloadType
13512 }
13513 if mffpi.ContainerName != nil {
13514 objectMap["containerName"] = mffpi.ContainerName
13515 }
13516 if mffpi.SourceResourceID != nil {
13517 objectMap["sourceResourceId"] = mffpi.SourceResourceID
13518 }
13519 if mffpi.PolicyID != nil {
13520 objectMap["policyId"] = mffpi.PolicyID
13521 }
13522 if mffpi.LastRecoveryPoint != nil {
13523 objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint
13524 }
13525 if mffpi.BackupSetName != nil {
13526 objectMap["backupSetName"] = mffpi.BackupSetName
13527 }
13528 if mffpi.CreateMode != "" {
13529 objectMap["createMode"] = mffpi.CreateMode
13530 }
13531 if mffpi.DeferredDeleteTimeInUTC != nil {
13532 objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC
13533 }
13534 if mffpi.IsScheduledForDeferredDelete != nil {
13535 objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete
13536 }
13537 if mffpi.DeferredDeleteTimeRemaining != nil {
13538 objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining
13539 }
13540 if mffpi.IsDeferredDeleteScheduleUpcoming != nil {
13541 objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming
13542 }
13543 if mffpi.IsRehydrate != nil {
13544 objectMap["isRehydrate"] = mffpi.IsRehydrate
13545 }
13546 if mffpi.ProtectedItemType != "" {
13547 objectMap["protectedItemType"] = mffpi.ProtectedItemType
13548 }
13549 return json.Marshal(objectMap)
13550 }
13551
13552
13553 func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
13554 return nil, false
13555 }
13556
13557
13558 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
13559 return nil, false
13560 }
13561
13562
13563 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
13564 return nil, false
13565 }
13566
13567
13568 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
13569 return nil, false
13570 }
13571
13572
13573 func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
13574 return nil, false
13575 }
13576
13577
13578 func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
13579 return nil, false
13580 }
13581
13582
13583 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
13584 return nil, false
13585 }
13586
13587
13588 func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
13589 return nil, false
13590 }
13591
13592
13593 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
13594 return nil, false
13595 }
13596
13597
13598 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
13599 return nil, false
13600 }
13601
13602
13603 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
13604 return nil, false
13605 }
13606
13607
13608 func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
13609 return nil, false
13610 }
13611
13612
13613 func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
13614 return nil, false
13615 }
13616
13617
13618 func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
13619 return &mffpi, true
13620 }
13621
13622
13623 func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
13624 return nil, false
13625 }
13626
13627
13628 func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
13629 return &mffpi, true
13630 }
13631
13632
13633 type MabFileFolderProtectedItemExtendedInfo struct {
13634
13635 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
13636
13637 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
13638
13639 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
13640 }
13641
13642
13643 type MabJob struct {
13644
13645 Duration *string `json:"duration,omitempty"`
13646
13647 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
13648
13649 MabServerName *string `json:"mabServerName,omitempty"`
13650
13651 MabServerType MabServerType `json:"mabServerType,omitempty"`
13652
13653 WorkloadType WorkloadType `json:"workloadType,omitempty"`
13654
13655 ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"`
13656
13657 ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"`
13658
13659 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
13660
13661 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13662
13663 Operation *string `json:"operation,omitempty"`
13664
13665 Status *string `json:"status,omitempty"`
13666
13667 StartTime *date.Time `json:"startTime,omitempty"`
13668
13669 EndTime *date.Time `json:"endTime,omitempty"`
13670
13671 ActivityID *string `json:"activityId,omitempty"`
13672
13673 JobType JobType `json:"jobType,omitempty"`
13674 }
13675
13676
13677 func (mj MabJob) MarshalJSON() ([]byte, error) {
13678 mj.JobType = JobTypeMabJob
13679 objectMap := make(map[string]interface{})
13680 if mj.Duration != nil {
13681 objectMap["duration"] = mj.Duration
13682 }
13683 if mj.ActionsInfo != nil {
13684 objectMap["actionsInfo"] = mj.ActionsInfo
13685 }
13686 if mj.MabServerName != nil {
13687 objectMap["mabServerName"] = mj.MabServerName
13688 }
13689 if mj.MabServerType != "" {
13690 objectMap["mabServerType"] = mj.MabServerType
13691 }
13692 if mj.WorkloadType != "" {
13693 objectMap["workloadType"] = mj.WorkloadType
13694 }
13695 if mj.ErrorDetails != nil {
13696 objectMap["errorDetails"] = mj.ErrorDetails
13697 }
13698 if mj.ExtendedInfo != nil {
13699 objectMap["extendedInfo"] = mj.ExtendedInfo
13700 }
13701 if mj.EntityFriendlyName != nil {
13702 objectMap["entityFriendlyName"] = mj.EntityFriendlyName
13703 }
13704 if mj.BackupManagementType != "" {
13705 objectMap["backupManagementType"] = mj.BackupManagementType
13706 }
13707 if mj.Operation != nil {
13708 objectMap["operation"] = mj.Operation
13709 }
13710 if mj.Status != nil {
13711 objectMap["status"] = mj.Status
13712 }
13713 if mj.StartTime != nil {
13714 objectMap["startTime"] = mj.StartTime
13715 }
13716 if mj.EndTime != nil {
13717 objectMap["endTime"] = mj.EndTime
13718 }
13719 if mj.ActivityID != nil {
13720 objectMap["activityId"] = mj.ActivityID
13721 }
13722 if mj.JobType != "" {
13723 objectMap["jobType"] = mj.JobType
13724 }
13725 return json.Marshal(objectMap)
13726 }
13727
13728
13729 func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
13730 return nil, false
13731 }
13732
13733
13734 func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
13735 return nil, false
13736 }
13737
13738
13739 func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
13740 return nil, false
13741 }
13742
13743
13744 func (mj MabJob) AsDpmJob() (*DpmJob, bool) {
13745 return nil, false
13746 }
13747
13748
13749 func (mj MabJob) AsMabJob() (*MabJob, bool) {
13750 return &mj, true
13751 }
13752
13753
13754 func (mj MabJob) AsJob() (*Job, bool) {
13755 return nil, false
13756 }
13757
13758
13759 func (mj MabJob) AsBasicJob() (BasicJob, bool) {
13760 return &mj, true
13761 }
13762
13763
13764 type MabJobExtendedInfo struct {
13765
13766 TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"`
13767
13768 PropertyBag map[string]*string `json:"propertyBag"`
13769
13770 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
13771 }
13772
13773
13774 func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) {
13775 objectMap := make(map[string]interface{})
13776 if mjei.TasksList != nil {
13777 objectMap["tasksList"] = mjei.TasksList
13778 }
13779 if mjei.PropertyBag != nil {
13780 objectMap["propertyBag"] = mjei.PropertyBag
13781 }
13782 if mjei.DynamicErrorMessage != nil {
13783 objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage
13784 }
13785 return json.Marshal(objectMap)
13786 }
13787
13788
13789 type MabJobTaskDetails struct {
13790
13791 TaskID *string `json:"taskId,omitempty"`
13792
13793 StartTime *date.Time `json:"startTime,omitempty"`
13794
13795 EndTime *date.Time `json:"endTime,omitempty"`
13796
13797 Duration *string `json:"duration,omitempty"`
13798
13799 Status *string `json:"status,omitempty"`
13800 }
13801
13802
13803 type MabProtectionPolicy struct {
13804
13805 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
13806
13807 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
13808
13809 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
13810
13811 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
13812 }
13813
13814
13815 func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) {
13816 mpp.BackupManagementType = BackupManagementTypeMAB
13817 objectMap := make(map[string]interface{})
13818 objectMap["schedulePolicy"] = mpp.SchedulePolicy
13819 objectMap["retentionPolicy"] = mpp.RetentionPolicy
13820 if mpp.ProtectedItemsCount != nil {
13821 objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount
13822 }
13823 if mpp.BackupManagementType != "" {
13824 objectMap["backupManagementType"] = mpp.BackupManagementType
13825 }
13826 return json.Marshal(objectMap)
13827 }
13828
13829
13830 func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
13831 return nil, false
13832 }
13833
13834
13835 func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
13836 return nil, false
13837 }
13838
13839
13840 func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
13841 return nil, false
13842 }
13843
13844
13845 func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
13846 return nil, false
13847 }
13848
13849
13850 func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
13851 return nil, false
13852 }
13853
13854
13855 func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
13856 return &mpp, true
13857 }
13858
13859
13860 func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
13861 return nil, false
13862 }
13863
13864
13865 func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
13866 return &mpp, true
13867 }
13868
13869
13870 func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error {
13871 var m map[string]*json.RawMessage
13872 err := json.Unmarshal(body, &m)
13873 if err != nil {
13874 return err
13875 }
13876 for k, v := range m {
13877 switch k {
13878 case "schedulePolicy":
13879 if v != nil {
13880 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
13881 if err != nil {
13882 return err
13883 }
13884 mpp.SchedulePolicy = schedulePolicy
13885 }
13886 case "retentionPolicy":
13887 if v != nil {
13888 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
13889 if err != nil {
13890 return err
13891 }
13892 mpp.RetentionPolicy = retentionPolicy
13893 }
13894 case "protectedItemsCount":
13895 if v != nil {
13896 var protectedItemsCount int32
13897 err = json.Unmarshal(*v, &protectedItemsCount)
13898 if err != nil {
13899 return err
13900 }
13901 mpp.ProtectedItemsCount = &protectedItemsCount
13902 }
13903 case "backupManagementType":
13904 if v != nil {
13905 var backupManagementType ManagementTypeBasicProtectionPolicy
13906 err = json.Unmarshal(*v, &backupManagementType)
13907 if err != nil {
13908 return err
13909 }
13910 mpp.BackupManagementType = backupManagementType
13911 }
13912 }
13913 }
13914
13915 return nil
13916 }
13917
13918
13919 type ManagementUsage struct {
13920
13921 Unit UsagesUnit `json:"unit,omitempty"`
13922
13923 QuotaPeriod *string `json:"quotaPeriod,omitempty"`
13924
13925 NextResetTime *date.Time `json:"nextResetTime,omitempty"`
13926
13927 CurrentValue *int64 `json:"currentValue,omitempty"`
13928
13929 Limit *int64 `json:"limit,omitempty"`
13930
13931 Name *NameInfo `json:"name,omitempty"`
13932 }
13933
13934
13935 type ManagementUsageList struct {
13936 autorest.Response `json:"-"`
13937
13938 Value *[]ManagementUsage `json:"value,omitempty"`
13939 }
13940
13941
13942 type MonthlyRetentionSchedule struct {
13943
13944 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
13945
13946 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
13947
13948 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
13949
13950 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
13951
13952 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
13953 }
13954
13955
13956 type NameInfo struct {
13957
13958 Value *string `json:"value,omitempty"`
13959
13960 LocalizedValue *string `json:"localizedValue,omitempty"`
13961 }
13962
13963
13964 type OperationResultInfo struct {
13965
13966 JobList *[]string `json:"jobList,omitempty"`
13967
13968 ObjectType ObjectType `json:"objectType,omitempty"`
13969 }
13970
13971
13972 func (ori OperationResultInfo) MarshalJSON() ([]byte, error) {
13973 ori.ObjectType = ObjectTypeOperationResultInfo
13974 objectMap := make(map[string]interface{})
13975 if ori.JobList != nil {
13976 objectMap["jobList"] = ori.JobList
13977 }
13978 if ori.ObjectType != "" {
13979 objectMap["objectType"] = ori.ObjectType
13980 }
13981 return json.Marshal(objectMap)
13982 }
13983
13984
13985 func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
13986 return nil, false
13987 }
13988
13989
13990 func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
13991 return &ori, true
13992 }
13993
13994
13995 func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
13996 return nil, false
13997 }
13998
13999
14000 func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
14001 return &ori, true
14002 }
14003
14004
14005 type BasicOperationResultInfoBase interface {
14006 AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool)
14007 AsOperationResultInfo() (*OperationResultInfo, bool)
14008 AsOperationResultInfoBase() (*OperationResultInfoBase, bool)
14009 }
14010
14011
14012 type OperationResultInfoBase struct {
14013
14014 ObjectType ObjectType `json:"objectType,omitempty"`
14015 }
14016
14017 func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) {
14018 var m map[string]interface{}
14019 err := json.Unmarshal(body, &m)
14020 if err != nil {
14021 return nil, err
14022 }
14023
14024 switch m["objectType"] {
14025 case string(ObjectTypeExportJobsOperationResultInfo):
14026 var ejori ExportJobsOperationResultInfo
14027 err := json.Unmarshal(body, &ejori)
14028 return ejori, err
14029 case string(ObjectTypeOperationResultInfo):
14030 var ori OperationResultInfo
14031 err := json.Unmarshal(body, &ori)
14032 return ori, err
14033 default:
14034 var orib OperationResultInfoBase
14035 err := json.Unmarshal(body, &orib)
14036 return orib, err
14037 }
14038 }
14039 func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) {
14040 var rawMessages []*json.RawMessage
14041 err := json.Unmarshal(body, &rawMessages)
14042 if err != nil {
14043 return nil, err
14044 }
14045
14046 oribArray := make([]BasicOperationResultInfoBase, len(rawMessages))
14047
14048 for index, rawMessage := range rawMessages {
14049 orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage)
14050 if err != nil {
14051 return nil, err
14052 }
14053 oribArray[index] = orib
14054 }
14055 return oribArray, nil
14056 }
14057
14058
14059 func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) {
14060 orib.ObjectType = ObjectTypeOperationResultInfoBase
14061 objectMap := make(map[string]interface{})
14062 if orib.ObjectType != "" {
14063 objectMap["objectType"] = orib.ObjectType
14064 }
14065 return json.Marshal(objectMap)
14066 }
14067
14068
14069 func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
14070 return nil, false
14071 }
14072
14073
14074 func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) {
14075 return nil, false
14076 }
14077
14078
14079 func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
14080 return &orib, true
14081 }
14082
14083
14084 func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
14085 return &orib, true
14086 }
14087
14088
14089 type OperationResultInfoBaseResource struct {
14090 autorest.Response `json:"-"`
14091
14092 Operation BasicOperationResultInfoBase `json:"operation,omitempty"`
14093
14094 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
14095
14096 Headers map[string][]string `json:"headers"`
14097 }
14098
14099
14100 func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) {
14101 objectMap := make(map[string]interface{})
14102 objectMap["operation"] = oribr.Operation
14103 if oribr.StatusCode != "" {
14104 objectMap["statusCode"] = oribr.StatusCode
14105 }
14106 if oribr.Headers != nil {
14107 objectMap["headers"] = oribr.Headers
14108 }
14109 return json.Marshal(objectMap)
14110 }
14111
14112
14113 func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error {
14114 var m map[string]*json.RawMessage
14115 err := json.Unmarshal(body, &m)
14116 if err != nil {
14117 return err
14118 }
14119 for k, v := range m {
14120 switch k {
14121 case "operation":
14122 if v != nil {
14123 operation, err := unmarshalBasicOperationResultInfoBase(*v)
14124 if err != nil {
14125 return err
14126 }
14127 oribr.Operation = operation
14128 }
14129 case "statusCode":
14130 if v != nil {
14131 var statusCode HTTPStatusCode
14132 err = json.Unmarshal(*v, &statusCode)
14133 if err != nil {
14134 return err
14135 }
14136 oribr.StatusCode = statusCode
14137 }
14138 case "headers":
14139 if v != nil {
14140 var headers map[string][]string
14141 err = json.Unmarshal(*v, &headers)
14142 if err != nil {
14143 return err
14144 }
14145 oribr.Headers = headers
14146 }
14147 }
14148 }
14149
14150 return nil
14151 }
14152
14153
14154 type OperationStatus struct {
14155 autorest.Response `json:"-"`
14156
14157 ID *string `json:"id,omitempty"`
14158
14159 Name *string `json:"name,omitempty"`
14160
14161 Status OperationStatusValues `json:"status,omitempty"`
14162
14163 StartTime *date.Time `json:"startTime,omitempty"`
14164
14165 EndTime *date.Time `json:"endTime,omitempty"`
14166
14167 Error *OperationStatusError `json:"error,omitempty"`
14168
14169 Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"`
14170 }
14171
14172
14173 func (osVar *OperationStatus) UnmarshalJSON(body []byte) error {
14174 var m map[string]*json.RawMessage
14175 err := json.Unmarshal(body, &m)
14176 if err != nil {
14177 return err
14178 }
14179 for k, v := range m {
14180 switch k {
14181 case "id":
14182 if v != nil {
14183 var ID string
14184 err = json.Unmarshal(*v, &ID)
14185 if err != nil {
14186 return err
14187 }
14188 osVar.ID = &ID
14189 }
14190 case "name":
14191 if v != nil {
14192 var name string
14193 err = json.Unmarshal(*v, &name)
14194 if err != nil {
14195 return err
14196 }
14197 osVar.Name = &name
14198 }
14199 case "status":
14200 if v != nil {
14201 var status OperationStatusValues
14202 err = json.Unmarshal(*v, &status)
14203 if err != nil {
14204 return err
14205 }
14206 osVar.Status = status
14207 }
14208 case "startTime":
14209 if v != nil {
14210 var startTime date.Time
14211 err = json.Unmarshal(*v, &startTime)
14212 if err != nil {
14213 return err
14214 }
14215 osVar.StartTime = &startTime
14216 }
14217 case "endTime":
14218 if v != nil {
14219 var endTime date.Time
14220 err = json.Unmarshal(*v, &endTime)
14221 if err != nil {
14222 return err
14223 }
14224 osVar.EndTime = &endTime
14225 }
14226 case "error":
14227 if v != nil {
14228 var errorVar OperationStatusError
14229 err = json.Unmarshal(*v, &errorVar)
14230 if err != nil {
14231 return err
14232 }
14233 osVar.Error = &errorVar
14234 }
14235 case "properties":
14236 if v != nil {
14237 properties, err := unmarshalBasicOperationStatusExtendedInfo(*v)
14238 if err != nil {
14239 return err
14240 }
14241 osVar.Properties = properties
14242 }
14243 }
14244 }
14245
14246 return nil
14247 }
14248
14249
14250 type OperationStatusError struct {
14251
14252 Code *string `json:"code,omitempty"`
14253
14254 Message *string `json:"message,omitempty"`
14255 }
14256
14257
14258 type BasicOperationStatusExtendedInfo interface {
14259 AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool)
14260 AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool)
14261 AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool)
14262 AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool)
14263 }
14264
14265
14266 type OperationStatusExtendedInfo struct {
14267
14268 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
14269 }
14270
14271 func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) {
14272 var m map[string]interface{}
14273 err := json.Unmarshal(body, &m)
14274 if err != nil {
14275 return nil, err
14276 }
14277
14278 switch m["objectType"] {
14279 case string(ObjectTypeOperationStatusJobExtendedInfo):
14280 var osjei OperationStatusJobExtendedInfo
14281 err := json.Unmarshal(body, &osjei)
14282 return osjei, err
14283 case string(ObjectTypeOperationStatusJobsExtendedInfo):
14284 var osjei OperationStatusJobsExtendedInfo
14285 err := json.Unmarshal(body, &osjei)
14286 return osjei, err
14287 case string(ObjectTypeOperationStatusProvisionILRExtendedInfo):
14288 var ospiei OperationStatusProvisionILRExtendedInfo
14289 err := json.Unmarshal(body, &ospiei)
14290 return ospiei, err
14291 default:
14292 var osei OperationStatusExtendedInfo
14293 err := json.Unmarshal(body, &osei)
14294 return osei, err
14295 }
14296 }
14297 func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) {
14298 var rawMessages []*json.RawMessage
14299 err := json.Unmarshal(body, &rawMessages)
14300 if err != nil {
14301 return nil, err
14302 }
14303
14304 oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages))
14305
14306 for index, rawMessage := range rawMessages {
14307 osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage)
14308 if err != nil {
14309 return nil, err
14310 }
14311 oseiArray[index] = osei
14312 }
14313 return oseiArray, nil
14314 }
14315
14316
14317 func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) {
14318 osei.ObjectType = ObjectTypeOperationStatusExtendedInfo
14319 objectMap := make(map[string]interface{})
14320 if osei.ObjectType != "" {
14321 objectMap["objectType"] = osei.ObjectType
14322 }
14323 return json.Marshal(objectMap)
14324 }
14325
14326
14327 func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
14328 return nil, false
14329 }
14330
14331
14332 func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
14333 return nil, false
14334 }
14335
14336
14337 func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
14338 return nil, false
14339 }
14340
14341
14342 func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
14343 return &osei, true
14344 }
14345
14346
14347 func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
14348 return &osei, true
14349 }
14350
14351
14352 type OperationStatusJobExtendedInfo struct {
14353
14354 JobID *string `json:"jobId,omitempty"`
14355
14356 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
14357 }
14358
14359
14360 func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) {
14361 osjei.ObjectType = ObjectTypeOperationStatusJobExtendedInfo
14362 objectMap := make(map[string]interface{})
14363 if osjei.JobID != nil {
14364 objectMap["jobId"] = osjei.JobID
14365 }
14366 if osjei.ObjectType != "" {
14367 objectMap["objectType"] = osjei.ObjectType
14368 }
14369 return json.Marshal(objectMap)
14370 }
14371
14372
14373 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
14374 return &osjei, true
14375 }
14376
14377
14378 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
14379 return nil, false
14380 }
14381
14382
14383 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
14384 return nil, false
14385 }
14386
14387
14388 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
14389 return nil, false
14390 }
14391
14392
14393 func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
14394 return &osjei, true
14395 }
14396
14397
14398 type OperationStatusJobsExtendedInfo struct {
14399
14400 JobIds *[]string `json:"jobIds,omitempty"`
14401
14402 FailedJobsError map[string]*string `json:"failedJobsError"`
14403
14404 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
14405 }
14406
14407
14408 func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) {
14409 osjei.ObjectType = ObjectTypeOperationStatusJobsExtendedInfo
14410 objectMap := make(map[string]interface{})
14411 if osjei.JobIds != nil {
14412 objectMap["jobIds"] = osjei.JobIds
14413 }
14414 if osjei.FailedJobsError != nil {
14415 objectMap["failedJobsError"] = osjei.FailedJobsError
14416 }
14417 if osjei.ObjectType != "" {
14418 objectMap["objectType"] = osjei.ObjectType
14419 }
14420 return json.Marshal(objectMap)
14421 }
14422
14423
14424 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
14425 return nil, false
14426 }
14427
14428
14429 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
14430 return &osjei, true
14431 }
14432
14433
14434 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
14435 return nil, false
14436 }
14437
14438
14439 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
14440 return nil, false
14441 }
14442
14443
14444 func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
14445 return &osjei, true
14446 }
14447
14448
14449 type OperationStatusProvisionILRExtendedInfo struct {
14450
14451 RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"`
14452
14453 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
14454 }
14455
14456
14457 func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) {
14458 ospiei.ObjectType = ObjectTypeOperationStatusProvisionILRExtendedInfo
14459 objectMap := make(map[string]interface{})
14460 if ospiei.RecoveryTarget != nil {
14461 objectMap["recoveryTarget"] = ospiei.RecoveryTarget
14462 }
14463 if ospiei.ObjectType != "" {
14464 objectMap["objectType"] = ospiei.ObjectType
14465 }
14466 return json.Marshal(objectMap)
14467 }
14468
14469
14470 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
14471 return nil, false
14472 }
14473
14474
14475 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
14476 return nil, false
14477 }
14478
14479
14480 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
14481 return &ospiei, true
14482 }
14483
14484
14485 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
14486 return nil, false
14487 }
14488
14489
14490 func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
14491 return &ospiei, true
14492 }
14493
14494
14495 type OperationWorkerResponse struct {
14496
14497 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
14498
14499 Headers map[string][]string `json:"headers"`
14500 }
14501
14502
14503 func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) {
14504 objectMap := make(map[string]interface{})
14505 if owr.StatusCode != "" {
14506 objectMap["statusCode"] = owr.StatusCode
14507 }
14508 if owr.Headers != nil {
14509 objectMap["headers"] = owr.Headers
14510 }
14511 return json.Marshal(objectMap)
14512 }
14513
14514
14515 type PointInTimeRange struct {
14516
14517 StartTime *date.Time `json:"startTime,omitempty"`
14518
14519 EndTime *date.Time `json:"endTime,omitempty"`
14520 }
14521
14522
14523 type PreBackupValidation struct {
14524
14525 Status InquiryStatus `json:"status,omitempty"`
14526
14527 Code *string `json:"code,omitempty"`
14528
14529 Message *string `json:"message,omitempty"`
14530 }
14531
14532
14533
14534
14535
14536
14537
14538 type PreValidateEnableBackupRequest struct {
14539
14540 ResourceType DataSourceType `json:"resourceType,omitempty"`
14541
14542 ResourceID *string `json:"resourceId,omitempty"`
14543
14544 VaultID *string `json:"vaultId,omitempty"`
14545
14546 Properties *string `json:"properties,omitempty"`
14547 }
14548
14549
14550 type PreValidateEnableBackupResponse struct {
14551 autorest.Response `json:"-"`
14552
14553 Status ValidationStatus `json:"status,omitempty"`
14554
14555 ErrorCode *string `json:"errorCode,omitempty"`
14556
14557 ErrorMessage *string `json:"errorMessage,omitempty"`
14558
14559 Recommendation *string `json:"recommendation,omitempty"`
14560
14561
14562 ContainerName *string `json:"containerName,omitempty"`
14563
14564 ProtectedItemName *string `json:"protectedItemName,omitempty"`
14565 }
14566
14567
14568 type BasicProtectableContainer interface {
14569 AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool)
14570 AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool)
14571 AsProtectableContainer() (*ProtectableContainer, bool)
14572 }
14573
14574
14575 type ProtectableContainer struct {
14576
14577 FriendlyName *string `json:"friendlyName,omitempty"`
14578
14579 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
14580
14581 HealthStatus *string `json:"healthStatus,omitempty"`
14582
14583 ContainerID *string `json:"containerId,omitempty"`
14584
14585 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
14586 }
14587
14588 func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) {
14589 var m map[string]interface{}
14590 err := json.Unmarshal(body, &m)
14591 if err != nil {
14592 return nil, err
14593 }
14594
14595 switch m["protectableContainerType"] {
14596 case string(ProtectableContainerTypeStorageContainer):
14597 var aspc AzureStorageProtectableContainer
14598 err := json.Unmarshal(body, &aspc)
14599 return aspc, err
14600 case string(ProtectableContainerTypeVMAppContainer):
14601 var avacpc AzureVMAppContainerProtectableContainer
14602 err := json.Unmarshal(body, &avacpc)
14603 return avacpc, err
14604 default:
14605 var pc ProtectableContainer
14606 err := json.Unmarshal(body, &pc)
14607 return pc, err
14608 }
14609 }
14610 func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) {
14611 var rawMessages []*json.RawMessage
14612 err := json.Unmarshal(body, &rawMessages)
14613 if err != nil {
14614 return nil, err
14615 }
14616
14617 pcArray := make([]BasicProtectableContainer, len(rawMessages))
14618
14619 for index, rawMessage := range rawMessages {
14620 pc, err := unmarshalBasicProtectableContainer(*rawMessage)
14621 if err != nil {
14622 return nil, err
14623 }
14624 pcArray[index] = pc
14625 }
14626 return pcArray, nil
14627 }
14628
14629
14630 func (pc ProtectableContainer) MarshalJSON() ([]byte, error) {
14631 pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer
14632 objectMap := make(map[string]interface{})
14633 if pc.FriendlyName != nil {
14634 objectMap["friendlyName"] = pc.FriendlyName
14635 }
14636 if pc.BackupManagementType != "" {
14637 objectMap["backupManagementType"] = pc.BackupManagementType
14638 }
14639 if pc.HealthStatus != nil {
14640 objectMap["healthStatus"] = pc.HealthStatus
14641 }
14642 if pc.ContainerID != nil {
14643 objectMap["containerId"] = pc.ContainerID
14644 }
14645 if pc.ProtectableContainerType != "" {
14646 objectMap["protectableContainerType"] = pc.ProtectableContainerType
14647 }
14648 return json.Marshal(objectMap)
14649 }
14650
14651
14652 func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
14653 return nil, false
14654 }
14655
14656
14657 func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
14658 return nil, false
14659 }
14660
14661
14662 func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
14663 return &pc, true
14664 }
14665
14666
14667 func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
14668 return &pc, true
14669 }
14670
14671
14672 type ProtectableContainerResource struct {
14673
14674 Properties BasicProtectableContainer `json:"properties,omitempty"`
14675
14676 ID *string `json:"id,omitempty"`
14677
14678 Name *string `json:"name,omitempty"`
14679
14680 Type *string `json:"type,omitempty"`
14681
14682 Location *string `json:"location,omitempty"`
14683
14684 Tags map[string]*string `json:"tags"`
14685
14686 ETag *string `json:"eTag,omitempty"`
14687 }
14688
14689
14690 func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) {
14691 objectMap := make(map[string]interface{})
14692 objectMap["properties"] = pcr.Properties
14693 if pcr.Location != nil {
14694 objectMap["location"] = pcr.Location
14695 }
14696 if pcr.Tags != nil {
14697 objectMap["tags"] = pcr.Tags
14698 }
14699 if pcr.ETag != nil {
14700 objectMap["eTag"] = pcr.ETag
14701 }
14702 return json.Marshal(objectMap)
14703 }
14704
14705
14706 func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error {
14707 var m map[string]*json.RawMessage
14708 err := json.Unmarshal(body, &m)
14709 if err != nil {
14710 return err
14711 }
14712 for k, v := range m {
14713 switch k {
14714 case "properties":
14715 if v != nil {
14716 properties, err := unmarshalBasicProtectableContainer(*v)
14717 if err != nil {
14718 return err
14719 }
14720 pcr.Properties = properties
14721 }
14722 case "id":
14723 if v != nil {
14724 var ID string
14725 err = json.Unmarshal(*v, &ID)
14726 if err != nil {
14727 return err
14728 }
14729 pcr.ID = &ID
14730 }
14731 case "name":
14732 if v != nil {
14733 var name string
14734 err = json.Unmarshal(*v, &name)
14735 if err != nil {
14736 return err
14737 }
14738 pcr.Name = &name
14739 }
14740 case "type":
14741 if v != nil {
14742 var typeVar string
14743 err = json.Unmarshal(*v, &typeVar)
14744 if err != nil {
14745 return err
14746 }
14747 pcr.Type = &typeVar
14748 }
14749 case "location":
14750 if v != nil {
14751 var location string
14752 err = json.Unmarshal(*v, &location)
14753 if err != nil {
14754 return err
14755 }
14756 pcr.Location = &location
14757 }
14758 case "tags":
14759 if v != nil {
14760 var tags map[string]*string
14761 err = json.Unmarshal(*v, &tags)
14762 if err != nil {
14763 return err
14764 }
14765 pcr.Tags = tags
14766 }
14767 case "eTag":
14768 if v != nil {
14769 var eTag string
14770 err = json.Unmarshal(*v, &eTag)
14771 if err != nil {
14772 return err
14773 }
14774 pcr.ETag = &eTag
14775 }
14776 }
14777 }
14778
14779 return nil
14780 }
14781
14782
14783 type ProtectableContainerResourceList struct {
14784 autorest.Response `json:"-"`
14785
14786 Value *[]ProtectableContainerResource `json:"value,omitempty"`
14787
14788 NextLink *string `json:"nextLink,omitempty"`
14789 }
14790
14791
14792
14793 type ProtectableContainerResourceListIterator struct {
14794 i int
14795 page ProtectableContainerResourceListPage
14796 }
14797
14798
14799
14800 func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
14801 if tracing.IsEnabled() {
14802 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext")
14803 defer func() {
14804 sc := -1
14805 if iter.Response().Response.Response != nil {
14806 sc = iter.Response().Response.Response.StatusCode
14807 }
14808 tracing.EndSpan(ctx, sc, err)
14809 }()
14810 }
14811 iter.i++
14812 if iter.i < len(iter.page.Values()) {
14813 return nil
14814 }
14815 err = iter.page.NextWithContext(ctx)
14816 if err != nil {
14817 iter.i--
14818 return err
14819 }
14820 iter.i = 0
14821 return nil
14822 }
14823
14824
14825
14826
14827 func (iter *ProtectableContainerResourceListIterator) Next() error {
14828 return iter.NextWithContext(context.Background())
14829 }
14830
14831
14832 func (iter ProtectableContainerResourceListIterator) NotDone() bool {
14833 return iter.page.NotDone() && iter.i < len(iter.page.Values())
14834 }
14835
14836
14837 func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList {
14838 return iter.page.Response()
14839 }
14840
14841
14842
14843 func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource {
14844 if !iter.page.NotDone() {
14845 return ProtectableContainerResource{}
14846 }
14847 return iter.page.Values()[iter.i]
14848 }
14849
14850
14851 func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator {
14852 return ProtectableContainerResourceListIterator{page: page}
14853 }
14854
14855
14856 func (pcrl ProtectableContainerResourceList) IsEmpty() bool {
14857 return pcrl.Value == nil || len(*pcrl.Value) == 0
14858 }
14859
14860
14861 func (pcrl ProtectableContainerResourceList) hasNextLink() bool {
14862 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
14863 }
14864
14865
14866
14867 func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
14868 if !pcrl.hasNextLink() {
14869 return nil, nil
14870 }
14871 return autorest.Prepare((&http.Request{}).WithContext(ctx),
14872 autorest.AsJSON(),
14873 autorest.AsGet(),
14874 autorest.WithBaseURL(to.String(pcrl.NextLink)))
14875 }
14876
14877
14878 type ProtectableContainerResourceListPage struct {
14879 fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)
14880 pcrl ProtectableContainerResourceList
14881 }
14882
14883
14884
14885 func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
14886 if tracing.IsEnabled() {
14887 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext")
14888 defer func() {
14889 sc := -1
14890 if page.Response().Response.Response != nil {
14891 sc = page.Response().Response.Response.StatusCode
14892 }
14893 tracing.EndSpan(ctx, sc, err)
14894 }()
14895 }
14896 for {
14897 next, err := page.fn(ctx, page.pcrl)
14898 if err != nil {
14899 return err
14900 }
14901 page.pcrl = next
14902 if !next.hasNextLink() || !next.IsEmpty() {
14903 break
14904 }
14905 }
14906 return nil
14907 }
14908
14909
14910
14911
14912 func (page *ProtectableContainerResourceListPage) Next() error {
14913 return page.NextWithContext(context.Background())
14914 }
14915
14916
14917 func (page ProtectableContainerResourceListPage) NotDone() bool {
14918 return !page.pcrl.IsEmpty()
14919 }
14920
14921
14922 func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList {
14923 return page.pcrl
14924 }
14925
14926
14927 func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource {
14928 if page.pcrl.IsEmpty() {
14929 return nil
14930 }
14931 return *page.pcrl.Value
14932 }
14933
14934
14935 func NewProtectableContainerResourceListPage(cur ProtectableContainerResourceList, getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage {
14936 return ProtectableContainerResourceListPage{
14937 fn: getNextPage,
14938 pcrl: cur,
14939 }
14940 }
14941
14942
14943 type BasicProtectedItem interface {
14944 AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool)
14945 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
14946 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
14947 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
14948 AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool)
14949 AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool)
14950 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
14951 AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool)
14952 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
14953 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
14954 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
14955 AsDPMProtectedItem() (*DPMProtectedItem, bool)
14956 AsGenericProtectedItem() (*GenericProtectedItem, bool)
14957 AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool)
14958 AsProtectedItem() (*ProtectedItem, bool)
14959 }
14960
14961
14962 type ProtectedItem struct {
14963
14964 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
14965
14966 WorkloadType DataSourceType `json:"workloadType,omitempty"`
14967
14968 ContainerName *string `json:"containerName,omitempty"`
14969
14970 SourceResourceID *string `json:"sourceResourceId,omitempty"`
14971
14972 PolicyID *string `json:"policyId,omitempty"`
14973
14974 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
14975
14976 BackupSetName *string `json:"backupSetName,omitempty"`
14977
14978 CreateMode CreateMode `json:"createMode,omitempty"`
14979
14980 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
14981
14982 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
14983
14984 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
14985
14986 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
14987
14988 IsRehydrate *bool `json:"isRehydrate,omitempty"`
14989
14990 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
14991 }
14992
14993 func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) {
14994 var m map[string]interface{}
14995 err := json.Unmarshal(body, &m)
14996 if err != nil {
14997 return nil, err
14998 }
14999
15000 switch m["protectedItemType"] {
15001 case string(ProtectedItemTypeAzureFileShareProtectedItem):
15002 var afpi AzureFileshareProtectedItem
15003 err := json.Unmarshal(body, &afpi)
15004 return afpi, err
15005 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
15006 var aisccvpi AzureIaaSClassicComputeVMProtectedItem
15007 err := json.Unmarshal(body, &aisccvpi)
15008 return aisccvpi, err
15009 case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
15010 var aiscvpi AzureIaaSComputeVMProtectedItem
15011 err := json.Unmarshal(body, &aiscvpi)
15012 return aiscvpi, err
15013 case string(ProtectedItemTypeAzureIaaSVMProtectedItem):
15014 var aispi AzureIaaSVMProtectedItem
15015 err := json.Unmarshal(body, &aispi)
15016 return aispi, err
15017 case string(ProtectedItemTypeMicrosoftSqlserversdatabases):
15018 var aspi AzureSQLProtectedItem
15019 err := json.Unmarshal(body, &aspi)
15020 return aspi, err
15021 case string(ProtectedItemTypeAzureVMWorkloadProtectedItem):
15022 var avwpi AzureVMWorkloadProtectedItem
15023 err := json.Unmarshal(body, &avwpi)
15024 return avwpi, err
15025 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
15026 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
15027 err := json.Unmarshal(body, &avwsadpi)
15028 return avwsadpi, err
15029 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
15030 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
15031 err := json.Unmarshal(body, &avwshdpi)
15032 return avwshdpi, err
15033 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
15034 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
15035 err := json.Unmarshal(body, &avwsdpi)
15036 return avwsdpi, err
15037 case string(ProtectedItemTypeDPMProtectedItem):
15038 var dpi DPMProtectedItem
15039 err := json.Unmarshal(body, &dpi)
15040 return dpi, err
15041 case string(ProtectedItemTypeGenericProtectedItem):
15042 var gpi GenericProtectedItem
15043 err := json.Unmarshal(body, &gpi)
15044 return gpi, err
15045 case string(ProtectedItemTypeMabFileFolderProtectedItem):
15046 var mffpi MabFileFolderProtectedItem
15047 err := json.Unmarshal(body, &mffpi)
15048 return mffpi, err
15049 default:
15050 var pi ProtectedItem
15051 err := json.Unmarshal(body, &pi)
15052 return pi, err
15053 }
15054 }
15055 func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) {
15056 var rawMessages []*json.RawMessage
15057 err := json.Unmarshal(body, &rawMessages)
15058 if err != nil {
15059 return nil, err
15060 }
15061
15062 piArray := make([]BasicProtectedItem, len(rawMessages))
15063
15064 for index, rawMessage := range rawMessages {
15065 pi, err := unmarshalBasicProtectedItem(*rawMessage)
15066 if err != nil {
15067 return nil, err
15068 }
15069 piArray[index] = pi
15070 }
15071 return piArray, nil
15072 }
15073
15074
15075 func (pi ProtectedItem) MarshalJSON() ([]byte, error) {
15076 pi.ProtectedItemType = ProtectedItemTypeProtectedItem
15077 objectMap := make(map[string]interface{})
15078 if pi.BackupManagementType != "" {
15079 objectMap["backupManagementType"] = pi.BackupManagementType
15080 }
15081 if pi.WorkloadType != "" {
15082 objectMap["workloadType"] = pi.WorkloadType
15083 }
15084 if pi.ContainerName != nil {
15085 objectMap["containerName"] = pi.ContainerName
15086 }
15087 if pi.SourceResourceID != nil {
15088 objectMap["sourceResourceId"] = pi.SourceResourceID
15089 }
15090 if pi.PolicyID != nil {
15091 objectMap["policyId"] = pi.PolicyID
15092 }
15093 if pi.LastRecoveryPoint != nil {
15094 objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint
15095 }
15096 if pi.BackupSetName != nil {
15097 objectMap["backupSetName"] = pi.BackupSetName
15098 }
15099 if pi.CreateMode != "" {
15100 objectMap["createMode"] = pi.CreateMode
15101 }
15102 if pi.DeferredDeleteTimeInUTC != nil {
15103 objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC
15104 }
15105 if pi.IsScheduledForDeferredDelete != nil {
15106 objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete
15107 }
15108 if pi.DeferredDeleteTimeRemaining != nil {
15109 objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining
15110 }
15111 if pi.IsDeferredDeleteScheduleUpcoming != nil {
15112 objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming
15113 }
15114 if pi.IsRehydrate != nil {
15115 objectMap["isRehydrate"] = pi.IsRehydrate
15116 }
15117 if pi.ProtectedItemType != "" {
15118 objectMap["protectedItemType"] = pi.ProtectedItemType
15119 }
15120 return json.Marshal(objectMap)
15121 }
15122
15123
15124 func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
15125 return nil, false
15126 }
15127
15128
15129 func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
15130 return nil, false
15131 }
15132
15133
15134 func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
15135 return nil, false
15136 }
15137
15138
15139 func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
15140 return nil, false
15141 }
15142
15143
15144 func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
15145 return nil, false
15146 }
15147
15148
15149 func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
15150 return nil, false
15151 }
15152
15153
15154 func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
15155 return nil, false
15156 }
15157
15158
15159 func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
15160 return nil, false
15161 }
15162
15163
15164 func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
15165 return nil, false
15166 }
15167
15168
15169 func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
15170 return nil, false
15171 }
15172
15173
15174 func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
15175 return nil, false
15176 }
15177
15178
15179 func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
15180 return nil, false
15181 }
15182
15183
15184 func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
15185 return nil, false
15186 }
15187
15188
15189 func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
15190 return nil, false
15191 }
15192
15193
15194 func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
15195 return &pi, true
15196 }
15197
15198
15199 func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
15200 return &pi, true
15201 }
15202
15203
15204 type ProtectedItemQueryObject struct {
15205
15206 HealthState HealthState `json:"healthState,omitempty"`
15207
15208 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15209
15210 ItemType DataSourceType `json:"itemType,omitempty"`
15211
15212 PolicyName *string `json:"policyName,omitempty"`
15213
15214 ContainerName *string `json:"containerName,omitempty"`
15215
15216 BackupEngineName *string `json:"backupEngineName,omitempty"`
15217
15218 FriendlyName *string `json:"friendlyName,omitempty"`
15219
15220 FabricName *string `json:"fabricName,omitempty"`
15221
15222 BackupSetName *string `json:"backupSetName,omitempty"`
15223 }
15224
15225
15226 type ProtectedItemResource struct {
15227 autorest.Response `json:"-"`
15228
15229 Properties BasicProtectedItem `json:"properties,omitempty"`
15230
15231 ID *string `json:"id,omitempty"`
15232
15233 Name *string `json:"name,omitempty"`
15234
15235 Type *string `json:"type,omitempty"`
15236
15237 Location *string `json:"location,omitempty"`
15238
15239 Tags map[string]*string `json:"tags"`
15240
15241 ETag *string `json:"eTag,omitempty"`
15242 }
15243
15244
15245 func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) {
15246 objectMap := make(map[string]interface{})
15247 objectMap["properties"] = pir.Properties
15248 if pir.Location != nil {
15249 objectMap["location"] = pir.Location
15250 }
15251 if pir.Tags != nil {
15252 objectMap["tags"] = pir.Tags
15253 }
15254 if pir.ETag != nil {
15255 objectMap["eTag"] = pir.ETag
15256 }
15257 return json.Marshal(objectMap)
15258 }
15259
15260
15261 func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error {
15262 var m map[string]*json.RawMessage
15263 err := json.Unmarshal(body, &m)
15264 if err != nil {
15265 return err
15266 }
15267 for k, v := range m {
15268 switch k {
15269 case "properties":
15270 if v != nil {
15271 properties, err := unmarshalBasicProtectedItem(*v)
15272 if err != nil {
15273 return err
15274 }
15275 pir.Properties = properties
15276 }
15277 case "id":
15278 if v != nil {
15279 var ID string
15280 err = json.Unmarshal(*v, &ID)
15281 if err != nil {
15282 return err
15283 }
15284 pir.ID = &ID
15285 }
15286 case "name":
15287 if v != nil {
15288 var name string
15289 err = json.Unmarshal(*v, &name)
15290 if err != nil {
15291 return err
15292 }
15293 pir.Name = &name
15294 }
15295 case "type":
15296 if v != nil {
15297 var typeVar string
15298 err = json.Unmarshal(*v, &typeVar)
15299 if err != nil {
15300 return err
15301 }
15302 pir.Type = &typeVar
15303 }
15304 case "location":
15305 if v != nil {
15306 var location string
15307 err = json.Unmarshal(*v, &location)
15308 if err != nil {
15309 return err
15310 }
15311 pir.Location = &location
15312 }
15313 case "tags":
15314 if v != nil {
15315 var tags map[string]*string
15316 err = json.Unmarshal(*v, &tags)
15317 if err != nil {
15318 return err
15319 }
15320 pir.Tags = tags
15321 }
15322 case "eTag":
15323 if v != nil {
15324 var eTag string
15325 err = json.Unmarshal(*v, &eTag)
15326 if err != nil {
15327 return err
15328 }
15329 pir.ETag = &eTag
15330 }
15331 }
15332 }
15333
15334 return nil
15335 }
15336
15337
15338 type ProtectedItemResourceList struct {
15339 autorest.Response `json:"-"`
15340
15341 Value *[]ProtectedItemResource `json:"value,omitempty"`
15342
15343 NextLink *string `json:"nextLink,omitempty"`
15344 }
15345
15346
15347 type ProtectedItemResourceListIterator struct {
15348 i int
15349 page ProtectedItemResourceListPage
15350 }
15351
15352
15353
15354 func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
15355 if tracing.IsEnabled() {
15356 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext")
15357 defer func() {
15358 sc := -1
15359 if iter.Response().Response.Response != nil {
15360 sc = iter.Response().Response.Response.StatusCode
15361 }
15362 tracing.EndSpan(ctx, sc, err)
15363 }()
15364 }
15365 iter.i++
15366 if iter.i < len(iter.page.Values()) {
15367 return nil
15368 }
15369 err = iter.page.NextWithContext(ctx)
15370 if err != nil {
15371 iter.i--
15372 return err
15373 }
15374 iter.i = 0
15375 return nil
15376 }
15377
15378
15379
15380
15381 func (iter *ProtectedItemResourceListIterator) Next() error {
15382 return iter.NextWithContext(context.Background())
15383 }
15384
15385
15386 func (iter ProtectedItemResourceListIterator) NotDone() bool {
15387 return iter.page.NotDone() && iter.i < len(iter.page.Values())
15388 }
15389
15390
15391 func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList {
15392 return iter.page.Response()
15393 }
15394
15395
15396
15397 func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource {
15398 if !iter.page.NotDone() {
15399 return ProtectedItemResource{}
15400 }
15401 return iter.page.Values()[iter.i]
15402 }
15403
15404
15405 func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator {
15406 return ProtectedItemResourceListIterator{page: page}
15407 }
15408
15409
15410 func (pirl ProtectedItemResourceList) IsEmpty() bool {
15411 return pirl.Value == nil || len(*pirl.Value) == 0
15412 }
15413
15414
15415 func (pirl ProtectedItemResourceList) hasNextLink() bool {
15416 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
15417 }
15418
15419
15420
15421 func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
15422 if !pirl.hasNextLink() {
15423 return nil, nil
15424 }
15425 return autorest.Prepare((&http.Request{}).WithContext(ctx),
15426 autorest.AsJSON(),
15427 autorest.AsGet(),
15428 autorest.WithBaseURL(to.String(pirl.NextLink)))
15429 }
15430
15431
15432 type ProtectedItemResourceListPage struct {
15433 fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)
15434 pirl ProtectedItemResourceList
15435 }
15436
15437
15438
15439 func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
15440 if tracing.IsEnabled() {
15441 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext")
15442 defer func() {
15443 sc := -1
15444 if page.Response().Response.Response != nil {
15445 sc = page.Response().Response.Response.StatusCode
15446 }
15447 tracing.EndSpan(ctx, sc, err)
15448 }()
15449 }
15450 for {
15451 next, err := page.fn(ctx, page.pirl)
15452 if err != nil {
15453 return err
15454 }
15455 page.pirl = next
15456 if !next.hasNextLink() || !next.IsEmpty() {
15457 break
15458 }
15459 }
15460 return nil
15461 }
15462
15463
15464
15465
15466 func (page *ProtectedItemResourceListPage) Next() error {
15467 return page.NextWithContext(context.Background())
15468 }
15469
15470
15471 func (page ProtectedItemResourceListPage) NotDone() bool {
15472 return !page.pirl.IsEmpty()
15473 }
15474
15475
15476 func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList {
15477 return page.pirl
15478 }
15479
15480
15481 func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource {
15482 if page.pirl.IsEmpty() {
15483 return nil
15484 }
15485 return *page.pirl.Value
15486 }
15487
15488
15489 func NewProtectedItemResourceListPage(cur ProtectedItemResourceList, getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage {
15490 return ProtectedItemResourceListPage{
15491 fn: getNextPage,
15492 pirl: cur,
15493 }
15494 }
15495
15496
15497
15498 type BasicProtectionContainer interface {
15499 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
15500 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
15501 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
15502 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
15503 AsAzureSQLContainer() (*AzureSQLContainer, bool)
15504 AsAzureStorageContainer() (*AzureStorageContainer, bool)
15505 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
15506 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
15507 AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool)
15508 AsDpmContainer() (*DpmContainer, bool)
15509 AsBasicDpmContainer() (BasicDpmContainer, bool)
15510 AsGenericContainer() (*GenericContainer, bool)
15511 AsIaaSVMContainer() (*IaaSVMContainer, bool)
15512 AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool)
15513 AsMabContainer() (*MabContainer, bool)
15514 AsProtectionContainer() (*ProtectionContainer, bool)
15515 }
15516
15517
15518
15519 type ProtectionContainer struct {
15520
15521 FriendlyName *string `json:"friendlyName,omitempty"`
15522
15523 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15524
15525 RegistrationStatus *string `json:"registrationStatus,omitempty"`
15526
15527 HealthStatus *string `json:"healthStatus,omitempty"`
15528
15529 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
15530 }
15531
15532 func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) {
15533 var m map[string]interface{}
15534 err := json.Unmarshal(body, &m)
15535 if err != nil {
15536 return nil, err
15537 }
15538
15539 switch m["containerType"] {
15540 case string(ContainerTypeAzureBackupServerContainer1):
15541 var absc AzureBackupServerContainer
15542 err := json.Unmarshal(body, &absc)
15543 return absc, err
15544 case string(ContainerTypeMicrosoftClassicComputevirtualMachines):
15545 var aisccvc AzureIaaSClassicComputeVMContainer
15546 err := json.Unmarshal(body, &aisccvc)
15547 return aisccvc, err
15548 case string(ContainerTypeMicrosoftComputevirtualMachines):
15549 var aiscvc AzureIaaSComputeVMContainer
15550 err := json.Unmarshal(body, &aiscvc)
15551 return aiscvc, err
15552 case string(ContainerTypeSQLAGWorkLoadContainer1):
15553 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
15554 err := json.Unmarshal(body, &aswcpc)
15555 return aswcpc, err
15556 case string(ContainerTypeAzureSQLContainer1):
15557 var asc AzureSQLContainer
15558 err := json.Unmarshal(body, &asc)
15559 return asc, err
15560 case string(ContainerTypeStorageContainer1):
15561 var asc AzureStorageContainer
15562 err := json.Unmarshal(body, &asc)
15563 return asc, err
15564 case string(ContainerTypeVMAppContainer1):
15565 var avacpc AzureVMAppContainerProtectionContainer
15566 err := json.Unmarshal(body, &avacpc)
15567 return avacpc, err
15568 case string(ContainerTypeAzureWorkloadContainer):
15569 var awc AzureWorkloadContainer
15570 err := json.Unmarshal(body, &awc)
15571 return awc, err
15572 case string(ContainerTypeDPMContainer1):
15573 var dc DpmContainer
15574 err := json.Unmarshal(body, &dc)
15575 return dc, err
15576 case string(ContainerTypeGenericContainer1):
15577 var gc GenericContainer
15578 err := json.Unmarshal(body, &gc)
15579 return gc, err
15580 case string(ContainerTypeIaaSVMContainer):
15581 var isc IaaSVMContainer
15582 err := json.Unmarshal(body, &isc)
15583 return isc, err
15584 case string(ContainerTypeWindows1):
15585 var mc MabContainer
15586 err := json.Unmarshal(body, &mc)
15587 return mc, err
15588 default:
15589 var pc ProtectionContainer
15590 err := json.Unmarshal(body, &pc)
15591 return pc, err
15592 }
15593 }
15594 func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) {
15595 var rawMessages []*json.RawMessage
15596 err := json.Unmarshal(body, &rawMessages)
15597 if err != nil {
15598 return nil, err
15599 }
15600
15601 pcArray := make([]BasicProtectionContainer, len(rawMessages))
15602
15603 for index, rawMessage := range rawMessages {
15604 pc, err := unmarshalBasicProtectionContainer(*rawMessage)
15605 if err != nil {
15606 return nil, err
15607 }
15608 pcArray[index] = pc
15609 }
15610 return pcArray, nil
15611 }
15612
15613
15614 func (pc ProtectionContainer) MarshalJSON() ([]byte, error) {
15615 pc.ContainerType = ContainerTypeProtectionContainer
15616 objectMap := make(map[string]interface{})
15617 if pc.FriendlyName != nil {
15618 objectMap["friendlyName"] = pc.FriendlyName
15619 }
15620 if pc.BackupManagementType != "" {
15621 objectMap["backupManagementType"] = pc.BackupManagementType
15622 }
15623 if pc.RegistrationStatus != nil {
15624 objectMap["registrationStatus"] = pc.RegistrationStatus
15625 }
15626 if pc.HealthStatus != nil {
15627 objectMap["healthStatus"] = pc.HealthStatus
15628 }
15629 if pc.ContainerType != "" {
15630 objectMap["containerType"] = pc.ContainerType
15631 }
15632 return json.Marshal(objectMap)
15633 }
15634
15635
15636 func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
15637 return nil, false
15638 }
15639
15640
15641 func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
15642 return nil, false
15643 }
15644
15645
15646 func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
15647 return nil, false
15648 }
15649
15650
15651 func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
15652 return nil, false
15653 }
15654
15655
15656 func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
15657 return nil, false
15658 }
15659
15660
15661 func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
15662 return nil, false
15663 }
15664
15665
15666 func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
15667 return nil, false
15668 }
15669
15670
15671 func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
15672 return nil, false
15673 }
15674
15675
15676 func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
15677 return nil, false
15678 }
15679
15680
15681 func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
15682 return nil, false
15683 }
15684
15685
15686 func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
15687 return nil, false
15688 }
15689
15690
15691 func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
15692 return nil, false
15693 }
15694
15695
15696 func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
15697 return nil, false
15698 }
15699
15700
15701 func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
15702 return nil, false
15703 }
15704
15705
15706 func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) {
15707 return nil, false
15708 }
15709
15710
15711 func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
15712 return &pc, true
15713 }
15714
15715
15716 func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
15717 return &pc, true
15718 }
15719
15720
15721
15722 type ProtectionContainerResource struct {
15723 autorest.Response `json:"-"`
15724
15725 Properties BasicProtectionContainer `json:"properties,omitempty"`
15726
15727 ID *string `json:"id,omitempty"`
15728
15729 Name *string `json:"name,omitempty"`
15730
15731 Type *string `json:"type,omitempty"`
15732
15733 Location *string `json:"location,omitempty"`
15734
15735 Tags map[string]*string `json:"tags"`
15736
15737 ETag *string `json:"eTag,omitempty"`
15738 }
15739
15740
15741 func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) {
15742 objectMap := make(map[string]interface{})
15743 objectMap["properties"] = pcr.Properties
15744 if pcr.Location != nil {
15745 objectMap["location"] = pcr.Location
15746 }
15747 if pcr.Tags != nil {
15748 objectMap["tags"] = pcr.Tags
15749 }
15750 if pcr.ETag != nil {
15751 objectMap["eTag"] = pcr.ETag
15752 }
15753 return json.Marshal(objectMap)
15754 }
15755
15756
15757 func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error {
15758 var m map[string]*json.RawMessage
15759 err := json.Unmarshal(body, &m)
15760 if err != nil {
15761 return err
15762 }
15763 for k, v := range m {
15764 switch k {
15765 case "properties":
15766 if v != nil {
15767 properties, err := unmarshalBasicProtectionContainer(*v)
15768 if err != nil {
15769 return err
15770 }
15771 pcr.Properties = properties
15772 }
15773 case "id":
15774 if v != nil {
15775 var ID string
15776 err = json.Unmarshal(*v, &ID)
15777 if err != nil {
15778 return err
15779 }
15780 pcr.ID = &ID
15781 }
15782 case "name":
15783 if v != nil {
15784 var name string
15785 err = json.Unmarshal(*v, &name)
15786 if err != nil {
15787 return err
15788 }
15789 pcr.Name = &name
15790 }
15791 case "type":
15792 if v != nil {
15793 var typeVar string
15794 err = json.Unmarshal(*v, &typeVar)
15795 if err != nil {
15796 return err
15797 }
15798 pcr.Type = &typeVar
15799 }
15800 case "location":
15801 if v != nil {
15802 var location string
15803 err = json.Unmarshal(*v, &location)
15804 if err != nil {
15805 return err
15806 }
15807 pcr.Location = &location
15808 }
15809 case "tags":
15810 if v != nil {
15811 var tags map[string]*string
15812 err = json.Unmarshal(*v, &tags)
15813 if err != nil {
15814 return err
15815 }
15816 pcr.Tags = tags
15817 }
15818 case "eTag":
15819 if v != nil {
15820 var eTag string
15821 err = json.Unmarshal(*v, &eTag)
15822 if err != nil {
15823 return err
15824 }
15825 pcr.ETag = &eTag
15826 }
15827 }
15828 }
15829
15830 return nil
15831 }
15832
15833
15834 type ProtectionContainerResourceList struct {
15835 autorest.Response `json:"-"`
15836
15837 Value *[]ProtectionContainerResource `json:"value,omitempty"`
15838
15839 NextLink *string `json:"nextLink,omitempty"`
15840 }
15841
15842
15843
15844 type ProtectionContainerResourceListIterator struct {
15845 i int
15846 page ProtectionContainerResourceListPage
15847 }
15848
15849
15850
15851 func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
15852 if tracing.IsEnabled() {
15853 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext")
15854 defer func() {
15855 sc := -1
15856 if iter.Response().Response.Response != nil {
15857 sc = iter.Response().Response.Response.StatusCode
15858 }
15859 tracing.EndSpan(ctx, sc, err)
15860 }()
15861 }
15862 iter.i++
15863 if iter.i < len(iter.page.Values()) {
15864 return nil
15865 }
15866 err = iter.page.NextWithContext(ctx)
15867 if err != nil {
15868 iter.i--
15869 return err
15870 }
15871 iter.i = 0
15872 return nil
15873 }
15874
15875
15876
15877
15878 func (iter *ProtectionContainerResourceListIterator) Next() error {
15879 return iter.NextWithContext(context.Background())
15880 }
15881
15882
15883 func (iter ProtectionContainerResourceListIterator) NotDone() bool {
15884 return iter.page.NotDone() && iter.i < len(iter.page.Values())
15885 }
15886
15887
15888 func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList {
15889 return iter.page.Response()
15890 }
15891
15892
15893
15894 func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource {
15895 if !iter.page.NotDone() {
15896 return ProtectionContainerResource{}
15897 }
15898 return iter.page.Values()[iter.i]
15899 }
15900
15901
15902 func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator {
15903 return ProtectionContainerResourceListIterator{page: page}
15904 }
15905
15906
15907 func (pcrl ProtectionContainerResourceList) IsEmpty() bool {
15908 return pcrl.Value == nil || len(*pcrl.Value) == 0
15909 }
15910
15911
15912 func (pcrl ProtectionContainerResourceList) hasNextLink() bool {
15913 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
15914 }
15915
15916
15917
15918 func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
15919 if !pcrl.hasNextLink() {
15920 return nil, nil
15921 }
15922 return autorest.Prepare((&http.Request{}).WithContext(ctx),
15923 autorest.AsJSON(),
15924 autorest.AsGet(),
15925 autorest.WithBaseURL(to.String(pcrl.NextLink)))
15926 }
15927
15928
15929 type ProtectionContainerResourceListPage struct {
15930 fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)
15931 pcrl ProtectionContainerResourceList
15932 }
15933
15934
15935
15936 func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
15937 if tracing.IsEnabled() {
15938 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext")
15939 defer func() {
15940 sc := -1
15941 if page.Response().Response.Response != nil {
15942 sc = page.Response().Response.Response.StatusCode
15943 }
15944 tracing.EndSpan(ctx, sc, err)
15945 }()
15946 }
15947 for {
15948 next, err := page.fn(ctx, page.pcrl)
15949 if err != nil {
15950 return err
15951 }
15952 page.pcrl = next
15953 if !next.hasNextLink() || !next.IsEmpty() {
15954 break
15955 }
15956 }
15957 return nil
15958 }
15959
15960
15961
15962
15963 func (page *ProtectionContainerResourceListPage) Next() error {
15964 return page.NextWithContext(context.Background())
15965 }
15966
15967
15968 func (page ProtectionContainerResourceListPage) NotDone() bool {
15969 return !page.pcrl.IsEmpty()
15970 }
15971
15972
15973 func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList {
15974 return page.pcrl
15975 }
15976
15977
15978 func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource {
15979 if page.pcrl.IsEmpty() {
15980 return nil
15981 }
15982 return *page.pcrl.Value
15983 }
15984
15985
15986 func NewProtectionContainerResourceListPage(cur ProtectionContainerResourceList, getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage {
15987 return ProtectionContainerResourceListPage{
15988 fn: getNextPage,
15989 pcrl: cur,
15990 }
15991 }
15992
15993
15994 type BasicProtectionIntent interface {
15995 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
15996 AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool)
15997 AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool)
15998 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
15999 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
16000 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
16001 AsProtectionIntent() (*ProtectionIntent, bool)
16002 }
16003
16004
16005 type ProtectionIntent struct {
16006
16007 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
16008
16009 SourceResourceID *string `json:"sourceResourceId,omitempty"`
16010
16011 ItemID *string `json:"itemId,omitempty"`
16012
16013 PolicyID *string `json:"policyId,omitempty"`
16014
16015 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
16016
16017 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
16018 }
16019
16020 func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) {
16021 var m map[string]interface{}
16022 err := json.Unmarshal(body, &m)
16023 if err != nil {
16024 return nil, err
16025 }
16026
16027 switch m["protectionIntentItemType"] {
16028 case string(ProtectionIntentItemTypeRecoveryServiceVaultItem):
16029 var arsvpi AzureRecoveryServiceVaultProtectionIntent
16030 err := json.Unmarshal(body, &arsvpi)
16031 return arsvpi, err
16032 case string(ProtectionIntentItemTypeAzureResourceItem):
16033 var arpi AzureResourceProtectionIntent
16034 err := json.Unmarshal(body, &arpi)
16035 return arpi, err
16036 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
16037 var awapi AzureWorkloadAutoProtectionIntent
16038 err := json.Unmarshal(body, &awapi)
16039 return awapi, err
16040 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
16041 var awsapi AzureWorkloadSQLAutoProtectionIntent
16042 err := json.Unmarshal(body, &awsapi)
16043 return awsapi, err
16044 default:
16045 var pi ProtectionIntent
16046 err := json.Unmarshal(body, &pi)
16047 return pi, err
16048 }
16049 }
16050 func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) {
16051 var rawMessages []*json.RawMessage
16052 err := json.Unmarshal(body, &rawMessages)
16053 if err != nil {
16054 return nil, err
16055 }
16056
16057 piArray := make([]BasicProtectionIntent, len(rawMessages))
16058
16059 for index, rawMessage := range rawMessages {
16060 pi, err := unmarshalBasicProtectionIntent(*rawMessage)
16061 if err != nil {
16062 return nil, err
16063 }
16064 piArray[index] = pi
16065 }
16066 return piArray, nil
16067 }
16068
16069
16070 func (pi ProtectionIntent) MarshalJSON() ([]byte, error) {
16071 pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent
16072 objectMap := make(map[string]interface{})
16073 if pi.BackupManagementType != "" {
16074 objectMap["backupManagementType"] = pi.BackupManagementType
16075 }
16076 if pi.SourceResourceID != nil {
16077 objectMap["sourceResourceId"] = pi.SourceResourceID
16078 }
16079 if pi.ItemID != nil {
16080 objectMap["itemId"] = pi.ItemID
16081 }
16082 if pi.PolicyID != nil {
16083 objectMap["policyId"] = pi.PolicyID
16084 }
16085 if pi.ProtectionState != "" {
16086 objectMap["protectionState"] = pi.ProtectionState
16087 }
16088 if pi.ProtectionIntentItemType != "" {
16089 objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType
16090 }
16091 return json.Marshal(objectMap)
16092 }
16093
16094
16095 func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
16096 return nil, false
16097 }
16098
16099
16100 func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
16101 return nil, false
16102 }
16103
16104
16105 func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
16106 return nil, false
16107 }
16108
16109
16110 func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
16111 return nil, false
16112 }
16113
16114
16115 func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
16116 return nil, false
16117 }
16118
16119
16120 func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
16121 return nil, false
16122 }
16123
16124
16125 func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
16126 return &pi, true
16127 }
16128
16129
16130 func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
16131 return &pi, true
16132 }
16133
16134
16135 type ProtectionIntentQueryObject struct {
16136
16137 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
16138
16139 ItemType IntentItemType `json:"itemType,omitempty"`
16140
16141 ParentName *string `json:"parentName,omitempty"`
16142
16143 ItemName *string `json:"itemName,omitempty"`
16144 }
16145
16146
16147 type ProtectionIntentResource struct {
16148 autorest.Response `json:"-"`
16149
16150 Properties BasicProtectionIntent `json:"properties,omitempty"`
16151
16152 ID *string `json:"id,omitempty"`
16153
16154 Name *string `json:"name,omitempty"`
16155
16156 Type *string `json:"type,omitempty"`
16157
16158 Location *string `json:"location,omitempty"`
16159
16160 Tags map[string]*string `json:"tags"`
16161
16162 ETag *string `json:"eTag,omitempty"`
16163 }
16164
16165
16166 func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) {
16167 objectMap := make(map[string]interface{})
16168 objectMap["properties"] = pir.Properties
16169 if pir.Location != nil {
16170 objectMap["location"] = pir.Location
16171 }
16172 if pir.Tags != nil {
16173 objectMap["tags"] = pir.Tags
16174 }
16175 if pir.ETag != nil {
16176 objectMap["eTag"] = pir.ETag
16177 }
16178 return json.Marshal(objectMap)
16179 }
16180
16181
16182 func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error {
16183 var m map[string]*json.RawMessage
16184 err := json.Unmarshal(body, &m)
16185 if err != nil {
16186 return err
16187 }
16188 for k, v := range m {
16189 switch k {
16190 case "properties":
16191 if v != nil {
16192 properties, err := unmarshalBasicProtectionIntent(*v)
16193 if err != nil {
16194 return err
16195 }
16196 pir.Properties = properties
16197 }
16198 case "id":
16199 if v != nil {
16200 var ID string
16201 err = json.Unmarshal(*v, &ID)
16202 if err != nil {
16203 return err
16204 }
16205 pir.ID = &ID
16206 }
16207 case "name":
16208 if v != nil {
16209 var name string
16210 err = json.Unmarshal(*v, &name)
16211 if err != nil {
16212 return err
16213 }
16214 pir.Name = &name
16215 }
16216 case "type":
16217 if v != nil {
16218 var typeVar string
16219 err = json.Unmarshal(*v, &typeVar)
16220 if err != nil {
16221 return err
16222 }
16223 pir.Type = &typeVar
16224 }
16225 case "location":
16226 if v != nil {
16227 var location string
16228 err = json.Unmarshal(*v, &location)
16229 if err != nil {
16230 return err
16231 }
16232 pir.Location = &location
16233 }
16234 case "tags":
16235 if v != nil {
16236 var tags map[string]*string
16237 err = json.Unmarshal(*v, &tags)
16238 if err != nil {
16239 return err
16240 }
16241 pir.Tags = tags
16242 }
16243 case "eTag":
16244 if v != nil {
16245 var eTag string
16246 err = json.Unmarshal(*v, &eTag)
16247 if err != nil {
16248 return err
16249 }
16250 pir.ETag = &eTag
16251 }
16252 }
16253 }
16254
16255 return nil
16256 }
16257
16258
16259 type ProtectionIntentResourceList struct {
16260 autorest.Response `json:"-"`
16261
16262 Value *[]ProtectionIntentResource `json:"value,omitempty"`
16263
16264 NextLink *string `json:"nextLink,omitempty"`
16265 }
16266
16267
16268
16269 type ProtectionIntentResourceListIterator struct {
16270 i int
16271 page ProtectionIntentResourceListPage
16272 }
16273
16274
16275
16276 func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) {
16277 if tracing.IsEnabled() {
16278 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext")
16279 defer func() {
16280 sc := -1
16281 if iter.Response().Response.Response != nil {
16282 sc = iter.Response().Response.Response.StatusCode
16283 }
16284 tracing.EndSpan(ctx, sc, err)
16285 }()
16286 }
16287 iter.i++
16288 if iter.i < len(iter.page.Values()) {
16289 return nil
16290 }
16291 err = iter.page.NextWithContext(ctx)
16292 if err != nil {
16293 iter.i--
16294 return err
16295 }
16296 iter.i = 0
16297 return nil
16298 }
16299
16300
16301
16302
16303 func (iter *ProtectionIntentResourceListIterator) Next() error {
16304 return iter.NextWithContext(context.Background())
16305 }
16306
16307
16308 func (iter ProtectionIntentResourceListIterator) NotDone() bool {
16309 return iter.page.NotDone() && iter.i < len(iter.page.Values())
16310 }
16311
16312
16313 func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList {
16314 return iter.page.Response()
16315 }
16316
16317
16318
16319 func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource {
16320 if !iter.page.NotDone() {
16321 return ProtectionIntentResource{}
16322 }
16323 return iter.page.Values()[iter.i]
16324 }
16325
16326
16327 func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator {
16328 return ProtectionIntentResourceListIterator{page: page}
16329 }
16330
16331
16332 func (pirl ProtectionIntentResourceList) IsEmpty() bool {
16333 return pirl.Value == nil || len(*pirl.Value) == 0
16334 }
16335
16336
16337 func (pirl ProtectionIntentResourceList) hasNextLink() bool {
16338 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
16339 }
16340
16341
16342
16343 func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) {
16344 if !pirl.hasNextLink() {
16345 return nil, nil
16346 }
16347 return autorest.Prepare((&http.Request{}).WithContext(ctx),
16348 autorest.AsJSON(),
16349 autorest.AsGet(),
16350 autorest.WithBaseURL(to.String(pirl.NextLink)))
16351 }
16352
16353
16354 type ProtectionIntentResourceListPage struct {
16355 fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)
16356 pirl ProtectionIntentResourceList
16357 }
16358
16359
16360
16361 func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) {
16362 if tracing.IsEnabled() {
16363 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext")
16364 defer func() {
16365 sc := -1
16366 if page.Response().Response.Response != nil {
16367 sc = page.Response().Response.Response.StatusCode
16368 }
16369 tracing.EndSpan(ctx, sc, err)
16370 }()
16371 }
16372 for {
16373 next, err := page.fn(ctx, page.pirl)
16374 if err != nil {
16375 return err
16376 }
16377 page.pirl = next
16378 if !next.hasNextLink() || !next.IsEmpty() {
16379 break
16380 }
16381 }
16382 return nil
16383 }
16384
16385
16386
16387
16388 func (page *ProtectionIntentResourceListPage) Next() error {
16389 return page.NextWithContext(context.Background())
16390 }
16391
16392
16393 func (page ProtectionIntentResourceListPage) NotDone() bool {
16394 return !page.pirl.IsEmpty()
16395 }
16396
16397
16398 func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList {
16399 return page.pirl
16400 }
16401
16402
16403 func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource {
16404 if page.pirl.IsEmpty() {
16405 return nil
16406 }
16407 return *page.pirl.Value
16408 }
16409
16410
16411 func NewProtectionIntentResourceListPage(cur ProtectionIntentResourceList, getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage {
16412 return ProtectionIntentResourceListPage{
16413 fn: getNextPage,
16414 pirl: cur,
16415 }
16416 }
16417
16418
16419 type BasicProtectionPolicy interface {
16420 AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool)
16421 AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool)
16422 AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool)
16423 AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool)
16424 AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool)
16425 AsMabProtectionPolicy() (*MabProtectionPolicy, bool)
16426 AsProtectionPolicy() (*ProtectionPolicy, bool)
16427 }
16428
16429
16430
16431 type ProtectionPolicy struct {
16432
16433 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
16434
16435 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
16436 }
16437
16438 func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) {
16439 var m map[string]interface{}
16440 err := json.Unmarshal(body, &m)
16441 if err != nil {
16442 return nil, err
16443 }
16444
16445 switch m["backupManagementType"] {
16446 case string(BackupManagementTypeAzureWorkload):
16447 var avwpp AzureVMWorkloadProtectionPolicy
16448 err := json.Unmarshal(body, &avwpp)
16449 return avwpp, err
16450 case string(BackupManagementTypeAzureStorage):
16451 var afspp AzureFileShareProtectionPolicy
16452 err := json.Unmarshal(body, &afspp)
16453 return afspp, err
16454 case string(BackupManagementTypeAzureIaasVM):
16455 var aispp AzureIaaSVMProtectionPolicy
16456 err := json.Unmarshal(body, &aispp)
16457 return aispp, err
16458 case string(BackupManagementTypeAzureSQL):
16459 var aspp AzureSQLProtectionPolicy
16460 err := json.Unmarshal(body, &aspp)
16461 return aspp, err
16462 case string(BackupManagementTypeGenericProtectionPolicy):
16463 var gpp GenericProtectionPolicy
16464 err := json.Unmarshal(body, &gpp)
16465 return gpp, err
16466 case string(BackupManagementTypeMAB):
16467 var mpp MabProtectionPolicy
16468 err := json.Unmarshal(body, &mpp)
16469 return mpp, err
16470 default:
16471 var pp ProtectionPolicy
16472 err := json.Unmarshal(body, &pp)
16473 return pp, err
16474 }
16475 }
16476 func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) {
16477 var rawMessages []*json.RawMessage
16478 err := json.Unmarshal(body, &rawMessages)
16479 if err != nil {
16480 return nil, err
16481 }
16482
16483 ppArray := make([]BasicProtectionPolicy, len(rawMessages))
16484
16485 for index, rawMessage := range rawMessages {
16486 pp, err := unmarshalBasicProtectionPolicy(*rawMessage)
16487 if err != nil {
16488 return nil, err
16489 }
16490 ppArray[index] = pp
16491 }
16492 return ppArray, nil
16493 }
16494
16495
16496 func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) {
16497 pp.BackupManagementType = BackupManagementTypeProtectionPolicy
16498 objectMap := make(map[string]interface{})
16499 if pp.ProtectedItemsCount != nil {
16500 objectMap["protectedItemsCount"] = pp.ProtectedItemsCount
16501 }
16502 if pp.BackupManagementType != "" {
16503 objectMap["backupManagementType"] = pp.BackupManagementType
16504 }
16505 return json.Marshal(objectMap)
16506 }
16507
16508
16509 func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
16510 return nil, false
16511 }
16512
16513
16514 func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
16515 return nil, false
16516 }
16517
16518
16519 func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
16520 return nil, false
16521 }
16522
16523
16524 func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
16525 return nil, false
16526 }
16527
16528
16529 func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
16530 return nil, false
16531 }
16532
16533
16534 func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
16535 return nil, false
16536 }
16537
16538
16539 func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
16540 return &pp, true
16541 }
16542
16543
16544 func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
16545 return &pp, true
16546 }
16547
16548
16549 type ProtectionPolicyQueryObject struct {
16550
16551 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
16552
16553 FabricName *string `json:"fabricName,omitempty"`
16554
16555 WorkloadType WorkloadType `json:"workloadType,omitempty"`
16556 }
16557
16558
16559
16560 type ProtectionPolicyResource struct {
16561 autorest.Response `json:"-"`
16562
16563 Properties BasicProtectionPolicy `json:"properties,omitempty"`
16564
16565 ID *string `json:"id,omitempty"`
16566
16567 Name *string `json:"name,omitempty"`
16568
16569 Type *string `json:"type,omitempty"`
16570
16571 Location *string `json:"location,omitempty"`
16572
16573 Tags map[string]*string `json:"tags"`
16574
16575 ETag *string `json:"eTag,omitempty"`
16576 }
16577
16578
16579 func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) {
16580 objectMap := make(map[string]interface{})
16581 objectMap["properties"] = ppr.Properties
16582 if ppr.Location != nil {
16583 objectMap["location"] = ppr.Location
16584 }
16585 if ppr.Tags != nil {
16586 objectMap["tags"] = ppr.Tags
16587 }
16588 if ppr.ETag != nil {
16589 objectMap["eTag"] = ppr.ETag
16590 }
16591 return json.Marshal(objectMap)
16592 }
16593
16594
16595 func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error {
16596 var m map[string]*json.RawMessage
16597 err := json.Unmarshal(body, &m)
16598 if err != nil {
16599 return err
16600 }
16601 for k, v := range m {
16602 switch k {
16603 case "properties":
16604 if v != nil {
16605 properties, err := unmarshalBasicProtectionPolicy(*v)
16606 if err != nil {
16607 return err
16608 }
16609 ppr.Properties = properties
16610 }
16611 case "id":
16612 if v != nil {
16613 var ID string
16614 err = json.Unmarshal(*v, &ID)
16615 if err != nil {
16616 return err
16617 }
16618 ppr.ID = &ID
16619 }
16620 case "name":
16621 if v != nil {
16622 var name string
16623 err = json.Unmarshal(*v, &name)
16624 if err != nil {
16625 return err
16626 }
16627 ppr.Name = &name
16628 }
16629 case "type":
16630 if v != nil {
16631 var typeVar string
16632 err = json.Unmarshal(*v, &typeVar)
16633 if err != nil {
16634 return err
16635 }
16636 ppr.Type = &typeVar
16637 }
16638 case "location":
16639 if v != nil {
16640 var location string
16641 err = json.Unmarshal(*v, &location)
16642 if err != nil {
16643 return err
16644 }
16645 ppr.Location = &location
16646 }
16647 case "tags":
16648 if v != nil {
16649 var tags map[string]*string
16650 err = json.Unmarshal(*v, &tags)
16651 if err != nil {
16652 return err
16653 }
16654 ppr.Tags = tags
16655 }
16656 case "eTag":
16657 if v != nil {
16658 var eTag string
16659 err = json.Unmarshal(*v, &eTag)
16660 if err != nil {
16661 return err
16662 }
16663 ppr.ETag = &eTag
16664 }
16665 }
16666 }
16667
16668 return nil
16669 }
16670
16671
16672 type ProtectionPolicyResourceList struct {
16673 autorest.Response `json:"-"`
16674
16675 Value *[]ProtectionPolicyResource `json:"value,omitempty"`
16676
16677 NextLink *string `json:"nextLink,omitempty"`
16678 }
16679
16680
16681
16682 type ProtectionPolicyResourceListIterator struct {
16683 i int
16684 page ProtectionPolicyResourceListPage
16685 }
16686
16687
16688
16689 func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) {
16690 if tracing.IsEnabled() {
16691 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext")
16692 defer func() {
16693 sc := -1
16694 if iter.Response().Response.Response != nil {
16695 sc = iter.Response().Response.Response.StatusCode
16696 }
16697 tracing.EndSpan(ctx, sc, err)
16698 }()
16699 }
16700 iter.i++
16701 if iter.i < len(iter.page.Values()) {
16702 return nil
16703 }
16704 err = iter.page.NextWithContext(ctx)
16705 if err != nil {
16706 iter.i--
16707 return err
16708 }
16709 iter.i = 0
16710 return nil
16711 }
16712
16713
16714
16715
16716 func (iter *ProtectionPolicyResourceListIterator) Next() error {
16717 return iter.NextWithContext(context.Background())
16718 }
16719
16720
16721 func (iter ProtectionPolicyResourceListIterator) NotDone() bool {
16722 return iter.page.NotDone() && iter.i < len(iter.page.Values())
16723 }
16724
16725
16726 func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList {
16727 return iter.page.Response()
16728 }
16729
16730
16731
16732 func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource {
16733 if !iter.page.NotDone() {
16734 return ProtectionPolicyResource{}
16735 }
16736 return iter.page.Values()[iter.i]
16737 }
16738
16739
16740 func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator {
16741 return ProtectionPolicyResourceListIterator{page: page}
16742 }
16743
16744
16745 func (pprl ProtectionPolicyResourceList) IsEmpty() bool {
16746 return pprl.Value == nil || len(*pprl.Value) == 0
16747 }
16748
16749
16750 func (pprl ProtectionPolicyResourceList) hasNextLink() bool {
16751 return pprl.NextLink != nil && len(*pprl.NextLink) != 0
16752 }
16753
16754
16755
16756 func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) {
16757 if !pprl.hasNextLink() {
16758 return nil, nil
16759 }
16760 return autorest.Prepare((&http.Request{}).WithContext(ctx),
16761 autorest.AsJSON(),
16762 autorest.AsGet(),
16763 autorest.WithBaseURL(to.String(pprl.NextLink)))
16764 }
16765
16766
16767 type ProtectionPolicyResourceListPage struct {
16768 fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)
16769 pprl ProtectionPolicyResourceList
16770 }
16771
16772
16773
16774 func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) {
16775 if tracing.IsEnabled() {
16776 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext")
16777 defer func() {
16778 sc := -1
16779 if page.Response().Response.Response != nil {
16780 sc = page.Response().Response.Response.StatusCode
16781 }
16782 tracing.EndSpan(ctx, sc, err)
16783 }()
16784 }
16785 for {
16786 next, err := page.fn(ctx, page.pprl)
16787 if err != nil {
16788 return err
16789 }
16790 page.pprl = next
16791 if !next.hasNextLink() || !next.IsEmpty() {
16792 break
16793 }
16794 }
16795 return nil
16796 }
16797
16798
16799
16800
16801 func (page *ProtectionPolicyResourceListPage) Next() error {
16802 return page.NextWithContext(context.Background())
16803 }
16804
16805
16806 func (page ProtectionPolicyResourceListPage) NotDone() bool {
16807 return !page.pprl.IsEmpty()
16808 }
16809
16810
16811 func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList {
16812 return page.pprl
16813 }
16814
16815
16816 func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource {
16817 if page.pprl.IsEmpty() {
16818 return nil
16819 }
16820 return *page.pprl.Value
16821 }
16822
16823
16824 func NewProtectionPolicyResourceListPage(cur ProtectionPolicyResourceList, getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage {
16825 return ProtectionPolicyResourceListPage{
16826 fn: getNextPage,
16827 pprl: cur,
16828 }
16829 }
16830
16831
16832 type BasicRecoveryPoint interface {
16833 AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool)
16834 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
16835 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
16836 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
16837 AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool)
16838 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
16839 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
16840 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
16841 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
16842 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
16843 AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool)
16844 AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool)
16845 AsRecoveryPoint() (*RecoveryPoint, bool)
16846 }
16847
16848
16849 type RecoveryPoint struct {
16850
16851 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
16852 }
16853
16854 func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) {
16855 var m map[string]interface{}
16856 err := json.Unmarshal(body, &m)
16857 if err != nil {
16858 return nil, err
16859 }
16860
16861 switch m["objectType"] {
16862 case string(ObjectTypeAzureFileShareRecoveryPoint):
16863 var afsrp AzureFileShareRecoveryPoint
16864 err := json.Unmarshal(body, &afsrp)
16865 return afsrp, err
16866 case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
16867 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
16868 err := json.Unmarshal(body, &awpitrp)
16869 return awpitrp, err
16870 case string(ObjectTypeAzureWorkloadRecoveryPoint):
16871 var awrp AzureWorkloadRecoveryPoint
16872 err := json.Unmarshal(body, &awrp)
16873 return awrp, err
16874 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
16875 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
16876 err := json.Unmarshal(body, &awshpitrp)
16877 return awshpitrp, err
16878 case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
16879 var awshrp AzureWorkloadSAPHanaRecoveryPoint
16880 err := json.Unmarshal(body, &awshrp)
16881 return awshrp, err
16882 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
16883 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
16884 err := json.Unmarshal(body, &awspitrp)
16885 return awspitrp, err
16886 case string(ObjectTypeAzureWorkloadSQLRecoveryPoint):
16887 var awsrp AzureWorkloadSQLRecoveryPoint
16888 err := json.Unmarshal(body, &awsrp)
16889 return awsrp, err
16890 case string(ObjectTypeGenericRecoveryPoint):
16891 var grp GenericRecoveryPoint
16892 err := json.Unmarshal(body, &grp)
16893 return grp, err
16894 case string(ObjectTypeIaasVMRecoveryPoint):
16895 var ivrp IaasVMRecoveryPoint
16896 err := json.Unmarshal(body, &ivrp)
16897 return ivrp, err
16898 default:
16899 var rp RecoveryPoint
16900 err := json.Unmarshal(body, &rp)
16901 return rp, err
16902 }
16903 }
16904 func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) {
16905 var rawMessages []*json.RawMessage
16906 err := json.Unmarshal(body, &rawMessages)
16907 if err != nil {
16908 return nil, err
16909 }
16910
16911 rpArray := make([]BasicRecoveryPoint, len(rawMessages))
16912
16913 for index, rawMessage := range rawMessages {
16914 rp, err := unmarshalBasicRecoveryPoint(*rawMessage)
16915 if err != nil {
16916 return nil, err
16917 }
16918 rpArray[index] = rp
16919 }
16920 return rpArray, nil
16921 }
16922
16923
16924 func (rp RecoveryPoint) MarshalJSON() ([]byte, error) {
16925 rp.ObjectType = ObjectTypeRecoveryPoint
16926 objectMap := make(map[string]interface{})
16927 if rp.ObjectType != "" {
16928 objectMap["objectType"] = rp.ObjectType
16929 }
16930 return json.Marshal(objectMap)
16931 }
16932
16933
16934 func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
16935 return nil, false
16936 }
16937
16938
16939 func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
16940 return nil, false
16941 }
16942
16943
16944 func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
16945 return nil, false
16946 }
16947
16948
16949 func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
16950 return nil, false
16951 }
16952
16953
16954 func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
16955 return nil, false
16956 }
16957
16958
16959 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
16960 return nil, false
16961 }
16962
16963
16964 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
16965 return nil, false
16966 }
16967
16968
16969 func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
16970 return nil, false
16971 }
16972
16973
16974 func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
16975 return nil, false
16976 }
16977
16978
16979 func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
16980 return nil, false
16981 }
16982
16983
16984 func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
16985 return nil, false
16986 }
16987
16988
16989 func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
16990 return nil, false
16991 }
16992
16993
16994 func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
16995 return &rp, true
16996 }
16997
16998
16999 func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
17000 return &rp, true
17001 }
17002
17003
17004 type RecoveryPointDiskConfiguration struct {
17005
17006 NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"`
17007
17008 NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"`
17009
17010 IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"`
17011
17012 ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"`
17013 }
17014
17015
17016
17017 type RecoveryPointResource struct {
17018 autorest.Response `json:"-"`
17019
17020 Properties BasicRecoveryPoint `json:"properties,omitempty"`
17021
17022 ID *string `json:"id,omitempty"`
17023
17024 Name *string `json:"name,omitempty"`
17025
17026 Type *string `json:"type,omitempty"`
17027
17028 Location *string `json:"location,omitempty"`
17029
17030 Tags map[string]*string `json:"tags"`
17031
17032 ETag *string `json:"eTag,omitempty"`
17033 }
17034
17035
17036 func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) {
17037 objectMap := make(map[string]interface{})
17038 objectMap["properties"] = rpr.Properties
17039 if rpr.Location != nil {
17040 objectMap["location"] = rpr.Location
17041 }
17042 if rpr.Tags != nil {
17043 objectMap["tags"] = rpr.Tags
17044 }
17045 if rpr.ETag != nil {
17046 objectMap["eTag"] = rpr.ETag
17047 }
17048 return json.Marshal(objectMap)
17049 }
17050
17051
17052 func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error {
17053 var m map[string]*json.RawMessage
17054 err := json.Unmarshal(body, &m)
17055 if err != nil {
17056 return err
17057 }
17058 for k, v := range m {
17059 switch k {
17060 case "properties":
17061 if v != nil {
17062 properties, err := unmarshalBasicRecoveryPoint(*v)
17063 if err != nil {
17064 return err
17065 }
17066 rpr.Properties = properties
17067 }
17068 case "id":
17069 if v != nil {
17070 var ID string
17071 err = json.Unmarshal(*v, &ID)
17072 if err != nil {
17073 return err
17074 }
17075 rpr.ID = &ID
17076 }
17077 case "name":
17078 if v != nil {
17079 var name string
17080 err = json.Unmarshal(*v, &name)
17081 if err != nil {
17082 return err
17083 }
17084 rpr.Name = &name
17085 }
17086 case "type":
17087 if v != nil {
17088 var typeVar string
17089 err = json.Unmarshal(*v, &typeVar)
17090 if err != nil {
17091 return err
17092 }
17093 rpr.Type = &typeVar
17094 }
17095 case "location":
17096 if v != nil {
17097 var location string
17098 err = json.Unmarshal(*v, &location)
17099 if err != nil {
17100 return err
17101 }
17102 rpr.Location = &location
17103 }
17104 case "tags":
17105 if v != nil {
17106 var tags map[string]*string
17107 err = json.Unmarshal(*v, &tags)
17108 if err != nil {
17109 return err
17110 }
17111 rpr.Tags = tags
17112 }
17113 case "eTag":
17114 if v != nil {
17115 var eTag string
17116 err = json.Unmarshal(*v, &eTag)
17117 if err != nil {
17118 return err
17119 }
17120 rpr.ETag = &eTag
17121 }
17122 }
17123 }
17124
17125 return nil
17126 }
17127
17128
17129 type RecoveryPointResourceList struct {
17130 autorest.Response `json:"-"`
17131
17132 Value *[]RecoveryPointResource `json:"value,omitempty"`
17133
17134 NextLink *string `json:"nextLink,omitempty"`
17135 }
17136
17137
17138 type RecoveryPointResourceListIterator struct {
17139 i int
17140 page RecoveryPointResourceListPage
17141 }
17142
17143
17144
17145 func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) {
17146 if tracing.IsEnabled() {
17147 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext")
17148 defer func() {
17149 sc := -1
17150 if iter.Response().Response.Response != nil {
17151 sc = iter.Response().Response.Response.StatusCode
17152 }
17153 tracing.EndSpan(ctx, sc, err)
17154 }()
17155 }
17156 iter.i++
17157 if iter.i < len(iter.page.Values()) {
17158 return nil
17159 }
17160 err = iter.page.NextWithContext(ctx)
17161 if err != nil {
17162 iter.i--
17163 return err
17164 }
17165 iter.i = 0
17166 return nil
17167 }
17168
17169
17170
17171
17172 func (iter *RecoveryPointResourceListIterator) Next() error {
17173 return iter.NextWithContext(context.Background())
17174 }
17175
17176
17177 func (iter RecoveryPointResourceListIterator) NotDone() bool {
17178 return iter.page.NotDone() && iter.i < len(iter.page.Values())
17179 }
17180
17181
17182 func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList {
17183 return iter.page.Response()
17184 }
17185
17186
17187
17188 func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource {
17189 if !iter.page.NotDone() {
17190 return RecoveryPointResource{}
17191 }
17192 return iter.page.Values()[iter.i]
17193 }
17194
17195
17196 func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator {
17197 return RecoveryPointResourceListIterator{page: page}
17198 }
17199
17200
17201 func (rprl RecoveryPointResourceList) IsEmpty() bool {
17202 return rprl.Value == nil || len(*rprl.Value) == 0
17203 }
17204
17205
17206 func (rprl RecoveryPointResourceList) hasNextLink() bool {
17207 return rprl.NextLink != nil && len(*rprl.NextLink) != 0
17208 }
17209
17210
17211
17212 func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) {
17213 if !rprl.hasNextLink() {
17214 return nil, nil
17215 }
17216 return autorest.Prepare((&http.Request{}).WithContext(ctx),
17217 autorest.AsJSON(),
17218 autorest.AsGet(),
17219 autorest.WithBaseURL(to.String(rprl.NextLink)))
17220 }
17221
17222
17223 type RecoveryPointResourceListPage struct {
17224 fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)
17225 rprl RecoveryPointResourceList
17226 }
17227
17228
17229
17230 func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) {
17231 if tracing.IsEnabled() {
17232 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext")
17233 defer func() {
17234 sc := -1
17235 if page.Response().Response.Response != nil {
17236 sc = page.Response().Response.Response.StatusCode
17237 }
17238 tracing.EndSpan(ctx, sc, err)
17239 }()
17240 }
17241 for {
17242 next, err := page.fn(ctx, page.rprl)
17243 if err != nil {
17244 return err
17245 }
17246 page.rprl = next
17247 if !next.hasNextLink() || !next.IsEmpty() {
17248 break
17249 }
17250 }
17251 return nil
17252 }
17253
17254
17255
17256
17257 func (page *RecoveryPointResourceListPage) Next() error {
17258 return page.NextWithContext(context.Background())
17259 }
17260
17261
17262 func (page RecoveryPointResourceListPage) NotDone() bool {
17263 return !page.rprl.IsEmpty()
17264 }
17265
17266
17267 func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList {
17268 return page.rprl
17269 }
17270
17271
17272 func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource {
17273 if page.rprl.IsEmpty() {
17274 return nil
17275 }
17276 return *page.rprl.Value
17277 }
17278
17279
17280 func NewRecoveryPointResourceListPage(cur RecoveryPointResourceList, getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage {
17281 return RecoveryPointResourceListPage{
17282 fn: getNextPage,
17283 rprl: cur,
17284 }
17285 }
17286
17287
17288 type RecoveryPointTierInformation struct {
17289
17290 Type RecoveryPointTierType `json:"type,omitempty"`
17291
17292 Status RecoveryPointTierStatus `json:"status,omitempty"`
17293 }
17294
17295
17296 type BasicRequest interface {
17297 AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool)
17298 AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool)
17299 AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool)
17300 AsRequest() (*Request, bool)
17301 }
17302
17303
17304 type Request struct {
17305
17306 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
17307 }
17308
17309 func unmarshalBasicRequest(body []byte) (BasicRequest, error) {
17310 var m map[string]interface{}
17311 err := json.Unmarshal(body, &m)
17312 if err != nil {
17313 return nil, err
17314 }
17315
17316 switch m["objectType"] {
17317 case string(ObjectTypeAzureFileShareBackupRequest):
17318 var afsbr AzureFileShareBackupRequest
17319 err := json.Unmarshal(body, &afsbr)
17320 return afsbr, err
17321 case string(ObjectTypeAzureWorkloadBackupRequest):
17322 var awbr AzureWorkloadBackupRequest
17323 err := json.Unmarshal(body, &awbr)
17324 return awbr, err
17325 case string(ObjectTypeIaasVMBackupRequest):
17326 var ivbr IaasVMBackupRequest
17327 err := json.Unmarshal(body, &ivbr)
17328 return ivbr, err
17329 default:
17330 var r Request
17331 err := json.Unmarshal(body, &r)
17332 return r, err
17333 }
17334 }
17335 func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) {
17336 var rawMessages []*json.RawMessage
17337 err := json.Unmarshal(body, &rawMessages)
17338 if err != nil {
17339 return nil, err
17340 }
17341
17342 rArray := make([]BasicRequest, len(rawMessages))
17343
17344 for index, rawMessage := range rawMessages {
17345 r, err := unmarshalBasicRequest(*rawMessage)
17346 if err != nil {
17347 return nil, err
17348 }
17349 rArray[index] = r
17350 }
17351 return rArray, nil
17352 }
17353
17354
17355 func (r Request) MarshalJSON() ([]byte, error) {
17356 r.ObjectType = ObjectTypeBackupRequest
17357 objectMap := make(map[string]interface{})
17358 if r.ObjectType != "" {
17359 objectMap["objectType"] = r.ObjectType
17360 }
17361 return json.Marshal(objectMap)
17362 }
17363
17364
17365 func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
17366 return nil, false
17367 }
17368
17369
17370 func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
17371 return nil, false
17372 }
17373
17374
17375 func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
17376 return nil, false
17377 }
17378
17379
17380 func (r Request) AsRequest() (*Request, bool) {
17381 return &r, true
17382 }
17383
17384
17385 func (r Request) AsBasicRequest() (BasicRequest, bool) {
17386 return &r, true
17387 }
17388
17389
17390
17391 type RequestResource struct {
17392
17393 Properties BasicRequest `json:"properties,omitempty"`
17394
17395 ID *string `json:"id,omitempty"`
17396
17397 Name *string `json:"name,omitempty"`
17398
17399 Type *string `json:"type,omitempty"`
17400
17401 Location *string `json:"location,omitempty"`
17402
17403 Tags map[string]*string `json:"tags"`
17404
17405 ETag *string `json:"eTag,omitempty"`
17406 }
17407
17408
17409 func (rr RequestResource) MarshalJSON() ([]byte, error) {
17410 objectMap := make(map[string]interface{})
17411 objectMap["properties"] = rr.Properties
17412 if rr.Location != nil {
17413 objectMap["location"] = rr.Location
17414 }
17415 if rr.Tags != nil {
17416 objectMap["tags"] = rr.Tags
17417 }
17418 if rr.ETag != nil {
17419 objectMap["eTag"] = rr.ETag
17420 }
17421 return json.Marshal(objectMap)
17422 }
17423
17424
17425 func (rr *RequestResource) UnmarshalJSON(body []byte) error {
17426 var m map[string]*json.RawMessage
17427 err := json.Unmarshal(body, &m)
17428 if err != nil {
17429 return err
17430 }
17431 for k, v := range m {
17432 switch k {
17433 case "properties":
17434 if v != nil {
17435 properties, err := unmarshalBasicRequest(*v)
17436 if err != nil {
17437 return err
17438 }
17439 rr.Properties = properties
17440 }
17441 case "id":
17442 if v != nil {
17443 var ID string
17444 err = json.Unmarshal(*v, &ID)
17445 if err != nil {
17446 return err
17447 }
17448 rr.ID = &ID
17449 }
17450 case "name":
17451 if v != nil {
17452 var name string
17453 err = json.Unmarshal(*v, &name)
17454 if err != nil {
17455 return err
17456 }
17457 rr.Name = &name
17458 }
17459 case "type":
17460 if v != nil {
17461 var typeVar string
17462 err = json.Unmarshal(*v, &typeVar)
17463 if err != nil {
17464 return err
17465 }
17466 rr.Type = &typeVar
17467 }
17468 case "location":
17469 if v != nil {
17470 var location string
17471 err = json.Unmarshal(*v, &location)
17472 if err != nil {
17473 return err
17474 }
17475 rr.Location = &location
17476 }
17477 case "tags":
17478 if v != nil {
17479 var tags map[string]*string
17480 err = json.Unmarshal(*v, &tags)
17481 if err != nil {
17482 return err
17483 }
17484 rr.Tags = tags
17485 }
17486 case "eTag":
17487 if v != nil {
17488 var eTag string
17489 err = json.Unmarshal(*v, &eTag)
17490 if err != nil {
17491 return err
17492 }
17493 rr.ETag = &eTag
17494 }
17495 }
17496 }
17497
17498 return nil
17499 }
17500
17501
17502 type Resource struct {
17503
17504 ID *string `json:"id,omitempty"`
17505
17506 Name *string `json:"name,omitempty"`
17507
17508 Type *string `json:"type,omitempty"`
17509
17510 Location *string `json:"location,omitempty"`
17511
17512 Tags map[string]*string `json:"tags"`
17513
17514 ETag *string `json:"eTag,omitempty"`
17515 }
17516
17517
17518 func (r Resource) MarshalJSON() ([]byte, error) {
17519 objectMap := make(map[string]interface{})
17520 if r.Location != nil {
17521 objectMap["location"] = r.Location
17522 }
17523 if r.Tags != nil {
17524 objectMap["tags"] = r.Tags
17525 }
17526 if r.ETag != nil {
17527 objectMap["eTag"] = r.ETag
17528 }
17529 return json.Marshal(objectMap)
17530 }
17531
17532
17533 type ResourceConfig struct {
17534
17535 StorageModelType StorageType `json:"storageModelType,omitempty"`
17536
17537 StorageType StorageType `json:"storageType,omitempty"`
17538
17539 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
17540 }
17541
17542
17543 type ResourceConfigResource struct {
17544 autorest.Response `json:"-"`
17545
17546 Properties *ResourceConfig `json:"properties,omitempty"`
17547
17548 ID *string `json:"id,omitempty"`
17549
17550 Name *string `json:"name,omitempty"`
17551
17552 Type *string `json:"type,omitempty"`
17553
17554 Location *string `json:"location,omitempty"`
17555
17556 Tags map[string]*string `json:"tags"`
17557
17558 ETag *string `json:"eTag,omitempty"`
17559 }
17560
17561
17562 func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) {
17563 objectMap := make(map[string]interface{})
17564 if rcr.Properties != nil {
17565 objectMap["properties"] = rcr.Properties
17566 }
17567 if rcr.Location != nil {
17568 objectMap["location"] = rcr.Location
17569 }
17570 if rcr.Tags != nil {
17571 objectMap["tags"] = rcr.Tags
17572 }
17573 if rcr.ETag != nil {
17574 objectMap["eTag"] = rcr.ETag
17575 }
17576 return json.Marshal(objectMap)
17577 }
17578
17579
17580 type ResourceHealthDetails struct {
17581
17582 Code *int32 `json:"code,omitempty"`
17583
17584 Title *string `json:"title,omitempty"`
17585
17586 Message *string `json:"message,omitempty"`
17587
17588 Recommendations *[]string `json:"recommendations,omitempty"`
17589 }
17590
17591
17592 func (rhd ResourceHealthDetails) MarshalJSON() ([]byte, error) {
17593 objectMap := make(map[string]interface{})
17594 return json.Marshal(objectMap)
17595 }
17596
17597
17598 type ResourceList struct {
17599
17600 NextLink *string `json:"nextLink,omitempty"`
17601 }
17602
17603
17604 type ResourceVaultConfig struct {
17605
17606 StorageModelType StorageType `json:"storageModelType,omitempty"`
17607
17608 StorageType StorageType `json:"storageType,omitempty"`
17609
17610 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
17611
17612 EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"`
17613
17614 SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"`
17615 }
17616
17617
17618 type ResourceVaultConfigResource struct {
17619 autorest.Response `json:"-"`
17620
17621 Properties *ResourceVaultConfig `json:"properties,omitempty"`
17622
17623 ID *string `json:"id,omitempty"`
17624
17625 Name *string `json:"name,omitempty"`
17626
17627 Type *string `json:"type,omitempty"`
17628
17629 Location *string `json:"location,omitempty"`
17630
17631 Tags map[string]*string `json:"tags"`
17632
17633 ETag *string `json:"eTag,omitempty"`
17634 }
17635
17636
17637 func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) {
17638 objectMap := make(map[string]interface{})
17639 if rvcr.Properties != nil {
17640 objectMap["properties"] = rvcr.Properties
17641 }
17642 if rvcr.Location != nil {
17643 objectMap["location"] = rvcr.Location
17644 }
17645 if rvcr.Tags != nil {
17646 objectMap["tags"] = rvcr.Tags
17647 }
17648 if rvcr.ETag != nil {
17649 objectMap["eTag"] = rvcr.ETag
17650 }
17651 return json.Marshal(objectMap)
17652 }
17653
17654
17655 type RestoreFileSpecs struct {
17656
17657 Path *string `json:"path,omitempty"`
17658
17659 FileSpecType *string `json:"fileSpecType,omitempty"`
17660
17661 TargetFolderPath *string `json:"targetFolderPath,omitempty"`
17662 }
17663
17664
17665 type BasicRestoreRequest interface {
17666 AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool)
17667 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
17668 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
17669 AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool)
17670 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
17671 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
17672 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
17673 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
17674 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
17675 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
17676 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
17677 AsRestoreRequest() (*RestoreRequest, bool)
17678 }
17679
17680
17681
17682 type RestoreRequest struct {
17683
17684 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
17685 }
17686
17687 func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) {
17688 var m map[string]interface{}
17689 err := json.Unmarshal(body, &m)
17690 if err != nil {
17691 return nil, err
17692 }
17693
17694 switch m["objectType"] {
17695 case string(ObjectTypeAzureFileShareRestoreRequest):
17696 var afsrr AzureFileShareRestoreRequest
17697 err := json.Unmarshal(body, &afsrr)
17698 return afsrr, err
17699 case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest):
17700 var awpitrr AzureWorkloadPointInTimeRestoreRequest
17701 err := json.Unmarshal(body, &awpitrr)
17702 return awpitrr, err
17703 case string(ObjectTypeAzureWorkloadRestoreRequest):
17704 var awrr AzureWorkloadRestoreRequest
17705 err := json.Unmarshal(body, &awrr)
17706 return awrr, err
17707 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
17708 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
17709 err := json.Unmarshal(body, &awshpitrr)
17710 return awshpitrr, err
17711 case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest):
17712 var awshrr AzureWorkloadSAPHanaRestoreRequest
17713 err := json.Unmarshal(body, &awshrr)
17714 return awshrr, err
17715 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
17716 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
17717 err := json.Unmarshal(body, &awspitrr)
17718 return awspitrr, err
17719 case string(ObjectTypeAzureWorkloadSQLRestoreRequest):
17720 var awsrr AzureWorkloadSQLRestoreRequest
17721 err := json.Unmarshal(body, &awsrr)
17722 return awsrr, err
17723 case string(ObjectTypeIaasVMRestoreRequest):
17724 var ivrr IaasVMRestoreRequest
17725 err := json.Unmarshal(body, &ivrr)
17726 return ivrr, err
17727 default:
17728 var rr RestoreRequest
17729 err := json.Unmarshal(body, &rr)
17730 return rr, err
17731 }
17732 }
17733 func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) {
17734 var rawMessages []*json.RawMessage
17735 err := json.Unmarshal(body, &rawMessages)
17736 if err != nil {
17737 return nil, err
17738 }
17739
17740 rrArray := make([]BasicRestoreRequest, len(rawMessages))
17741
17742 for index, rawMessage := range rawMessages {
17743 rr, err := unmarshalBasicRestoreRequest(*rawMessage)
17744 if err != nil {
17745 return nil, err
17746 }
17747 rrArray[index] = rr
17748 }
17749 return rrArray, nil
17750 }
17751
17752
17753 func (rr RestoreRequest) MarshalJSON() ([]byte, error) {
17754 rr.ObjectType = ObjectTypeRestoreRequest
17755 objectMap := make(map[string]interface{})
17756 if rr.ObjectType != "" {
17757 objectMap["objectType"] = rr.ObjectType
17758 }
17759 return json.Marshal(objectMap)
17760 }
17761
17762
17763 func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
17764 return nil, false
17765 }
17766
17767
17768 func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
17769 return nil, false
17770 }
17771
17772
17773 func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
17774 return nil, false
17775 }
17776
17777
17778 func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
17779 return nil, false
17780 }
17781
17782
17783 func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
17784 return nil, false
17785 }
17786
17787
17788 func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
17789 return nil, false
17790 }
17791
17792
17793 func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
17794 return nil, false
17795 }
17796
17797
17798 func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
17799 return nil, false
17800 }
17801
17802
17803 func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
17804 return nil, false
17805 }
17806
17807
17808 func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
17809 return nil, false
17810 }
17811
17812
17813 func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
17814 return nil, false
17815 }
17816
17817
17818 func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
17819 return &rr, true
17820 }
17821
17822
17823 func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
17824 return &rr, true
17825 }
17826
17827
17828
17829 type RestoreRequestResource struct {
17830
17831 Properties BasicRestoreRequest `json:"properties,omitempty"`
17832
17833 ID *string `json:"id,omitempty"`
17834
17835 Name *string `json:"name,omitempty"`
17836
17837 Type *string `json:"type,omitempty"`
17838
17839 Location *string `json:"location,omitempty"`
17840
17841 Tags map[string]*string `json:"tags"`
17842
17843 ETag *string `json:"eTag,omitempty"`
17844 }
17845
17846
17847 func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) {
17848 objectMap := make(map[string]interface{})
17849 objectMap["properties"] = rrr.Properties
17850 if rrr.Location != nil {
17851 objectMap["location"] = rrr.Location
17852 }
17853 if rrr.Tags != nil {
17854 objectMap["tags"] = rrr.Tags
17855 }
17856 if rrr.ETag != nil {
17857 objectMap["eTag"] = rrr.ETag
17858 }
17859 return json.Marshal(objectMap)
17860 }
17861
17862
17863 func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error {
17864 var m map[string]*json.RawMessage
17865 err := json.Unmarshal(body, &m)
17866 if err != nil {
17867 return err
17868 }
17869 for k, v := range m {
17870 switch k {
17871 case "properties":
17872 if v != nil {
17873 properties, err := unmarshalBasicRestoreRequest(*v)
17874 if err != nil {
17875 return err
17876 }
17877 rrr.Properties = properties
17878 }
17879 case "id":
17880 if v != nil {
17881 var ID string
17882 err = json.Unmarshal(*v, &ID)
17883 if err != nil {
17884 return err
17885 }
17886 rrr.ID = &ID
17887 }
17888 case "name":
17889 if v != nil {
17890 var name string
17891 err = json.Unmarshal(*v, &name)
17892 if err != nil {
17893 return err
17894 }
17895 rrr.Name = &name
17896 }
17897 case "type":
17898 if v != nil {
17899 var typeVar string
17900 err = json.Unmarshal(*v, &typeVar)
17901 if err != nil {
17902 return err
17903 }
17904 rrr.Type = &typeVar
17905 }
17906 case "location":
17907 if v != nil {
17908 var location string
17909 err = json.Unmarshal(*v, &location)
17910 if err != nil {
17911 return err
17912 }
17913 rrr.Location = &location
17914 }
17915 case "tags":
17916 if v != nil {
17917 var tags map[string]*string
17918 err = json.Unmarshal(*v, &tags)
17919 if err != nil {
17920 return err
17921 }
17922 rrr.Tags = tags
17923 }
17924 case "eTag":
17925 if v != nil {
17926 var eTag string
17927 err = json.Unmarshal(*v, &eTag)
17928 if err != nil {
17929 return err
17930 }
17931 rrr.ETag = &eTag
17932 }
17933 }
17934 }
17935
17936 return nil
17937 }
17938
17939
17940 type RetentionDuration struct {
17941
17942
17943 Count *int32 `json:"count,omitempty"`
17944
17945 DurationType RetentionDurationType `json:"durationType,omitempty"`
17946 }
17947
17948
17949 type BasicRetentionPolicy interface {
17950 AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool)
17951 AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool)
17952 AsRetentionPolicy() (*RetentionPolicy, bool)
17953 }
17954
17955
17956 type RetentionPolicy struct {
17957
17958 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
17959 }
17960
17961 func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) {
17962 var m map[string]interface{}
17963 err := json.Unmarshal(body, &m)
17964 if err != nil {
17965 return nil, err
17966 }
17967
17968 switch m["retentionPolicyType"] {
17969 case string(RetentionPolicyTypeLongTermRetentionPolicy):
17970 var ltrp LongTermRetentionPolicy
17971 err := json.Unmarshal(body, <rp)
17972 return ltrp, err
17973 case string(RetentionPolicyTypeSimpleRetentionPolicy):
17974 var srp SimpleRetentionPolicy
17975 err := json.Unmarshal(body, &srp)
17976 return srp, err
17977 default:
17978 var rp RetentionPolicy
17979 err := json.Unmarshal(body, &rp)
17980 return rp, err
17981 }
17982 }
17983 func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) {
17984 var rawMessages []*json.RawMessage
17985 err := json.Unmarshal(body, &rawMessages)
17986 if err != nil {
17987 return nil, err
17988 }
17989
17990 rpArray := make([]BasicRetentionPolicy, len(rawMessages))
17991
17992 for index, rawMessage := range rawMessages {
17993 rp, err := unmarshalBasicRetentionPolicy(*rawMessage)
17994 if err != nil {
17995 return nil, err
17996 }
17997 rpArray[index] = rp
17998 }
17999 return rpArray, nil
18000 }
18001
18002
18003 func (rp RetentionPolicy) MarshalJSON() ([]byte, error) {
18004 rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy
18005 objectMap := make(map[string]interface{})
18006 if rp.RetentionPolicyType != "" {
18007 objectMap["retentionPolicyType"] = rp.RetentionPolicyType
18008 }
18009 return json.Marshal(objectMap)
18010 }
18011
18012
18013 func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
18014 return nil, false
18015 }
18016
18017
18018 func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
18019 return nil, false
18020 }
18021
18022
18023 func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
18024 return &rp, true
18025 }
18026
18027
18028 func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
18029 return &rp, true
18030 }
18031
18032
18033 type BasicSchedulePolicy interface {
18034 AsLogSchedulePolicy() (*LogSchedulePolicy, bool)
18035 AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool)
18036 AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool)
18037 AsSchedulePolicy() (*SchedulePolicy, bool)
18038 }
18039
18040
18041 type SchedulePolicy struct {
18042
18043 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
18044 }
18045
18046 func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) {
18047 var m map[string]interface{}
18048 err := json.Unmarshal(body, &m)
18049 if err != nil {
18050 return nil, err
18051 }
18052
18053 switch m["schedulePolicyType"] {
18054 case string(SchedulePolicyTypeLogSchedulePolicy):
18055 var lsp LogSchedulePolicy
18056 err := json.Unmarshal(body, &lsp)
18057 return lsp, err
18058 case string(SchedulePolicyTypeLongTermSchedulePolicy):
18059 var ltsp LongTermSchedulePolicy
18060 err := json.Unmarshal(body, <sp)
18061 return ltsp, err
18062 case string(SchedulePolicyTypeSimpleSchedulePolicy):
18063 var ssp SimpleSchedulePolicy
18064 err := json.Unmarshal(body, &ssp)
18065 return ssp, err
18066 default:
18067 var sp SchedulePolicy
18068 err := json.Unmarshal(body, &sp)
18069 return sp, err
18070 }
18071 }
18072 func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) {
18073 var rawMessages []*json.RawMessage
18074 err := json.Unmarshal(body, &rawMessages)
18075 if err != nil {
18076 return nil, err
18077 }
18078
18079 spArray := make([]BasicSchedulePolicy, len(rawMessages))
18080
18081 for index, rawMessage := range rawMessages {
18082 sp, err := unmarshalBasicSchedulePolicy(*rawMessage)
18083 if err != nil {
18084 return nil, err
18085 }
18086 spArray[index] = sp
18087 }
18088 return spArray, nil
18089 }
18090
18091
18092 func (sp SchedulePolicy) MarshalJSON() ([]byte, error) {
18093 sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy
18094 objectMap := make(map[string]interface{})
18095 if sp.SchedulePolicyType != "" {
18096 objectMap["schedulePolicyType"] = sp.SchedulePolicyType
18097 }
18098 return json.Marshal(objectMap)
18099 }
18100
18101
18102 func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
18103 return nil, false
18104 }
18105
18106
18107 func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
18108 return nil, false
18109 }
18110
18111
18112 func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
18113 return nil, false
18114 }
18115
18116
18117 func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
18118 return &sp, true
18119 }
18120
18121
18122 func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
18123 return &sp, true
18124 }
18125
18126
18127 type Settings struct {
18128
18129 TimeZone *string `json:"timeZone,omitempty"`
18130
18131 Issqlcompression *bool `json:"issqlcompression,omitempty"`
18132
18133
18134 IsCompression *bool `json:"isCompression,omitempty"`
18135 }
18136
18137
18138 type SimpleRetentionPolicy struct {
18139
18140 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
18141
18142 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
18143 }
18144
18145
18146 func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) {
18147 srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy
18148 objectMap := make(map[string]interface{})
18149 if srp.RetentionDuration != nil {
18150 objectMap["retentionDuration"] = srp.RetentionDuration
18151 }
18152 if srp.RetentionPolicyType != "" {
18153 objectMap["retentionPolicyType"] = srp.RetentionPolicyType
18154 }
18155 return json.Marshal(objectMap)
18156 }
18157
18158
18159 func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
18160 return nil, false
18161 }
18162
18163
18164 func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
18165 return &srp, true
18166 }
18167
18168
18169 func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
18170 return nil, false
18171 }
18172
18173
18174 func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
18175 return &srp, true
18176 }
18177
18178
18179 type SimpleSchedulePolicy struct {
18180
18181 ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"`
18182
18183 ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"`
18184
18185 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"`
18186
18187 ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"`
18188
18189 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
18190 }
18191
18192
18193 func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) {
18194 ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy
18195 objectMap := make(map[string]interface{})
18196 if ssp.ScheduleRunFrequency != "" {
18197 objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency
18198 }
18199 if ssp.ScheduleRunDays != nil {
18200 objectMap["scheduleRunDays"] = ssp.ScheduleRunDays
18201 }
18202 if ssp.ScheduleRunTimes != nil {
18203 objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes
18204 }
18205 if ssp.ScheduleWeeklyFrequency != nil {
18206 objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency
18207 }
18208 if ssp.SchedulePolicyType != "" {
18209 objectMap["schedulePolicyType"] = ssp.SchedulePolicyType
18210 }
18211 return json.Marshal(objectMap)
18212 }
18213
18214
18215 func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
18216 return nil, false
18217 }
18218
18219
18220 func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
18221 return nil, false
18222 }
18223
18224
18225 func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
18226 return &ssp, true
18227 }
18228
18229
18230 func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
18231 return nil, false
18232 }
18233
18234
18235 func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
18236 return &ssp, true
18237 }
18238
18239
18240 type SQLDataDirectory struct {
18241
18242 Type SQLDataDirectoryType `json:"type,omitempty"`
18243
18244 Path *string `json:"path,omitempty"`
18245
18246 LogicalName *string `json:"logicalName,omitempty"`
18247 }
18248
18249
18250 type SQLDataDirectoryMapping struct {
18251
18252 MappingType SQLDataDirectoryType `json:"mappingType,omitempty"`
18253
18254 SourceLogicalName *string `json:"sourceLogicalName,omitempty"`
18255
18256 SourcePath *string `json:"sourcePath,omitempty"`
18257
18258 TargetPath *string `json:"targetPath,omitempty"`
18259 }
18260
18261
18262 type StatusRequest struct {
18263
18264 ResourceType DataSourceType `json:"resourceType,omitempty"`
18265
18266 ResourceID *string `json:"resourceId,omitempty"`
18267
18268 PoLogicalName *string `json:"poLogicalName,omitempty"`
18269 }
18270
18271
18272 type StatusResponse struct {
18273 autorest.Response `json:"-"`
18274
18275 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
18276
18277 VaultID *string `json:"vaultId,omitempty"`
18278
18279 FabricName FabricName `json:"fabricName,omitempty"`
18280
18281 ContainerName *string `json:"containerName,omitempty"`
18282
18283 ProtectedItemName *string `json:"protectedItemName,omitempty"`
18284
18285 ErrorCode *string `json:"errorCode,omitempty"`
18286
18287 ErrorMessage *string `json:"errorMessage,omitempty"`
18288
18289 PolicyName *string `json:"policyName,omitempty"`
18290
18291 RegistrationStatus *string `json:"registrationStatus,omitempty"`
18292 }
18293
18294
18295 type SubProtectionPolicy struct {
18296
18297 PolicyType PolicyType `json:"policyType,omitempty"`
18298
18299 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
18300
18301 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
18302 }
18303
18304
18305 func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error {
18306 var m map[string]*json.RawMessage
18307 err := json.Unmarshal(body, &m)
18308 if err != nil {
18309 return err
18310 }
18311 for k, v := range m {
18312 switch k {
18313 case "policyType":
18314 if v != nil {
18315 var policyType PolicyType
18316 err = json.Unmarshal(*v, &policyType)
18317 if err != nil {
18318 return err
18319 }
18320 spp.PolicyType = policyType
18321 }
18322 case "schedulePolicy":
18323 if v != nil {
18324 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
18325 if err != nil {
18326 return err
18327 }
18328 spp.SchedulePolicy = schedulePolicy
18329 }
18330 case "retentionPolicy":
18331 if v != nil {
18332 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
18333 if err != nil {
18334 return err
18335 }
18336 spp.RetentionPolicy = retentionPolicy
18337 }
18338 }
18339 }
18340
18341 return nil
18342 }
18343
18344
18345 type TargetAFSRestoreInfo struct {
18346
18347 Name *string `json:"name,omitempty"`
18348
18349 TargetResourceID *string `json:"targetResourceId,omitempty"`
18350 }
18351
18352
18353 type TargetRestoreInfo struct {
18354
18355 OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"`
18356
18357 ContainerID *string `json:"containerId,omitempty"`
18358
18359 DatabaseName *string `json:"databaseName,omitempty"`
18360
18361 TargetDirectoryForFileRestore *string `json:"targetDirectoryForFileRestore,omitempty"`
18362 }
18363
18364
18365 type TokenInformation struct {
18366 autorest.Response `json:"-"`
18367
18368 Token *string `json:"token,omitempty"`
18369
18370 ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"`
18371
18372 SecurityPIN *string `json:"securityPIN,omitempty"`
18373 }
18374
18375
18376 type ValidateIaasVMRestoreOperationRequest struct {
18377
18378 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
18379
18380 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
18381 }
18382
18383
18384 func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) {
18385 vivror.ObjectType = ObjectTypeValidateIaasVMRestoreOperationRequest
18386 objectMap := make(map[string]interface{})
18387 objectMap["restoreRequest"] = vivror.RestoreRequest
18388 if vivror.ObjectType != "" {
18389 objectMap["objectType"] = vivror.ObjectType
18390 }
18391 return json.Marshal(objectMap)
18392 }
18393
18394
18395 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
18396 return &vivror, true
18397 }
18398
18399
18400 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
18401 return nil, false
18402 }
18403
18404
18405 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
18406 return &vivror, true
18407 }
18408
18409
18410 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
18411 return nil, false
18412 }
18413
18414
18415 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
18416 return &vivror, true
18417 }
18418
18419
18420 func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error {
18421 var m map[string]*json.RawMessage
18422 err := json.Unmarshal(body, &m)
18423 if err != nil {
18424 return err
18425 }
18426 for k, v := range m {
18427 switch k {
18428 case "restoreRequest":
18429 if v != nil {
18430 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
18431 if err != nil {
18432 return err
18433 }
18434 vivror.RestoreRequest = restoreRequest
18435 }
18436 case "objectType":
18437 if v != nil {
18438 var objectType ObjectTypeBasicValidateOperationRequest
18439 err = json.Unmarshal(*v, &objectType)
18440 if err != nil {
18441 return err
18442 }
18443 vivror.ObjectType = objectType
18444 }
18445 }
18446 }
18447
18448 return nil
18449 }
18450
18451
18452 type BasicValidateOperationRequest interface {
18453 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
18454 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
18455 AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool)
18456 AsValidateOperationRequest() (*ValidateOperationRequest, bool)
18457 }
18458
18459
18460 type ValidateOperationRequest struct {
18461
18462 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
18463 }
18464
18465 func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) {
18466 var m map[string]interface{}
18467 err := json.Unmarshal(body, &m)
18468 if err != nil {
18469 return nil, err
18470 }
18471
18472 switch m["objectType"] {
18473 case string(ObjectTypeValidateIaasVMRestoreOperationRequest):
18474 var vivror ValidateIaasVMRestoreOperationRequest
18475 err := json.Unmarshal(body, &vivror)
18476 return vivror, err
18477 case string(ObjectTypeValidateRestoreOperationRequest):
18478 var vror ValidateRestoreOperationRequest
18479 err := json.Unmarshal(body, &vror)
18480 return vror, err
18481 default:
18482 var vor ValidateOperationRequest
18483 err := json.Unmarshal(body, &vor)
18484 return vor, err
18485 }
18486 }
18487 func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) {
18488 var rawMessages []*json.RawMessage
18489 err := json.Unmarshal(body, &rawMessages)
18490 if err != nil {
18491 return nil, err
18492 }
18493
18494 vorArray := make([]BasicValidateOperationRequest, len(rawMessages))
18495
18496 for index, rawMessage := range rawMessages {
18497 vor, err := unmarshalBasicValidateOperationRequest(*rawMessage)
18498 if err != nil {
18499 return nil, err
18500 }
18501 vorArray[index] = vor
18502 }
18503 return vorArray, nil
18504 }
18505
18506
18507 func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) {
18508 vor.ObjectType = ObjectTypeValidateOperationRequest
18509 objectMap := make(map[string]interface{})
18510 if vor.ObjectType != "" {
18511 objectMap["objectType"] = vor.ObjectType
18512 }
18513 return json.Marshal(objectMap)
18514 }
18515
18516
18517 func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
18518 return nil, false
18519 }
18520
18521
18522 func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
18523 return nil, false
18524 }
18525
18526
18527 func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
18528 return nil, false
18529 }
18530
18531
18532 func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
18533 return &vor, true
18534 }
18535
18536
18537 func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
18538 return &vor, true
18539 }
18540
18541
18542 type ValidateOperationResponse struct {
18543
18544 ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"`
18545 }
18546
18547
18548 type ValidateOperationsResponse struct {
18549 autorest.Response `json:"-"`
18550 ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"`
18551 }
18552
18553
18554 type BasicValidateRestoreOperationRequest interface {
18555 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
18556 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
18557 }
18558
18559
18560 type ValidateRestoreOperationRequest struct {
18561
18562 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
18563
18564 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
18565 }
18566
18567 func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) {
18568 var m map[string]interface{}
18569 err := json.Unmarshal(body, &m)
18570 if err != nil {
18571 return nil, err
18572 }
18573
18574 switch m["objectType"] {
18575 case string(ObjectTypeValidateIaasVMRestoreOperationRequest):
18576 var vivror ValidateIaasVMRestoreOperationRequest
18577 err := json.Unmarshal(body, &vivror)
18578 return vivror, err
18579 default:
18580 var vror ValidateRestoreOperationRequest
18581 err := json.Unmarshal(body, &vror)
18582 return vror, err
18583 }
18584 }
18585 func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) {
18586 var rawMessages []*json.RawMessage
18587 err := json.Unmarshal(body, &rawMessages)
18588 if err != nil {
18589 return nil, err
18590 }
18591
18592 vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages))
18593
18594 for index, rawMessage := range rawMessages {
18595 vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage)
18596 if err != nil {
18597 return nil, err
18598 }
18599 vrorArray[index] = vror
18600 }
18601 return vrorArray, nil
18602 }
18603
18604
18605 func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) {
18606 vror.ObjectType = ObjectTypeValidateRestoreOperationRequest
18607 objectMap := make(map[string]interface{})
18608 objectMap["restoreRequest"] = vror.RestoreRequest
18609 if vror.ObjectType != "" {
18610 objectMap["objectType"] = vror.ObjectType
18611 }
18612 return json.Marshal(objectMap)
18613 }
18614
18615
18616 func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
18617 return nil, false
18618 }
18619
18620
18621 func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
18622 return &vror, true
18623 }
18624
18625
18626 func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
18627 return &vror, true
18628 }
18629
18630
18631 func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
18632 return nil, false
18633 }
18634
18635
18636 func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
18637 return &vror, true
18638 }
18639
18640
18641 func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error {
18642 var m map[string]*json.RawMessage
18643 err := json.Unmarshal(body, &m)
18644 if err != nil {
18645 return err
18646 }
18647 for k, v := range m {
18648 switch k {
18649 case "restoreRequest":
18650 if v != nil {
18651 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
18652 if err != nil {
18653 return err
18654 }
18655 vror.RestoreRequest = restoreRequest
18656 }
18657 case "objectType":
18658 if v != nil {
18659 var objectType ObjectTypeBasicValidateOperationRequest
18660 err = json.Unmarshal(*v, &objectType)
18661 if err != nil {
18662 return err
18663 }
18664 vror.ObjectType = objectType
18665 }
18666 }
18667 }
18668
18669 return nil
18670 }
18671
18672
18673 type WeeklyRetentionFormat struct {
18674
18675 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
18676
18677 WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"`
18678 }
18679
18680
18681 type WeeklyRetentionSchedule struct {
18682
18683 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
18684
18685 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
18686
18687 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
18688 }
18689
18690
18691 type WorkloadInquiryDetails struct {
18692
18693 Type *string `json:"type,omitempty"`
18694
18695 ItemCount *int64 `json:"itemCount,omitempty"`
18696
18697 InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"`
18698 }
18699
18700
18701 type BasicWorkloadItem interface {
18702 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
18703 AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool)
18704 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
18705 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
18706 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
18707 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
18708 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
18709 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
18710 AsWorkloadItem() (*WorkloadItem, bool)
18711 }
18712
18713
18714 type WorkloadItem struct {
18715
18716 BackupManagementType *string `json:"backupManagementType,omitempty"`
18717
18718 WorkloadType *string `json:"workloadType,omitempty"`
18719
18720 FriendlyName *string `json:"friendlyName,omitempty"`
18721
18722 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
18723
18724 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
18725 }
18726
18727 func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) {
18728 var m map[string]interface{}
18729 err := json.Unmarshal(body, &m)
18730 if err != nil {
18731 return nil, err
18732 }
18733
18734 switch m["workloadItemType"] {
18735 case string(WorkloadItemTypeAzureVMWorkloadItem):
18736 var avwi AzureVMWorkloadItem
18737 err := json.Unmarshal(body, &avwi)
18738 return avwi, err
18739 case string(WorkloadItemTypeSAPAseDatabase1):
18740 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
18741 err := json.Unmarshal(body, &avwsadwi)
18742 return avwsadwi, err
18743 case string(WorkloadItemTypeSAPAseSystem1):
18744 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
18745 err := json.Unmarshal(body, &avwsaswi)
18746 return avwsaswi, err
18747 case string(WorkloadItemTypeSAPHanaDatabase1):
18748 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
18749 err := json.Unmarshal(body, &avwshdwi)
18750 return avwshdwi, err
18751 case string(WorkloadItemTypeSAPHanaSystem1):
18752 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
18753 err := json.Unmarshal(body, &avwshswi)
18754 return avwshswi, err
18755 case string(WorkloadItemTypeSQLDataBase1):
18756 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
18757 err := json.Unmarshal(body, &avwsdwi)
18758 return avwsdwi, err
18759 case string(WorkloadItemTypeSQLInstance1):
18760 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
18761 err := json.Unmarshal(body, &avwsiwi)
18762 return avwsiwi, err
18763 default:
18764 var wi WorkloadItem
18765 err := json.Unmarshal(body, &wi)
18766 return wi, err
18767 }
18768 }
18769 func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) {
18770 var rawMessages []*json.RawMessage
18771 err := json.Unmarshal(body, &rawMessages)
18772 if err != nil {
18773 return nil, err
18774 }
18775
18776 wiArray := make([]BasicWorkloadItem, len(rawMessages))
18777
18778 for index, rawMessage := range rawMessages {
18779 wi, err := unmarshalBasicWorkloadItem(*rawMessage)
18780 if err != nil {
18781 return nil, err
18782 }
18783 wiArray[index] = wi
18784 }
18785 return wiArray, nil
18786 }
18787
18788
18789 func (wi WorkloadItem) MarshalJSON() ([]byte, error) {
18790 wi.WorkloadItemType = WorkloadItemTypeWorkloadItem
18791 objectMap := make(map[string]interface{})
18792 if wi.BackupManagementType != nil {
18793 objectMap["backupManagementType"] = wi.BackupManagementType
18794 }
18795 if wi.WorkloadType != nil {
18796 objectMap["workloadType"] = wi.WorkloadType
18797 }
18798 if wi.FriendlyName != nil {
18799 objectMap["friendlyName"] = wi.FriendlyName
18800 }
18801 if wi.ProtectionState != "" {
18802 objectMap["protectionState"] = wi.ProtectionState
18803 }
18804 if wi.WorkloadItemType != "" {
18805 objectMap["workloadItemType"] = wi.WorkloadItemType
18806 }
18807 return json.Marshal(objectMap)
18808 }
18809
18810
18811 func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
18812 return nil, false
18813 }
18814
18815
18816 func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
18817 return nil, false
18818 }
18819
18820
18821 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
18822 return nil, false
18823 }
18824
18825
18826 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
18827 return nil, false
18828 }
18829
18830
18831 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
18832 return nil, false
18833 }
18834
18835
18836 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
18837 return nil, false
18838 }
18839
18840
18841 func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
18842 return nil, false
18843 }
18844
18845
18846 func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
18847 return nil, false
18848 }
18849
18850
18851 func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
18852 return &wi, true
18853 }
18854
18855
18856 func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
18857 return &wi, true
18858 }
18859
18860
18861
18862 type WorkloadItemResource struct {
18863
18864 Properties BasicWorkloadItem `json:"properties,omitempty"`
18865
18866 ID *string `json:"id,omitempty"`
18867
18868 Name *string `json:"name,omitempty"`
18869
18870 Type *string `json:"type,omitempty"`
18871
18872 Location *string `json:"location,omitempty"`
18873
18874 Tags map[string]*string `json:"tags"`
18875
18876 ETag *string `json:"eTag,omitempty"`
18877 }
18878
18879
18880 func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) {
18881 objectMap := make(map[string]interface{})
18882 objectMap["properties"] = wir.Properties
18883 if wir.Location != nil {
18884 objectMap["location"] = wir.Location
18885 }
18886 if wir.Tags != nil {
18887 objectMap["tags"] = wir.Tags
18888 }
18889 if wir.ETag != nil {
18890 objectMap["eTag"] = wir.ETag
18891 }
18892 return json.Marshal(objectMap)
18893 }
18894
18895
18896 func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error {
18897 var m map[string]*json.RawMessage
18898 err := json.Unmarshal(body, &m)
18899 if err != nil {
18900 return err
18901 }
18902 for k, v := range m {
18903 switch k {
18904 case "properties":
18905 if v != nil {
18906 properties, err := unmarshalBasicWorkloadItem(*v)
18907 if err != nil {
18908 return err
18909 }
18910 wir.Properties = properties
18911 }
18912 case "id":
18913 if v != nil {
18914 var ID string
18915 err = json.Unmarshal(*v, &ID)
18916 if err != nil {
18917 return err
18918 }
18919 wir.ID = &ID
18920 }
18921 case "name":
18922 if v != nil {
18923 var name string
18924 err = json.Unmarshal(*v, &name)
18925 if err != nil {
18926 return err
18927 }
18928 wir.Name = &name
18929 }
18930 case "type":
18931 if v != nil {
18932 var typeVar string
18933 err = json.Unmarshal(*v, &typeVar)
18934 if err != nil {
18935 return err
18936 }
18937 wir.Type = &typeVar
18938 }
18939 case "location":
18940 if v != nil {
18941 var location string
18942 err = json.Unmarshal(*v, &location)
18943 if err != nil {
18944 return err
18945 }
18946 wir.Location = &location
18947 }
18948 case "tags":
18949 if v != nil {
18950 var tags map[string]*string
18951 err = json.Unmarshal(*v, &tags)
18952 if err != nil {
18953 return err
18954 }
18955 wir.Tags = tags
18956 }
18957 case "eTag":
18958 if v != nil {
18959 var eTag string
18960 err = json.Unmarshal(*v, &eTag)
18961 if err != nil {
18962 return err
18963 }
18964 wir.ETag = &eTag
18965 }
18966 }
18967 }
18968
18969 return nil
18970 }
18971
18972
18973 type WorkloadItemResourceList struct {
18974 autorest.Response `json:"-"`
18975
18976 Value *[]WorkloadItemResource `json:"value,omitempty"`
18977
18978 NextLink *string `json:"nextLink,omitempty"`
18979 }
18980
18981
18982 type WorkloadItemResourceListIterator struct {
18983 i int
18984 page WorkloadItemResourceListPage
18985 }
18986
18987
18988
18989 func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18990 if tracing.IsEnabled() {
18991 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext")
18992 defer func() {
18993 sc := -1
18994 if iter.Response().Response.Response != nil {
18995 sc = iter.Response().Response.Response.StatusCode
18996 }
18997 tracing.EndSpan(ctx, sc, err)
18998 }()
18999 }
19000 iter.i++
19001 if iter.i < len(iter.page.Values()) {
19002 return nil
19003 }
19004 err = iter.page.NextWithContext(ctx)
19005 if err != nil {
19006 iter.i--
19007 return err
19008 }
19009 iter.i = 0
19010 return nil
19011 }
19012
19013
19014
19015
19016 func (iter *WorkloadItemResourceListIterator) Next() error {
19017 return iter.NextWithContext(context.Background())
19018 }
19019
19020
19021 func (iter WorkloadItemResourceListIterator) NotDone() bool {
19022 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19023 }
19024
19025
19026 func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList {
19027 return iter.page.Response()
19028 }
19029
19030
19031
19032 func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource {
19033 if !iter.page.NotDone() {
19034 return WorkloadItemResource{}
19035 }
19036 return iter.page.Values()[iter.i]
19037 }
19038
19039
19040 func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator {
19041 return WorkloadItemResourceListIterator{page: page}
19042 }
19043
19044
19045 func (wirl WorkloadItemResourceList) IsEmpty() bool {
19046 return wirl.Value == nil || len(*wirl.Value) == 0
19047 }
19048
19049
19050 func (wirl WorkloadItemResourceList) hasNextLink() bool {
19051 return wirl.NextLink != nil && len(*wirl.NextLink) != 0
19052 }
19053
19054
19055
19056 func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
19057 if !wirl.hasNextLink() {
19058 return nil, nil
19059 }
19060 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19061 autorest.AsJSON(),
19062 autorest.AsGet(),
19063 autorest.WithBaseURL(to.String(wirl.NextLink)))
19064 }
19065
19066
19067 type WorkloadItemResourceListPage struct {
19068 fn func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)
19069 wirl WorkloadItemResourceList
19070 }
19071
19072
19073
19074 func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
19075 if tracing.IsEnabled() {
19076 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext")
19077 defer func() {
19078 sc := -1
19079 if page.Response().Response.Response != nil {
19080 sc = page.Response().Response.Response.StatusCode
19081 }
19082 tracing.EndSpan(ctx, sc, err)
19083 }()
19084 }
19085 for {
19086 next, err := page.fn(ctx, page.wirl)
19087 if err != nil {
19088 return err
19089 }
19090 page.wirl = next
19091 if !next.hasNextLink() || !next.IsEmpty() {
19092 break
19093 }
19094 }
19095 return nil
19096 }
19097
19098
19099
19100
19101 func (page *WorkloadItemResourceListPage) Next() error {
19102 return page.NextWithContext(context.Background())
19103 }
19104
19105
19106 func (page WorkloadItemResourceListPage) NotDone() bool {
19107 return !page.wirl.IsEmpty()
19108 }
19109
19110
19111 func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList {
19112 return page.wirl
19113 }
19114
19115
19116 func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource {
19117 if page.wirl.IsEmpty() {
19118 return nil
19119 }
19120 return *page.wirl.Value
19121 }
19122
19123
19124 func NewWorkloadItemResourceListPage(cur WorkloadItemResourceList, getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage {
19125 return WorkloadItemResourceListPage{
19126 fn: getNextPage,
19127 wirl: cur,
19128 }
19129 }
19130
19131
19132 type BasicWorkloadProtectableItem interface {
19133 AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool)
19134 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
19135 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
19136 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
19137 AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool)
19138 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
19139 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
19140 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
19141 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
19142 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
19143 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
19144 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
19145 AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool)
19146 AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool)
19147 }
19148
19149
19150
19151 type WorkloadProtectableItem struct {
19152
19153 BackupManagementType *string `json:"backupManagementType,omitempty"`
19154
19155 WorkloadType *string `json:"workloadType,omitempty"`
19156
19157 FriendlyName *string `json:"friendlyName,omitempty"`
19158
19159 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
19160
19161 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
19162 }
19163
19164 func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) {
19165 var m map[string]interface{}
19166 err := json.Unmarshal(body, &m)
19167 if err != nil {
19168 return nil, err
19169 }
19170
19171 switch m["protectableItemType"] {
19172 case string(ProtectableItemTypeAzureFileShare):
19173 var afspi AzureFileShareProtectableItem
19174 err := json.Unmarshal(body, &afspi)
19175 return afspi, err
19176 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
19177 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
19178 err := json.Unmarshal(body, &aisccvpi)
19179 return aisccvpi, err
19180 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
19181 var aiscvpi AzureIaaSComputeVMProtectableItem
19182 err := json.Unmarshal(body, &aiscvpi)
19183 return aiscvpi, err
19184 case string(ProtectableItemTypeAzureVMWorkloadProtectableItem):
19185 var avwpi AzureVMWorkloadProtectableItem
19186 err := json.Unmarshal(body, &avwpi)
19187 return avwpi, err
19188 case string(ProtectableItemTypeSAPAseSystem):
19189 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
19190 err := json.Unmarshal(body, &avwsaspi)
19191 return avwsaspi, err
19192 case string(ProtectableItemTypeSAPHanaDatabase):
19193 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
19194 err := json.Unmarshal(body, &avwshdpi)
19195 return avwshdpi, err
19196 case string(ProtectableItemTypeSAPHanaSystem):
19197 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
19198 err := json.Unmarshal(body, &avwshspi)
19199 return avwshspi, err
19200 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
19201 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
19202 err := json.Unmarshal(body, &avwsagpi)
19203 return avwsagpi, err
19204 case string(ProtectableItemTypeSQLDataBase):
19205 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
19206 err := json.Unmarshal(body, &avwsdpi)
19207 return avwsdpi, err
19208 case string(ProtectableItemTypeSQLInstance):
19209 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
19210 err := json.Unmarshal(body, &avwsipi)
19211 return avwsipi, err
19212 case string(ProtectableItemTypeIaaSVMProtectableItem):
19213 var ispi IaaSVMProtectableItem
19214 err := json.Unmarshal(body, &ispi)
19215 return ispi, err
19216 default:
19217 var wpi WorkloadProtectableItem
19218 err := json.Unmarshal(body, &wpi)
19219 return wpi, err
19220 }
19221 }
19222 func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) {
19223 var rawMessages []*json.RawMessage
19224 err := json.Unmarshal(body, &rawMessages)
19225 if err != nil {
19226 return nil, err
19227 }
19228
19229 wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages))
19230
19231 for index, rawMessage := range rawMessages {
19232 wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage)
19233 if err != nil {
19234 return nil, err
19235 }
19236 wpiArray[index] = wpi
19237 }
19238 return wpiArray, nil
19239 }
19240
19241
19242 func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) {
19243 wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem
19244 objectMap := make(map[string]interface{})
19245 if wpi.BackupManagementType != nil {
19246 objectMap["backupManagementType"] = wpi.BackupManagementType
19247 }
19248 if wpi.WorkloadType != nil {
19249 objectMap["workloadType"] = wpi.WorkloadType
19250 }
19251 if wpi.FriendlyName != nil {
19252 objectMap["friendlyName"] = wpi.FriendlyName
19253 }
19254 if wpi.ProtectionState != "" {
19255 objectMap["protectionState"] = wpi.ProtectionState
19256 }
19257 if wpi.ProtectableItemType != "" {
19258 objectMap["protectableItemType"] = wpi.ProtectableItemType
19259 }
19260 return json.Marshal(objectMap)
19261 }
19262
19263
19264 func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
19265 return nil, false
19266 }
19267
19268
19269 func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
19270 return nil, false
19271 }
19272
19273
19274 func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
19275 return nil, false
19276 }
19277
19278
19279 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
19280 return nil, false
19281 }
19282
19283
19284 func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
19285 return nil, false
19286 }
19287
19288
19289 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
19290 return nil, false
19291 }
19292
19293
19294 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
19295 return nil, false
19296 }
19297
19298
19299 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
19300 return nil, false
19301 }
19302
19303
19304 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
19305 return nil, false
19306 }
19307
19308
19309 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
19310 return nil, false
19311 }
19312
19313
19314 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
19315 return nil, false
19316 }
19317
19318
19319 func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
19320 return nil, false
19321 }
19322
19323
19324 func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
19325 return nil, false
19326 }
19327
19328
19329 func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
19330 return &wpi, true
19331 }
19332
19333
19334 func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
19335 return &wpi, true
19336 }
19337
19338
19339
19340 type WorkloadProtectableItemResource struct {
19341
19342 Properties BasicWorkloadProtectableItem `json:"properties,omitempty"`
19343
19344 ID *string `json:"id,omitempty"`
19345
19346 Name *string `json:"name,omitempty"`
19347
19348 Type *string `json:"type,omitempty"`
19349
19350 Location *string `json:"location,omitempty"`
19351
19352 Tags map[string]*string `json:"tags"`
19353
19354 ETag *string `json:"eTag,omitempty"`
19355 }
19356
19357
19358 func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) {
19359 objectMap := make(map[string]interface{})
19360 objectMap["properties"] = wpir.Properties
19361 if wpir.Location != nil {
19362 objectMap["location"] = wpir.Location
19363 }
19364 if wpir.Tags != nil {
19365 objectMap["tags"] = wpir.Tags
19366 }
19367 if wpir.ETag != nil {
19368 objectMap["eTag"] = wpir.ETag
19369 }
19370 return json.Marshal(objectMap)
19371 }
19372
19373
19374 func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error {
19375 var m map[string]*json.RawMessage
19376 err := json.Unmarshal(body, &m)
19377 if err != nil {
19378 return err
19379 }
19380 for k, v := range m {
19381 switch k {
19382 case "properties":
19383 if v != nil {
19384 properties, err := unmarshalBasicWorkloadProtectableItem(*v)
19385 if err != nil {
19386 return err
19387 }
19388 wpir.Properties = properties
19389 }
19390 case "id":
19391 if v != nil {
19392 var ID string
19393 err = json.Unmarshal(*v, &ID)
19394 if err != nil {
19395 return err
19396 }
19397 wpir.ID = &ID
19398 }
19399 case "name":
19400 if v != nil {
19401 var name string
19402 err = json.Unmarshal(*v, &name)
19403 if err != nil {
19404 return err
19405 }
19406 wpir.Name = &name
19407 }
19408 case "type":
19409 if v != nil {
19410 var typeVar string
19411 err = json.Unmarshal(*v, &typeVar)
19412 if err != nil {
19413 return err
19414 }
19415 wpir.Type = &typeVar
19416 }
19417 case "location":
19418 if v != nil {
19419 var location string
19420 err = json.Unmarshal(*v, &location)
19421 if err != nil {
19422 return err
19423 }
19424 wpir.Location = &location
19425 }
19426 case "tags":
19427 if v != nil {
19428 var tags map[string]*string
19429 err = json.Unmarshal(*v, &tags)
19430 if err != nil {
19431 return err
19432 }
19433 wpir.Tags = tags
19434 }
19435 case "eTag":
19436 if v != nil {
19437 var eTag string
19438 err = json.Unmarshal(*v, &eTag)
19439 if err != nil {
19440 return err
19441 }
19442 wpir.ETag = &eTag
19443 }
19444 }
19445 }
19446
19447 return nil
19448 }
19449
19450
19451 type WorkloadProtectableItemResourceList struct {
19452 autorest.Response `json:"-"`
19453
19454 Value *[]WorkloadProtectableItemResource `json:"value,omitempty"`
19455
19456 NextLink *string `json:"nextLink,omitempty"`
19457 }
19458
19459
19460
19461 type WorkloadProtectableItemResourceListIterator struct {
19462 i int
19463 page WorkloadProtectableItemResourceListPage
19464 }
19465
19466
19467
19468 func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19469 if tracing.IsEnabled() {
19470 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext")
19471 defer func() {
19472 sc := -1
19473 if iter.Response().Response.Response != nil {
19474 sc = iter.Response().Response.Response.StatusCode
19475 }
19476 tracing.EndSpan(ctx, sc, err)
19477 }()
19478 }
19479 iter.i++
19480 if iter.i < len(iter.page.Values()) {
19481 return nil
19482 }
19483 err = iter.page.NextWithContext(ctx)
19484 if err != nil {
19485 iter.i--
19486 return err
19487 }
19488 iter.i = 0
19489 return nil
19490 }
19491
19492
19493
19494
19495 func (iter *WorkloadProtectableItemResourceListIterator) Next() error {
19496 return iter.NextWithContext(context.Background())
19497 }
19498
19499
19500 func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool {
19501 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19502 }
19503
19504
19505 func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList {
19506 return iter.page.Response()
19507 }
19508
19509
19510
19511 func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource {
19512 if !iter.page.NotDone() {
19513 return WorkloadProtectableItemResource{}
19514 }
19515 return iter.page.Values()[iter.i]
19516 }
19517
19518
19519 func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator {
19520 return WorkloadProtectableItemResourceListIterator{page: page}
19521 }
19522
19523
19524 func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool {
19525 return wpirl.Value == nil || len(*wpirl.Value) == 0
19526 }
19527
19528
19529 func (wpirl WorkloadProtectableItemResourceList) hasNextLink() bool {
19530 return wpirl.NextLink != nil && len(*wpirl.NextLink) != 0
19531 }
19532
19533
19534
19535 func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
19536 if !wpirl.hasNextLink() {
19537 return nil, nil
19538 }
19539 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19540 autorest.AsJSON(),
19541 autorest.AsGet(),
19542 autorest.WithBaseURL(to.String(wpirl.NextLink)))
19543 }
19544
19545
19546 type WorkloadProtectableItemResourceListPage struct {
19547 fn func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)
19548 wpirl WorkloadProtectableItemResourceList
19549 }
19550
19551
19552
19553 func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
19554 if tracing.IsEnabled() {
19555 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext")
19556 defer func() {
19557 sc := -1
19558 if page.Response().Response.Response != nil {
19559 sc = page.Response().Response.Response.StatusCode
19560 }
19561 tracing.EndSpan(ctx, sc, err)
19562 }()
19563 }
19564 for {
19565 next, err := page.fn(ctx, page.wpirl)
19566 if err != nil {
19567 return err
19568 }
19569 page.wpirl = next
19570 if !next.hasNextLink() || !next.IsEmpty() {
19571 break
19572 }
19573 }
19574 return nil
19575 }
19576
19577
19578
19579
19580 func (page *WorkloadProtectableItemResourceListPage) Next() error {
19581 return page.NextWithContext(context.Background())
19582 }
19583
19584
19585 func (page WorkloadProtectableItemResourceListPage) NotDone() bool {
19586 return !page.wpirl.IsEmpty()
19587 }
19588
19589
19590 func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList {
19591 return page.wpirl
19592 }
19593
19594
19595 func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource {
19596 if page.wpirl.IsEmpty() {
19597 return nil
19598 }
19599 return *page.wpirl.Value
19600 }
19601
19602
19603 func NewWorkloadProtectableItemResourceListPage(cur WorkloadProtectableItemResourceList, getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage {
19604 return WorkloadProtectableItemResourceListPage{
19605 fn: getNextPage,
19606 wpirl: cur,
19607 }
19608 }
19609
19610
19611 type YearlyRetentionSchedule struct {
19612
19613 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
19614
19615 MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"`
19616
19617 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
19618
19619 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
19620
19621 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
19622
19623 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
19624 }
19625
View as plain text